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
@Contract(pure=true) PsiElement getLastChild();
@Contract(pure=true) PsiElement getLastChild();
/** * Returns the last child of the PSI element. * * @return the last child, or null if the element has no children. */
Returns the last child of the PSI element
getLastChild
{ "repo_name": "goodwinnk/intellij-community", "path": "platform/core-api/src/com/intellij/psi/PsiElement.java", "license": "apache-2.0", "size": 21426 }
[ "org.jetbrains.annotations.Contract" ]
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
788,156
@Test(expected = OccupiedWayException.class) public void whenOtherFigureOnMoveQueenThanTrowException() throws ImpossibleMoveException, OccupiedWayException, FigureNotFoundException { board.addFigure(bishop); board.addFigure(queen); board.move(queen.getPosition(), getObjectCell(1, 3))...
@Test(expected = OccupiedWayException.class) void function() throws ImpossibleMoveException, OccupiedWayException, FigureNotFoundException { board.addFigure(bishop); board.addFigure(queen); board.move(queen.getPosition(), getObjectCell(1, 3)); }
/** * Testing the operation of the exception when on the way of stroke has a different figure. * @throws ImpossibleMoveException exception in case of impossibility of motion figure. * @throws OccupiedWayException exception if there's other figures. * @throws FigureNotFoundException exception if ...
Testing the operation of the exception when on the way of stroke has a different figure
whenOtherFigureOnMoveQueenThanTrowException
{ "repo_name": "sergeyBulygin/Java_a_to_z", "path": "Chapter_002/Test_task/Game/src/test/java/ru/sbulygin/chees/BoardTest.java", "license": "apache-2.0", "size": 16452 }
[ "org.junit.Test", "ru.sbulygin.chees.Cell", "ru.sbulygin.exeptions.FigureNotFoundException", "ru.sbulygin.exeptions.ImpossibleMoveException", "ru.sbulygin.exeptions.OccupiedWayException" ]
import org.junit.Test; import ru.sbulygin.chees.Cell; import ru.sbulygin.exeptions.FigureNotFoundException; import ru.sbulygin.exeptions.ImpossibleMoveException; import ru.sbulygin.exeptions.OccupiedWayException;
import org.junit.*; import ru.sbulygin.chees.*; import ru.sbulygin.exeptions.*;
[ "org.junit", "ru.sbulygin.chees", "ru.sbulygin.exeptions" ]
org.junit; ru.sbulygin.chees; ru.sbulygin.exeptions;
268,955
protected String domain() { if (uri.getPath().startsWith("queues/")) { return "queue"; } else if (uri.getPath().startsWith("topics/")) { return "topic"; } else if (uri.getPath().startsWith("persistent/")) { return "persistent"; } else { ...
String function() { if (uri.getPath().startsWith(STR)) { return "queue"; } else if (uri.getPath().startsWith(STR)) { return "topic"; } else if (uri.getPath().startsWith(STR)) { return STR; } else { throw new RestException(Status.INTERNAL_SERVER_ERROR, STR); } }
/** * Get the domain of the destination (whether it's queue or topic) */
Get the domain of the destination (whether it's queue or topic)
domain
{ "repo_name": "agarman/pulsar", "path": "pulsar-broker/src/main/java/com/yahoo/pulsar/broker/admin/AdminResource.java", "license": "apache-2.0", "size": 11251 }
[ "com.yahoo.pulsar.broker.web.RestException", "javax.ws.rs.core.Response" ]
import com.yahoo.pulsar.broker.web.RestException; import javax.ws.rs.core.Response;
import com.yahoo.pulsar.broker.web.*; import javax.ws.rs.core.*;
[ "com.yahoo.pulsar", "javax.ws" ]
com.yahoo.pulsar; javax.ws;
372,641
public XYItemRenderer getRenderer(int index) { XYItemRenderer result = null; if (this.renderers.size() > index) { result = (XYItemRenderer) this.renderers.get(index); } return result; }
XYItemRenderer function(int index) { XYItemRenderer result = null; if (this.renderers.size() > index) { result = (XYItemRenderer) this.renderers.get(index); } return result; }
/** * Returns the renderer for a dataset, or <code>null</code>. * * @param index the renderer index. * * @return The renderer (possibly <code>null</code>). * * @see #setRenderer(int, XYItemRenderer) */
Returns the renderer for a dataset, or <code>null</code>
getRenderer
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java", "license": "mit", "size": 199979 }
[ "org.jfree.chart.renderer.xy.XYItemRenderer" ]
import org.jfree.chart.renderer.xy.XYItemRenderer;
import org.jfree.chart.renderer.xy.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,198,062
public void removeToDo(String id) throws TodoException { SilverTrace.info("todo", "ToDoSessionController.removeToDo()", "root.MSG_GEN_ENTER_METHOD"); try { calendarBm.removeToDo(id); SilverTrace.info("todo", "ToDoSessionController.removeToDo()", "root.MSG_GEN_EXIT_METHOD"); }...
void function(String id) throws TodoException { SilverTrace.info("todo", STR, STR); try { calendarBm.removeToDo(id); SilverTrace.info("todo", STR, STR); } catch (Exception e) { throw new TodoException(STR, SilverpeasException.ERROR, STR, e); } }
/** * Method declaration * * @param id * @throws TodoException * @see */
Method declaration
removeToDo
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/webactiv/todo/control/ToDoSessionController.java", "license": "agpl-3.0", "size": 20258 }
[ "com.stratelia.silverpeas.silvertrace.SilverTrace", "com.stratelia.webactiv.util.exception.SilverpeasException" ]
import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.exception.SilverpeasException;
import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.exception.*;
[ "com.stratelia.silverpeas", "com.stratelia.webactiv" ]
com.stratelia.silverpeas; com.stratelia.webactiv;
915,221
public static <K,V,T> Object findResult(Map<K,V> receiver, Object defaultResult, BiFunction<K,V,T> function) { for (Map.Entry<K,V> kvPair : receiver.entrySet()) { T value = function.apply(kvPair.getKey(), kvPair.getValue()); if (value != null) { return value; ...
static <K,V,T> Object function(Map<K,V> receiver, Object defaultResult, BiFunction<K,V,T> function) { for (Map.Entry<K,V> kvPair : receiver.entrySet()) { T value = function.apply(kvPair.getKey(), kvPair.getValue()); if (value != null) { return value; } } return defaultResult; }
/** * Iterates through the map calling the given function for each item * but stopping once the first non-null result is found and returning that result. * If all results are null, defaultResult is returned. */
Iterates through the map calling the given function for each item but stopping once the first non-null result is found and returning that result. If all results are null, defaultResult is returned
findResult
{ "repo_name": "jimczi/elasticsearch", "path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/api/Augmentation.java", "license": "apache-2.0", "size": 18692 }
[ "java.util.Map", "java.util.function.BiFunction" ]
import java.util.Map; import java.util.function.BiFunction;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
1,721,736
public MysqliStatement prepare(Env env, StringValue query) { MysqliStatement stmt = new MysqliStatement((Mysqli) validateConnection()); boolean result = stmt.prepare(env, query); if (! result) { stmt.close(); return null; } return stmt; }
MysqliStatement function(Env env, StringValue query) { MysqliStatement stmt = new MysqliStatement((Mysqli) validateConnection()); boolean result = stmt.prepare(env, query); if (! result) { stmt.close(); return null; } return stmt; }
/** * returns a prepared statement or null on error. */
returns a prepared statement or null on error
prepare
{ "repo_name": "dlitz/resin", "path": "modules/quercus/src/com/caucho/quercus/lib/db/Mysqli.java", "license": "gpl-2.0", "size": 42236 }
[ "com.caucho.quercus.env.Env", "com.caucho.quercus.env.StringValue" ]
import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
451,528
protected Map<String, String> filterByReturnedFieldConversions(String multiValueReturnFields, Map<String, String> fieldConversions) { Map <String, String> returnedFieldConversions = new HashMap<String, String>(); returnedFieldConversions.putAll(fieldConversions); // parse...
Map<String, String> function(String multiValueReturnFields, Map<String, String> fieldConversions) { Map <String, String> returnedFieldConversions = new HashMap<String, String>(); returnedFieldConversions.putAll(fieldConversions); String[] returnedFieldsStrArr = StringUtils.split(multiValueReturnFields, ","); if (return...
/** * Filters the field conversions by the multi value return fields * @param multiValueReturnFields the return fields to filter by, as a comma separated string * @param fieldConversions the map of field conversions to filter * @return a {@link java.util.Map} containing the filtered field conver...
Filters the field conversions by the multi value return fields
filterByReturnedFieldConversions
{ "repo_name": "ricepanda/rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/service/impl/ViewHelperServiceImpl.java", "license": "apache-2.0", "size": 55434 }
[ "java.util.HashMap", "java.util.Map", "org.apache.commons.lang.StringUtils" ]
import java.util.HashMap; import java.util.Map; import org.apache.commons.lang.StringUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
519,750
public void associateConnection(ManagedConnectionFactory mcf, Subject subject, ConnectionRequestInfo cri, Object connection) throws ResourceException;
void function(ManagedConnectionFactory mcf, Subject subject, ConnectionRequestInfo cri, Object connection) throws ResourceException;
/** * AssociateConnection should be called by the ResourceAdapter before any work is done on an inactive * Connection. * * @param mcf The ManagedConnectionFactory that may be used to create a new ManagedConnection (usually one * will be found in the pool). * @param subject The ...
AssociateConnection should be called by the ResourceAdapter before any work is done on an inactive Connection
associateConnection
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jca.cm/src/com/ibm/websphere/j2c/ConnectionManager.java", "license": "epl-1.0", "size": 3297 }
[ "javax.resource.ResourceException", "javax.resource.spi.ConnectionRequestInfo", "javax.resource.spi.ManagedConnectionFactory", "javax.security.auth.Subject" ]
import javax.resource.ResourceException; import javax.resource.spi.ConnectionRequestInfo; import javax.resource.spi.ManagedConnectionFactory; import javax.security.auth.Subject;
import javax.resource.*; import javax.resource.spi.*; import javax.security.auth.*;
[ "javax.resource", "javax.security" ]
javax.resource; javax.security;
2,901,349
@Override public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { super.removeConnection(context, info, error); if (isSSL(context, info)) { this.sslBroker.removeConnection(context, info, error); } else { thi...
void function(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { super.removeConnection(context, info, error); if (isSSL(context, info)) { this.sslBroker.removeConnection(context, info, error); } else { this.nonSslBroker.removeConnection(context, info, error); } }
/** * Overriding removeConnection to make sure the security context is cleaned. */
Overriding removeConnection to make sure the security context is cleaned
removeConnection
{ "repo_name": "chirino/activemq", "path": "activemq-broker/src/main/java/org/apache/activemq/security/JaasDualAuthenticationBroker.java", "license": "apache-2.0", "size": 6119 }
[ "org.apache.activemq.broker.ConnectionContext", "org.apache.activemq.command.ConnectionInfo" ]
import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.ConnectionInfo;
import org.apache.activemq.broker.*; import org.apache.activemq.command.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,074,948
public void pingRequestReceived(String clientID){ try { AndesMQTTBridge.getBridgeInstance().onProcessPingRequest(clientID); } catch (MQTTException e) { log.error("Error occurred while processing the ping request",e); } }
void function(String clientID){ try { AndesMQTTBridge.getBridgeInstance().onProcessPingRequest(clientID); } catch (MQTTException e) { log.error(STR,e); } }
/** * Added by WSO2 in order to execute the scheduler to resend a message to un-acked messages */
Added by WSO2 in order to execute the scheduler to resend a message to un-acked messages
pingRequestReceived
{ "repo_name": "Asitha/andes", "path": "modules/andes-core/broker/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/ProtocolProcessor.java", "license": "apache-2.0", "size": 44025 }
[ "org.dna.mqtt.wso2.AndesMQTTBridge", "org.wso2.andes.mqtt.MQTTException" ]
import org.dna.mqtt.wso2.AndesMQTTBridge; import org.wso2.andes.mqtt.MQTTException;
import org.dna.mqtt.wso2.*; import org.wso2.andes.mqtt.*;
[ "org.dna.mqtt", "org.wso2.andes" ]
org.dna.mqtt; org.wso2.andes;
435,260
public long getMaxFileSize() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; }
long function() { byte [] value = getValue(MAX_FILESIZE_KEY); if (value != null) { return Long.parseLong(Bytes.toString(value)); } return -1; }
/** * Returns the maximum size upto which a region can grow to after which a region * split is triggered. The region size is represented by the size of the biggest * store file in that region. * * @return max hregion size for table, -1 if not set. * * @see #setMaxFileSize(long) */
Returns the maximum size upto which a region can grow to after which a region split is triggered. The region size is represented by the size of the biggest store file in that region
getMaxFileSize
{ "repo_name": "ZhangXFeng/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java", "license": "apache-2.0", "size": 54577 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,578,718
public TaskCompletionEvent[] getTaskCompletionEvents(int startFrom) throws IOException;
TaskCompletionEvent[] function(int startFrom) throws IOException;
/** * Get events indicating completion (success/failure) of component tasks. * * @param startFrom index to start fetching events from * @return an array of {@link TaskCompletionEvent}s * @throws IOException */
Get events indicating completion (success/failure) of component tasks
getTaskCompletionEvents
{ "repo_name": "steveloughran/hadoop-mapreduce", "path": "src/java/org/apache/hadoop/mapred/RunningJob.java", "license": "apache-2.0", "size": 6801 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,283,380
List findByNamedQueryAndNamedParam(String queryName, String[] paramNames, Object[] values, Type[] types) throws DataAccessException;
List findByNamedQueryAndNamedParam(String queryName, String[] paramNames, Object[] values, Type[] types) throws DataAccessException;
/** * Execute a named query for persistent instances, binding a * number of values to ":" named parameters in the query string. * A named query is defined in a Hibernate mapping file. * @param queryName the name of a Hibernate query in a mapping file * @param paramNames the names of the parameters * @param ...
Execute a named query for persistent instances, binding a number of values to ":" named parameters in the query string. A named query is defined in a Hibernate mapping file
findByNamedQueryAndNamedParam
{ "repo_name": "dachengxi/spring1.1.1_source", "path": "src/org/springframework/orm/hibernate/HibernateOperations.java", "license": "mit", "size": 32030 }
[ "java.util.List", "net.sf.hibernate.type.Type", "org.springframework.dao.DataAccessException" ]
import java.util.List; import net.sf.hibernate.type.Type; import org.springframework.dao.DataAccessException;
import java.util.*; import net.sf.hibernate.type.*; import org.springframework.dao.*;
[ "java.util", "net.sf.hibernate", "org.springframework.dao" ]
java.util; net.sf.hibernate; org.springframework.dao;
2,529,230
@Test() public void testPassword() throws Exception { final DIGESTMD5BindRequestProperties properties = new DIGESTMD5BindRequestProperties("u:auth.id", "password"); assertNotNull(properties.getPassword()); assertEquals(properties.getPassword().stringValue(), "password"); proper...
@Test() void function() throws Exception { final DIGESTMD5BindRequestProperties properties = new DIGESTMD5BindRequestProperties(STR, STR); assertNotNull(properties.getPassword()); assertEquals(properties.getPassword().stringValue(), STR); properties.setPassword(STR); assertNotNull(properties.getPassword()); assertEqual...
/** * Tests properties related to the password. * * @throws Exception If an unexpected problem occurs. */
Tests properties related to the password
testPassword
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/DIGESTMD5BindRequestPropertiesTestCase.java", "license": "gpl-2.0", "size": 10511 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
299,686
private static PTransform<PCollection<? extends HCatRecord>, PCollection<Row>> forSchema( Schema schema) { return ParDo.of(new HCatToRowFn(schema)); }
static PTransform<PCollection<? extends HCatRecord>, PCollection<Row>> function( Schema schema) { return ParDo.of(new HCatToRowFn(schema)); }
/** * Creates a {@link PTransform} that converts incoming {@link HCatRecord HCatRecords} to {@link * Row Rows} using specified schema. * * <p>If there is a mismatch between the schema specified here and actual record schema, or * internal representation and schema, then runtime errors will happen. */
Creates a <code>PTransform</code> that converts incoming <code>HCatRecord HCatRecords</code> to <code>Row Rows</code> using specified schema. If there is a mismatch between the schema specified here and actual record schema, or internal representation and schema, then runtime errors will happen
forSchema
{ "repo_name": "iemejia/incubator-beam", "path": "sdks/java/io/hcatalog/src/main/java/org/apache/beam/sdk/io/hcatalog/HCatToRow.java", "license": "apache-2.0", "size": 3358 }
[ "org.apache.beam.sdk.schemas.Schema", "org.apache.beam.sdk.transforms.PTransform", "org.apache.beam.sdk.transforms.ParDo", "org.apache.beam.sdk.values.PCollection", "org.apache.beam.sdk.values.Row", "org.apache.hive.hcatalog.data.HCatRecord" ]
import org.apache.beam.sdk.schemas.Schema; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.transforms.ParDo; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.Row; import org.apache.hive.hcatalog.data.HCatRecord;
import org.apache.beam.sdk.schemas.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; import org.apache.hive.hcatalog.data.*;
[ "org.apache.beam", "org.apache.hive" ]
org.apache.beam; org.apache.hive;
2,578,044
@Test public void testIsJobExecutionAbandonable() { final JobExecution jobExecution = new JobExecution(1L); assertFalse(JobUtils.isJobExecutionAbandonable(jobExecution)); }
void function() { final JobExecution jobExecution = new JobExecution(1L); assertFalse(JobUtils.isJobExecutionAbandonable(jobExecution)); }
/** * Test method for * {@link JobUtils#isJobExecutionAbandonable(org.springframework.batch.core.JobExecution)}. */
Test method for <code>JobUtils#isJobExecutionAbandonable(org.springframework.batch.core.JobExecution)</code>
testIsJobExecutionAbandonable
{ "repo_name": "spring-cloud/spring-cloud-dataflow", "path": "spring-cloud-dataflow-rest-resource/src/test/java/org/springframework/cloud/dataflow/rest/job/support/JobUtilsTests.java", "license": "apache-2.0", "size": 5730 }
[ "org.junit.Assert", "org.springframework.batch.core.JobExecution" ]
import org.junit.Assert; import org.springframework.batch.core.JobExecution;
import org.junit.*; import org.springframework.batch.core.*;
[ "org.junit", "org.springframework.batch" ]
org.junit; org.springframework.batch;
1,079,052
public JRItemLabel clone(JRChart parentChart);
JRItemLabel function(JRChart parentChart);
/** * Returns the item label formatting mask. * The mask will be specified using the patterns defined * in <code>java.text.DecimalFormat</code>. * * @return the item label formatting mask */
Returns the item label formatting mask. The mask will be specified using the patterns defined in <code>java.text.DecimalFormat</code>
clone
{ "repo_name": "juniormesquitadandao/report4all", "path": "lib/src/net/sf/jasperreports/charts/JRItemLabel.java", "license": "mit", "size": 2149 }
[ "net.sf.jasperreports.engine.JRChart" ]
import net.sf.jasperreports.engine.JRChart;
import net.sf.jasperreports.engine.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
1,960,114
Pod editPod(UpdatePodCmd cmd);
Pod editPod(UpdatePodCmd cmd);
/** * Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system. * * @param UpdatePodCmd * api command */
Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system
editPod
{ "repo_name": "cinderella/incubator-cloudstack", "path": "api/src/com/cloud/configuration/ConfigurationService.java", "license": "apache-2.0", "size": 8568 }
[ "com.cloud.api.commands.UpdatePodCmd", "com.cloud.dc.Pod" ]
import com.cloud.api.commands.UpdatePodCmd; import com.cloud.dc.Pod;
import com.cloud.api.commands.*; import com.cloud.dc.*;
[ "com.cloud.api", "com.cloud.dc" ]
com.cloud.api; com.cloud.dc;
2,449,540
public final Set<String> getAdditionalParameters(){ return inputParams.getAdditionalParameters().keySet(); }
final Set<String> function(){ return inputParams.getAdditionalParameters().keySet(); }
/** * Gets the list of parameters' name. * * @return The additional parameters of this job. * * @see UWSParameters#getNames() */
Gets the list of parameters' name
getAdditionalParameters
{ "repo_name": "gmantele/experimental-taplib", "path": "uws/uwslib/src/uws/job/UWSJob.java", "license": "lgpl-3.0", "size": 62748 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
293,267
public HashMap<String, List<String>> getPermissions() { return permissions; }
HashMap<String, List<String>> function() { return permissions; }
/** * Gets a map which contains all set permissions. * The map's key is the user id, the value is a list with all permissions of this user. * * @return A map which contains all set permissions. */
Gets a map which contains all set permissions. The map's key is the user id, the value is a list with all permissions of this user
getPermissions
{ "repo_name": "BtoBastian/sdcf4j", "path": "sdcf4j-core/src/main/java/de/btobastian/sdcf4j/CommandHandler.java", "license": "lgpl-3.0", "size": 8038 }
[ "java.util.HashMap", "java.util.List" ]
import java.util.HashMap; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,148,231
public static Condition<Node> getAdjacentToCondition(Node node) { MultiCondition<Node> result = new MultiCondition<Node>( MultiCondition.OR); result.addCondition(getParentOfCondition(node)); result.addCondition(getChildOfCondition(node)); return result; }
static Condition<Node> function(Node node) { MultiCondition<Node> result = new MultiCondition<Node>( MultiCondition.OR); result.addCondition(getParentOfCondition(node)); result.addCondition(getChildOfCondition(node)); return result; }
/** * Returns a Condition<Node> which is fulfilled when a node is adjacent to 'node' * * @param node */
Returns a Condition which is fulfilled when a node is adjacent to 'node'
getAdjacentToCondition
{ "repo_name": "hpiasg/desij", "path": "src/main/java/net/strongdesign/stg/traversal/ConditionFactory.java", "license": "mit", "size": 59144 }
[ "net.strongdesign.stg.Node" ]
import net.strongdesign.stg.Node;
import net.strongdesign.stg.*;
[ "net.strongdesign.stg" ]
net.strongdesign.stg;
2,047,485
protected void iconifyFrame(JInternalFrame f) { getDesktopManager().iconifyFrame(f); }
void function(JInternalFrame f) { getDesktopManager().iconifyFrame(f); }
/** * This is a convenience method that iconifies the JInternalFrame. * * @param f The JInternalFrame to iconify. */
This is a convenience method that iconifies the JInternalFrame
iconifyFrame
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java", "license": "gpl-2.0", "size": 49056 }
[ "javax.swing.JInternalFrame" ]
import javax.swing.JInternalFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
612,545
Collection<FrjRegularSequent> regular(ProvedSequentsTables table);
Collection<FrjRegularSequent> regular(ProvedSequentsTables table);
/** * Return the regular sequents added to the specified table. * * @return the regular sequents added to specified table. */
Return the regular sequents added to the specified table
regular
{ "repo_name": "ferram/jtabwb_provers", "path": "ipl_frj/src/ipl/frj/tp/basic/_ProvedSequentsDB.java", "license": "gpl-3.0", "size": 3486 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,679,655
public static void main(String[] args) throws Exception { UdpClient client = new UdpClient(); long t0 = System.currentTimeMillis(); for (int i = 0; i <= UdpServer.MAX_RECEIVED; i++) { //if (i % 2 == 0) { Thread.sleep(1); //} String str = Int...
static void function(String[] args) throws Exception { UdpClient client = new UdpClient(); long t0 = System.currentTimeMillis(); for (int i = 0; i <= UdpServer.MAX_RECEIVED; i++) { Thread.sleep(1); String str = Integer.toString(i); byte[] data = str.getBytes(); IoBuffer buffer = IoBuffer.allocate(data.length); buffer.p...
/** * The main method : instanciates a client, and send N messages. We sleep * between each K messages sent, to avoid the server saturation. * @param args * @throws Exception */
The main method : instanciates a client, and send N messages. We sleep between each K messages sent, to avoid the server saturation
main
{ "repo_name": "iloveyou416068/CookNIOServer", "path": "demos/mina/src/mina/udp/perf/UdpClient.java", "license": "apache-2.0", "size": 4270 }
[ "org.apache.mina.core.buffer.IoBuffer" ]
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.buffer.*;
[ "org.apache.mina" ]
org.apache.mina;
1,233,870
public void setHighScore(String highScore) { String[] args={"1"}; SQLiteDatabase myDB = this.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(HIGHSCORE, highScore); myDB.update(HIGHSCORES, cv, KEY + " =? ", args); }
void function(String highScore) { String[] args={"1"}; SQLiteDatabase myDB = this.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(HIGHSCORE, highScore); myDB.update(HIGHSCORES, cv, KEY + STR, args); }
/** * Writes new highscore-value to database. * * @param highScore Highscore */
Writes new highscore-value to database
setHighScore
{ "repo_name": "ViktorStarn/Waspventure", "path": "app/src/main/java/com/wasp/measlebeam/waspventure/Database.java", "license": "gpl-3.0", "size": 3899 }
[ "android.content.ContentValues", "android.database.sqlite.SQLiteDatabase" ]
import android.content.ContentValues; import android.database.sqlite.SQLiteDatabase;
import android.content.*; import android.database.sqlite.*;
[ "android.content", "android.database" ]
android.content; android.database;
1,649,707
@ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String vmScaleSetName, String instanceId, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String vmScaleSetName, String instanceId, Context context);
/** * Restarts a virtual machine in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param context The context to associate with this operation. ...
Restarts a virtual machine in a VM scale set
restart
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java", "license": "mit", "size": 89951 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context;
import com.azure.core.annotation.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,740,644
EAttribute getCoreModelAdapter_AdapterClass();
EAttribute getCoreModelAdapter_AdapterClass();
/** * Returns the meta object for the attribute '{@link uk.ac.lancs.comp.vmlLangInst.CoreModelAdapter#getAdapterClass <em>Adapter Class</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Adapter Class</em>'. * @see uk.ac.lancs.comp.vmlLangInst.CoreM...
Returns the meta object for the attribute '<code>uk.ac.lancs.comp.vmlLangInst.CoreModelAdapter#getAdapterClass Adapter Class</code>'.
getCoreModelAdapter_AdapterClass
{ "repo_name": "szschaler/vml_star", "path": "uk.ac.lancs.comp.vmlstar.lang_inst.model/src/uk/ac/lancs/comp/vmlLangInst/VmlLangInstPackage.java", "license": "mit", "size": 27322 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,149,398
public void initialize(Map<String, String> properties);
void function(Map<String, String> properties);
/** * <p> * Initializes the {@code ClaimsProcessor} using the specified properties map. * </p> * * @param properties a {@code Map<String, String>} that contains the properties that have been configured for * this {@code ClaimsProcessor}. */
Initializes the ClaimsProcessor using the specified properties map.
initialize
{ "repo_name": "taylor-project/taylor-picketlink-2.0.3", "path": "federation/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/ClaimsProcessor.java", "license": "gpl-2.0", "size": 2930 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,042,022
return StringUtils.remove(str, "\uFFFD"); }
return StringUtils.remove(str, STR); }
/** * Remove the replacement character which is used by utf-8 to display an unknown character (often a black diamond with a white question * mark or an empty square box). * * @param str The input string which should be cleaned. * @return The cleaned input string. */
Remove the replacement character which is used by utf-8 to display an unknown character (often a black diamond with a white question mark or an empty square box)
removeUtfReplacementCharacter
{ "repo_name": "rrauschenbach/mobi-api4java", "path": "src/main/java/org/rr/mobi4java/MobiUtils.java", "license": "apache-2.0", "size": 3650 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
2,309,033
EReference getfunctionHeading_Type();
EReference getfunctionHeading_Type();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.functionHeading#getType <em>Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Type</em>'. * @see org.xtext.example.delphi.delphi.functi...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.functionHeading#getType Type</code>'.
getfunctionHeading_Type
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,299
protected void sequence_UiDecimalField(EObject context, UiDecimalField semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, UiDecimalField semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * ( * ( * noGrouping?='noGrouping'? * noMarkNegative?='noMarkNegative'? * styles=STRING? * precision=INT? * i18nInfo=UiI18nInfo? * readonly?='readonly'? * )? * name=ID? * ...
Constraint: ( ( noGrouping?='noGrouping'? noMarkNegative?='noMarkNegative'? styles=STRING? precision=INT? i18nInfo=UiI18nInfo? readonly?='readonly'? )? name=ID? ((validators+=UiValidator | bindings+=UiBinding)* processorAssignments+=UiVisibilityProcessorAssignment*)? )
sequence_UiDecimalField
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.dsl/src-gen/org/lunifera/ecview/dsl/serializer/UIGrammarSemanticSequencer.java", "license": "epl-1.0", "size": 151691 }
[ "org.eclipse.emf.ecore.EObject", "org.lunifera.ecview.semantic.uimodel.UiDecimalField" ]
import org.eclipse.emf.ecore.EObject; import org.lunifera.ecview.semantic.uimodel.UiDecimalField;
import org.eclipse.emf.ecore.*; import org.lunifera.ecview.semantic.uimodel.*;
[ "org.eclipse.emf", "org.lunifera.ecview" ]
org.eclipse.emf; org.lunifera.ecview;
2,916,201
@Test public void testPLFM_4089() throws Exception{ // setup a simple two column schema schema = Lists.newArrayList( columnManager.createColumnModel(adminUserInfo, TableModelTestUtils.createColumn(0L, "aBoolean", ColumnType.BOOLEAN)), columnManager.createColumnModel(adminUserInfo, TableModelTestUti...
void function() throws Exception{ schema = Lists.newArrayList( columnManager.createColumnModel(adminUserInfo, TableModelTestUtils.createColumn(0L, STR, ColumnType.BOOLEAN)), columnManager.createColumnModel(adminUserInfo, TableModelTestUtils.createColumn(0L, STR, ColumnType.INTEGER))); createTableWithSchema(); List<Stri...
/** * This bug occurs when RowSets are applied to a table that do not include all columns. * When the table worker would apply such a change set it would delete the missing columns * causing all the data in the column to be lost. * @throws Exception * */
This bug occurs when RowSets are applied to a table that do not include all columns. When the table worker would apply such a change set it would delete the missing columns causing all the data in the column to be lost
testPLFM_4089
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "services/workers/src/test/java/org/sagebionetworks/table/worker/TableWorkerIntegrationTest.java", "license": "apache-2.0", "size": 147213 }
[ "com.google.common.collect.Lists", "java.util.List", "org.junit.jupiter.api.Assertions", "org.sagebionetworks.repo.model.dbo.dao.table.TableModelTestUtils", "org.sagebionetworks.repo.model.table.ColumnModel", "org.sagebionetworks.repo.model.table.ColumnType", "org.sagebionetworks.repo.model.table.Row" ]
import com.google.common.collect.Lists; import java.util.List; import org.junit.jupiter.api.Assertions; import org.sagebionetworks.repo.model.dbo.dao.table.TableModelTestUtils; import org.sagebionetworks.repo.model.table.ColumnModel; import org.sagebionetworks.repo.model.table.ColumnType; import org.sagebionetworks.rep...
import com.google.common.collect.*; import java.util.*; import org.junit.jupiter.api.*; import org.sagebionetworks.repo.model.dbo.dao.table.*; import org.sagebionetworks.repo.model.table.*;
[ "com.google.common", "java.util", "org.junit.jupiter", "org.sagebionetworks.repo" ]
com.google.common; java.util; org.junit.jupiter; org.sagebionetworks.repo;
1,500,671
private static PartialResultItem readPartialResultItem(RandomAccessFile file, int lengthInitialQuery) throws IOException { PartialResultItem partialResultItem = new PartialResultItem(); //Structura fisier //char[CONST] fisierOrigine; //int pozitieQuery; ...
static PartialResultItem function(RandomAccessFile file, int lengthInitialQuery) throws IOException { PartialResultItem partialResultItem = new PartialResultItem(); partialResultItem.setFisierOrigine(readString(file, STRING_CONST)); partialResultItem.setPozitieStartQuery(littleEndianToBigEndian(file.readInt())); partia...
/** * Citesc un partial result item din fisier * @param file * @return * @throws IOException */
Citesc un partial result item din fisier
readPartialResultItem
{ "repo_name": "genomeartist/genomeartist", "path": "sources_java/guiTransposon/src/ro/genomeartist/gui/controller/externalcalls/ResultParsing.java", "license": "gpl-3.0", "size": 19385 }
[ "java.io.IOException", "java.io.RandomAccessFile", "ro.genomeartist.gui.controller.partialresult.PartialResultItem" ]
import java.io.IOException; import java.io.RandomAccessFile; import ro.genomeartist.gui.controller.partialresult.PartialResultItem;
import java.io.*; import ro.genomeartist.gui.controller.partialresult.*;
[ "java.io", "ro.genomeartist.gui" ]
java.io; ro.genomeartist.gui;
1,880,619
private FlowState getStateOrFail(int streamId) throws Http2Exception { FlowState window = streamStates.get(streamId); if (window == null) { throw protocolError("Flow control window missing for stream: %d", streamId); } return window; } private final class Fl...
FlowState function(int streamId) throws Http2Exception { FlowState window = streamStates.get(streamId); if (window == null) { throw protocolError(STR, streamId); } return window; } private final class FlowState { private int windowSize; private int lowerBound; private final int streamId; FlowState(int streamId) { this....
/** * Gets the window for the stream or raises a {@code PROTOCOL_ERROR} if not found. */
Gets the window for the stream or raises a PROTOCOL_ERROR if not found
getStateOrFail
{ "repo_name": "daschl/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2InboundFlowController.java", "license": "apache-2.0", "size": 8425 }
[ "io.netty.handler.codec.http2.Http2Exception" ]
import io.netty.handler.codec.http2.Http2Exception;
import io.netty.handler.codec.http2.*;
[ "io.netty.handler" ]
io.netty.handler;
2,067,705
public static boolean isConversionSupported(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) { List codecs = getFormatConversionProviders(); for(int i=0; i<codecs.size(); i++ ) { FormatConversionProvider codec = (FormatConversionProvider) codecs.get(i); if(co...
static boolean function(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) { List codecs = getFormatConversionProviders(); for(int i=0; i<codecs.size(); i++ ) { FormatConversionProvider codec = (FormatConversionProvider) codecs.get(i); if(codec.isConversionSupported(targetEncoding,sourceFormat) ) { return t...
/** * Indicates whether an audio input stream of the specified encoding * can be obtained from an audio input stream that has the specified * format. * @param targetEncoding the desired encoding after conversion * @param sourceFormat the audio format before conversion * @return <code>true<...
Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format
isConversionSupported
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java", "license": "mit", "size": 64713 }
[ "java.util.List", "javax.sound.sampled.spi.FormatConversionProvider" ]
import java.util.List; import javax.sound.sampled.spi.FormatConversionProvider;
import java.util.*; import javax.sound.sampled.spi.*;
[ "java.util", "javax.sound" ]
java.util; javax.sound;
2,705,385
@Deprecated public static int getEncodedLength(ByteBuffer original) throws IllegalArgumentException { if (original.hasArray()) { return getEncodedLength(original.array(), original.arrayOffset(), original.limit() - original.arrayOffset()); } else { throw new IllegalArgumentException...
static int function(ByteBuffer original) throws IllegalArgumentException { if (original.hasArray()) { return getEncodedLength(original.array(), original.arrayOffset(), original.limit() - original.arrayOffset()); } else { throw new IllegalArgumentException(STR); } }
/** * Returns the number of chars required to encode the given byte sequence. * * @param original The byte sequence to be encoded. Must be backed by an * array. * @return The number of chars required to encode the given byte sequence * @throws IllegalArgumentException If the given ByteBuffer i...
Returns the number of chars required to encode the given byte sequence
getEncodedLength
{ "repo_name": "tokee/lucene", "path": "src/java/org/apache/lucene/util/IndexableBinaryStringTools.java", "license": "apache-2.0", "size": 17370 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,746,431
private ModelAndView getClearNamespacesResult(final Repository repository, final HttpServletRequest request, final HttpServletResponse response) throws ServerHTTPException, RepositoryException { RepositoryConnection repositoryCon = repository.getConnection(); synchronized (repositoryCon) { try { reposi...
ModelAndView function(final Repository repository, final HttpServletRequest request, final HttpServletResponse response) throws ServerHTTPException, RepositoryException { RepositoryConnection repositoryCon = repository.getConnection(); synchronized (repositoryCon) { try { repositoryCon.clearNamespaces(); } catch (Repos...
/** * clear the namespaces * * @param repository the Repository object * @param request the HttpServletRequest object * @param response the HttpServletResponse oject * @return EmptySuccessView object if success * @throws ServerHTTPException throws when errors in repository * @throws RepositoryExceptio...
clear the namespaces
getClearNamespacesResult
{ "repo_name": "cumulusrdf/cumulusrdf", "path": "cumulusrdf-web-module/src/main/java/edu/kit/aifb/cumulus/webapp/endpoint/repository/namespaces/NamespacesHandler.java", "license": "apache-2.0", "size": 5669 }
[ "info.aduna.webapp.views.EmptySuccessView", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.openrdf.http.server.ServerHTTPException", "org.openrdf.repository.Repository", "org.openrdf.repository.RepositoryConnection", "org.openrdf.repository.RepositoryException", ...
import info.aduna.webapp.views.EmptySuccessView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openrdf.http.server.ServerHTTPException; import org.openrdf.repository.Repository; import org.openrdf.repository.RepositoryConnection; import org.openrdf.repository.Re...
import info.aduna.webapp.views.*; import javax.servlet.http.*; import org.openrdf.http.server.*; import org.openrdf.repository.*; import org.springframework.web.servlet.*;
[ "info.aduna.webapp", "javax.servlet", "org.openrdf.http", "org.openrdf.repository", "org.springframework.web" ]
info.aduna.webapp; javax.servlet; org.openrdf.http; org.openrdf.repository; org.springframework.web;
815,474
public void addPacketListener(PacketListener listener);
void function(PacketListener listener);
/** * Adds a packet listener. * <p> * Adding an already registered listener has no effect. If you need to change the packets * the current listener is observing, you must first remove the packet listener before you * can register it again. * @param listener - new packet listener. */
Adds a packet listener. Adding an already registered listener has no effect. If you need to change the packets the current listener is observing, you must first remove the packet listener before you can register it again
addPacketListener
{ "repo_name": "HolodeckOne-Minecraft/ProtocolLib", "path": "modules/API/src/main/java/com/comphenix/protocol/ProtocolManager.java", "license": "gpl-2.0", "size": 11149 }
[ "com.comphenix.protocol.events.PacketListener" ]
import com.comphenix.protocol.events.PacketListener;
import com.comphenix.protocol.events.*;
[ "com.comphenix.protocol" ]
com.comphenix.protocol;
1,313,227
public CountDownLatch getTopLevelDomainsAsync(String responseFields, AsyncCallback<com.mozu.api.contracts.reference.TopLevelDomainCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.reference.TopLevelDomainCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getTopLevelD...
CountDownLatch function(String responseFields, AsyncCallback<com.mozu.api.contracts.reference.TopLevelDomainCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.reference.TopLevelDomainCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getTopLevelDomainsClient( responseFields);...
/** * Retrieves the entire list of top-level internet domains that the system supports. * <p><pre><code> * ReferenceData referencedata = new ReferenceData(); * CountDownLatch latch = referencedata.getTopLevelDomains( responseFields, callback ); * latch.await() * </code></pre></p> * @param responseFie...
Retrieves the entire list of top-level internet domains that the system supports. <code><code> ReferenceData referencedata = new ReferenceData(); CountDownLatch latch = referencedata.getTopLevelDomains( responseFields, callback ); latch.await() * </code></code>
getTopLevelDomainsAsync
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java", "license": "mit", "size": 44850 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,591,106
public static String get_user_salt(String username) { String sqlText = "SELECT salt FROM user WHERE username = ?;"; PreparedStatement pstmt = null; Connection conn = Database_access.get_a_connection(); ResultSet resultSet = null; try { pstmt = Database_access.prepare_statement( con...
static String function(String username) { String sqlText = STR; PreparedStatement pstmt = null; Connection conn = Database_access.get_a_connection(); ResultSet resultSet = null; try { pstmt = Database_access.prepare_statement( conn, sqlText); pstmt.setNString( 1, username); resultSet = pstmt.executeQuery(); if (Databas...
/** * gets the salt for a given user. * @param username the username for the user * @return the salt for the user, used in hashing * password, or empty if failure */
gets the salt for a given user
get_user_salt
{ "repo_name": "byronka/xenos", "path": "src/com/renomad/xenos/User_utils.java", "license": "mit", "size": 23024 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,054,315
public final void testNormalizeWithCJKKanji() { assertEquals(NGram.normalize('\u4E00'), '\u4E00'); assertEquals(NGram.normalize('\u4E01'), '\u4E01'); assertEquals(NGram.normalize('\u4E02'), '\u4E02'); assertEquals(NGram.normalize('\u4E03'), '\u4E01'); assertEquals(NGram.norma...
final void function() { assertEquals(NGram.normalize('\u4E00'), '\u4E00'); assertEquals(NGram.normalize('\u4E01'), '\u4E01'); assertEquals(NGram.normalize('\u4E02'), '\u4E02'); assertEquals(NGram.normalize('\u4E03'), '\u4E01'); assertEquals(NGram.normalize('\u4E04'), '\u4E04'); assertEquals(NGram.normalize('\u4E05'), '...
/** * Test method for {@link NGram#normalize(char)} with CJK Kanji characters. */
Test method for <code>NGram#normalize(char)</code> with CJK Kanji characters
testNormalizeWithCJKKanji
{ "repo_name": "jprante/elasticsearch-plugin-bundle", "path": "src/test/java/org/xbib/elasticsearch/plugin/bundle/test/index/mapper/langdetect/NGramTests.java", "license": "agpl-3.0", "size": 5023 }
[ "org.xbib.elasticsearch.plugin.bundle.common.langdetect.NGram" ]
import org.xbib.elasticsearch.plugin.bundle.common.langdetect.NGram;
import org.xbib.elasticsearch.plugin.bundle.common.langdetect.*;
[ "org.xbib.elasticsearch" ]
org.xbib.elasticsearch;
329,224
Call<ResponseBody> putNotExpandableAsync(Colors stringBody, final ServiceCallback<Void> serviceCallback);
Call<ResponseBody> putNotExpandableAsync(Colors stringBody, final ServiceCallback<Void> serviceCallback);
/** * Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color' * * @param stringBody Possible values for this parameter include: 'red color', 'green-color', 'blue_color' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @...
Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'
putNotExpandableAsync
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodystring/EnumOperations.java", "license": "mit", "size": 2669 }
[ "com.microsoft.rest.ServiceCallback", "com.squareup.okhttp.ResponseBody" ]
import com.microsoft.rest.ServiceCallback; import com.squareup.okhttp.ResponseBody;
import com.microsoft.rest.*; import com.squareup.okhttp.*;
[ "com.microsoft.rest", "com.squareup.okhttp" ]
com.microsoft.rest; com.squareup.okhttp;
2,582,056
protected GlobalCustom readCustom(String text) throws Exception { return readCustom(new ByteArrayInputStream(text.getBytes("utf-8"))); }
GlobalCustom function(String text) throws Exception { return readCustom(new ByteArrayInputStream(text.getBytes("utf-8"))); }
/** * Read a customization into model from string. * * @param text customization document text * @return root element * @throws Exception */
Read a customization into model from string
readCustom
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/test/org/jibx/binding/generator/CustomizationTestBase.java", "license": "bsd-3-clause", "size": 6987 }
[ "java.io.ByteArrayInputStream", "org.jibx.custom.classes.GlobalCustom" ]
import java.io.ByteArrayInputStream; import org.jibx.custom.classes.GlobalCustom;
import java.io.*; import org.jibx.custom.classes.*;
[ "java.io", "org.jibx.custom" ]
java.io; org.jibx.custom;
1,791,100
@Test public void testResourceInjection() { logger.info("starting a weld engine in container mode"); final String greeting = cb.sayHello(user); assertEquals("Unexpected greeting received from bean", HELLO_GREETING_PREFIX + user, greeting); }
void function() { logger.info(STR); final String greeting = cb.sayHello(user); assertEquals(STR, HELLO_GREETING_PREFIX + user, greeting); }
/** * Tests simple resource injection in a jar archive */
Tests simple resource injection in a jar archive
testResourceInjection
{ "repo_name": "flashboss/wildfly-book", "path": "business-components/injection/src/test/java/it/vige/businesscomponents/injection/ContainerInjectionTestCase.java", "license": "gpl-3.0", "size": 3314 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,771,142
public static Map<String, Integer> generateMostFrequentNGramAlphabet(List<String> l , int n, int nb) { Map<String, Double> occ = computeNGram(l.get(0), n); for(int i = 1 ; i < l.size() ; i++) { Map<String, Double> m = computeNGram(l.get(i), n); for(String s : m.keySet()) { if(occ.containsKey(s)) { ...
static Map<String, Integer> function(List<String> l , int n, int nb) { Map<String, Double> occ = computeNGram(l.get(0), n); for(int i = 1 ; i < l.size() ; i++) { Map<String, Double> m = computeNGram(l.get(i), n); for(String s : m.keySet()) { if(occ.containsKey(s)) { occ.put(s, occ.get(s)+m.get(s)); } else { occ.put(s, ...
/** * Generates the list of the most frequent n-grams in a list of string * @param l the list * @param n n-gram * @param nb number of most frequent n-grams * @return */
Generates the list of the most frequent n-grams in a list of string
generateMostFrequentNGramAlphabet
{ "repo_name": "davidpicard/jkernelmachines", "path": "src/main/java/net/jkernelmachines/projection/StringNGramProjection.java", "license": "bsd-3-clause", "size": 6468 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,124,810
@Nonnull public final PDBusinessEntity setAdditionalInfo (@Nullable final String sAdditionalInfo) { m_sAdditionalInfo = sAdditionalInfo; return this; }
final PDBusinessEntity function (@Nullable final String sAdditionalInfo) { m_sAdditionalInfo = sAdditionalInfo; return this; }
/** * Set the additional information / free text. * * @param sAdditionalInfo * Additional information to be used (free text). May be * <code>null</code>. * @return this for chaining */
Set the additional information / free text
setAdditionalInfo
{ "repo_name": "phax/peppol-directory", "path": "phoss-directory-businesscard/src/main/java/com/helger/pd/businesscard/generic/PDBusinessEntity.java", "license": "apache-2.0", "size": 13496 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,901,487
public static boolean isEnabled (@Nonnull final Logger aLogger, @Nonnull final IErrorLevel aErrorLevel) { return getFuncIsEnabled (aLogger, aErrorLevel).isEnabled (); }
static boolean function (@Nonnull final Logger aLogger, @Nonnull final IErrorLevel aErrorLevel) { return getFuncIsEnabled (aLogger, aErrorLevel).isEnabled (); }
/** * Check if logging is enabled for the passed logger based on the error level * provided * * @param aLogger * The logger. May not be <code>null</code>. * @param aErrorLevel * The error level. May not be <code>null</code>. * @return <code>true</code> if the respective log level i...
Check if logging is enabled for the passed logger based on the error level provided
isEnabled
{ "repo_name": "phax/ph-commons", "path": "ph-commons/src/main/java/com/helger/commons/log/LogHelper.java", "license": "apache-2.0", "size": 17308 }
[ "com.helger.commons.error.level.IErrorLevel", "javax.annotation.Nonnull", "org.slf4j.Logger" ]
import com.helger.commons.error.level.IErrorLevel; import javax.annotation.Nonnull; import org.slf4j.Logger;
import com.helger.commons.error.level.*; import javax.annotation.*; import org.slf4j.*;
[ "com.helger.commons", "javax.annotation", "org.slf4j" ]
com.helger.commons; javax.annotation; org.slf4j;
122,198
protected ObjectName makeObjectName(String path, ZKMBeanInfo bean) throws MalformedObjectNameException { if(path==null) return null; StringBuilder beanName = new StringBuilder(CommonNames.DOMAIN + ":"); int counter=0; counter=tokenize(beanName,path,counter...
ObjectName function(String path, ZKMBeanInfo bean) throws MalformedObjectNameException { if(path==null) return null; StringBuilder beanName = new StringBuilder(CommonNames.DOMAIN + ":"); int counter=0; counter=tokenize(beanName,path,counter); tokenize(beanName,bean.getName(),counter); beanName.deleteCharAt(beanName.len...
/** * Builds an MBean path and creates an ObjectName instance using the path. * @param path MBean path * @param bean the MBean instance * @return ObjectName to be registered with the platform MBean server */
Builds an MBean path and creates an ObjectName instance using the path
makeObjectName
{ "repo_name": "jludvice/fabric8", "path": "fabric/fabric-zookeeper/src/main/java/org/apache/zookeeper/jmx/MBeanRegistry.java", "license": "apache-2.0", "size": 7128 }
[ "javax.management.MalformedObjectNameException", "javax.management.ObjectName" ]
import javax.management.MalformedObjectNameException; import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,872,897
protected String getStringProperty( String memberName ) { if ( !StructureContextUtil.isValidStructureHandle( this ) ) { throw new RuntimeException( "The structure is floating, and its handle is invalid!" ); //$NON-NLS-1$ } Structure struct = null; Module module = getModule( ); DesignElement tar...
String function( String memberName ) { if ( !StructureContextUtil.isValidStructureHandle( this ) ) { throw new RuntimeException( STR ); } Structure struct = null; Module module = getModule( ); DesignElement target = structContext.getElement( ); DesignElement element = getElement( ); ElementPropertyDefn propDefn = struc...
/** * Get the string value of a member. * * @param memberName * name of the member to get * @return String value of the member, or <code>null</code> if the member is * not set or is not found. */
Get the string value of a member
getStringProperty
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/StructureHandle.java", "license": "epl-1.0", "size": 14634 }
[ "org.eclipse.birt.report.model.core.DesignElement", "org.eclipse.birt.report.model.core.Module", "org.eclipse.birt.report.model.core.Structure", "org.eclipse.birt.report.model.core.StructureContext", "org.eclipse.birt.report.model.metadata.ElementPropertyDefn", "org.eclipse.birt.report.model.metadata.Prop...
import org.eclipse.birt.report.model.core.DesignElement; import org.eclipse.birt.report.model.core.Module; import org.eclipse.birt.report.model.core.Structure; import org.eclipse.birt.report.model.core.StructureContext; import org.eclipse.birt.report.model.metadata.ElementPropertyDefn; import org.eclipse.birt.report.mo...
import org.eclipse.birt.report.model.core.*; import org.eclipse.birt.report.model.metadata.*; import org.eclipse.birt.report.model.util.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
703,004
public static Object getFieldValue(Object bean,String methodName){ Object value = null; try { value = bean.getClass().getMethod(methodName).invoke(bean); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (I...
static Object function(Object bean,String methodName){ Object value = null; try { value = bean.getClass().getMethod(methodName).invoke(bean); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace();...
/** * Execute the method declared in the bean defined * @param bean - object with getter methods * @param methodName - name of the get method * @return return the value of method registered in param method Name */
Execute the method declared in the bean defined
getFieldValue
{ "repo_name": "voiders/dbutil", "path": "src/main/java/com/voider/dbutil/annotation/Helper.java", "license": "mit", "size": 2492 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,096,553
protected String build_instructor_download_upload_all(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String view = (String) state.getAttribute(VIEW_SUBMISSION_LIST_OPTION); boolean download = (((String) state.getAttribute(STATE_MODE)).equals(MODE_INSTRUCTOR_DOWNLOAD_ALL)); co...
String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String view = (String) state.getAttribute(VIEW_SUBMISSION_LIST_OPTION); boolean download = (((String) state.getAttribute(STATE_MODE)).equals(MODE_INSTRUCTOR_DOWNLOAD_ALL)); context.put(STR, Boolean.valueOf(download)); context....
/** * build the instructor view to download/upload information from archive file */
build the instructor view to download/upload information from archive file
build_instructor_download_upload_all
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 631432 }
[ "org.sakaiproject.assignment.api.Assignment", "org.sakaiproject.assignment.cover.AssignmentService", "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.component.cover.ServerConfigurationService", "org.sakaiproject.eve...
import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.component.cover.ServerConfigurationService; import ...
import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.cover.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event" ]
org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event;
683,185
public void test(TestHarness harness) { // create instance of a class Double Object o = new NullPointerException("NullPointerException"); // get a runtime class of an object "o" Class c = o.getClass(); int modifiers = c.getModifiers(); harness.check( Modifier.is...
void function(TestHarness harness) { Object o = new NullPointerException(STR); Class c = o.getClass(); int modifiers = c.getModifiers(); harness.check( Modifier.isPublic(modifiers)); harness.check(!Modifier.isPrivate(modifiers)); harness.check(!Modifier.isProtected(modifiers)); harness.check(!Modifier.isAbstract(modifi...
/** * Runs the test using the specified harness. * * @param harness the test harness (<code>null</code> not permitted). */
Runs the test using the specified harness
test
{ "repo_name": "niloc132/mauve-gwt", "path": "src/main/java/gnu/testlet/java/lang/NullPointerException/classInfo/getModifiers.java", "license": "gpl-2.0", "size": 2317 }
[ "gnu.testlet.TestHarness", "java.lang.NullPointerException", "java.lang.reflect.Modifier" ]
import gnu.testlet.TestHarness; import java.lang.NullPointerException; import java.lang.reflect.Modifier;
import gnu.testlet.*; import java.lang.*; import java.lang.reflect.*;
[ "gnu.testlet", "java.lang" ]
gnu.testlet; java.lang;
1,266,583
public JButton getJbtPrint() { return jbtPrint; }
JButton function() { return jbtPrint; }
/** * An accessor method for <code>jbtPrint</code>. * * @return The print button of the current view. */
An accessor method for <code>jbtPrint</code>
getJbtPrint
{ "repo_name": "ivan-guerra/graphing_calculator", "path": "src/calculator_views/HistoryView.java", "license": "mit", "size": 3417 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
964,360
@Override @Nullable public Player getCzar() { return this.czar; }
Player function() { return this.czar; }
/** * Gets the czar for this round. This may change if the czar leaves. * * @return Czar */
Gets the czar for this round. This may change if the czar leaves
getCzar
{ "repo_name": "kenzierocks/TheHumanity", "path": "src/main/java/org/royaldev/thehumanity/game/round/CurrentRound.java", "license": "gpl-3.0", "size": 16621 }
[ "org.royaldev.thehumanity.player.Player" ]
import org.royaldev.thehumanity.player.Player;
import org.royaldev.thehumanity.player.*;
[ "org.royaldev.thehumanity" ]
org.royaldev.thehumanity;
1,741,055
public static Color getColorByName(String colorName) { if (colorName.equalsIgnoreCase(COLOR_BLACK)) { return Color.black; } else if (colorName.equalsIgnoreCase(COLOR_BLUE)) { return Color.blue; } else if (colorName.equalsIgnoreCase(COLOR_CYAN)) { return Co...
static Color function(String colorName) { if (colorName.equalsIgnoreCase(COLOR_BLACK)) { return Color.black; } else if (colorName.equalsIgnoreCase(COLOR_BLUE)) { return Color.blue; } else if (colorName.equalsIgnoreCase(COLOR_CYAN)) { return Color.cyan; } else if (colorName.equalsIgnoreCase(COLOR_DARKGRAY) colorName.equ...
/** * Convert a color name to a color value. * @param colorName a string repr of the color. * @return the color value. * @todo refactor to use an EnumeratedAttribute (maybe?) */
Convert a color name to a color value
getColorByName
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/types/optional/image/ColorMapper.java", "license": "mit", "size": 4084 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
14,992
public Adapter createNumberLiteralAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link uk.ac.kcl.inf.robotics.rigidBodies.NumberLiteral <em>Number Literal</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the c...
Creates a new adapter for an object of class '<code>uk.ac.kcl.inf.robotics.rigidBodies.NumberLiteral Number Literal</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createNumberLiteralAdapter
{ "repo_name": "szschaler/RigidBodies", "path": "uk.ac.kcl.inf.robotics.rigid_bodies/src-gen/uk/ac/kcl/inf/robotics/rigidBodies/util/RigidBodiesAdapterFactory.java", "license": "mit", "size": 41508 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,046,491
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String circuitName, String authorizationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String circuitName, String authorizationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); }
/** * Deletes the specified authorization from the specified express route circuit. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. * @param serviceCallback th...
Deletes the specified authorization from the specified express route circuit
beginDeleteAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/ExpressRouteCircuitAuthorizationsInner.java", "license": "mit", "size": 48736 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,545,779
public void pairDevice( BluetoothGatt bleServer, int connId, long deviceId, long setupPincode, @Nullable byte[] csrNonce, NetworkCredentials networkCredentials) { if (connectionId == 0) { connectionId = connId; if (connectionId == 0) { Log.e(TAG, "Failed to...
void function( BluetoothGatt bleServer, int connId, long deviceId, long setupPincode, @Nullable byte[] csrNonce, NetworkCredentials networkCredentials) { if (connectionId == 0) { connectionId = connId; if (connectionId == 0) { Log.e(TAG, STR); completionListener.onError(new Exception(STR)); return; } Log.d(TAG, STR + c...
/** * Pair a device connected through BLE. * * @param bleServer the BluetoothGatt representing the BLE connection to the device * @param connId the BluetoothGatt Id representing the BLE connection to the device * @param deviceId the node ID to assign to the device * @param setupPincode the pincode for...
Pair a device connected through BLE
pairDevice
{ "repo_name": "project-chip/connectedhomeip", "path": "src/controller/java/src/chip/devicecontroller/ChipDeviceController.java", "license": "apache-2.0", "size": 16834 }
[ "android.bluetooth.BluetoothGatt", "android.util.Log", "androidx.annotation.Nullable" ]
import android.bluetooth.BluetoothGatt; import android.util.Log; import androidx.annotation.Nullable;
import android.bluetooth.*; import android.util.*; import androidx.annotation.*;
[ "android.bluetooth", "android.util", "androidx.annotation" ]
android.bluetooth; android.util; androidx.annotation;
1,888,379
public Expression getOnExpression() { return onExpression; }
Expression function() { return onExpression; }
/** * Returns the "ON" expression (if any) */
Returns the "ON" expression (if any)
getOnExpression
{ "repo_name": "55open/skylunece", "path": "skylucene/jsqlparser/net/sf/jsqlparser/statement/select/Join.java", "license": "apache-2.0", "size": 4147 }
[ "net.sf.jsqlparser.expression.Expression" ]
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.*;
[ "net.sf.jsqlparser" ]
net.sf.jsqlparser;
251,452
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<WorkloadNetworkVirtualMachineInner> listVirtualMachinesAsync( String resourceGroupName, String privateCloudName) { return new PagedFlux<>( () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), ...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<WorkloadNetworkVirtualMachineInner> function( String resourceGroupName, String privateCloudName) { return new PagedFlux<>( () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)...
/** * List of virtual machines in a private cloud workload network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. *...
List of virtual machines in a private cloud workload network
listVirtualMachinesAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java", "license": "mit", "size": 538828 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.avs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,416,493
public Map<JobACL, AccessControlList> constructJobACLs(Configuration conf) { Map<JobACL, AccessControlList> acls = new HashMap<JobACL, AccessControlList>(); // Don't construct anything if authorization is disabled. if (!areACLsEnabled()) { return acls; } for (JobACL aclName : JobA...
Map<JobACL, AccessControlList> function(Configuration conf) { Map<JobACL, AccessControlList> acls = new HashMap<JobACL, AccessControlList>(); if (!areACLsEnabled()) { return acls; } for (JobACL aclName : JobACL.values()) { String aclConfigName = aclName.getAclName(); String aclConfigured = conf.get(aclConfigName); if (...
/** * Construct the jobACLs from the configuration so that they can be kept in * the memory. If authorization is disabled on the JT, nothing is constructed * and an empty map is returned. * * @return JobACL to AccessControlList map. */
Construct the jobACLs from the configuration so that they can be kept in the memory. If authorization is disabled on the JT, nothing is constructed and an empty map is returned
constructJobACLs
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobACLsManager.java", "license": "apache-2.0", "size": 4261 }
[ "java.util.HashMap", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapreduce.JobACL", "org.apache.hadoop.security.authorize.AccessControlList" ]
import java.util.HashMap; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.JobACL; import org.apache.hadoop.security.authorize.AccessControlList;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.security.authorize.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,394,271
private void buildLinkForRouterLsaBroadcast(RouterLsa routerLsa, OspfInterface ospfInterface) { OspfInterfaceImpl ospfInterfaceImpl = (OspfInterfaceImpl) ospfInterface; if (ospfInterfaceImpl.state() == OspfInterfaceState.WAITING) { OspfLsaLink link = new OspfLsaLink(); link.s...
void function(RouterLsa routerLsa, OspfInterface ospfInterface) { OspfInterfaceImpl ospfInterfaceImpl = (OspfInterfaceImpl) ospfInterface; if (ospfInterfaceImpl.state() == OspfInterfaceState.WAITING) { OspfLsaLink link = new OspfLsaLink(); link.setLinkData(ospfInterface.ipNetworkMask().toString()); link.setLinkId(ospfI...
/** * Builds LSA link for router LSA. * * @param routerLsa router LSA instance * @param ospfInterface interface instance */
Builds LSA link for router LSA
buildLinkForRouterLsaBroadcast
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java", "license": "apache-2.0", "size": 27792 }
[ "org.onosproject.ospf.controller.OspfInterface", "org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink", "org.onosproject.ospf.protocol.lsa.types.RouterLsa", "org.onosproject.ospf.protocol.util.OspfInterfaceState" ]
import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink; import org.onosproject.ospf.protocol.lsa.types.RouterLsa; import org.onosproject.ospf.protocol.util.OspfInterfaceState;
import org.onosproject.ospf.controller.*; import org.onosproject.ospf.protocol.lsa.subtypes.*; import org.onosproject.ospf.protocol.lsa.types.*; import org.onosproject.ospf.protocol.util.*;
[ "org.onosproject.ospf" ]
org.onosproject.ospf;
1,488,229
@Override public void deleteShardStore(String reason, ShardLock lock, IndexSettings indexSettings) throws IOException { ShardId shardId = lock.getShardId(); logger.trace("{} deleting shard reason [{}]", shardId, reason); nodeEnv.deleteShardDirectoryUnderLock(lock, indexSettings); } ...
void function(String reason, ShardLock lock, IndexSettings indexSettings) throws IOException { ShardId shardId = lock.getShardId(); logger.trace(STR, shardId, reason); nodeEnv.deleteShardDirectoryUnderLock(lock, indexSettings); } /** * This method deletes the shard contents on disk for the given shard ID. This method w...
/** * Deletes the shard with an already acquired shard lock. * @param reason the reason for the shard deletion * @param lock the lock of the shard to delete * @param indexSettings the shards index settings. * @throws IOException if an IOException occurs */
Deletes the shard with an already acquired shard lock
deleteShardStore
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/indices/IndicesService.java", "license": "apache-2.0", "size": 65029 }
[ "java.io.IOException", "org.elasticsearch.env.ShardLock", "org.elasticsearch.index.IndexSettings", "org.elasticsearch.index.shard.ShardId" ]
import java.io.IOException; import org.elasticsearch.env.ShardLock; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.shard.ShardId;
import java.io.*; import org.elasticsearch.env.*; import org.elasticsearch.index.*; import org.elasticsearch.index.shard.*;
[ "java.io", "org.elasticsearch.env", "org.elasticsearch.index" ]
java.io; org.elasticsearch.env; org.elasticsearch.index;
389,193
public static void decrypt(OutputStream out, InputStream in, int outLen, Context context, byte[] iv) throws IOException { Decryptor d = context.getCipher().getDecryptor(); d.setKey(context.getKey()); d.setIv(iv); // can be null decrypt(out, in, outLen, d); }
static void function(OutputStream out, InputStream in, int outLen, Context context, byte[] iv) throws IOException { Decryptor d = context.getCipher().getDecryptor(); d.setKey(context.getKey()); d.setIv(iv); decrypt(out, in, outLen, d); }
/** * Decrypt a stream of ciphertext given a context and IV * @param out * @param in * @param outLen * @param context * @param iv * @throws IOException */
Decrypt a stream of ciphertext given a context and IV
decrypt
{ "repo_name": "ibmsoe/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java", "license": "apache-2.0", "size": 17756 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
27,194
private void initializeScreen(View view) { projectLeaderTextView = view.findViewById(R.id.project_leader_textView); androidDeveloperTextView = view.findViewById(R.id.android_developer_textView); computerVisionTextVeiw = view.findViewById(R.id.computer_vision_textView); }
void function(View view) { projectLeaderTextView = view.findViewById(R.id.project_leader_textView); androidDeveloperTextView = view.findViewById(R.id.android_developer_textView); computerVisionTextVeiw = view.findViewById(R.id.computer_vision_textView); }
/** * Link the layout element from XML to Java */
Link the layout element from XML to Java
initializeScreen
{ "repo_name": "Ahmed-Abdelmeged/ADAS", "path": "app/src/main/java/com/example/mego/adas/main/AboutFragment.java", "license": "apache-2.0", "size": 3069 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,320,598
public FileExistsOperation getFileExistsOperation() { return mFileExists; }
FileExistsOperation function() { return mFileExists; }
/** * Gets the action that server will take if a file with the same name * already exists in the provided folder. * @return */
Gets the action that server will take if a file with the same name already exists in the provided folder
getFileExistsOperation
{ "repo_name": "Aypz/bcfusefs", "path": "bcfusefs/src/com/bitcasa/javalib/http/Uploader.java", "license": "bsd-2-clause", "size": 1332 }
[ "com.bitcasa.javalib.http.BitcasaHttpRequestor" ]
import com.bitcasa.javalib.http.BitcasaHttpRequestor;
import com.bitcasa.javalib.http.*;
[ "com.bitcasa.javalib" ]
com.bitcasa.javalib;
246,450
public Map<String, Object> additionalData() { return this.innerProperties() == null ? null : this.innerProperties().additionalData(); }
Map<String, Object> function() { return this.innerProperties() == null ? null : this.innerProperties().additionalData(); }
/** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. * * @return the additionalData value. */
Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented to the user
additionalData
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java", "license": "mit", "size": 3677 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,889,612
Map<String, Map<String, StatsResult>> getFacetStatsResults();
Map<String, Map<String, StatsResult>> getFacetStatsResults();
/** * Return a map of fieldName associated to value facets for the given {@link FieldStatsResult}. * * @return map of field faceting statistics */
Return a map of fieldName associated to value facets for the given <code>FieldStatsResult</code>
getFacetStatsResults
{ "repo_name": "spring-projects/spring-data-solr", "path": "src/main/java/org/springframework/data/solr/core/query/result/FieldStatsResult.java", "license": "apache-2.0", "size": 1940 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,342,289
protected static synchronized String bridgeServerToString(CacheServer c) { StringBuffer buf = new StringBuffer(); ClientSubscriptionConfig csg = c.getClientSubscriptionConfig();; buf.append("\n capacity: " + csg.getCapacity()); buf.append("\n diskStoreName: " + csg.getDiskStoreName()); buf.appen...
static synchronized String function(CacheServer c) { StringBuffer buf = new StringBuffer(); ClientSubscriptionConfig csg = c.getClientSubscriptionConfig();; buf.append(STR + csg.getCapacity()); buf.append(STR + csg.getDiskStoreName()); buf.append(STR + csg.getEvictionPolicy()); buf.append(STR + Arrays.asList(c.getGroup...
/** * Returns the bridge server as a string. For use only by {@link * BridgeHelper#bridgeServerToString(CacheServer)}. */
Returns the bridge server as a string. For use only by <code>BridgeHelper#bridgeServerToString(CacheServer)</code>
bridgeServerToString
{ "repo_name": "papicella/snappy-store", "path": "tests/core/src/main/java/hydra/BridgeDescription.java", "license": "apache-2.0", "size": 17364 }
[ "com.gemstone.gemfire.cache.server.CacheServer", "com.gemstone.gemfire.cache.server.ClientSubscriptionConfig", "java.util.Arrays" ]
import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig; import java.util.Arrays;
import com.gemstone.gemfire.cache.server.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
966,014
public static List<KafkaAdminClient.Call> getListOffsetsCalls(KafkaAdminClient adminClient, MetadataOperationContext<ListOffsetsResult.ListOffsetsResultInfo, ListOffsetsOptions> context, ...
static List<KafkaAdminClient.Call> function(KafkaAdminClient adminClient, MetadataOperationContext<ListOffsetsResult.ListOffsetsResultInfo, ListOffsetsOptions> context, Map<TopicPartition, OffsetSpec> topicPartitionOffsets, Map<TopicPartition, KafkaFutureImpl<ListOffsetsResult.ListOffsetsResultInfo>> futures) { return ...
/** * Used for benchmark. KafkaAdminClient.getListOffsetsCalls is only accessible * from within the admin package. */
Used for benchmark. KafkaAdminClient.getListOffsetsCalls is only accessible from within the admin package
getListOffsetsCalls
{ "repo_name": "TiVo/kafka", "path": "clients/src/test/java/org/apache/kafka/clients/admin/AdminClientTestUtils.java", "license": "apache-2.0", "size": 6050 }
[ "java.util.List", "java.util.Map", "org.apache.kafka.clients.admin.internals.MetadataOperationContext", "org.apache.kafka.common.TopicPartition", "org.apache.kafka.common.internals.KafkaFutureImpl" ]
import java.util.List; import java.util.Map; import org.apache.kafka.clients.admin.internals.MetadataOperationContext; import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.internals.KafkaFutureImpl;
import java.util.*; import org.apache.kafka.clients.admin.internals.*; import org.apache.kafka.common.*; import org.apache.kafka.common.internals.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
2,469,650
public void test_6511() throws Exception { Connection conn = getConnection(); vet_6511( conn, "boolean", "booleanpToBoolean", "booleanToBooleanp", "true" ); vet_6511( conn, "int", "intToInteger", "integerToInt", "1" ); vet_6511( conn, "bigint", "longpToLong", "longToLongp", "1"...
void function() throws Exception { Connection conn = getConnection(); vet_6511( conn, STR, STR, STR, "true" ); vet_6511( conn, "int", STR, STR, "1" ); vet_6511( conn, STR, STR, STR, "1" ); vet_6511( conn, STR, STR, STR, "1" ); vet_6511( conn, STR, STR, STR, "1.0" ); vet_6511( conn, "real", STR, STR, "1.0" ); }
/** * DERBY-6511: Make sure that conversions between primitive and wrapper * types work properly. */
DERBY-6511: Make sure that conversions between primitive and wrapper types work properly
test_6511
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java", "license": "apache-2.0", "size": 33102 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,654,596
private final RequestBuilder getGetRequest() { return MockMvcRequestBuilders .get(UrlDbxTeamBuilderConfig.URL_VALIDATE_AFFINITIES); }
final RequestBuilder function() { return MockMvcRequestBuilders .get(UrlDbxTeamBuilderConfig.URL_VALIDATE_AFFINITIES); }
/** * Returns a request builder prepared for validating affinities with no * affinities. * * @return a request builder with no affinities */
Returns a request builder prepared for validating affinities with no affinities
getGetRequest
{ "repo_name": "Bernardo-MG/dreadball-toolkit-webpage", "path": "src/test/java/com/bernardomg/tabletop/dreadball/web/toolkit/test/unit/builder/controller/TestSponsorValidationControllerAffinitiesValues.java", "license": "apache-2.0", "size": 6356 }
[ "com.bernardomg.tabletop.dreadball.web.toolkit.test.configuration.UrlDbxTeamBuilderConfig", "org.springframework.test.web.servlet.RequestBuilder", "org.springframework.test.web.servlet.request.MockMvcRequestBuilders" ]
import com.bernardomg.tabletop.dreadball.web.toolkit.test.configuration.UrlDbxTeamBuilderConfig; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import com.bernardomg.tabletop.dreadball.web.toolkit.test.configuration.*; import org.springframework.test.web.servlet.*; import org.springframework.test.web.servlet.request.*;
[ "com.bernardomg.tabletop", "org.springframework.test" ]
com.bernardomg.tabletop; org.springframework.test;
687,501
protected void addExpanded(RenderableDataItem item) { if (itemAttributes == null) { itemAttributes = new ItemAttributes(); } itemAttributes.addExpanded(item); }
void function(RenderableDataItem item) { if (itemAttributes == null) { itemAttributes = new ItemAttributes(); } itemAttributes.addExpanded(item); }
/** * Adds the specified item to this widget expanded item set. This method is * called when an item is created from a DataItem configuration object * * @param item * the item to add */
Adds the specified item to this widget expanded item set. This method is called when an item is created from a DataItem configuration object
addExpanded
{ "repo_name": "appnativa/rare", "path": "source/rare/core/com/appnativa/rare/widget/aWidget.java", "license": "gpl-3.0", "size": 150848 }
[ "com.appnativa.rare.ui.RenderableDataItem" ]
import com.appnativa.rare.ui.RenderableDataItem;
import com.appnativa.rare.ui.*;
[ "com.appnativa.rare" ]
com.appnativa.rare;
1,640,463
public void revoke(); } private static class LockableContext { private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); private final Lock read = lock.readLock(); private final Lock write = lock.writeLock(); private final ConcurrentLinkedQueue<ReadPermit> reads = new Concurrent...
void function(); } private static class LockableContext { private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); private final Lock read = lock.readLock(); private final Lock write = lock.writeLock(); private final ConcurrentLinkedQueue<ReadPermit> reads = new ConcurrentLinkedQueue<ClusterContextCach...
/** * Must call release when done with context */
Must call release when done with context
revoke
{ "repo_name": "unchartedsoftware/influent", "path": "influent-server/src/main/java/influent/server/clustering/utils/ClusterContextCache.java", "license": "apache-2.0", "size": 11009 }
[ "java.util.concurrent.ConcurrentLinkedQueue", "java.util.concurrent.locks.Lock", "java.util.concurrent.locks.ReentrantReadWriteLock" ]
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.*; import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
1,523,563
public void startPurge(WakeableLooper wakeableLooper) { synchronized (CacheCore.class) { if (looper == null) { looper = wakeableLooper; }
void function(WakeableLooper wakeableLooper) { synchronized (CacheCore.class) { if (looper == null) { looper = wakeableLooper; }
/** * start purge looper task * @param wakeableLooper the looper to run timer */
start purge looper task
startPurge
{ "repo_name": "objmagic/heron", "path": "heron/metricscachemgr/src/java/com/twitter/heron/metricscachemgr/metricscache/CacheCore.java", "license": "apache-2.0", "size": 21292 }
[ "com.twitter.heron.common.basics.WakeableLooper" ]
import com.twitter.heron.common.basics.WakeableLooper;
import com.twitter.heron.common.basics.*;
[ "com.twitter.heron" ]
com.twitter.heron;
2,302,650
protected Expression xml2Expression(Expression expression, Element expressionElement) { if (expression == null) { expression = BPELFactory.eINSTANCE.createExpression(); expression.setElement(expressionElement); } // Save all the references to external namespaces saveNamespacePrefix(expression, expr...
Expression function(Expression expression, Element expressionElement) { if (expression == null) { expression = BPELFactory.eINSTANCE.createExpression(); expression.setElement(expressionElement); } saveNamespacePrefix(expression, expressionElement); if (expressionElement == null) { return expression; } if (expressionEle...
/** * Converts an XML expression element to a BPEL Expression object. * * Accept a pre-constructed argument. This is good for sub-types of * expression. * * Returns the second argument as a convenience. * */
Converts an XML expression element to a BPEL Expression object. Accept a pre-constructed argument. This is good for sub-types of expression. Returns the second argument as a convenience
xml2Expression
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java", "license": "apache-2.0", "size": 141166 }
[ "org.eclipse.bpel.model.BPELFactory", "org.eclipse.bpel.model.Expression", "org.w3c.dom.Element" ]
import org.eclipse.bpel.model.BPELFactory; import org.eclipse.bpel.model.Expression; import org.w3c.dom.Element;
import org.eclipse.bpel.model.*; import org.w3c.dom.*;
[ "org.eclipse.bpel", "org.w3c.dom" ]
org.eclipse.bpel; org.w3c.dom;
321,513
public static int quickSelect(long[] array, int k) { Preconditions.checkArgument(k > 0 && k <= array.length); return quickSelect(array, 0, array.length, k); }
static int function(long[] array, int k) { Preconditions.checkArgument(k > 0 && k <= array.length); return quickSelect(array, 0, array.length, k); }
/** * Selects the kth smallest element in the array in linear time. k = 1, will * return the absolutely smallest element. * * @return the kth smallest index of the element. */
Selects the kth smallest element in the array in linear time. k = 1, will return the absolutely smallest element
quickSelect
{ "repo_name": "sourcewarehouse/thomasjungblut", "path": "src/de/jungblut/datastructure/ArrayUtils.java", "license": "apache-2.0", "size": 40697 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,490,789
@Deprecated public ResultSet query(String sqlQuery) throws SQLException { if (!sqlQuery.toLowerCase().startsWith("select")) { throw new SQLException("Query: Only SQL-Statements starting with SELECT are allowed: " + sqlQuery); } Statement st = createStatement(true); ResultSet rs = st.executeQuery(...
ResultSet function(String sqlQuery) throws SQLException { if (!sqlQuery.toLowerCase().startsWith(STR)) { throw new SQLException(STR + sqlQuery); } Statement st = createStatement(true); ResultSet rs = st.executeQuery(sqlQuery); return rs; }
/** * Executes the given SQL-Query. Only SQL-statements starting with "SELECT" * (disregarding case) will be accepted. Any errors will result in an * SQL-Exception being thrown. * * @param sqlQuery An SQL-String. * @return A ResultSet-Object with the results of the query. The ResultSet * i...
Executes the given SQL-Query. Only SQL-statements starting with "SELECT" (disregarding case) will be accepted. Any errors will result in an SQL-Exception being thrown
query
{ "repo_name": "ntj/ComplexRapidMiner", "path": "src/com/rapidminer/tools/jdbc/DatabaseHandler.java", "license": "gpl-2.0", "size": 23802 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,736,290
public Map<String, JobState.DatasetState> getLatestDatasetStatesByUrns(String jobName) throws IOException { List<JobState.DatasetState> previousDatasetStates = getAll(jobName, "%" + CURRENT_DATASET_STATE_FILE_SUFFIX + DATASET_STATE_STORE_TABLE_SUFFIX, true); Map<String, JobState.DatasetState> dataset...
Map<String, JobState.DatasetState> function(String jobName) throws IOException { List<JobState.DatasetState> previousDatasetStates = getAll(jobName, "%" + CURRENT_DATASET_STATE_FILE_SUFFIX + DATASET_STATE_STORE_TABLE_SUFFIX, true); Map<String, JobState.DatasetState> datasetStatesByUrns = Maps.newHashMap(); if (!previou...
/** * Get a {@link Map} from dataset URNs to the latest {@link JobState.DatasetState}s. * * @param jobName the job name * @return a {@link Map} from dataset URNs to the latest {@link JobState.DatasetState}s * @throws IOException if there's something wrong reading the {@link JobState.DatasetState}s */
Get a <code>Map</code> from dataset URNs to the latest <code>JobState.DatasetState</code>s
getLatestDatasetStatesByUrns
{ "repo_name": "ydai1124/gobblin-1", "path": "gobblin-runtime/src/main/java/gobblin/runtime/MysqlDatasetStateStore.java", "license": "apache-2.0", "size": 5586 }
[ "com.google.common.collect.Maps", "java.io.IOException", "java.util.List", "java.util.Map" ]
import com.google.common.collect.Maps; import java.io.IOException; import java.util.List; import java.util.Map;
import com.google.common.collect.*; import java.io.*; import java.util.*;
[ "com.google.common", "java.io", "java.util" ]
com.google.common; java.io; java.util;
1,886,808
public @CheckForNull Obligation getObligationByType(ObjectType type) throws ClassNotFoundException { for (Iterator<Obligation> i = obligationIterator(); i.hasNext();) { Obligation obligation = i.next(); if (Hierarchy.isSubtype(type, obligation.getType())) { return...
Obligation function(ObjectType type) throws ClassNotFoundException { for (Iterator<Obligation> i = obligationIterator(); i.hasNext();) { Obligation obligation = i.next(); if (Hierarchy.isSubtype(type, obligation.getType())) { return obligation; } } return null; }
/** * Look up an Obligation by type. This returns the first Obligation that is * a supertype of the type given (meaning that the given type could be an * instance of the returned Obligation). * * @param type * a type * @return an Obligation that is a supertype of the given ...
Look up an Obligation by type. This returns the first Obligation that is a supertype of the type given (meaning that the given type could be an instance of the returned Obligation)
getObligationByType
{ "repo_name": "johnscancella/spotbugs", "path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/obl/ObligationFactory.java", "license": "lgpl-2.1", "size": 6908 }
[ "edu.umd.cs.findbugs.ba.Hierarchy", "java.util.Iterator", "org.apache.bcel.generic.ObjectType" ]
import edu.umd.cs.findbugs.ba.Hierarchy; import java.util.Iterator; import org.apache.bcel.generic.ObjectType;
import edu.umd.cs.findbugs.ba.*; import java.util.*; import org.apache.bcel.generic.*;
[ "edu.umd.cs", "java.util", "org.apache.bcel" ]
edu.umd.cs; java.util; org.apache.bcel;
1,395,125
public void setCacheMetricInterval(int cacheMetricInterval) { if (cacheMetricInterval > 0) { ClientConfig.CACHEMETRIC_INTERVAL = cacheMetricInterval; } }
void function(int cacheMetricInterval) { if (cacheMetricInterval > 0) { ClientConfig.CACHEMETRIC_INTERVAL = cacheMetricInterval; } }
/** * cache metric statistics timer worker interval * * @param cacheMetricInterval */
cache metric statistics timer worker interval
setCacheMetricInterval
{ "repo_name": "tangwan/study_code", "path": "taobao-tfs-test/src/main/java/com/taobao/common/tfs/DefaultTfsManager.java", "license": "apache-2.0", "size": 34208 }
[ "com.taobao.common.tfs.impl.ClientConfig" ]
import com.taobao.common.tfs.impl.ClientConfig;
import com.taobao.common.tfs.impl.*;
[ "com.taobao.common" ]
com.taobao.common;
1,923,178
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<SharesSetMetadataResponse> setMetadataWithResponseAsync( String shareName, Integer timeout, Map<String, String> metadata, String leaseId, Context context) { final String restype = "share"; final String comp = "metadata"; ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<SharesSetMetadataResponse> function( String shareName, Integer timeout, Map<String, String> metadata, String leaseId, Context context) { final String restype = "share"; final String comp = STR; final String accept = STR; return service.setMetadata( this.client.getUrl(), ...
/** * Sets one or more user-defined name-value pairs for the specified share. * * @param shareName The name of the target share. * @param timeout The timeout parameter is expressed in seconds. For more information, see &lt;a * href="https://docs.microsoft.com/en-us/rest/api/storageservices/...
Sets one or more user-defined name-value pairs for the specified share
setMetadataWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/SharesImpl.java", "license": "mit", "size": 51155 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.storage.file.share.implementation.models.SharesSetMetadataResponse", "java.util.Map" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.storage.file.share.implementation.models.SharesSetMetadataResponse; import java.util.Map;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.storage.file.share.implementation.models.*; import java.util.*;
[ "com.azure.core", "com.azure.storage", "java.util" ]
com.azure.core; com.azure.storage; java.util;
2,445,503
protected Response createResponse(Status status, NlsRuntimeException error, String message, Map<String, List<String>> errorsMap) { return createResponse(status, error, message, error.getCode(), errorsMap); }
Response function(Status status, NlsRuntimeException error, String message, Map<String, List<String>> errorsMap) { return createResponse(status, error, message, error.getCode(), errorsMap); }
/** * Create a response message as a JSON-String from the given parts. * * @param status is the HTTP {@link Status}. * @param error is the catched or wrapped {@link NlsRuntimeException}. * @param message is the JSON message attribute. * @param errorsMap is a map with all validation errors * @return...
Create a response message as a JSON-String from the given parts
createResponse
{ "repo_name": "oasp/oasp4j", "path": "modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java", "license": "apache-2.0", "size": 20503 }
[ "java.util.List", "java.util.Map", "javax.ws.rs.core.Response", "net.sf.mmm.util.exception.api.NlsRuntimeException" ]
import java.util.List; import java.util.Map; import javax.ws.rs.core.Response; import net.sf.mmm.util.exception.api.NlsRuntimeException;
import java.util.*; import javax.ws.rs.core.*; import net.sf.mmm.util.exception.api.*;
[ "java.util", "javax.ws", "net.sf.mmm" ]
java.util; javax.ws; net.sf.mmm;
99,469
@Pure public ISarlSkillBuilder createSarlSkill(String name, Resource resource) { IScriptBuilder scriptBuilder = createScript(getFooPackageName(), resource); return scriptBuilder.addSarlSkill(name); }
ISarlSkillBuilder function(String name, Resource resource) { IScriptBuilder scriptBuilder = createScript(getFooPackageName(), resource); return scriptBuilder.addSarlSkill(name); }
/** Create the factory for a Sarl SarlSkill. * @param name the name of the SarlSkill * @param resource the resource that must be used for * containing the generated element, and resolving types from names. * @return the factory. */
Create the factory for a Sarl SarlSkill
createSarlSkill
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/CodeBuilderFactory.java", "license": "apache-2.0", "size": 50509 }
[ "io.sarl.lang.codebuilder.builders.ISarlSkillBuilder", "io.sarl.lang.codebuilder.builders.IScriptBuilder", "org.eclipse.emf.ecore.resource.Resource" ]
import io.sarl.lang.codebuilder.builders.ISarlSkillBuilder; import io.sarl.lang.codebuilder.builders.IScriptBuilder; import org.eclipse.emf.ecore.resource.Resource;
import io.sarl.lang.codebuilder.builders.*; import org.eclipse.emf.ecore.resource.*;
[ "io.sarl.lang", "org.eclipse.emf" ]
io.sarl.lang; org.eclipse.emf;
2,625,247
private void sendSwitchStatus() { // TODO: find correct duration to send sendOnPlayStatus(StatusCodes.NS_PLAY_SWITCH, 1, bytesSent.get()); }
void function() { sendOnPlayStatus(StatusCodes.NS_PLAY_SWITCH, 1, bytesSent.get()); }
/** * Send playlist switch status notification */
Send playlist switch status notification
sendSwitchStatus
{ "repo_name": "maritelle/red5-server-common", "path": "src/main/java/org/red5/server/stream/PlayEngine.java", "license": "apache-2.0", "size": 82267 }
[ "org.red5.server.net.rtmp.status.StatusCodes" ]
import org.red5.server.net.rtmp.status.StatusCodes;
import org.red5.server.net.rtmp.status.*;
[ "org.red5.server" ]
org.red5.server;
594,955
public static void putPosition(ByteBuffer buf, FileWALPointer ptr) { buf.putLong(ptr.index()); buf.putInt(ptr.fileOffset()); }
static void function(ByteBuffer buf, FileWALPointer ptr) { buf.putLong(ptr.index()); buf.putInt(ptr.fileOffset()); }
/** * Saves position, WAL pointer (requires {@link #FILE_WAL_POINTER_SIZE} bytes) * @param buf Byte buffer to serialize version to. * @param ptr File WAL pointer to write. */
Saves position, WAL pointer (requires <code>#FILE_WAL_POINTER_SIZE</code> bytes)
putPosition
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java", "license": "apache-2.0", "size": 17095 }
[ "java.nio.ByteBuffer", "org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer" ]
import java.nio.ByteBuffer; import org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer;
import java.nio.*; import org.apache.ignite.internal.processors.cache.persistence.wal.*;
[ "java.nio", "org.apache.ignite" ]
java.nio; org.apache.ignite;
1,248,795
public void closeRegion(String regionName) throws IOException { closeRegion(Bytes.toBytes(regionName)); }
void function(String regionName) throws IOException { closeRegion(Bytes.toBytes(regionName)); }
/** * Closes the named region. * * @param regionName The region to close. */
Closes the named region
closeRegion
{ "repo_name": "NGDATA/lilyproject", "path": "global/hadoop-test-fw/src/main/java/org/lilyproject/hadooptestfw/fork/HBaseTestingUtility.java", "license": "apache-2.0", "size": 90460 }
[ "java.io.IOException", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,595,015
protected boolean allSubsetsOfSizeK_1AreFrequent(int[] candidate, List<Itemset> levelK_1) { // generate all subsets by always each item from the candidate, one by // one for (int posRemoved = 0; posRemoved < candidate.length; posRemoved++) { // perform a binary search to check if the subset appears in l...
boolean function(int[] candidate, List<Itemset> levelK_1) { for (int posRemoved = 0; posRemoved < candidate.length; posRemoved++) { int first = 0; int last = levelK_1.size() - 1; boolean found = false; while (first <= last) { int middle = (first + last) / 2; if (sameAs(levelK_1.get(middle), candidate, posRemoved) < 0) ...
/** * Method to check if all the subsets of size k-1 of a candidate of size k * are freuqnet * * @param candidate * a candidate itemset of size k * @param levelK_1 * the frequent itemsets of size k-1 * @return true if all the subsets are frequet */
Method to check if all the subsets of size k-1 of a candidate of size k are freuqnet
allSubsetsOfSizeK_1AreFrequent
{ "repo_name": "YinYanfei/CadalWorkspace", "path": "CadalRec/src/cn/cadal/rec/dm/algorithms/frequentpatterns/apriori/AlgoApriori.java", "license": "gpl-3.0", "size": 17134 }
[ "cn.cadal.rec.dm.patterns.itemset_array_integers_with_count.Itemset", "java.util.List" ]
import cn.cadal.rec.dm.patterns.itemset_array_integers_with_count.Itemset; import java.util.List;
import cn.cadal.rec.dm.patterns.itemset_array_integers_with_count.*; import java.util.*;
[ "cn.cadal.rec", "java.util" ]
cn.cadal.rec; java.util;
1,366,404
public void testAssociationNestedSearch2() throws Exception { PrivateTeacher searchObject = new PrivateTeacher(); Ii ii = new Ii(); ii.setExtension("2"); searchObject.setId(ii); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.Teacher",searchObje...
void function() throws Exception { PrivateTeacher searchObject = new PrivateTeacher(); Ii ii = new Ii(); ii.setExtension("2"); searchObject.setId(ii); Collection results = getApplicationService().search(STR,searchObject ); assertNotNull(results); assertEquals(1,results.size()); Teacher result = (Teacher)results.iterato...
/** * Uses Nested Search Criteria for inheritance as association in search * Verifies that the results are returned * Verifies size of the result set * Verifies that none of the attribute is null * * @throws Exception */
Uses Nested Search Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
testAssociationNestedSearch2
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/iso-example-project/junit/src/test/xml/data/AbstractParentWithAssociationXMLData2Test.java", "license": "bsd-3-clause", "size": 3178 }
[ "gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.PrivateTeacher", "gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.Teacher", "gov.nih.nci.iso21090.Ii", "java.util.Collection" ]
import gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.PrivateTeacher; import gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.Teacher; import gov.nih.nci.iso21090.Ii; import java.util.Collection;
import gov.nih.nci.cacoresdk.domain.inheritance.abstrakt.*; import gov.nih.nci.iso21090.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
1,816,002
public static List<String> getStringsFromValue(String value, String separator) { List<String> strings = new ArrayList<String>(); try { String[] chunks = value.split(separator + "(?=([^\"]*\"[^\"]*\")*[^\"]*$)"); for (String chunk : chunks) { chunk = chunk....
static List<String> function(String value, String separator) { List<String> strings = new ArrayList<String>(); try { String[] chunks = value.split(separator + STR]*\"[^\"]*\")*[^\"]*$)STR' && chunk.charAt(chunk.length() - 1) == '"') { chunk = chunk.substring(1, chunk.length() - 1).trim(); } strings.add(chunk); } } } ca...
/** * Splits the string into a list of string by the specified separator. * * @param value * @param separator * @return list of strings */
Splits the string into a list of string by the specified separator
getStringsFromValue
{ "repo_name": "culmat/gitblit", "path": "src/main/java/com/gitblit/utils/StringUtils.java", "license": "apache-2.0", "size": 20912 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.PatternSyntaxException" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.PatternSyntaxException;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
949,134
public static void main(String[] args) { try { // グループ化のためのアプリケーションID (Windows 7以降) Display.setAppName(AppConstants.NAME); // 設定読み込み AppConfig.load(); ShipGroupConfig.load(); QuestConfig.load(); // lazy load Exec...
static void function(String[] args) { try { Display.setAppName(AppConstants.NAME); AppConfig.load(); ShipGroupConfig.load(); QuestConfig.load(); ExecutorService service = ThreadManager.getExecutorService(); service.submit(() -> ShipConfig.load()); service.submit(() -> ItemMasterConfig.load()); service.submit(() -> Item...
/** * Launch the application. * @param args */
Launch the application
main
{ "repo_name": "Ibemu/logbook", "path": "main/logbook/gui/ApplicationMain.java", "license": "mit", "size": 33344 }
[ "java.util.concurrent.ExecutorService", "java.util.concurrent.ScheduledExecutorService", "org.eclipse.swt.widgets.Display", "org.eclipse.wb.swt.SWTResourceManager" ]
import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; import org.eclipse.swt.widgets.Display; import org.eclipse.wb.swt.SWTResourceManager;
import java.util.concurrent.*; import org.eclipse.swt.widgets.*; import org.eclipse.wb.swt.*;
[ "java.util", "org.eclipse.swt", "org.eclipse.wb" ]
java.util; org.eclipse.swt; org.eclipse.wb;
553,567
@Test public void testLsPdu() throws Exception { defaultLspWrapper.setLsPdu(pdu); lsPdu = defaultLspWrapper.lsPdu(); assertThat(lsPdu, is(pdu)); }
void function() throws Exception { defaultLspWrapper.setLsPdu(pdu); lsPdu = defaultLspWrapper.lsPdu(); assertThat(lsPdu, is(pdu)); }
/** * Tests lsPdu() getter method. */
Tests lsPdu() getter method
testLsPdu
{ "repo_name": "kuujo/onos", "path": "protocols/isis/ctl/src/test/java/org/onosproject/isis/controller/impl/lsdb/DefaultLspWrapperTest.java", "license": "apache-2.0", "size": 8756 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
2,295,786
public ServiceFuture<AccountKeysInner> regenerateKeysAsync(String resourceGroupName, String accountName, final ServiceCallback<AccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
ServiceFuture<AccountKeysInner> function(String resourceGroupName, String accountName, final ServiceCallback<AccountKeysInner> serviceCallback) { return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); }
/** * Regenerate specified Key of a Spatial Anchors Account. * * @param resourceGroupName Name of an Azure resource group. * @param accountName Name of an Mixed Reality Account. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalA...
Regenerate specified Key of a Spatial Anchors Account
regenerateKeysAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/mixedreality/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/mixedreality/v2020_05_01/implementation/SpatialAnchorsAccountsInner.java", "license": "mit", "size": 67374 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
991,502
public TOutlineTemplate copy(Connection con) throws TorqueException { return copy(true, con); }
TOutlineTemplate function(Connection con) throws TorqueException { return copy(true, con); }
/** * Makes a copy of this object using connection. * It creates a new object filling in the simple attributes. * It then fills all the association collections and sets the * related objects to isNew=true. * * @param con the database connection to read associated objects. */
Makes a copy of this object using connection. It creates a new object filling in the simple attributes. It then fills all the association collections and sets the related objects to isNew=true
copy
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTOutlineTemplate.java", "license": "gpl-3.0", "size": 43969 }
[ "java.sql.Connection", "org.apache.torque.TorqueException" ]
import java.sql.Connection; import org.apache.torque.TorqueException;
import java.sql.*; import org.apache.torque.*;
[ "java.sql", "org.apache.torque" ]
java.sql; org.apache.torque;
1,039,546
public Object copyObject (Object obj, org.omg.CORBA.ORB orb) throws RemoteException { if (orb instanceof ORB) { ORB lorb = (ORB)orb ; try { try { // This gets the copier for the current invocation, which was // prev...
Object function (Object obj, org.omg.CORBA.ORB orb) throws RemoteException { if (orb instanceof ORB) { ORB lorb = (ORB)orb ; try { try { return lorb.peekInvocationInfo().getCopierFactory().make().copy( obj ) ; } catch (java.util.EmptyStackException exc) { CopierManager cm = lorb.getCopierManager() ; ObjectCopier copier...
/** * Copies or connects an object. Used by local stubs to copy * an actual parameter, result object, or exception. * @param obj the object to copy. * @param orb the ORB. * @return the copy or connected object. * @exception RemoteException if the object could not be copied or connected. ...
Copies or connects an object. Used by local stubs to copy an actual parameter, result object, or exception
copyObject
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java", "license": "gpl-2.0", "size": 29510 }
[ "java.io.Serializable", "java.rmi.RemoteException", "org.omg.CORBA" ]
import java.io.Serializable; import java.rmi.RemoteException; import org.omg.CORBA;
import java.io.*; import java.rmi.*; import org.omg.*;
[ "java.io", "java.rmi", "org.omg" ]
java.io; java.rmi; org.omg;
1,117,332
public void closeFrame(JInternalFrame frame) { Container c = frame.getParent(); frame.doDefaultCloseAction(); if (c != null) { if (frame.isIcon()) c.remove(frame.getDesktopIcon()); else c.remove(frame); c.repaint(); } } // closeFrame()
void function(JInternalFrame frame) { Container c = frame.getParent(); frame.doDefaultCloseAction(); if (c != null) { if (frame.isIcon()) c.remove(frame.getDesktopIcon()); else c.remove(frame); c.repaint(); } }
/** * This method removes the JInternalFrame and JDesktopIcon (if one is * present) from their parents. * * @param frame The JInternalFrame to close. */
This method removes the JInternalFrame and JDesktopIcon (if one is present) from their parents
closeFrame
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/DefaultDesktopManager.java", "license": "gpl-2.0", "size": 18096 }
[ "java.awt.Container", "javax.swing.JInternalFrame" ]
import java.awt.Container; import javax.swing.JInternalFrame;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
328,939
public static NV getProperty2(final IIndexManager indexManagerIsIgnored, final Properties properties, final String namespace, final String globalName, final String defaultValue) { // indexManager MAY be null. if (properties == null) throw new IllegalArgumentExcep...
static NV function(final IIndexManager indexManagerIsIgnored, final Properties properties, final String namespace, final String globalName, final String defaultValue) { if (properties == null) throw new IllegalArgumentException(); if (globalName == null) throw new IllegalArgumentException(); String key = null; String v...
/** * Variant returns both the name under which the value was discovered and * the value. * * @param indexManagerIsIgnored * @param properties * @param namespace * @param globalName * @param defaultValue * @return */
Variant returns both the name under which the value was discovered and the value
getProperty2
{ "repo_name": "wikimedia/wikidata-query-blazegraph", "path": "bigdata-core/bigdata/src/java/com/bigdata/config/Configuration.java", "license": "gpl-2.0", "size": 13862 }
[ "com.bigdata.journal.IIndexManager", "java.util.Properties" ]
import com.bigdata.journal.IIndexManager; import java.util.Properties;
import com.bigdata.journal.*; import java.util.*;
[ "com.bigdata.journal", "java.util" ]
com.bigdata.journal; java.util;
1,671,515
@Test public void testEqualsVariables() { Expression ex1 = new Variable("foo"); Expression ex2 = new Variable("foo"); Expression ex3 = new Variable("foo"); Expression ex4 = new Variable("foos"); assertTrue(ex1.equals(ex2)); assertTrue(ex2.equals(ex1)); ass...
void function() { Expression ex1 = new Variable("foo"); Expression ex2 = new Variable("foo"); Expression ex3 = new Variable("foo"); Expression ex4 = new Variable("foos"); assertTrue(ex1.equals(ex2)); assertTrue(ex2.equals(ex1)); assertTrue(ex2.equals(ex3)); assertTrue(ex3.equals(ex1)); assertTrue(ex1.hashCode()==ex2.ha...
/** * Tests equality of 2 variables. */
Tests equality of 2 variables
testEqualsVariables
{ "repo_name": "hcgatewood/main", "path": "6.005 Expression Final Project/src/test/ExpressionTest.java", "license": "mit", "size": 26294 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,683,557
public boolean isUserModified() { return isUserDefined() || (isOriginalCoordsEmpty() && (getCoords() != null || getCalcStateJson() != null)) || StringUtils.isNotBlank(getUserNote()); }
boolean function() { return isUserDefined() (isOriginalCoordsEmpty() && (getCoords() != null getCalcStateJson() != null)) StringUtils.isNotBlank(getUserNote()); }
/** * returns true if either this is a user defined waypoint or some data of * the waypoint was modified by the user */
returns true if either this is a user defined waypoint or some data of the waypoint was modified by the user
isUserModified
{ "repo_name": "rsudev/c-geo-opensource", "path": "main/src/cgeo/geocaching/models/Waypoint.java", "license": "apache-2.0", "size": 15840 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
367,600