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
@POST @Path("/{cluster-id}/services/start") public void startAllClusterServices(HttpRequest request, HttpResponder responder, @PathParam("cluster-id") String clusterId) { requestServiceAction(request, responder, clusterId, null, ClusterAction.START_SERVICES); }
@Path(STR) void function(HttpRequest request, HttpResponder responder, @PathParam(STR) String clusterId) { requestServiceAction(request, responder, clusterId, null, ClusterAction.START_SERVICES); }
/** * Starts all services on the cluster, taking into account service dependencies for order of service starts. * * @param request Request to start cluster services. * @param responder Responder for sending the response. * @param clusterId Id of the cluster whose services should be started. */
Starts all services on the cluster, taking into account service dependencies for order of service starts
startAllClusterServices
{ "repo_name": "awholegunch/loom", "path": "server/src/main/java/com/continuuity/loom/http/handler/ClusterHandler.java", "license": "apache-2.0", "size": 33669 }
[ "com.continuuity.http.HttpResponder", "com.continuuity.loom.scheduler.ClusterAction", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "org.jboss.netty.handler.codec.http.HttpRequest" ]
import com.continuuity.http.HttpResponder; import com.continuuity.loom.scheduler.ClusterAction; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jboss.netty.handler.codec.http.HttpRequest;
import com.continuuity.http.*; import com.continuuity.loom.scheduler.*; import javax.ws.rs.*; import org.jboss.netty.handler.codec.http.*;
[ "com.continuuity.http", "com.continuuity.loom", "javax.ws", "org.jboss.netty" ]
com.continuuity.http; com.continuuity.loom; javax.ws; org.jboss.netty;
1,158,050
private static void getAllFiles(File sourceDirectory, List<File> fileList) { File[] files = sourceDirectory.listFiles(); if (files != null) { for (File file : files) { fileList.add(file); if (file.isDirectory()) { getAllFiles(file, file...
static void function(File sourceDirectory, List<File> fileList) { File[] files = sourceDirectory.listFiles(); if (files != null) { for (File file : files) { fileList.add(file); if (file.isDirectory()) { getAllFiles(file, fileList); } } } }
/** * Retrieve all the files included in the source directory to be archived * * @param sourceDirectory Source directory * @param fileList List of files */
Retrieve all the files included in the source directory to be archived
getAllFiles
{ "repo_name": "ajanthan/wso2apim-soap-api-importer", "path": "src/main/java/org/wso2/apim/tools/ZipUtil.java", "license": "apache-2.0", "size": 3597 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
184,406
public Map<String, Blob> getExtensions() { return extensions; }
Map<String, Blob> function() { return extensions; }
/** * Returns the extension BLOBs. * @return the extensions * @since 0.8.0 */
Returns the extension BLOBs
getExtensions
{ "repo_name": "asakusafw/asakusafw", "path": "yaess-project/asakusa-yaess-core/src/main/java/com/asakusafw/yaess/core/ExecutionContext.java", "license": "apache-2.0", "size": 7316 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,727,747
public List<String> getJsFiles() { return Collections.unmodifiableList(jsFiles); }
List<String> function() { return Collections.unmodifiableList(jsFiles); }
/** Returns an unmodifiable list of JavaScript files included in this * resource. * * @return A valid list of files, never null. */
Returns an unmodifiable list of JavaScript files included in this resource
getJsFiles
{ "repo_name": "seykron/webjars-utils", "path": "spring-webjars/src/main/java/com/github/seykron/webjars/WebJarResource.java", "license": "apache-2.0", "size": 6703 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
707,180
@Override public void setSelectedValue(final String aValue) { if (aValue == null) { selectedItemIndex = -1; selectedItemKey = null; selectedItemValue = null; } else { int newSelectedIndex = findValueIndex(aValue); if (newSelectedIndex == -1) { newSelectedIndex = findKeyIndex(aValue); if (...
void function(final String aValue) { if (aValue == null) { selectedItemIndex = -1; selectedItemKey = null; selectedItemValue = null; } else { int newSelectedIndex = findValueIndex(aValue); if (newSelectedIndex == -1) { newSelectedIndex = findKeyIndex(aValue); if (newSelectedIndex == -1) { add(aValue, generateCustomValu...
/** * Sets the selected value. If the {@link String} is not in the list of * values, a new custom entry is generated. * * @param aValue the new selected item. */
Sets the selected value. If the <code>String</code> is not in the list of values, a new custom entry is generated
setSelectedValue
{ "repo_name": "valib/UniversalMediaServer", "path": "src/main/java/net/pms/util/KeyedStringComboBoxModel.java", "license": "gpl-2.0", "size": 4658 }
[ "javax.swing.event.ListDataEvent" ]
import javax.swing.event.ListDataEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,535,006
@Deprecated //FIXME: Lo vamos a reemplazar por un metodo que solamente se encargue de actualizar las predicciones para la fecha actual public void updatePlayerPredictions(Competition competition) { Collection<Player> players = getDao().getPlayersInCompetition(competition); if (players!=null){ Iterator<...
void function(Competition competition) { Collection<Player> players = getDao().getPlayersInCompetition(competition); if (players!=null){ Iterator<Player> it = players.iterator(); while (it.hasNext()) { Player player = (Player) it.next(); this.getPredictionForPlayer(player, competition); } } }
/** * Setea un valor por default a las predicciones de los jugadores que todavia no han pronosticado vencido el plazo * @param competition */
Setea un valor por default a las predicciones de los jugadores que todavia no han pronosticado vencido el plazo
updatePlayerPredictions
{ "repo_name": "llarreta/larretasources", "path": "ProdeWeb/src/main/java/ar/com/larreta/prode/services/impl/CompetitionServiceImpl.java", "license": "apache-2.0", "size": 23772 }
[ "ar.com.larreta.prode.domain.Competition", "ar.com.larreta.prode.domain.Player", "java.util.Collection", "java.util.Iterator" ]
import ar.com.larreta.prode.domain.Competition; import ar.com.larreta.prode.domain.Player; import java.util.Collection; import java.util.Iterator;
import ar.com.larreta.prode.domain.*; import java.util.*;
[ "ar.com.larreta", "java.util" ]
ar.com.larreta; java.util;
85,877
public static UUID getUUID(Player player) { return getUUID(player.getName(), player.getUniqueId()); }
static UUID function(Player player) { return getUUID(player.getName(), player.getUniqueId()); }
/** * Get UUID for player. * * @param player to get UUID for * @return UUID */
Get UUID for player
getUUID
{ "repo_name": "lenis0012/LoginSecurity-2", "path": "src/main/java/com/lenis0012/bukkit/loginsecurity/util/ProfileUtil.java", "license": "apache-2.0", "size": 2246 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
2,103,945
@Override public ResourceStatistics getStatistics(String location, Job job) throws IOException { return null; }
ResourceStatistics function(String location, Job job) throws IOException { return null; }
/** * This implementation returns {@code null}. * * @see org.apache.pig.LoadMetadata#getStatistics(java.lang.String, * org.apache.hadoop.mapreduce.Job) */
This implementation returns null
getStatistics
{ "repo_name": "ketralnis/elephant-bird", "path": "src/java/com/twitter/elephantbird/pig/load/SequenceFileLoader.java", "license": "apache-2.0", "size": 16786 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.Job", "org.apache.pig.ResourceStatistics" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.Job; import org.apache.pig.ResourceStatistics;
import java.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.pig.*;
[ "java.io", "org.apache.hadoop", "org.apache.pig" ]
java.io; org.apache.hadoop; org.apache.pig;
2,313,874
private Queue<FileSystemEvent> acceptableFiles(Queue<FileSystemEvent> events) { updateTask("Recognize file type"); Queue<FileSystemEvent> accepted = new LinkedList<FileSystemEvent>(); for (FileSystemEvent event : events) { String fileType = getFileType(event); if (ACC...
Queue<FileSystemEvent> function(Queue<FileSystemEvent> events) { updateTask(STR); Queue<FileSystemEvent> accepted = new LinkedList<FileSystemEvent>(); for (FileSystemEvent event : events) { String fileType = getFileType(event); if (ACCEPTED_FILE_TYPES.contains(fileType) && !configuration.getSkippedTypes().contains(file...
/** * Gets the list of received file events, filtering out those not correct for this action. * * @param events * @return */
Gets the list of received file events, filtering out those not correct for this action
acceptableFiles
{ "repo_name": "mariolfigueiredo/Local", "path": "src/actions/ds2ds/src/main/java/it/geosolutions/geobatch/actions/ds2ds/Ds2dsAction.java", "license": "gpl-3.0", "size": 19646 }
[ "it.geosolutions.filesystemmonitor.monitor.FileSystemEvent", "java.util.LinkedList", "java.util.Queue" ]
import it.geosolutions.filesystemmonitor.monitor.FileSystemEvent; import java.util.LinkedList; import java.util.Queue;
import it.geosolutions.filesystemmonitor.monitor.*; import java.util.*;
[ "it.geosolutions.filesystemmonitor", "java.util" ]
it.geosolutions.filesystemmonitor; java.util;
1,028,477
public void onMotionInput(InputDevice device, InputDevice.MotionRange motionRange, char axisDir) { String bindStr = "Device '" + device.getDescriptor() + "'-Axis " + motionRange.getAxis() + axisDir; String uiString = device.getName() + ": Axis " + motionRange.getAxis() + axisDir; s...
void function(InputDevice device, InputDevice.MotionRange motionRange, char axisDir) { String bindStr = STR + device.getDescriptor() + STR + motionRange.getAxis() + axisDir; String uiString = device.getName() + STR + motionRange.getAxis() + axisDir; setValue(bindStr, uiString); }
/** * Saves the provided motion input setting both to the INI file (so native code can use it) and as * an Android preference (so it persists correctly and is human-readable.) * * @param device InputDevice from which the input event originated. * @param motionRange MotionRange of the movement * @...
Saves the provided motion input setting both to the INI file (so native code can use it) and as an Android preference (so it persists correctly and is human-readable.)
onMotionInput
{ "repo_name": "aliaspider/dolphin", "path": "Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputBindingSetting.java", "license": "gpl-2.0", "size": 3351 }
[ "android.view.InputDevice" ]
import android.view.InputDevice;
import android.view.*;
[ "android.view" ]
android.view;
699,112
public void updateQueue(Printers queue) { if (queue != null) { super.updateContent(); adapter.setPrintQueue(queue); } }
void function(Printers queue) { if (queue != null) { super.updateContent(); adapter.setPrintQueue(queue); } }
/** * Updates the printer queue list. * * @param queue The queue information. */
Updates the printer queue list
updateQueue
{ "repo_name": "arkon/CDFLabs", "path": "app/src/main/java/me/echeung/cdflabs/ui/fragments/PrintersFragment.java", "license": "mit", "size": 3434 }
[ "me.echeung.cdflabs.printers.Printers" ]
import me.echeung.cdflabs.printers.Printers;
import me.echeung.cdflabs.printers.*;
[ "me.echeung.cdflabs" ]
me.echeung.cdflabs;
1,476,841
@Test public void testExecuteWithStellarMap() { final String expected = "{foo=2, key=val}"; InterpreterResult result = interpreter.interpret("{ 'foo':2, 'key':'val' }", context); // validate the result assertEquals(InterpreterResult.Code.SUCCESS, result.code()); assertEquals(1, result.message()...
void function() { final String expected = STR; InterpreterResult result = interpreter.interpret(STR, context); assertEquals(InterpreterResult.Code.SUCCESS, result.code()); assertEquals(1, result.message().size()); InterpreterResultMessage message = result.message().get(0); assertEquals(expected, message.getData()); ass...
/** * Ensure that Stellar maps are displayed correctly in Zeppelin. */
Ensure that Stellar maps are displayed correctly in Zeppelin
testExecuteWithStellarMap
{ "repo_name": "mattf-horton/incubator-metron", "path": "metron-stellar/stellar-zeppelin/src/test/java/org/apache/metron/stellar/zeppelin/StellarInterpreterTest.java", "license": "apache-2.0", "size": 6345 }
[ "org.apache.zeppelin.interpreter.InterpreterResult", "org.apache.zeppelin.interpreter.InterpreterResultMessage", "org.junit.Assert" ]
import org.apache.zeppelin.interpreter.InterpreterResult; import org.apache.zeppelin.interpreter.InterpreterResultMessage; import org.junit.Assert;
import org.apache.zeppelin.interpreter.*; import org.junit.*;
[ "org.apache.zeppelin", "org.junit" ]
org.apache.zeppelin; org.junit;
2,186,253
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } return Objects.equals(this.value, ((NavAidChnl) obj).getValue()); }
boolean function(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } return Objects.equals(this.value, ((NavAidChnl) obj).getValue()); }
/** * Equality is based upon the value. * <p> * @param obj the other object to compare. * @return TRUE if the values match exactly. */
Equality is based upon the value.
equals
{ "repo_name": "KeyBridge/lib-openssrf", "path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/metadata/domains/NavAidChnl.java", "license": "apache-2.0", "size": 3959 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
994,804
public QuerySearchResult queryResult() { return null; } public FetchSearchResult fetchResult() { return null; }
QuerySearchResult function() { return null; } public FetchSearchResult fetchResult() { return null; }
/** * Returns the query result iff it's included in this response otherwise <code>null</code> */
Returns the query result iff it's included in this response otherwise <code>null</code>
queryResult
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/SearchPhaseResult.java", "license": "apache-2.0", "size": 3727 }
[ "org.elasticsearch.search.fetch.FetchSearchResult", "org.elasticsearch.search.query.QuerySearchResult" ]
import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.query.QuerySearchResult;
import org.elasticsearch.search.fetch.*; import org.elasticsearch.search.query.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,107,805
List<String> getAllOntologiesIds();
List<String> getAllOntologiesIds();
/** * Retrieves all ontologies ids. * * @return String Ontology Id */
Retrieves all ontologies ids
getAllOntologiesIds
{ "repo_name": "joerivandervelde/molgenis", "path": "molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/service/OntologyService.java", "license": "lgpl-3.0", "size": 2438 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,094,143
public void removebiboPresentedat(Document value) { Base.remove(this.model, this.getResource(), PRESENTEDAT, value); }
void function(Document value) { Base.remove(this.model, this.getResource(), PRESENTEDAT, value); }
/** * Removes a value of property Presentedat given as an instance of Document * @param value the value to be removed * * [Generated from RDFReactor template rule #remove4dynamic] */
Removes a value of property Presentedat given as an instance of Document
removebiboPresentedat
{ "repo_name": "alexgarciac/testbiotea", "path": "src/ws/biotea/ld2rdf/rdf/model/bibo/BiboEvent.java", "license": "apache-2.0", "size": 20852 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
1,725,744
public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgum...
void function(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( STR); } } super.add(new OHLCItem(period, open, high,...
/** * Adds a data item to the series. * * @param period the period. * @param open the open-value. * @param high the high-value. * @param low the low-value. * @param close the close-value. */
Adds a data item to the series
add
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/data/time/ohlc/OHLCSeries.java", "license": "lgpl-2.1", "size": 3796 }
[ "org.jfree.data.time.RegularTimePeriod" ]
import org.jfree.data.time.RegularTimePeriod;
import org.jfree.data.time.*;
[ "org.jfree.data" ]
org.jfree.data;
2,718,994
Integer changePasswordsAtLogonAndSendEmails(List<UUID> userIds);
Integer changePasswordsAtLogonAndSendEmails(List<UUID> userIds);
/** * Update passwords for specified users, send them emails with new generated passwords and make them change * passwords at next logon. * * @param userIds User ids * @return Count of users */
Update passwords for specified users, send them emails with new generated passwords and make them change passwords at next logon
changePasswordsAtLogonAndSendEmails
{ "repo_name": "cuba-platform/cuba", "path": "modules/global/src/com/haulmont/cuba/security/app/UserManagementService.java", "license": "apache-2.0", "size": 6005 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,240,888
private IDocument getDocument() { return outline.getEditor().getDocumentProvider().getDocument(outline.getEditor().getEditorInput()); }
IDocument function() { return outline.getEditor().getDocumentProvider().getDocument(outline.getEditor().getEditorInput()); }
/** * Helper for getting the IDocument. * * @return the IDocument assosiated with the outline. */
Helper for getting the IDocument
getDocument
{ "repo_name": "kolovos/texlipse", "path": "net.sourceforge.texlipse/src/net/sourceforge/texlipse/outline/TexOutlineDNDAdapter.java", "license": "epl-1.0", "size": 7256 }
[ "org.eclipse.jface.text.IDocument" ]
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
137,859
EDataType getFloat();
EDataType getFloat();
/** * Returns the meta object for data type '{@link java.lang.Float <em>Float</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Float</em>'. * @see java.lang.Float * @model instanceClass="java.lang.Float" * @generated */
Returns the meta object for data type '<code>java.lang.Float Float</code>'.
getFloat
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.horizontalelasticity/src-gen/org/eclipse/cmf/occi/multicloud/horizontalelasticity/HorizontalelasticityPackage.java", "license": "epl-1.0", "size": 170187 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,528,975
public DocumentFP getDocument() { if (codeField.getText() == null || codeField.getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Informe o código do documento!", "Atenção!", JOptionPane.WARNING_MESSAGE); return null; } if (titleField.getText() == null || tit...
DocumentFP function() { if (codeField.getText() == null codeField.getText().isEmpty()) { JOptionPane.showMessageDialog(null, STR, STR, JOptionPane.WARNING_MESSAGE); return null; } if (titleField.getText() == null titleField.getText().isEmpty()) { JOptionPane.showMessageDialog(null, STR, STR, JOptionPane.WARNING_MESSAGE...
/** * Retorna dados dos campos em forma de documento * * @return <code>DocumentFP</code> documento */
Retorna dados dos campos em forma de documento
getDocument
{ "repo_name": "jmayer13/SAlmox", "path": "src/uni/uri/salmox/view/AddDocumentFPFrame.java", "license": "gpl-2.0", "size": 12823 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
539,386
public static RelDataType createSqlTypeWithNullability( final RelDataTypeFactory typeFactory, final SqlTypeName typeName, final boolean nullable ) { final RelDataType dataType; switch (typeName) { case TIMESTAMP: // Our timestamps are down to the millisecond (precision = 3...
static RelDataType function( final RelDataTypeFactory typeFactory, final SqlTypeName typeName, final boolean nullable ) { final RelDataType dataType; switch (typeName) { case TIMESTAMP: dataType = typeFactory.createSqlType(typeName, 3); break; case CHAR: case VARCHAR: dataType = typeFactory.createTypeWithCharsetAndColl...
/** * Like RelDataTypeFactory.createSqlTypeWithNullability, but creates types that align best with how Druid * represents them. */
Like RelDataTypeFactory.createSqlTypeWithNullability, but creates types that align best with how Druid represents them
createSqlTypeWithNullability
{ "repo_name": "deltaprojects/druid", "path": "sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java", "license": "apache-2.0", "size": 14066 }
[ "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeFactory", "org.apache.calcite.sql.SqlCollation", "org.apache.calcite.sql.type.SqlTypeName" ]
import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.sql.SqlCollation; import org.apache.calcite.sql.type.SqlTypeName;
import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*; import org.apache.calcite.sql.type.*;
[ "org.apache.calcite" ]
org.apache.calcite;
813,156
public Map<String,String> getAttributeMappings() { return attributeMappings; }
Map<String,String> function() { return attributeMappings; }
/** * Returns a direct reference to the currently * cached mappings. Note that if this map is * modified, the next call to * {@link #getSearchResultAttributes()} may * return stale values. */
Returns a direct reference to the currently cached mappings. Note that if this map is modified, the next call to <code>#getSearchResultAttributes()</code> may return stale values
getAttributeMappings
{ "repo_name": "hackbuteer59/sakai", "path": "providers/jldap/src/java/edu/amc/sakai/user/SimpleLdapAttributeMapper.java", "license": "apache-2.0", "size": 25144 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
13,508
public void testRestrictingProviderMatchingPathDenied() { // rejected by "foo" prefix final Uri test1 = PERM_URI_PATH_RESTRICTING.buildUpon().appendPath("foo").build(); assertReadingContentUriNotAllowed(test1, null); assertWritingContentUriNotAllowed(test1, null); // rejecte...
void function() { final Uri test1 = PERM_URI_PATH_RESTRICTING.buildUpon().appendPath("foo").build(); assertReadingContentUriNotAllowed(test1, null); assertWritingContentUriNotAllowed(test1, null); final Uri test2 = PERM_URI_PATH_RESTRICTING.buildUpon() .appendPath("foo").appendPath("ba").build(); assertReadingContentUr...
/** * Verify that paths under {@code path-permission} restriction aren't * allowed, even though the {@code provider} requires no permissions. */
Verify that paths under path-permission restriction aren't allowed, even though the provider requires no permissions
testRestrictingProviderMatchingPathDenied
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/AccessPermissionWithDiffSigTest.java", "license": "apache-2.0", "size": 55346 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
2,732,027
@Override public FileLister getFileLister(File root) { return new BackupLister(root); }
FileLister function(File root) { return new BackupLister(root); }
/** * Get a task suited to building a list of backup files. */
Get a task suited to building a list of backup files
getFileLister
{ "repo_name": "GuillaumeSmaha/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/filechooser/BackupChooser.java", "license": "gpl-3.0", "size": 9140 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
508,470
public static Resources getResources() { return context.getResources(); }
static Resources function() { return context.getResources(); }
/** * Convenience method to read resources * * @return resources object */
Convenience method to read resources
getResources
{ "repo_name": "michaltakac/astrid", "path": "api/src/com/todoroo/andlib/service/ContextManager.java", "license": "gpl-3.0", "size": 1479 }
[ "android.content.res.Resources" ]
import android.content.res.Resources;
import android.content.res.*;
[ "android.content" ]
android.content;
1,015,372
// add file to study QueryResult<File> createFileToStudy(int studyId, File file, QueryOptions options) throws CatalogDBException;
QueryResult<File> createFileToStudy(int studyId, File file, QueryOptions options) throws CatalogDBException;
/** * File methods * *************************** */
File methods
createFileToStudy
{ "repo_name": "roalva1/opencga", "path": "opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/CatalogFileDBAdaptor.java", "license": "apache-2.0", "size": 4372 }
[ "org.opencb.datastore.core.QueryOptions", "org.opencb.datastore.core.QueryResult", "org.opencb.opencga.catalog.exceptions.CatalogDBException", "org.opencb.opencga.catalog.models.File" ]
import org.opencb.datastore.core.QueryOptions; import org.opencb.datastore.core.QueryResult; import org.opencb.opencga.catalog.exceptions.CatalogDBException; import org.opencb.opencga.catalog.models.File;
import org.opencb.datastore.core.*; import org.opencb.opencga.catalog.exceptions.*; import org.opencb.opencga.catalog.models.*;
[ "org.opencb.datastore", "org.opencb.opencga" ]
org.opencb.datastore; org.opencb.opencga;
225,948
@Test public void testRecurrenceExpanderSingleOccurrence() throws Exception { RecurrenceExpander expander = new RecurrenceExpander(); Calendar calendar = getCalendar("floating_recurring4.ics"); InstanceList instances = expander.getOcurrences(calendar, new DateTime("20080101T1000...
void function() throws Exception { RecurrenceExpander expander = new RecurrenceExpander(); Calendar calendar = getCalendar(STR); InstanceList instances = expander.getOcurrences(calendar, new DateTime(STR), new DateTime(STR), null); Assert.assertEquals(1, instances.size()); }
/** * Tests recurrence expander single occurance. * @throws Exception - if something is wrong this exception is thrown. */
Tests recurrence expander single occurance
testRecurrenceExpanderSingleOccurrence
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/calendar/RecurrenceExpanderTest.java", "license": "apache-2.0", "size": 8398 }
[ "net.fortuna.ical4j.model.Calendar", "net.fortuna.ical4j.model.DateTime", "org.junit.Assert" ]
import net.fortuna.ical4j.model.Calendar; import net.fortuna.ical4j.model.DateTime; import org.junit.Assert;
import net.fortuna.ical4j.model.*; import org.junit.*;
[ "net.fortuna.ical4j", "org.junit" ]
net.fortuna.ical4j; org.junit;
1,791,255
public PropertyValue createValueFromValues( PropertyValue[] elementValues) throws NullPointerException, BadParameterException, BadTypeException;
PropertyValue function( PropertyValue[] elementValues) throws NullPointerException, BadParameterException, BadTypeException;
/** * <p>Creates and returns a fixed array property value from the * given array of property values.</p> * * @param elementValues Property value array to use to initialize the new * fixed array property value. * @return Newly created fixed array property value with values copied * from the given ...
Creates and returns a fixed array property value from the given array of property values
createValueFromValues
{ "repo_name": "AMWA-TV/maj", "path": "src/main/java/tv/amwa/maj/meta/TypeDefinitionFixedArray.java", "license": "apache-2.0", "size": 10939 }
[ "tv.amwa.maj.exception.BadParameterException", "tv.amwa.maj.exception.BadTypeException", "tv.amwa.maj.industry.PropertyValue" ]
import tv.amwa.maj.exception.BadParameterException; import tv.amwa.maj.exception.BadTypeException; import tv.amwa.maj.industry.PropertyValue;
import tv.amwa.maj.exception.*; import tv.amwa.maj.industry.*;
[ "tv.amwa.maj" ]
tv.amwa.maj;
260,287
@Override protected boolean validateAnnotationSemantics( NullAway analysis, VisitorState state, MethodTree tree, Symbol.MethodSymbol methodSymbol) { String message; if (tree.getBody() == null) { return true; } Set<String> nonnullFieldsOfReceiverAtExit = analysis .getN...
boolean function( NullAway analysis, VisitorState state, MethodTree tree, Symbol.MethodSymbol methodSymbol) { String message; if (tree.getBody() == null) { return true; } Set<String> nonnullFieldsOfReceiverAtExit = analysis .getNullnessAnalysis(state) .getNonnullFieldsOfReceiverAtExit(new TreePath(state.getPath(), tree...
/** * Validates whether all parameters mentioned in the @EnsuresNonNull annotation are guaranteed to * be {@code @NonNull} at exit point of this method. */
Validates whether all parameters mentioned in the @EnsuresNonNull annotation are guaranteed to be @NonNull at exit point of this method
validateAnnotationSemantics
{ "repo_name": "uber/nullaway", "path": "nullaway/src/main/java/com/uber/nullaway/handlers/contract/fieldcontract/EnsuresNonNullHandler.java", "license": "mit", "size": 8973 }
[ "com.google.errorprone.VisitorState", "com.sun.source.tree.MethodTree", "com.sun.source.util.TreePath", "com.sun.tools.javac.code.Symbol", "com.uber.nullaway.ErrorMessage", "com.uber.nullaway.NullAway", "com.uber.nullaway.NullabilityUtil", "com.uber.nullaway.handlers.contract.ContractUtils", "java.u...
import com.google.errorprone.VisitorState; import com.sun.source.tree.MethodTree; import com.sun.source.util.TreePath; import com.sun.tools.javac.code.Symbol; import com.uber.nullaway.ErrorMessage; import com.uber.nullaway.NullAway; import com.uber.nullaway.NullabilityUtil; import com.uber.nullaway.handlers.contract.Co...
import com.google.errorprone.*; import com.sun.source.tree.*; import com.sun.source.util.*; import com.sun.tools.javac.code.*; import com.uber.nullaway.*; import com.uber.nullaway.handlers.contract.*; import java.util.*; import java.util.stream.*;
[ "com.google.errorprone", "com.sun.source", "com.sun.tools", "com.uber.nullaway", "java.util" ]
com.google.errorprone; com.sun.source; com.sun.tools; com.uber.nullaway; java.util;
1,419,292
@WebMethod(operationName = "GetAvailableSubmitTransitions") @WebResult(targetNamespace = "urn:sbmappservices72") @RequestWrapper(localName = "GetAvailableSubmitTransitions", targetNamespace = "urn:sbmappservices72", className = "com.prisch.sbm.stubs.GetAvailableSubmitTransitions") @ResponseWrapper(local...
@WebMethod(operationName = STR) @WebResult(targetNamespace = STR) @RequestWrapper(localName = STR, targetNamespace = STR, className = STR) @ResponseWrapper(localName = STR, targetNamespace = STR, className = STR) List<Transition> function( @WebParam(name = "auth", targetNamespace = STR) Auth auth, @WebParam(name = STR,...
/** * Return available Submit transitions, given an item id and attribute name (may be null or empty). * * @param auth * @param options * @param project * @param attributeName * @return * returns java.util.List<com.prisch.sbm.stubs.Transition> * @throws AEWebservicesFau...
Return available Submit transitions, given an item id and attribute name (may be null or empty)
getAvailableSubmitTransitions
{ "repo_name": "PriscH/SlackAgent", "path": "client/src/main/java/com/prisch/sbm/stubs/Sbmappservices72PortType.java", "license": "gpl-3.0", "size": 42158 }
[ "java.util.List", "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
426,017
public Collection<String> getGu() { final TreeSet<String> ts = new TreeSet<String>(); for (final KatasterGewObj tmp : objList) { ts.add(tmp.getOwner()); } return ts; }
Collection<String> function() { final TreeSet<String> ts = new TreeSet<String>(); for (final KatasterGewObj tmp : objList) { ts.add(tmp.getOwner()); } return ts; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getGu
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/reports/GerOffenHelper.java", "license": "lgpl-3.0", "size": 14873 }
[ "de.cismet.watergis.reports.types.KatasterGewObj", "java.util.Collection", "java.util.TreeSet" ]
import de.cismet.watergis.reports.types.KatasterGewObj; import java.util.Collection; import java.util.TreeSet;
import de.cismet.watergis.reports.types.*; import java.util.*;
[ "de.cismet.watergis", "java.util" ]
de.cismet.watergis; java.util;
2,783,189
public Optional<ContactTokenDetails> getContact(String e164number) throws IOException { String contactToken = createDirectoryServerToken(e164number, true); ContactTokenDetails contactTokenDetails = this.pushServiceSocket.getContactTokenDetails(contactToken); if (contactTokenDetails !=...
Optional<ContactTokenDetails> function(String e164number) throws IOException { String contactToken = createDirectoryServerToken(e164number, true); ContactTokenDetails contactTokenDetails = this.pushServiceSocket.getContactTokenDetails(contactToken); if (contactTokenDetails != null) { contactTokenDetails.setNumber(e164n...
/** * Checks whether a contact is currently registered with the server. * * @param e164number The contact to check. * @return An optional ContactTokenDetails, present if registered, absent if not. * @throws IOException */
Checks whether a contact is currently registered with the server
getContact
{ "repo_name": "Turakar/libtextsecure-java", "path": "java/src/main/java/org/whispersystems/signalservice/api/SignalServiceAccountManager.java", "license": "gpl-3.0", "size": 16848 }
[ "java.io.IOException", "org.whispersystems.libsignal.util.guava.Optional", "org.whispersystems.signalservice.api.push.ContactTokenDetails" ]
import java.io.IOException; import org.whispersystems.libsignal.util.guava.Optional; import org.whispersystems.signalservice.api.push.ContactTokenDetails;
import java.io.*; import org.whispersystems.libsignal.util.guava.*; import org.whispersystems.signalservice.api.push.*;
[ "java.io", "org.whispersystems.libsignal", "org.whispersystems.signalservice" ]
java.io; org.whispersystems.libsignal; org.whispersystems.signalservice;
502,354
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { lblBeforePackage = new javax.swing.JLabel(); lblAfterPackage = new javax.swing.JLabel(); lblBeforeImports = new javax.swing.JLabel...
@SuppressWarnings(STR) void function() { lblBeforePackage = new javax.swing.JLabel(); lblAfterPackage = new javax.swing.JLabel(); lblBeforeImports = new javax.swing.JLabel(); lblAfterImports = new javax.swing.JLabel(); lblAfterType = new javax.swing.JLabel(); lblBeforeType = new javax.swing.JLabel(); lblBeforeFunction ...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "tunnelvisionlabs/goworks", "path": "goworks.editor/src/org/tvl/goworks/editor/go/formatting/FormatBlankLines.java", "license": "gpl-2.0", "size": 13298 }
[ "org.openide.util.NbBundle" ]
import org.openide.util.NbBundle;
import org.openide.util.*;
[ "org.openide.util" ]
org.openide.util;
944,255
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<PrivateEndpointConnectionInner> getAsync( String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName) .flat...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PrivateEndpointConnectionInner> function( String resourceGroupName, String namespaceName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, namespaceName, privateEndpointConnectionName) .flatMap( (Response<PrivateEndpointConnectionInn...
/** * Gets a description for the specified Private Endpoint Connection name. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param privateEndpointConnectionName The PrivateEndpointConnection name. * @throw...
Gets a description for the specified Private Endpoint Connection name
getAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 52216 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.eventhubs.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.eventhubs.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.eventhubs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,317,892
EAttribute getnCohExp_Name();
EAttribute getnCohExp_Name();
/** * Returns the meta object for the attribute '{@link sc.ndt.editor.turbsimtbs.nCohExp#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see sc.ndt.editor.turbsimtbs.nCohExp#getName() * @see #getnCohExp() * @...
Returns the meta object for the attribute '<code>sc.ndt.editor.turbsimtbs.nCohExp#getName Name</code>'.
getnCohExp_Name
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.turbsim.tbs/src-gen/sc/ndt/editor/turbsimtbs/TurbsimtbsPackage.java", "license": "gpl-3.0", "size": 204585 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
786,242
void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException;
void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException;
/** * Send the given object to the default destination, converting the object * to a JMS message with a configured MessageConverter. The MessagePostProcessor * callback allows for modification of the message after conversion. * <p>This will only work with a default destination specified! * @param message the ...
Send the given object to the default destination, converting the object to a JMS message with a configured MessageConverter. The MessagePostProcessor callback allows for modification of the message after conversion. This will only work with a default destination specified
convertAndSend
{ "repo_name": "raedle/univis", "path": "lib/springframework-1.2.8/src/org/springframework/jms/core/JmsOperations.java", "license": "lgpl-2.1", "size": 16773 }
[ "org.springframework.jms.JmsException" ]
import org.springframework.jms.JmsException;
import org.springframework.jms.*;
[ "org.springframework.jms" ]
org.springframework.jms;
2,635,799
List<String> queues(String connectionFactory, String username, String password) throws MBeanException;
List<String> queues(String connectionFactory, String username, String password) throws MBeanException;
/** * List the JMS queues. * * @param connectionFactory The JMS connection factory name. * @param username The (optional) username to connect to the JMS broker. * @param password The (optional) password to connect to the JMS broker. * @return The {@link List} of JMS queues. * @throws ...
List the JMS queues
queues
{ "repo_name": "grgrzybek/karaf", "path": "jms/src/main/java/org/apache/karaf/jms/JmsMBean.java", "license": "apache-2.0", "size": 7275 }
[ "java.util.List", "javax.management.MBeanException" ]
import java.util.List; import javax.management.MBeanException;
import java.util.*; import javax.management.*;
[ "java.util", "javax.management" ]
java.util; javax.management;
1,448,568
public static SkyValue normal( @Nullable SkyValue value, @Nullable ErrorInfo errorInfo, NestedSet<TaggedEvents> transitiveEvents, NestedSet<Postable> transitivePostables) { Preconditions.checkState(value != null || errorInfo != null, "Value and error cannot both be null"); if (...
static SkyValue function( @Nullable SkyValue value, @Nullable ErrorInfo errorInfo, NestedSet<TaggedEvents> transitiveEvents, NestedSet<Postable> transitivePostables) { Preconditions.checkState(value != null errorInfo != null, STR); if (errorInfo == null) { return (transitiveEvents.isEmpty() && transitivePostables.isEmp...
/** * Builds a SkyValue that has a value, and possibly an error, and possibly events/postables. If it * has only a value, returns just the value in order to save memory. * * <p>This is public only for use in alternative {@code MemoizingEvaluator} implementations. */
Builds a SkyValue that has a value, and possibly an error, and possibly events/postables. If it has only a value, returns just the value in order to save memory. This is public only for use in alternative MemoizingEvaluator implementations
normal
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/skyframe/ValueWithMetadata.java", "license": "apache-2.0", "size": 10629 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.collect.nestedset.NestedSet", "com.google.devtools.build.lib.events.ExtendedEventHandler", "javax.annotation.Nullable" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.events.ExtendedEventHandler; import javax.annotation.Nullable;
import com.google.common.base.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.events.*; import javax.annotation.*;
[ "com.google.common", "com.google.devtools", "javax.annotation" ]
com.google.common; com.google.devtools; javax.annotation;
859,396
System.out.println(Arrays.toString(args)); ParamBean para = new ParamBean(); boolean over = false; try { for(int i = 0; i < args.length && over == false; ++i) { switch (args[i]) { case "-h": case "--help": ...
System.out.println(Arrays.toString(args)); ParamBean para = new ParamBean(); boolean over = false; try { for(int i = 0; i < args.length && over == false; ++i) { switch (args[i]) { case "-h": case STR: printUsage(); System.exit(0); break; case "-m": para.setMode(Integer.valueOf(args[i+1])); i++; break; case "-p": para.s...
/** * persist 1:yes 0:no * * @param args */
persist 1:yes 0:no
main
{ "repo_name": "sammylp/amq-client", "path": "src/main/java/amq/AmqMain.java", "license": "gpl-3.0", "size": 5701 }
[ "java.util.Arrays", "java.util.concurrent.ExecutorService" ]
import java.util.Arrays; import java.util.concurrent.ExecutorService;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,451,643
public Enumeration<BasicBlock> reverseBlockEnumerator() { return IREnumeration.reverseBE(this); }
Enumeration<BasicBlock> function() { return IREnumeration.reverseBE(this); }
/** * Reverse (with respect to the current code linearization order) * iteration overal all the basic blocks in the IR. * * @return an enumeration of {@link BasicBlock}s that enumerates the * basic blocks in reverse code order. */
Reverse (with respect to the current code linearization order) iteration overal all the basic blocks in the IR
reverseBlockEnumerator
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/ir/IR.java", "license": "epl-1.0", "size": 51870 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,554,219
private ZonelessTimeGrain mergeTimeGrains(ZonelessTimeGrain timeGrain1, ZonelessTimeGrain timeGrain2) { if (timeGrain1 == null) { return timeGrain2; } else if (timeGrain2 == null || timeGrain1.equals(timeGrain2)) { return timeGrain1; } else { String messag...
ZonelessTimeGrain function(ZonelessTimeGrain timeGrain1, ZonelessTimeGrain timeGrain2) { if (timeGrain1 == null) { return timeGrain2; } else if (timeGrain2 == null timeGrain1.equals(timeGrain2)) { return timeGrain1; } else { String message = String.format(STR, timeGrain1, timeGrain2); LOG.error(message); throw new Ille...
/** * Merge two time grains together. * <p/> * This is the pattern for how the time grains are merged: * <ul> * <li>null - null = null</li> * <li>nonNull - null = nonNull</li> * <li>nonNull - nonNull = nonNull</li> * <li>nonNull - differentNonNull = ERROR</li> ...
Merge two time grains together. This is the pattern for how the time grains are merged: null - null = null nonNull - null = nonNull nonNull - nonNull = nonNull nonNull - differentNonNull = ERROR
mergeTimeGrains
{ "repo_name": "yahoo/fili", "path": "fili-core/src/main/java/com/yahoo/bard/webservice/data/metric/TemplateDruidQuery.java", "license": "apache-2.0", "size": 33052 }
[ "com.yahoo.bard.webservice.data.time.ZonelessTimeGrain" ]
import com.yahoo.bard.webservice.data.time.ZonelessTimeGrain;
import com.yahoo.bard.webservice.data.time.*;
[ "com.yahoo.bard" ]
com.yahoo.bard;
2,757,366
if (open) { switch (material) { case ACACIA_FENCE_GATE: case BIRCH_FENCE_GATE: case DARK_OAK_FENCE_GATE: case JUNGLE_FENCE_GATE: case SPRUCE_FENCE_GATE: case OAK_FENCE_GATE: return Sound.BLOCK...
if (open) { switch (material) { case ACACIA_FENCE_GATE: case BIRCH_FENCE_GATE: case DARK_OAK_FENCE_GATE: case JUNGLE_FENCE_GATE: case SPRUCE_FENCE_GATE: case OAK_FENCE_GATE: return Sound.BLOCK_FENCE_GATE_OPEN; case OAK_DOOR: case SPRUCE_DOOR: case BIRCH_DOOR: case JUNGLE_DOOR: case ACACIA_DOOR: case DARK_OAK_DOOR: retu...
/** * Gets the sound for opening/closing the given material. For unknown * materials, a generic sound is returned. * * @param material * The material. * @param open * Whether ther material is opened. * @return The sound. */
Gets the sound for opening/closing the given material. For unknown materials, a generic sound is returned
get
{ "repo_name": "rutgerkok/BlockLocker", "path": "src/main/java/nl/rutgerkok/blocklocker/OpenBlockSound.java", "license": "mit", "size": 2909 }
[ "org.bukkit.Sound" ]
import org.bukkit.Sound;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,042,188
EReference getPlugin_Feature();
EReference getPlugin_Feature();
/** * Returns the meta object for the container reference '{@link org.dresdenocl.examples.pml.Plugin#getFeature <em>Feature</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Feature</em>'. * @see org.dresdenocl.examples.pml.Plugin#getFeat...
Returns the meta object for the container reference '<code>org.dresdenocl.examples.pml.Plugin#getFeature Feature</code>'.
getPlugin_Feature
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.examples.pml/src/org/dresdenocl/examples/pml/PmlPackage.java", "license": "lgpl-3.0", "size": 38372 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,463,990
public ModelAndView toSimilar(HttpServletRequest request, HttpServletResponse response) { return getModelAndView("similar").addObject(REQUEST_SEARCH_KEY, new SimilarForm()); }
ModelAndView function(HttpServletRequest request, HttpServletResponse response) { return getModelAndView(STR).addObject(REQUEST_SEARCH_KEY, new SimilarForm()); }
/** * Initial page to add new data. If user is not login in, which should never * the case, forward the user to login page. * * @param request * @param response * @return */
Initial page to add new data. If user is not login in, which should never the case, forward the user to login page
toSimilar
{ "repo_name": "Joe23/capelin-opac", "path": "capelin-mvc/src/org/capelin/mvc/controller/CatalogRecordController.java", "license": "agpl-3.0", "size": 34371 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.capelin.mvc.web.form.SimilarForm", "org.springframework.web.servlet.ModelAndView" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.capelin.mvc.web.form.SimilarForm; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.*; import org.capelin.mvc.web.form.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.capelin.mvc", "org.springframework.web" ]
javax.servlet; org.capelin.mvc; org.springframework.web;
1,792,160
private String convertAgentStatus(AgentConnection status) { if (status.equals(AgentConnection.NEVER_CONNECTED)) { return "neverConnected"; } else if (status.equals(AgentConnection.CONNECTED)) { return "connected"; } else if (status.equals(AgentConnection.DISCONNECTED)) { return "disconnected"; } els...
String function(AgentConnection status) { if (status.equals(AgentConnection.NEVER_CONNECTED)) { return STR; } else if (status.equals(AgentConnection.CONNECTED)) { return STR; } else if (status.equals(AgentConnection.DISCONNECTED)) { return STR; } else { return STR; } }
/** * Convert agent status to readable format. * * @param status * the status. * @return readable format. */
Convert agent status to readable format
convertAgentStatus
{ "repo_name": "kugelr/inspectIT", "path": "inspectITJMeter/src/info/novatec/inspectit/jmeter/InspectITGetConnectedAgents.java", "license": "agpl-3.0", "size": 2037 }
[ "info.novatec.inspectit.communication.data.cmr.AgentStatusData" ]
import info.novatec.inspectit.communication.data.cmr.AgentStatusData;
import info.novatec.inspectit.communication.data.cmr.*;
[ "info.novatec.inspectit" ]
info.novatec.inspectit;
587,351
@Test public void elementsAreValidAndWorking() { Elements elements = compilationRule.getElements(); TypeElement stringElement = elements.getTypeElement(String.class.getName()); assertThat(stringElement.getEnclosingElement()) .isEqualTo(elements.getPackageElement("java.lang")); }
@Test void function() { Elements elements = compilationRule.getElements(); TypeElement stringElement = elements.getTypeElement(String.class.getName()); assertThat(stringElement.getEnclosingElement()) .isEqualTo(elements.getPackageElement(STR)); }
/** * Do some non-trivial operation with {@link Element} instances because they stop working after * compilation stops. */
Do some non-trivial operation with <code>Element</code> instances because they stop working after compilation stops
elementsAreValidAndWorking
{ "repo_name": "fbiville/annotation-processing-ftw", "path": "doc/compile-testing/master/src/test/java/com/google/testing/compile/CompilationRuleTest.java", "license": "mit", "size": 3132 }
[ "com.google.common.truth.Truth", "javax.lang.model.element.TypeElement", "javax.lang.model.util.Elements", "org.junit.Test" ]
import com.google.common.truth.Truth; import javax.lang.model.element.TypeElement; import javax.lang.model.util.Elements; import org.junit.Test;
import com.google.common.truth.*; import javax.lang.model.element.*; import javax.lang.model.util.*; import org.junit.*;
[ "com.google.common", "javax.lang", "org.junit" ]
com.google.common; javax.lang; org.junit;
1,890,884
public int solsInMonth(int year, int monthNum) { PlanetMonth month = months.get(monthNum); int sols = month.getNumSols(); Map<PlanetMonth, Integer> leapYear = leapPeriod.get(year % leapPeriod.size()); if (!leapYear.isEmpty() && leapYear.containsKey(month)) { sols += leapY...
int function(int year, int monthNum) { PlanetMonth month = months.get(monthNum); int sols = month.getNumSols(); Map<PlanetMonth, Integer> leapYear = leapPeriod.get(year % leapPeriod.size()); if (!leapYear.isEmpty() && leapYear.containsKey(month)) { sols += leapYear.get(month); } return sols; }
/** * returns the total number of sols in a specific month * @param year * @param monthNum: the number of the month (starting from 0) * @return */
returns the total number of sols in a specific month
solsInMonth
{ "repo_name": "MikhailErofeev/mars-calendar", "path": "src/main/java/com/github/mikhailerofeev/mars/calendar/model/values/time/PlanetCalendar.java", "license": "mit", "size": 3232 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,798,593
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_M_CostQueue.java", "license": "gpl-2.0", "size": 6632 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
151,475
private T getFromBackup(Entry<?>[] cache, Class<?> type) { Entry<T> e = probeBackupLocations(cache, this); if (e != null) return e.value(); return getFromHashMap(type); } // Hack to suppress warnings on the (T) cast, which is a no-op. @SuppressWarnings("unchecked") ...
T function(Entry<?>[] cache, Class<?> type) { Entry<T> e = probeBackupLocations(cache, this); if (e != null) return e.value(); return getFromHashMap(type); } @SuppressWarnings(STR) Entry<T> castEntry(Entry<?> e) { return (Entry<T>) e; }
/** * Slow tail of ClassValue.get to retry at nearby locations in the cache, * or take a slow lock and check the hash table. * Called only if the first probe was empty or a collision. * This is a separate method, so compilers can process it independently. */
Slow tail of ClassValue.get to retry at nearby locations in the cache, or take a slow lock and check the hash table. Called only if the first probe was empty or a collision. This is a separate method, so compilers can process it independently
getFromBackup
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/java/lang/ClassValue.java", "license": "apache-2.0", "size": 33658 }
[ "java.lang.ClassValue" ]
import java.lang.ClassValue;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,303,150
public void threadBuf(ThreadLocal<ByteBuffer> threadBuf) { checkpointPagesWriterFactory.threadBuf(threadBuf); }
void function(ThreadLocal<ByteBuffer> threadBuf) { checkpointPagesWriterFactory.threadBuf(threadBuf); }
/** * Replace thread local with buffers. Thread local should provide direct buffer with one page in length. * * @param threadBuf new thread-local with buffers for the checkpoint threads. */
Replace thread local with buffers. Thread local should provide direct buffer with one page in length
threadBuf
{ "repo_name": "daradurvs/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointManager.java", "license": "apache-2.0", "size": 15254 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,878,763
Set<Objective> getObjectives();
Set<Objective> getObjectives();
/** * Gets all Objectives on this Scoreboard * * @return An immutable set of all Objectives on this Scoreboard */
Gets all Objectives on this Scoreboard
getObjectives
{ "repo_name": "tgnmc/Bukkit", "path": "src/main/java/org/bukkit/scoreboard/Scoreboard.java", "license": "gpl-3.0", "size": 5483 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,087,409
public static URL searchMovieByTitleUrl(IMDbSearchByTitleParameters pars) throws MalformedURLException { String year = ""; if (pars.isYearSet()) { year = param(pair(IMDbConstants.YEAR_ENABLED, "1")) + param(pair(IMDbConstants.YEAR, pars.getYear().toString())); } return new URL(IMDbConstants....
static URL function(IMDbSearchByTitleParameters pars) throws MalformedURLException { String year = STR1STR1STR0")) + param(pair(IMDbConstants.AKA, pars.getAka().getValue())) + param(pair(IMDbConstants.RELEASE, pars.getRelease().getValue())) + year + param(pair(IMDbConstants.MOVIE_TYPE, pars.getType().getValue())) + par...
/** * Returns the URL that searches for movies by title. * * @param pars The list of parameters * @return The query URL * @throws MalformedURLException Throws if the URL has an invalid form */
Returns the URL that searches for movies by title
searchMovieByTitleUrl
{ "repo_name": "makgyver/MKimdb", "path": "src/mk/imdb/core/IMDbURLCreator.java", "license": "gpl-3.0", "size": 3505 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
868,193
Log.d(TAG, String.format("Add device %s", device.getAddress())); mBluetoothDevices.add(device); }
Log.d(TAG, String.format(STR, device.getAddress())); mBluetoothDevices.add(device); }
/** * Save device in storage. * * @param device registered device */
Save device in storage
addDevice
{ "repo_name": "googleinterns/heartrate-bt-wear", "path": "server/app/src/main/java/com/google/heartrate/wearos/app/bluetooth/server/BluetoothDeviceStorage.java", "license": "apache-2.0", "size": 1856 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,189,583
static String getObjectLitKeyName(Node key) { switch (key.getType()) { case Token.STRING_KEY: case Token.GETTER_DEF: case Token.SETTER_DEF: return key.getString(); } throw new IllegalStateException("Unexpected node type: " + key); }
static String getObjectLitKeyName(Node key) { switch (key.getType()) { case Token.STRING_KEY: case Token.GETTER_DEF: case Token.SETTER_DEF: return key.getString(); } throw new IllegalStateException(STR + key); }
/** * Get the name of an object literal key. * * @param key A node */
Get the name of an object literal key
getObjectLitKeyName
{ "repo_name": "martinrosstmc/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 99366 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
852,989
// ------------------------< Private Helper methods >--------------------------// private void loadRole() throws RoleException { permissions = 0; log.debug("Searching for role: {}", roleId); String path = rolePath + "/" + roleId; try { roleNode = session.getRootNode...
void function() throws RoleException { permissions = 0; log.debug(STR, roleId); String path = rolePath + "/" + roleId; try { roleNode = session.getRootNode().getNode(path); log.debug(STR, path); try { if (roleNode.getProperty(HippoNodeType.HIPPO_JCRREAD).getBoolean()) { log.trace(STR, roleId); permissions += READ; } } ...
/** * Load the role from the repository and fetch the permissions for the role * @throws RoleException */
Load the role from the repository and fetch the permissions for the role
loadRole
{ "repo_name": "canhnt/hippo-repo-xacml", "path": "hippo-repository-3.1.x-xacml/engine/src/main/java/org/hippoecm/repository/security/role/RepositoryRole.java", "license": "apache-2.0", "size": 4351 }
[ "javax.jcr.PathNotFoundException", "javax.jcr.RepositoryException", "org.hippoecm.repository.api.HippoNodeType" ]
import javax.jcr.PathNotFoundException; import javax.jcr.RepositoryException; import org.hippoecm.repository.api.HippoNodeType;
import javax.jcr.*; import org.hippoecm.repository.api.*;
[ "javax.jcr", "org.hippoecm.repository" ]
javax.jcr; org.hippoecm.repository;
1,673,342
public Range getZValueRange(Range x, Range y) { double minX = x.getLowerBound(); double minY = y.getLowerBound(); double maxX = x.getUpperBound(); double maxY = y.getUpperBound(); double zMin = 1.e20; double zMax = -1.e20; for (int k = 0; k < this.zValues.le...
Range function(Range x, Range y) { double minX = x.getLowerBound(); double minY = y.getLowerBound(); double maxX = x.getUpperBound(); double maxY = y.getUpperBound(); double zMin = 1.e20; double zMax = -1.e20; for (int k = 0; k < this.zValues.length; k++) { if (this.xValues[k].doubleValue() >= minX && this.xValues[k].d...
/** * Returns the maximum z-value within visible region of plot. * * @param x the x range. * @param y the y range. * * @return The z range. */
Returns the maximum z-value within visible region of plot
getZValueRange
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/data/contour/DefaultContourDataset.java", "license": "mit", "size": 15601 }
[ "org.jfree.data.Range" ]
import org.jfree.data.Range;
import org.jfree.data.*;
[ "org.jfree.data" ]
org.jfree.data;
2,752,181
public NodeList getChildNodes() { return this; }
NodeList function() { return this; }
/** * Return the nodelist (same reference). * * @return The nodelist containing the child nodes (this) */
Return the nodelist (same reference)
getChildNodes
{ "repo_name": "mirego/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java", "license": "apache-2.0", "size": 44686 }
[ "org.w3c.dom.NodeList" ]
import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,484,582
@Override public String getText(Object object) { String label = ((CtrlUnit76)object).getSysId(); return label == null || label.length() == 0 ? getString("_UI_CtrlUnit76_type") : getString("_UI_CtrlUnit76_type") + " " + label; }
String function(Object object) { String label = ((CtrlUnit76)object).getSysId(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit76ItemProvider.java", "license": "epl-1.0", "size": 5064 }
[ "eu.mondo.collaboration.operationtracemodel.example.WTSpec" ]
import eu.mondo.collaboration.operationtracemodel.example.WTSpec;
import eu.mondo.collaboration.operationtracemodel.example.*;
[ "eu.mondo.collaboration" ]
eu.mondo.collaboration;
413,774
public List<Network> findAllNetworks() { return networkRepository.findAll(); }
List<Network> function() { return networkRepository.findAll(); }
/** * Get all {@link Network}s. * * @return */
Get all <code>Network</code>s
findAllNetworks
{ "repo_name": "apruden/mica2", "path": "mica-core/src/main/java/org/obiba/mica/network/service/NetworkService.java", "license": "gpl-3.0", "size": 12198 }
[ "java.util.List", "org.obiba.mica.network.domain.Network" ]
import java.util.List; import org.obiba.mica.network.domain.Network;
import java.util.*; import org.obiba.mica.network.domain.*;
[ "java.util", "org.obiba.mica" ]
java.util; org.obiba.mica;
2,638,105
static int pxToDp(final Context context, final float px) { return (int)(px / context.getResources().getDisplayMetrics().density); }
static int pxToDp(final Context context, final float px) { return (int)(px / context.getResources().getDisplayMetrics().density); }
/** * Helper method to convert pixel to dp * @param context * @param px * @return */
Helper method to convert pixel to dp
pxToDp
{ "repo_name": "envyfan/AndroidReview", "path": "app/src/main/java/com/vv/androidreview/ui/view/RangeSliderViewEx.java", "license": "gpl-3.0", "size": 20282 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,703,851
public List<ICondition> getConditions(List<AttributeInterface> attributes, List<String> operators, List<String> firstValues, List<String> secondValues) { List<ICondition> conditionList = new ArrayList<ICondition>(); for (int i = 0; i < attributes.size(); i++) { ICondition...
List<ICondition> function(List<AttributeInterface> attributes, List<String> operators, List<String> firstValues, List<String> secondValues) { List<ICondition> conditionList = new ArrayList<ICondition>(); for (int i = 0; i < attributes.size(); i++) { ICondition condition = QueryObjectFactory.createCondition(); condition...
/** * Returns the list of conditions given the attributes, operators and the * values for the attributes. * * @param attributes The attributes on which the conditions are defined. * @param operators The operators for the conditions. * @param firstValues The first values in the condi...
Returns the list of conditions given the attributes, operators and the values for the attributes
getConditions
{ "repo_name": "NCIP/metadata-based-query", "path": "software/Query/src/main/java/edu/wustl/common/querysuite/utils/ConstraintsObjectBuilder.java", "license": "bsd-3-clause", "size": 20623 }
[ "edu.common.dynamicextensions.domaininterface.AttributeInterface", "edu.wustl.common.querysuite.factory.QueryObjectFactory", "edu.wustl.common.querysuite.queryobject.ICondition", "edu.wustl.common.querysuite.queryobject.RelationalOperator", "java.util.ArrayList", "java.util.List" ]
import edu.common.dynamicextensions.domaininterface.AttributeInterface; import edu.wustl.common.querysuite.factory.QueryObjectFactory; import edu.wustl.common.querysuite.queryobject.ICondition; import edu.wustl.common.querysuite.queryobject.RelationalOperator; import java.util.ArrayList; import java.util.List;
import edu.common.dynamicextensions.domaininterface.*; import edu.wustl.common.querysuite.factory.*; import edu.wustl.common.querysuite.queryobject.*; import java.util.*;
[ "edu.common.dynamicextensions", "edu.wustl.common", "java.util" ]
edu.common.dynamicextensions; edu.wustl.common; java.util;
1,890,805
public String getFont(String fontAlias) { return ((JSONObject)((JSONObject)((JSONObject)object).get("mapping")).get("font")).get(fontAlias).toString(); }
String function(String fontAlias) { return ((JSONObject)((JSONObject)((JSONObject)object).get(STR)).get("font")).get(fontAlias).toString(); }
/** * Get a font from the font library * @param fontAlias * @return */
Get a font from the font library
getFont
{ "repo_name": "bwyap/java-engine-lwjgl", "path": "src/com/bwyap/engine/resource/JSONResourceLibrary.java", "license": "mit", "size": 2610 }
[ "org.json.simple.JSONObject" ]
import org.json.simple.JSONObject;
import org.json.simple.*;
[ "org.json.simple" ]
org.json.simple;
1,127,849
public void execute(VtiSoapRequest soapRequest, VtiSoapResponse soapResponse) throws Exception { if (logger.isDebugEnabled()) logger.debug("Soap Method with name " + getName() + " is started."); // mapping xml namespace to prefix SimpleNamespaceContext nc = new SimpleN...
void function(VtiSoapRequest soapRequest, VtiSoapResponse soapResponse) throws Exception { if (logger.isDebugEnabled()) logger.debug(STR + getName() + STR); SimpleNamespaceContext nc = new SimpleNamespaceContext(); nc.addNamespace(prefix, namespace); nc.addNamespace(soapUriPrefix, soapUri); XPath xpath = new Dom4jXPath...
/** * Check in file * * @param soapRequest Vti soap request ({@link VtiSoapRequest}) * @param soapResponse Vti soap response ({@link VtiSoapResponse}) */
Check in file
execute
{ "repo_name": "Alfresco/community-edition", "path": "modules/sharepoint/amp/source/java/org/alfresco/module/vti/web/ws/CheckInFileEndpoint.java", "license": "lgpl-3.0", "size": 6013 }
[ "org.alfresco.module.vti.handler.alfresco.VtiUtils", "org.alfresco.service.cmr.model.FileNotFoundException", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.cmr.version.VersionType", "org.apache.commons.httpclient.util.URIUtil", "org.dom4j.Element", "org.jaxen.SimpleNamespaceContext...
import org.alfresco.module.vti.handler.alfresco.VtiUtils; import org.alfresco.service.cmr.model.FileNotFoundException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.version.VersionType; import org.apache.commons.httpclient.util.URIUtil; import org.dom4j.Element; import org.jaxen.Si...
import org.alfresco.module.vti.handler.alfresco.*; import org.alfresco.service.cmr.model.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.version.*; import org.apache.commons.httpclient.util.*; import org.dom4j.*; import org.jaxen.*; import org.jaxen.dom4j.*; import org.springframework.e...
[ "org.alfresco.module", "org.alfresco.service", "org.apache.commons", "org.dom4j", "org.jaxen", "org.jaxen.dom4j", "org.springframework.extensions" ]
org.alfresco.module; org.alfresco.service; org.apache.commons; org.dom4j; org.jaxen; org.jaxen.dom4j; org.springframework.extensions;
2,044,448
Object visitFromDocument( COSDocument obj ) throws IOException;
Object visitFromDocument( COSDocument obj ) throws IOException;
/** * Notification of visit to document object. * * @param obj The Object that is being visited. * @return any Object depending on the visitor implementation, or null * @throws IOException If there is an error while visiting this object. */
Notification of visit to document object
visitFromDocument
{ "repo_name": "mdamt/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/cos/ICOSVisitor.java", "license": "apache-2.0", "size": 3681 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,969,544
boolean canRead(Type type, Class<?> contextClass, MediaType mediaType);
boolean canRead(Type type, Class<?> contextClass, MediaType mediaType);
/** * Indicates whether the given type can be read by this converter. * This method should perform the same checks than * {@link HttpMessageConverter#canRead(Class, MediaType)} with additional ones * related to the generic type. * @param type the (potentially generic) type to test for readability * @param c...
Indicates whether the given type can be read by this converter. This method should perform the same checks than <code>HttpMessageConverter#canRead(Class, MediaType)</code> with additional ones related to the generic type
canRead
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/spring/org/springframework/http/converter/GenericHttpMessageConverter.java", "license": "gpl-2.0", "size": 4817 }
[ "java.lang.reflect.Type", "org.springframework.http.MediaType" ]
import java.lang.reflect.Type; import org.springframework.http.MediaType;
import java.lang.reflect.*; import org.springframework.http.*;
[ "java.lang", "org.springframework.http" ]
java.lang; org.springframework.http;
1,691,365
public void aggregate(Resource resource, Resource targetResource, Map<String, Object> agregateProperties );
void function(Resource resource, Resource targetResource, Map<String, Object> agregateProperties );
/** * Aggregate the resource onto the target resoruces informed by the set of properties in the aggregate Properties. * @param resource the resource identified by the event * @param targetResource a resource to which aggregation should be applied. * @param agregateProperties a map of properties derived from...
Aggregate the resource onto the target resoruces informed by the set of properties in the aggregate Properties
aggregate
{ "repo_name": "roxolan/nakamura", "path": "sandbox/aggregate/src/main/java/org/sakaiproject/nakamura/api/aggregate/ResourceAggregator.java", "license": "apache-2.0", "size": 1581 }
[ "java.util.Map", "org.apache.sling.api.resource.Resource" ]
import java.util.Map; import org.apache.sling.api.resource.Resource;
import java.util.*; import org.apache.sling.api.resource.*;
[ "java.util", "org.apache.sling" ]
java.util; org.apache.sling;
1,205,768
void writeElement(String name, List att, String text) throws KNXMLException;
void writeElement(String name, List att, String text) throws KNXMLException;
/** * Writes a new element to the current position in a document. * <p> * Predefined entities in <code>text</code> are replaced with references before * write. * * @param name element name, the element's type * @param att attribute specifications for this element, empty list or * <code>n...
Writes a new element to the current position in a document. Predefined entities in <code>text</code> are replaced with references before write
writeElement
{ "repo_name": "ow2-chameleon/fuchsia", "path": "bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/XMLWriter.java", "license": "apache-2.0", "size": 7091 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,157,069
public final void testGetMGFParameters01() { PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1); assertTrue(MGF1ParameterSpec.SHA1.equals(pssps.getMGFParameters())); }
final void function() { PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1); assertTrue(MGF1ParameterSpec.SHA1.equals(pssps.getMGFParameters())); }
/** * Test #1 for <code>getMGFParameters()</code> method * Assertion: returns mask generation function parameters */
Test #1 for <code>getMGFParameters()</code> method Assertion: returns mask generation function parameters
testGetMGFParameters01
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/spec/PSSParameterSpecTest.java", "license": "gpl-3.0", "size": 8468 }
[ "java.security.spec.MGF1ParameterSpec", "java.security.spec.PSSParameterSpec" ]
import java.security.spec.MGF1ParameterSpec; import java.security.spec.PSSParameterSpec;
import java.security.spec.*;
[ "java.security" ]
java.security;
393,577
public EventType getEventType();
EventType function();
/** * Returns the event type that the view that is created by the view factory would create for events posted * by the view. * @return event type of view's created by the view factory */
Returns the event type that the view that is created by the view factory would create for events posted by the view
getEventType
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/view/ViewFactory.java", "license": "gpl-2.0", "size": 3702 }
[ "com.espertech.esper.client.EventType" ]
import com.espertech.esper.client.EventType;
import com.espertech.esper.client.*;
[ "com.espertech.esper" ]
com.espertech.esper;
1,655,575
public boolean checkFireDisableFlag(AnBoardPosition p_position, int p_radius, FdChange p_fdChange, Collection<FireDisabling> p_fdRemoved, Collection<FireDisabling> p_fdAdded) { assert m_game != null; boolean isFdChanged = false; EbToken token = m_game.getToken( p_position ); EnuColor tea...
boolean function(AnBoardPosition p_position, int p_radius, FdChange p_fdChange, Collection<FireDisabling> p_fdRemoved, Collection<FireDisabling> p_fdAdded) { assert m_game != null; boolean isFdChanged = false; EbToken token = m_game.getToken( p_position ); EnuColor teamColor = new EnuColor( EnuColor.None ); if( token !...
/** * Check fire disable flag of all token in an area around p_position BUT NOT at p_position * AND NOT token that are controlled by same player. * Note that despite p_radius parameter, area ISN'T round but is square. * @param p_position * @param p_radius * @param p_fdRemoved * @param p_fdAdded ...
Check fire disable flag of all token in an area around p_position BUT NOT at p_position AND NOT token that are controlled by same player. Note that despite p_radius parameter, area ISN'T round but is square
checkFireDisableFlag
{ "repo_name": "kroc702/fullmetalgalaxy", "path": "src/com/fullmetalgalaxy/model/BoardFireCover.java", "license": "agpl-3.0", "size": 24322 }
[ "com.fullmetalgalaxy.model.persist.AnBoardPosition", "com.fullmetalgalaxy.model.persist.EbToken", "com.fullmetalgalaxy.model.persist.FireDisabling", "java.util.Collection" ]
import com.fullmetalgalaxy.model.persist.AnBoardPosition; import com.fullmetalgalaxy.model.persist.EbToken; import com.fullmetalgalaxy.model.persist.FireDisabling; import java.util.Collection;
import com.fullmetalgalaxy.model.persist.*; import java.util.*;
[ "com.fullmetalgalaxy.model", "java.util" ]
com.fullmetalgalaxy.model; java.util;
786,376
@Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(10); }
PasswordEncoder function() { return new BCryptPasswordEncoder(10); }
/** * BCryptPasswordEncoder takes a work factor as first argument. The default is 10, the valid range is 4 to 31. The * amount of work increases exponentially. */
BCryptPasswordEncoder takes a work factor as first argument. The default is 10, the valid range is 4 to 31. The amount of work increases exponentially
passwordEncoder
{ "repo_name": "dschadow/JavaSecurity", "path": "access-control-spring-security/src/main/java/de/dominikschadow/javasecurity/Application.java", "license": "apache-2.0", "size": 1988 }
[ "org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder", "org.springframework.security.crypto.password.PasswordEncoder" ]
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.crypto.bcrypt.*; import org.springframework.security.crypto.password.*;
[ "org.springframework.security" ]
org.springframework.security;
2,367,433
public void emit(View emiter, int particlesPerSecond) { // Setup emiter emitWithGravity(emiter, Gravity.CENTER, particlesPerSecond); }
void function(View emiter, int particlesPerSecond) { emitWithGravity(emiter, Gravity.CENTER, particlesPerSecond); }
/** * Starts emiting particles from a specific view. If at some point the number goes over the amount of particles availabe on create * no new particles will be created * * @param emiter View from which center the particles will be emited * @param particlesPerSecond Number of partic...
Starts emiting particles from a specific view. If at some point the number goes over the amount of particles availabe on create no new particles will be created
emit
{ "repo_name": "Cleveroad/FireworkyPullToRefresh", "path": "library/src/main/java/com/cleveroad/pulltorefresh/firework/particlesystem/ParticleSystem.java", "license": "mit", "size": 30246 }
[ "android.view.Gravity", "android.view.View" ]
import android.view.Gravity; import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,195,714
private static void saveRequestParameter(final HttpServletRequest request, final HttpSession session, final String name) { final String value = request.getParameter(name); if (value != null) { session.setAttribute(name, value); } }
static void function(final HttpServletRequest request, final HttpSession session, final String name) { final String value = request.getParameter(name); if (value != null) { session.setAttribute(name, value); } }
/** * Save a request parameter in the web session. * * @param request The HTTP request * @param session The HTTP session * @param name The name of the parameter */
Save a request parameter in the web session
saveRequestParameter
{ "repo_name": "vydra/cas", "path": "support/cas-server-support-pac4j/src/main/java/org/apereo/cas/support/pac4j/web/flow/ClientAction.java", "license": "apache-2.0", "size": 13851 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpSession" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,200,616
public void setThreads(int min, int max) { QueuedThreadPool pool = (QueuedThreadPool) webServer.getThreadPool() ; pool.setMinThreads(min); pool.setMaxThreads(max); }
void function(int min, int max) { QueuedThreadPool pool = (QueuedThreadPool) webServer.getThreadPool() ; pool.setMinThreads(min); pool.setMaxThreads(max); }
/** * Set the min, max number of worker threads (simultaneous connections). */
Set the min, max number of worker threads (simultaneous connections)
setThreads
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/core/org/apache/hadoop/http/HttpServer.java", "license": "apache-2.0", "size": 26533 }
[ "org.mortbay.thread.QueuedThreadPool" ]
import org.mortbay.thread.QueuedThreadPool;
import org.mortbay.thread.*;
[ "org.mortbay.thread" ]
org.mortbay.thread;
1,786,562
player_energy = handler.getWorld().getEntity_manager().getPlayer().energy; bar_index = (int) Math.ceil(Assets.mana_bar.length * ((float) (player_energy)/(float)(handler.getWorld().getEntity_manager().getPlayer().MAX_ENERGY)))-1; if (bar_index < 0) { bar_index = 0; } if (bar_index > Assets.mana_bar.le...
player_energy = handler.getWorld().getEntity_manager().getPlayer().energy; bar_index = (int) Math.ceil(Assets.mana_bar.length * ((float) (player_energy)/(float)(handler.getWorld().getEntity_manager().getPlayer().MAX_ENERGY)))-1; if (bar_index < 0) { bar_index = 0; } if (bar_index > Assets.mana_bar.length-1) { bar_index...
/** * <i><b>tick</b></i> * <pre> public void tick()</pre> * <p>This tick method updates the bars variables</p> * @param * @return * **/
tick <code> public void tick()</code> This tick method updates the bars variables
tick
{ "repo_name": "VilePoison/JavaGame", "path": "Game/src/dev/lucas/game/ui/UIPlayerEnergyStatusBar.java", "license": "gpl-3.0", "size": 2495 }
[ "dev.lucas.game.gfx.Assets" ]
import dev.lucas.game.gfx.Assets;
import dev.lucas.game.gfx.*;
[ "dev.lucas.game" ]
dev.lucas.game;
1,580,697
@Test void testCompensatingCalcWithAggregate0() { String mv = "" + "select * from\n" + "(select \"deptno\", sum(\"salary\") as \"sum_salary\", sum(\"commission\")\n" + "from \"emps\"\n" + "group by \"deptno\")\n" + "where \"sum_salary\" > 10"; String query = "" ...
@Test void testCompensatingCalcWithAggregate0() { String mv = STRselect * from\nSTR(select \STR, sum(\STR) as \STR, sum(\STR)\nSTRfrom \"emps\"\nSTRgroup by \STR)\nSTRwhere \STR > 10"; String query = STRselect * from\nSTR(select \STR, sum(\STR) as \STR\nSTRfrom \"emps\"\nSTRgroup by \STR)\nSTRwhere \STR > 10"; sql(mv, ...
/** * There will be a compensating Project added after matching of the Aggregate. * This rule targets to test if the Calc can be handled. */
There will be a compensating Project added after matching of the Aggregate. This rule targets to test if the Calc can be handled
testCompensatingCalcWithAggregate0
{ "repo_name": "datametica/calcite", "path": "core/src/test/java/org/apache/calcite/test/MaterializedViewSubstitutionVisitorTest.java", "license": "apache-2.0", "size": 61771 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,572,021
public Observable<ServiceResponse<BgpConnectionInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, String connectionName, BgpConnectionInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter th...
Observable<ServiceResponse<BgpConnectionInner>> function(String resourceGroupName, String virtualHubName, String connectionName, BgpConnectionInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR...
/** * Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. * * @param resourceGroupName The resource group name of the VirtualHub. * @param virtualHubName The name of the VirtualHub. * @param connectionName The name of the connection....
Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection
beginCreateOrUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/VirtualHubBgpConnectionsInner.java", "license": "mit", "size": 45399 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
646,632
public static void fetchReports(final Context context) { try { if (Util.isConnected(context)) { if (Categories.getAllCategoriesFromWeb()) { mNewCategories = HandleXml.processCategoriesXml(Preferences.categoriesResponse); } if ...
static void function(final Context context) { try { if (Util.isConnected(context)) { if (Categories.getAllCategoriesFromWeb()) { mNewCategories = HandleXml.processCategoriesXml(Preferences.categoriesResponse); } if (Incidents.getAllIncidentsFromWeb()) { mNewIncidents = HandleXml.processIncidentsXml(Preferences.incident...
/** * Fetch reports details from the internet * * @param context - the activity calling this method. */
Fetch reports details from the internet
fetchReports
{ "repo_name": "mckayb24/Ushahidi_Android", "path": "Core/src/com/ushahidi/android/app/util/ApiUtils.java", "license": "lgpl-3.0", "size": 10886 }
[ "android.content.Context", "com.ushahidi.android.app.MainApplication", "com.ushahidi.android.app.Preferences", "com.ushahidi.android.app.data.HandleXml", "com.ushahidi.android.app.net.Categories", "com.ushahidi.android.app.net.Incidents", "java.io.IOException" ]
import android.content.Context; import com.ushahidi.android.app.MainApplication; import com.ushahidi.android.app.Preferences; import com.ushahidi.android.app.data.HandleXml; import com.ushahidi.android.app.net.Categories; import com.ushahidi.android.app.net.Incidents; import java.io.IOException;
import android.content.*; import com.ushahidi.android.app.*; import com.ushahidi.android.app.data.*; import com.ushahidi.android.app.net.*; import java.io.*;
[ "android.content", "com.ushahidi.android", "java.io" ]
android.content; com.ushahidi.android; java.io;
213,532
public int doEndTag() throws JspException { if (this.changeResponseLocale) { // set the locale for the response pageContext.getResponse().setLocale(getLocale()); } return EVAL_PAGE; }
int function() throws JspException { if (this.changeResponseLocale) { pageContext.getResponse().setLocale(getLocale()); } return EVAL_PAGE; }
/** * Sets the response locale if the changeResponseLocale attribute was set * to true, OR if changeResponseLocale was unset and the tag was empty */
Sets the response locale if the changeResponseLocale attribute was set to true, OR if changeResponseLocale was unset and the tag was empty
doEndTag
{ "repo_name": "jboss-integration/kie-uberfire-extensions", "path": "i18n-taglib/src/main/java/org/apache/taglibs/i18n/LocaleTag.java", "license": "apache-2.0", "size": 4662 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
2,515,607
GenericTableSchema getTableSchema(Class<?> klazz);
GenericTableSchema getTableSchema(Class<?> klazz);
/** * Retrieve the table schema for the given table in the given database schema. * * @param klazz The class whose table schema should be retrieved. Classes are matched in the database schema either * using their {@link TypedTable} annotation, if they have one, or by name. * @retur...
Retrieve the table schema for the given table in the given database schema
getTableSchema
{ "repo_name": "opendaylight/ovsdb", "path": "library/impl/src/main/java/org/opendaylight/ovsdb/lib/schema/typed/TypedDatabaseSchema.java", "license": "epl-1.0", "size": 5358 }
[ "org.opendaylight.ovsdb.lib.schema.GenericTableSchema" ]
import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
import org.opendaylight.ovsdb.lib.schema.*;
[ "org.opendaylight.ovsdb" ]
org.opendaylight.ovsdb;
409,561
private void doAddLocationProvider(LocationProviderProxy locationProvider) { String providerName = TiConvert.toString(locationProvider.getProperty(TiC.PROPERTY_NAME)); if (!(tiLocation.isProvider(providerName))) { Log.e(TAG, "Unable to add location provider [" + providerName + "], does not exist"); retur...
void function(LocationProviderProxy locationProvider) { String providerName = TiConvert.toString(locationProvider.getProperty(TiC.PROPERTY_NAME)); if (!(tiLocation.isProvider(providerName))) { Log.e(TAG, STR + providerName + STR); return; } LocationProviderProxy existingLocationProvider = manualLocationProviders.get(pr...
/** * Adds the specified location provider to the list of manual location providers. If a location * provider with the same "name" property already exists in the list of manual location * providers then the existing provider will be removed and the specified one will be added in it's * place. * * @param loc...
Adds the specified location provider to the list of manual location providers. If a location provider with the same "name" property already exists in the list of manual location providers then the existing provider will be removed and the specified one will be added in it's place
doAddLocationProvider
{ "repo_name": "mano-mykingdom/titanium_mobile", "path": "android/modules/geolocation/src/java/ti/modules/titanium/geolocation/android/AndroidModule.java", "license": "apache-2.0", "size": 9252 }
[ "org.appcelerator.kroll.common.Log", "org.appcelerator.titanium.TiC", "org.appcelerator.titanium.util.TiConvert" ]
import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.TiC; import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.kroll.common.*; import org.appcelerator.titanium.*; import org.appcelerator.titanium.util.*;
[ "org.appcelerator.kroll", "org.appcelerator.titanium" ]
org.appcelerator.kroll; org.appcelerator.titanium;
2,067,959
public Point getPosition(){return vector.origin;}
public Point getPosition(){return vector.origin;}
/** * Return the pixel's number above the Sprite center; * @return {@link Sprite#NORTH} */
Return the pixel's number above the Sprite center
getNorth
{ "repo_name": "tabuto/j2dgf", "path": "src/com/tabuto/j2dgf/Sprite.java", "license": "lgpl-3.0", "size": 16038 }
[ "com.tabuto.util.Point" ]
import com.tabuto.util.Point;
import com.tabuto.util.*;
[ "com.tabuto.util" ]
com.tabuto.util;
978,986
public List<Artist> getStarredArtists(int offset, int count, String username) { return query("select " + prefix(COLUMNS, "artist") + " from starred_artist, artist where artist.id = starred_artist.artist_id and " + "artist.present and starred_artist.username=? order by starred_artist.created ...
List<Artist> function(int offset, int count, String username) { return query(STR + prefix(COLUMNS, STR) + STR + STR, rowMapper, username, count, offset); }
/** * Returns the most recently starred artists. * * @param offset Number of artists to skip. * @param count Maximum number of artists to return. * @param username Returns artists starred by this user. * @return The most recently starred artists for this user. */
Returns the most recently starred artists
getStarredArtists
{ "repo_name": "Booksonic-Server/madsonic-main", "path": "src/main/java/org/madsonic/dao/ArtistDao.java", "license": "gpl-3.0", "size": 9747 }
[ "java.util.List", "org.madsonic.domain.Artist" ]
import java.util.List; import org.madsonic.domain.Artist;
import java.util.*; import org.madsonic.domain.*;
[ "java.util", "org.madsonic.domain" ]
java.util; org.madsonic.domain;
1,000,182
//------------- Date Num to STR ----------------------------------- public static String dateNum2STR(String Date_In, Configuration conf){ String DayNo_STR = Date_In.substring(8, 10); int DayNo = Integer.parseInt(DayNo_STR); String MonthNo_STR = Date_In.substring(5, 7); ...
static String function(String Date_In, Configuration conf){ String DayNo_STR = Date_In.substring(8, 10); int DayNo = Integer.parseInt(DayNo_STR); String MonthNo_STR = Date_In.substring(5, 7); int MonthNo = Integer.parseInt(MonthNo_STR); String Month_STR = formatMonth(Integer.parseInt(MonthNo_STR), conf.locale); String ...
/** * Convert "YYYY-MM-DD" to "Friday X Month Year" * * @param Date_In * @param conf * @return */
Convert "YYYY-MM-DD" to "Friday X Month Year"
dateNum2STR
{ "repo_name": "MKLab-ITI/ImproveMyCity-Mobile", "path": "ImproveMyCity_Project/app/src/main/java/com/mk4droid/IMC_Utils/My_Date_Utils.java", "license": "agpl-3.0", "size": 7743 }
[ "android.content.res.Configuration", "android.text.format.DateUtils", "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar" ]
import android.content.res.Configuration; import android.text.format.DateUtils; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar;
import android.content.res.*; import android.text.format.*; import java.util.*;
[ "android.content", "android.text", "java.util" ]
android.content; android.text; java.util;
2,506,325
public void removeMarketingPermissions(TechnicalProduct technicalProduct);
void function(TechnicalProduct technicalProduct);
/** * Removes all marketing permissions pointing to the specified technical * product. If the organization reference does not have other marketing * permissions the reference will be deleted, too. * * @param technicalProduct * The technical product for which marketing permissio...
Removes all marketing permissions pointing to the specified technical product. If the organization reference does not have other marketing permissions the reference will be deleted, too
removeMarketingPermissions
{ "repo_name": "opetrovski/development", "path": "oscm-accountmgmt-intsvc/javasrc/org/oscm/accountservice/local/MarketingPermissionServiceLocal.java", "license": "apache-2.0", "size": 5042 }
[ "org.oscm.domobjects.TechnicalProduct" ]
import org.oscm.domobjects.TechnicalProduct;
import org.oscm.domobjects.*;
[ "org.oscm.domobjects" ]
org.oscm.domobjects;
2,771,561
PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; }
PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; }
/** * Returns a new instance of this fragment for the given section * number. */
Returns a new instance of this fragment for the given section number
newInstance
{ "repo_name": "NayaneshGupte/Android-Simple-Demos", "path": "PagerExample/app/src/main/java/in/nrg/sampleapps/pagerexample/fragments/PlaceholderFragment.java", "license": "apache-2.0", "size": 3303 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,483,205
public BinaryField getBinaryFieldObject(Integer troid) { return (BinaryField)getObject(troid); }
BinaryField function(Integer troid) { return (BinaryField)getObject(troid); }
/** * Retrieve the <code>BinaryField</code> as a <code>BinaryField</code>. * * see org.melati.poem.prepro.TableDef#generateTableBaseJava * @param troid a Table Row Oject ID * @return the <code>Persistent</code> identified by the <code>troid</code> */
Retrieve the <code>BinaryField</code> as a <code>BinaryField</code>. see org.melati.poem.prepro.TableDef#generateTableBaseJava
getBinaryFieldObject
{ "repo_name": "timp21337/melati-old", "path": "poem/src/test/java/org/melati/poem/test/generated/BinaryFieldTableBase.java", "license": "gpl-2.0", "size": 10471 }
[ "org.melati.poem.test.BinaryField" ]
import org.melati.poem.test.BinaryField;
import org.melati.poem.test.*;
[ "org.melati.poem" ]
org.melati.poem;
213,266
public boolean containsValue(V value) { Objects.requireNonNull(value); expungeStaleEntries(); return reverseMap.containsKey(new LookupValue<>(value)); }
boolean function(V value) { Objects.requireNonNull(value); expungeStaleEntries(); return reverseMap.containsKey(new LookupValue<>(value)); }
/** * Checks whether the specified non-null value is already present in this * {@code WeakCache}. The check is made using identity comparison regardless * of whether value's class overrides {@link Object#equals} or not. * * @param value the non-null value to check * @return true if given {...
Checks whether the specified non-null value is already present in this WeakCache. The check is made using identity comparison regardless of whether value's class overrides <code>Object#equals</code> or not
containsValue
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/java/lang/reflect/WeakCache.java", "license": "apache-2.0", "size": 13443 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,780,027
public static <T> String toJsonString(T instance) throws JsonProcessingException { return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(instance); }
static <T> String function(T instance) throws JsonProcessingException { return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(instance); }
/** * Converts a given instance of a class into its JSON data string representation * @param instance The T object to be converted into the JSON string * @param <T> The generic type to create an instance of * @return JSON data representation of the given class instance, in string */
Converts a given instance of a class into its JSON data string representation
toJsonString
{ "repo_name": "CS2103AUG2016-T10-C3/main", "path": "src/main/java/seedu/emeraldo/commons/util/JsonUtil.java", "license": "mit", "size": 3138 }
[ "com.fasterxml.jackson.core.JsonProcessingException" ]
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,614,270
public void setLongShort(LongShort longShort) { JodaBeanUtils.notNull(longShort, "longShort"); this._longShort = longShort; }
void function(LongShort longShort) { JodaBeanUtils.notNull(longShort, STR); this._longShort = longShort; }
/** * Sets the long/short type. * @param longShort the new value of the property, not null */
Sets the long/short type
setLongShort
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/option/NonDeliverableFXDigitalOptionSecurity.java", "license": "apache-2.0", "size": 24872 }
[ "com.opengamma.financial.security.LongShort", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.financial.security.LongShort; import org.joda.beans.JodaBeanUtils;
import com.opengamma.financial.security.*; import org.joda.beans.*;
[ "com.opengamma.financial", "org.joda.beans" ]
com.opengamma.financial; org.joda.beans;
677,231
public static void assertEquivalenceOperations(JSType a, JSType b) { Assert.assertTrue(a.isEquivalentTo(b)); Assert.assertTrue(a.isEquivalentTo(a)); Assert.assertTrue(b.isEquivalentTo(b)); Assert.assertTrue(b.isEquivalentTo(a)); Assert.assertTrue(a.isSubtypeOf(b)); Assert.assertTrue(a.isSubty...
static void function(JSType a, JSType b) { Assert.assertTrue(a.isEquivalentTo(b)); Assert.assertTrue(a.isEquivalentTo(a)); Assert.assertTrue(b.isEquivalentTo(b)); Assert.assertTrue(b.isEquivalentTo(a)); Assert.assertTrue(a.isSubtypeOf(b)); Assert.assertTrue(a.isSubtypeOf(a)); Assert.assertTrue(b.isSubtypeOf(b)); Assert...
/** * For the given equivalent types, run all type operations that * should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc) */
For the given equivalent types, run all type operations that should have trivial solutions (getGreatestSubtype, isEquivalentTo, etc)
assertEquivalenceOperations
{ "repo_name": "tdelmas/closure-compiler", "path": "src/com/google/javascript/rhino/testing/Asserts.java", "license": "apache-2.0", "size": 5234 }
[ "com.google.javascript.rhino.jstype.JSType", "org.junit.Assert" ]
import com.google.javascript.rhino.jstype.JSType; import org.junit.Assert;
import com.google.javascript.rhino.jstype.*; import org.junit.*;
[ "com.google.javascript", "org.junit" ]
com.google.javascript; org.junit;
1,333,498
public void addContainerListener(ContainerListener listener) { synchronized (listeners) { listeners.add(listener); } }
void function(ContainerListener listener) { synchronized (listeners) { listeners.add(listener); } }
/** * Add a container event listener to this component. * * @param listener The listener to add */
Add a container event listener to this component
addContainerListener
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/core/ContainerBase.java", "license": "apache-2.0", "size": 44660 }
[ "org.apache.catalina.ContainerListener" ]
import org.apache.catalina.ContainerListener;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,070,203
void deleteNodes(Collection<INaviViewNode> nodes);
void deleteNodes(Collection<INaviViewNode> nodes);
/** * Deletes nodes from the view. * * @param nodes The nodes to delete. */
Deletes nodes from the view
deleteNodes
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/IViewContent.java", "license": "apache-2.0", "size": 4155 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,585,956
public void addFilesToApk(List<File> files, Map<String, String> paths) throws IOException { // close zip file to rename apk if(this.zip != null) { this.zip.close(); this.zip = null; } // add missing paths to directories parameter for(File file : files) { if(!paths.containsKey(file.getPath())) ...
void function(List<File> files, Map<String, String> paths) throws IOException { if(this.zip != null) { this.zip.close(); this.zip = null; } for(File file : files) { if(!paths.containsKey(file.getPath())) paths.put(file.getPath(), file.getName()); } File tempFile = File.createTempFile(this.apk.getName(), null); tempFile...
/** * Adds the files to the APK which is handled by this {@link ApkHandler}. * * @param files Array with File objects to be added to the APK. * @param paths Map containing paths where to put the files. The Map's keys are the file's paths: <code>paths.get(file.getPath())</code> * @throws IOException if ...
Adds the files to the APK which is handled by this <code>ApkHandler</code>
addFilesToApk
{ "repo_name": "wsnavely/soot-infoflow-android", "path": "src/soot/jimple/infoflow/android/axml/ApkHandler.java", "license": "lgpl-2.1", "size": 6917 }
[ "com.google.common.io.Files", "java.io.File", "java.io.FileInputStream", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.util.List", "java.util.Map", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream", "java.util.zip.ZipOutputStream" ]
import com.google.common.io.Files; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutput...
import com.google.common.io.*; import java.io.*; import java.util.*; import java.util.zip.*;
[ "com.google.common", "java.io", "java.util" ]
com.google.common; java.io; java.util;
468,387
public void testParseNameValue() throws Exception { CookieSpec cookiespec = new RFC2965Spec(); CookieOrigin origin = new CookieOrigin("www.domain.com", 80, "/", false); Header header = new BasicHeader("Set-Cookie2", "name=value;Version=1;"); List<Cookie> cookies = cookiespec.parse(he...
void function() throws Exception { CookieSpec cookiespec = new RFC2965Spec(); CookieOrigin origin = new CookieOrigin(STR, 80, "/", false); Header header = new BasicHeader(STR, STR); List<Cookie> cookies = cookiespec.parse(header, origin); assertNotNull(cookies); assertEquals(1, cookies.size()); ClientCookie cookie = (C...
/** * test parsing cookie name/value. */
test parsing cookie name/value
testParseNameValue
{ "repo_name": "cstamas/httpclient", "path": "httpclient/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2965Spec.java", "license": "apache-2.0", "size": 43443 }
[ "java.util.List", "org.apache.http.Header", "org.apache.http.cookie.ClientCookie", "org.apache.http.cookie.Cookie", "org.apache.http.cookie.CookieOrigin", "org.apache.http.cookie.CookieSpec", "org.apache.http.message.BasicHeader" ]
import java.util.List; import org.apache.http.Header; import org.apache.http.cookie.ClientCookie; import org.apache.http.cookie.Cookie; import org.apache.http.cookie.CookieOrigin; import org.apache.http.cookie.CookieSpec; import org.apache.http.message.BasicHeader;
import java.util.*; import org.apache.http.*; import org.apache.http.cookie.*; import org.apache.http.message.*;
[ "java.util", "org.apache.http" ]
java.util; org.apache.http;
644,994
return new HandshakeImpl1Server(); }
return new HandshakeImpl1Server(); }
/** * This default implementation does not do anything. Go ahead and overwrite it. * * @see org.java_websocket.WebSocketListener#onWebsocketHandshakeReceivedAsServer(WebSocket, Draft, ClientHandshake) */
This default implementation does not do anything. Go ahead and overwrite it
onWebsocketHandshakeReceivedAsServer
{ "repo_name": "gamedevpl/gamedev-cloud", "path": "src/org/java_websocket/WebSocketAdapter.java", "license": "mit", "size": 4701 }
[ "org.java_websocket.handshake.HandshakeImpl1Server" ]
import org.java_websocket.handshake.HandshakeImpl1Server;
import org.java_websocket.handshake.*;
[ "org.java_websocket.handshake" ]
org.java_websocket.handshake;
258,531
public VirtualNetworkGatewaySku sku() { return this.sku; }
VirtualNetworkGatewaySku function() { return this.sku; }
/** * Get the sku value. * * @return the sku value */
Get the sku value
sku
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayInner.java", "license": "mit", "size": 9544 }
[ "com.microsoft.azure.management.network.VirtualNetworkGatewaySku" ]
import com.microsoft.azure.management.network.VirtualNetworkGatewaySku;
import com.microsoft.azure.management.network.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,650,634
public SubprocessBuilder pipeStdin(final InputStream stream) { redirectStdin(PIPE); this.stdinPipe = stream; return this; }
SubprocessBuilder function(final InputStream stream) { redirectStdin(PIPE); this.stdinPipe = stream; return this; }
/** * Pipe an {@link InputStream} into stdin of the subprocess on a background thread. */
Pipe an <code>InputStream</code> into stdin of the subprocess on a background thread
pipeStdin
{ "repo_name": "spotify/spawn", "path": "src/main/java/com/spotify/spawn/Subprocesses.java", "license": "apache-2.0", "size": 7642 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
410,597
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount) { set_Value (COLUMNNAME_A_Depreciation_Manual_Amount, A_Depreciation_Manual_Amount); }
void function (BigDecimal A_Depreciation_Manual_Amount) { set_Value (COLUMNNAME_A_Depreciation_Manual_Amount, A_Depreciation_Manual_Amount); }
/** Set Depreciation Manual Amount. @param A_Depreciation_Manual_Amount Depreciation Manual Amount */
Set Depreciation Manual Amount
setA_Depreciation_Manual_Amount
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_I_Asset.java", "license": "gpl-2.0", "size": 44316 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,839,301