method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public Observable<ServiceResponse<ImagePrediction>> detectImageWithNoStoreWithServiceResponseAsync(UUID projectId, String publishedName, byte[] imageData, String application) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required ...
Observable<ServiceResponse<ImagePrediction>> function(UUID projectId, String publishedName, byte[] imageData, String application) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (projectId == null) { throw new IllegalArgumentException(STR); } if (publishedName == null) { throw new ...
/** * Detect objects in an image without saving the result. * * @param projectId The project id. * @param publishedName Specifies the name of the model to evaluate against. * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB. * @pa...
Detect objects in an image without saving the result
detectImageWithNoStoreWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-customvision-prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java", "license": "mit", "size": 89979 }
[ "com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,859,881
public Adapter createUnorderedAlternativeValAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org.eclipse.xtext.serializer.sequencertest.UnorderedAlternativeVal <em>Unordered Alternative Val</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inh...
Creates a new adapter for an object of class '<code>org.eclipse.xtext.serializer.sequencertest.UnorderedAlternativeVal Unordered Alternative Val</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.
createUnorderedAlternativeValAdapter
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/sequencertest/util/SequencertestAdapterFactory.java", "license": "epl-1.0", "size": 39311 }
[ "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;
256,705
private double getSyntacticSimilarity(TestChromosome individual) { // The method toCode converts a test case to its JUnit representation String originalString = originalTest.toCode(); //System.out.println("\n orgString: "+ originalString); // The length of test cases varies during the search // therefore ...
double function(TestChromosome individual) { String originalString = originalTest.toCode(); TestCaseMinimizer minimizer = new TestCaseMinimizer(originalCoveredGoals); TestChromosome copy = (TestChromosome) individual.clone(); minimizer.minimize(copy); TestCodeVisitor visitor = new TestCodeVisitor(); copy.getTestCase()....
/** * Determine the syntactic distance between the string representation of two * test cases. * * * @param individual * @return */
Determine the syntactic distance between the string representation of two test cases
getSyntacticSimilarity
{ "repo_name": "claudejin/evosuite", "path": "removed/replace/DifferenceFitnessFunction.java", "license": "lgpl-3.0", "size": 8965 }
[ "java.util.HashSet", "java.util.Set", "org.evosuite.testcase.TestCaseMinimizer", "org.evosuite.testcase.TestChromosome", "org.evosuite.testcase.TestCodeVisitor" ]
import java.util.HashSet; import java.util.Set; import org.evosuite.testcase.TestCaseMinimizer; import org.evosuite.testcase.TestChromosome; import org.evosuite.testcase.TestCodeVisitor;
import java.util.*; import org.evosuite.testcase.*;
[ "java.util", "org.evosuite.testcase" ]
java.util; org.evosuite.testcase;
2,736,078
default Predicate<T> toPredicate() { return object -> apply(object).included(); }
default Predicate<T> toPredicate() { return object -> apply(object).included(); }
/** * Return a {@link Predicate} that returns {@code true} if this filter * <em>includes</em> the object supplied to the predicate's * {@link Predicate#test test} method. */
Return a <code>Predicate</code> that returns true if this filter includes the object supplied to the predicate's <code>Predicate#test test</code> method
toPredicate
{ "repo_name": "sbrannen/junit-lambda", "path": "junit-platform-engine/src/main/java/org/junit/platform/engine/Filter.java", "license": "epl-1.0", "size": 3545 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
1,173,473
public Boolean getBoolean(Object[] dataRow, int index) throws KettleValueException;
Boolean function(Object[] dataRow, int index) throws KettleValueException;
/** * Get a Boolean value from a row of data. Convert data if this needed. * * @param dataRow the data row * @param index the index * @return The boolean found on that position in the row * @throws KettleValueException in case there was a problem converting the data. */
Get a Boolean value from a row of data. Convert data if this needed
getBoolean
{ "repo_name": "bsspirit/kettle-4.4.0-stable", "path": "src-core/org/pentaho/di/core/row/RowMetaInterface.java", "license": "apache-2.0", "size": 21111 }
[ "org.pentaho.di.core.exception.KettleValueException" ]
import org.pentaho.di.core.exception.KettleValueException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
481,704
protected Routed<T> findService(RoutingContext routingCtx) { assert router != null; return router.find(routingCtx); }
Routed<T> function(RoutingContext routingCtx) { assert router != null; return router.find(routingCtx); }
/** * Finds the {@link Service} whose {@link Route} matches the {@code path}. * * @param routingCtx a context to find the {@link Service}. * * @return the {@link Service} wrapped by {@link Routed} if there's a match. * {@link Routed#empty()} if there's no match. */
Finds the <code>Service</code> whose <code>Route</code> matches the path
findService
{ "repo_name": "anuraaga/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/composition/AbstractCompositeService.java", "license": "apache-2.0", "size": 8217 }
[ "com.linecorp.armeria.server.Routed", "com.linecorp.armeria.server.RoutingContext" ]
import com.linecorp.armeria.server.Routed; import com.linecorp.armeria.server.RoutingContext;
import com.linecorp.armeria.server.*;
[ "com.linecorp.armeria" ]
com.linecorp.armeria;
2,686,128
@Override public DataSetPreProcessor getPreProcessor() { return backedIterator.getPreProcessor(); }
DataSetPreProcessor function() { return backedIterator.getPreProcessor(); }
/** * Returns preprocessors, if defined * * @return */
Returns preprocessors, if defined
getPreProcessor
{ "repo_name": "kinbod/deeplearning4j", "path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/datasets/iterator/AsyncDataSetIterator.java", "license": "apache-2.0", "size": 15291 }
[ "org.nd4j.linalg.dataset.api.DataSetPreProcessor" ]
import org.nd4j.linalg.dataset.api.DataSetPreProcessor;
import org.nd4j.linalg.dataset.api.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
1,349,600
public String getDescriptionString() { String linesep = System.getProperty( "line.separator" ); StringBuffer sb = new StringBuffer(); if ( options != null && options.size() > 0 ) { sb.append( "Options:" ).append( linesep ); TreeSet<String> opts = new TreeSet<String>( this.options.keySet() ); for ( St...
String function() { String linesep = System.getProperty( STR ); StringBuffer sb = new StringBuffer(); if ( options != null && options.size() > 0 ) { sb.append( STR ).append( linesep ); TreeSet<String> opts = new TreeSet<String>( this.options.keySet() ); for ( String opt : opts ) { sb.append( " " ).append( opt ); for ( ...
/** * Get a tabular description of all options and their descriptions, one per line. */
Get a tabular description of all options and their descriptions, one per line
getDescriptionString
{ "repo_name": "kartoFlane/superluminal2", "path": "src/java/org/unsynchronized/Getopt.java", "license": "gpl-2.0", "size": 5475 }
[ "java.util.TreeSet" ]
import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
1,422,085
public T lzf() { LZFDataFormat lzfdf = new LZFDataFormat(); return dataFormat(lzfdf); }
T function() { LZFDataFormat lzfdf = new LZFDataFormat(); return dataFormat(lzfdf); }
/** * Uses the LZF deflater data format */
Uses the LZF deflater data format
lzf
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 46443 }
[ "org.apache.camel.model.dataformat.LZFDataFormat" ]
import org.apache.camel.model.dataformat.LZFDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,128,424
public CompilationMessage errDuplicateWSDLImport(String tns, String location) { return this.formatCompilationMessage("Attempted to import WSDL for namespace {0} from" + " multiple locations: definitions from {1} will be ignored!", tns, location); } /** * Error in schema processing:...
CompilationMessage function(String tns, String location) { return this.formatCompilationMessage(STR + STR, tns, location); } /** * Error in schema processing: {0}
/** * Attempted to import WSDL for namespace {0} from multiple locations: * definitions from {1} will be ignored! */
Attempted to import WSDL for namespace {0} from multiple locations: definitions from {1} will be ignored
errDuplicateWSDLImport
{ "repo_name": "isurusuranga/wso2-ode", "path": "bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/CommonCompilationMessages.java", "license": "apache-2.0", "size": 22389 }
[ "org.apache.ode.bpel.compiler.api.CompilationMessage" ]
import org.apache.ode.bpel.compiler.api.CompilationMessage;
import org.apache.ode.bpel.compiler.api.*;
[ "org.apache.ode" ]
org.apache.ode;
2,624,221
try{ return parse(content); } catch(Exception ex){ throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYearMonth"}); } }
try{ return parse(content); } catch(Exception ex){ throw new InvalidDatatypeValueException(STR, new Object[]{content, STR}); } }
/** * Convert a string to a compiled form * * @param content The lexical representation of gYearMonth * @return a valid and normalized gYearMonth object */
Convert a string to a compiled form
getActualValue
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xerces/internal/impl/dv/xs/YearMonthDV.java", "license": "apache-2.0", "size": 3643 }
[ "com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException" ]
import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
import com.sun.org.apache.xerces.internal.impl.dv.*;
[ "com.sun.org" ]
com.sun.org;
181,676
public Object createService(Constructor ctor) throws ConfigException { try { int p = _url.indexOf(':'); String urlName = _url.substring(p + 1); URL url = new URL(urlName); String action = "dummy-action"; QName name = new QName(urlName, "dummy-action"); ret...
Object function(Constructor ctor) throws ConfigException { try { int p = _url.indexOf(':'); String urlName = _url.substring(p + 1); URL url = new URL(urlName); String action = STR; QName name = new QName(urlName, STR); return ctor.newInstance(url, name); } catch (RuntimeException e) { throw e; } catch (Exception e) { t...
/** * Creates the object from the proxy. * * @param env the calling environment * * @return the object named by the proxy. */
Creates the object from the proxy
createService
{ "repo_name": "christianchristensen/resin", "path": "modules/extra/src/com/caucho/soa/client/WebServiceClient.java", "license": "gpl-2.0", "size": 5508 }
[ "com.caucho.config.ConfigException", "java.lang.reflect.Constructor", "javax.xml.namespace.QName" ]
import com.caucho.config.ConfigException; import java.lang.reflect.Constructor; import javax.xml.namespace.QName;
import com.caucho.config.*; import java.lang.reflect.*; import javax.xml.namespace.*;
[ "com.caucho.config", "java.lang", "javax.xml" ]
com.caucho.config; java.lang; javax.xml;
2,339,986
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) public String delete(@PathVariable long id, Model model, UriComponentsBuilder uriBuilder, RedirectAttributes redirectAttributes) { PersonDTO person = personFacade.findPersonById(id); if (pers...
@RequestMapping(value = STR, method = RequestMethod.GET) String function(@PathVariable long id, Model model, UriComponentsBuilder uriBuilder, RedirectAttributes redirectAttributes) { PersonDTO person = personFacade.findPersonById(id); if (person != null) { personFacade.removePersonById(id); } redirectAttributes.addFlas...
/** * Delete person * @param id * @param model * @param uriBuilder * @param redirectAttributes * @return */
Delete person
delete
{ "repo_name": "DrakMelisek/pa165_haunted_houses", "path": "web/src/main/java/com/peta2kuba/pa165_haunted_houses/mvc/controllers/PersonController.java", "license": "apache-2.0", "size": 6677 }
[ "com.peta2kuba.pa165_haunted_houses.dto.PersonDTO", "org.springframework.ui.Model", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.servlet.mvc.support.Redire...
import com.peta2kuba.pa165_haunted_houses.dto.PersonDTO; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.m...
import com.peta2kuba.pa165_haunted_houses.dto.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.mvc.support.*; import org.springframework.web.util.*;
[ "com.peta2kuba.pa165_haunted_houses", "org.springframework.ui", "org.springframework.web" ]
com.peta2kuba.pa165_haunted_houses; org.springframework.ui; org.springframework.web;
1,194,207
public void IGNOREtestSec2056() { UsernamePasswordAuthenticationToken foundUser = new UsernamePasswordAuthenticationToken( "rod", "koala"); UsernamePasswordAuthenticationToken notFoundUser = new UsernamePasswordAuthenticationToken( "notFound", "koala"); PasswordEncoder encoder = new BCryptPasswordEncod...
void function() { UsernamePasswordAuthenticationToken foundUser = new UsernamePasswordAuthenticationToken( "rod", "koala"); UsernamePasswordAuthenticationToken notFoundUser = new UsernamePasswordAuthenticationToken( STR, "koala"); PasswordEncoder encoder = new BCryptPasswordEncoder(10, new SecureRandom()); DaoAuthentic...
/** * This is an explicit test for SEC-2056. It is intentionally ignored since this test * is not deterministic and {@link #testUserNotFoundEncodesPassword()} ensures that * SEC-2056 is fixed. */
This is an explicit test for SEC-2056. It is intentionally ignored since this test is not deterministic and <code>#testUserNotFoundEncodesPassword()</code> ensures that SEC-2056 is fixed
IGNOREtestSec2056
{ "repo_name": "kazuki43zoo/spring-security", "path": "core/src/test/java/org/springframework/security/authentication/dao/DaoAuthenticationProviderTests.java", "license": "apache-2.0", "size": 24867 }
[ "java.security.SecureRandom", "java.util.ArrayList", "java.util.List", "org.assertj.core.api.Assertions", "org.springframework.security.authentication.UsernamePasswordAuthenticationToken", "org.springframework.security.core.userdetails.UsernameNotFoundException", "org.springframework.security.crypto.bcr...
import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; import org.assertj.core.api.Assertions; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework...
import java.security.*; import java.util.*; import org.assertj.core.api.*; import org.springframework.security.authentication.*; import org.springframework.security.core.userdetails.*; import org.springframework.security.crypto.bcrypt.*; import org.springframework.security.crypto.password.*;
[ "java.security", "java.util", "org.assertj.core", "org.springframework.security" ]
java.security; java.util; org.assertj.core; org.springframework.security;
2,040,626
@Setting(HibernateStreamingSettings.CHUNK_SIZE) public void setChunkSize(int chunkSize) { this.chunkSize = chunkSize; }
@Setting(HibernateStreamingSettings.CHUNK_SIZE) void function(int chunkSize) { this.chunkSize = chunkSize; }
/** * Set the chunk size for chunk streaming * * @param chunkSize * Size to set */
Set the chunk size for chunk streaming
setChunkSize
{ "repo_name": "ahuarte47/SOS", "path": "hibernate/dao/src/main/java/org/n52/sos/ds/hibernate/values/HibernateStreamingConfiguration.java", "license": "gpl-2.0", "size": 4310 }
[ "org.n52.sos.config.annotation.Setting" ]
import org.n52.sos.config.annotation.Setting;
import org.n52.sos.config.annotation.*;
[ "org.n52.sos" ]
org.n52.sos;
599,016
private List<NodeRef> getIntersectingEdges(Tree tree, double height) { List<NodeRef> intersectingEdges = new ArrayList<NodeRef>(); for (int i = 0; i < tree.getNodeCount(); i++) { final NodeRef node = tree.getNode(i); final NodeRef parent = tree.getParent(node); ...
List<NodeRef> function(Tree tree, double height) { List<NodeRef> intersectingEdges = new ArrayList<NodeRef>(); for (int i = 0; i < tree.getNodeCount(); i++) { final NodeRef node = tree.getNode(i); final NodeRef parent = tree.getParent(node); if (parent != null && tree.getNodeHeight(node) < height && tree.getNodeHeight(...
/** * Gets a list of edges that subtend the given height * @param tree * @param height * @return */
Gets a list of edges that subtend the given height
getIntersectingEdges
{ "repo_name": "maxbiostat/beast-mcmc", "path": "src/dr/evomodel/operators/SubtreeJumpOperator.java", "license": "lgpl-2.1", "size": 9282 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,069,107
public void setInitialRequestedFteQuantity(BigDecimal initialRequestedFteQuantity) { this.initialRequestedFteQuantity = initialRequestedFteQuantity; }
void function(BigDecimal initialRequestedFteQuantity) { this.initialRequestedFteQuantity = initialRequestedFteQuantity; }
/** * Sets the initialRequestedFteQuantity attribute. * * @param initialRequestedFteQuantity The initialRequestedFteQuantity to set. */
Sets the initialRequestedFteQuantity attribute
setInitialRequestedFteQuantity
{ "repo_name": "bhutchinson/kfs", "path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionSalaryTotal.java", "license": "agpl-3.0", "size": 7347 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,190,541
public interface OnFullScreenListener { void onFullScreen(@NonNull View view, boolean fullScreen); }
interface OnFullScreenListener { void function(@NonNull View view, boolean fullScreen); }
/** * Called to indicate a fullscreen mode change. */
Called to indicate a fullscreen mode change
onFullScreen
{ "repo_name": "AndroidX/androidx", "path": "media2/media2-widget/src/main/java/androidx/media2/widget/MediaControlView.java", "license": "apache-2.0", "size": 95335 }
[ "android.view.View", "androidx.annotation.NonNull" ]
import android.view.View; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
2,204,448
@Test public void whenPutIsUsed_thenNearCacheShouldBeInvalidated_onDataAdapter() { whenEntryIsChanged_thenNearCacheShouldBeInvalidated(true, DataStructureMethods.PUT); }
void function() { whenEntryIsChanged_thenNearCacheShouldBeInvalidated(true, DataStructureMethods.PUT); }
/** * Checks that the Near Cache is eventually invalidated when {@link DataStructureMethods#PUT} is used. */
Checks that the Near Cache is eventually invalidated when <code>DataStructureMethods#PUT</code> is used
whenPutIsUsed_thenNearCacheShouldBeInvalidated_onDataAdapter
{ "repo_name": "tkountis/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/internal/nearcache/AbstractNearCacheBasicTest.java", "license": "apache-2.0", "size": 79879 }
[ "com.hazelcast.internal.adapter.DataStructureAdapter" ]
import com.hazelcast.internal.adapter.DataStructureAdapter;
import com.hazelcast.internal.adapter.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
1,755,097
//----------------------------------------------------------------------- public MetaProperty<Double> first() { return first; }
MetaProperty<Double> function() { return first; }
/** * The meta-property for the {@code first} property. * @return the meta-property, not null */
The meta-property for the first property
first
{ "repo_name": "OpenGamma/Strata", "path": "modules/collect/src/main/java/com/opengamma/strata/collect/tuple/DoublesPair.java", "license": "apache-2.0", "size": 11774 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,070,382
public List<String> getArgList() { return args; } /* public String toString() { StringBuilder buf = new StringBuilder(); buf.append("[ CommandLine: [ options: "); buf.append(options.toString()); buf.append(" ] [ args: "); ...
List<String> function() { return args; } /* public String toString() { StringBuilder buf = new StringBuilder(); buf.append(STR); buf.append(options.toString()); buf.append(STR); buf.append(args.toString()); buf.append(STR); return buf.toString(); }
/** * Retrieve any left-over non-recognized options and arguments * * @return remaining items passed in but not parsed as a <code>List</code>. */
Retrieve any left-over non-recognized options and arguments
getArgList
{ "repo_name": "ufctester/commons-cli", "path": "src/main/java/org/apache/commons/cli/CommandLine.java", "license": "apache-2.0", "size": 11324 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
300,165
private boolean checkRootMethod2() { try { File file = new File("/system/app/Superuser.apk"); if (file.exists()) { return true; } } catch (Exception e) { // Nothing to do } return false; }
boolean function() { try { File file = new File(STR); if (file.exists()) { return true; } } catch (Exception e) { } return false; }
/** * Whether SU apk is present * * @return true if found; false otherwise */
Whether SU apk is present
checkRootMethod2
{ "repo_name": "AdaptiveMe/adaptive-arp-android", "path": "adaptive-arp-rt/mobile/src/main/java/me/adaptive/arp/impl/SecurityDelegate.java", "license": "apache-2.0", "size": 14939 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
884,352
protected void validateFrom( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { Objects.requireNonNull(targetRowType); switch (node.getKind()) { case AS: validateFrom( ((SqlCall) node).operand(0), targetRowType, scope); break; ...
void function( SqlNode node, RelDataType targetRowType, SqlValidatorScope scope) { Objects.requireNonNull(targetRowType); switch (node.getKind()) { case AS: validateFrom( ((SqlCall) node).operand(0), targetRowType, scope); break; case VALUES: validateValues((SqlCall) node, targetRowType, scope); break; case JOIN: valid...
/** * Validates the FROM clause of a query, or (recursively) a child node of * the FROM clause: AS, OVER, JOIN, VALUES, or sub-query. * * @param node Node in FROM clause, typically a table or derived * table * @param targetRowType Desired row type of this expression, or ...
Validates the FROM clause of a query, or (recursively) a child node of the FROM clause: AS, OVER, JOIN, VALUES, or sub-query
validateFrom
{ "repo_name": "dindin5258/calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java", "license": "apache-2.0", "size": 218596 }
[ "java.util.Objects", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.sql.SqlCall", "org.apache.calcite.sql.SqlJoin", "org.apache.calcite.sql.SqlNode" ]
import java.util.Objects; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.SqlCall; import org.apache.calcite.sql.SqlJoin; import org.apache.calcite.sql.SqlNode;
import java.util.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,755,456
private void addOutside() { //one = inner domain, two = outer domain for (ArrayList<String> e : adjacentsList) { String one = e.get(0).substring(0, e.get(0).length()); one = one.replaceAll("[0-9]", ""); String two = e.get(1).substring(0, e.get(1).length()); two = two.replaceAll("[0-9]", ""); Strin...
void function() { for (ArrayList<String> e : adjacentsList) { String one = e.get(0).substring(0, e.get(0).length()); one = one.replaceAll("[0-9]", STR[0-9]STRSTR_STR_membrane"; Compartment com1 = getMappedCompartment(one); Compartment com2 = getMappedCompartment(two); Compartment commem = getMappedCompartment(mem); if(...
/** * Add the outside annotation to Compartment for CellDesigner. */
Add the outside annotation to Compartment for CellDesigner
addOutside
{ "repo_name": "spatialsimulator/XitoSBML", "path": "src/main/java/jp/ac/keio/bio/fun/xitosbml/xitosbml/SpatialSBMLExporter.java", "license": "apache-2.0", "size": 24303 }
[ "java.util.ArrayList", "javax.xml.stream.XMLStreamException", "jp.ac.keio.bio.fun.xitosbml.util.PluginConstants", "org.sbml.jsbml.Compartment" ]
import java.util.ArrayList; import javax.xml.stream.XMLStreamException; import jp.ac.keio.bio.fun.xitosbml.util.PluginConstants; import org.sbml.jsbml.Compartment;
import java.util.*; import javax.xml.stream.*; import jp.ac.keio.bio.fun.xitosbml.util.*; import org.sbml.jsbml.*;
[ "java.util", "javax.xml", "jp.ac.keio", "org.sbml.jsbml" ]
java.util; javax.xml; jp.ac.keio; org.sbml.jsbml;
2,627,819
public static String getJarPath(Class<?> clazz) throws FileNotFoundException { URL resource = clazz.getClassLoader().getResource( clazz.getCanonicalName().replace(".", "/") + ".class"); if (resource.getProtocol().equals("jar")) { return resource.getPath().subs...
static String function(Class<?> clazz) throws FileNotFoundException { URL resource = clazz.getClassLoader().getResource( clazz.getCanonicalName().replace(".", "/") + STR); if (resource.getProtocol().equals("jar")) { return resource.getPath().substring( resource.getPath().indexOf(':') + 1, resource.getPath().indexOf('!'...
/** * Figures out the jar location from the class * @param clazz class in the jar file * @return the jar file location, null if the class was not loaded from a jar * @throws FileNotFoundException */
Figures out the jar location from the class
getJarPath
{ "repo_name": "PonIC/PonIC", "path": "src/org/apache/pig/scripting/ScriptEngine.java", "license": "apache-2.0", "size": 11137 }
[ "java.io.FileNotFoundException" ]
import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
72,939
@Nullable public static ExternalIdentityRef getIdentityRef(@Nullable Authorizable auth) throws RepositoryException { if (auth == null) { return null; } Value[] v = auth.getProperty(REP_EXTERNAL_ID); if (v == null || v.length == 0) { return null; } ...
static ExternalIdentityRef function(@Nullable Authorizable auth) throws RepositoryException { if (auth == null) { return null; } Value[] v = auth.getProperty(REP_EXTERNAL_ID); if (v == null v.length == 0) { return null; } return ExternalIdentityRef.fromString(v[0].getString()); }
/** * Retrieves the external identity ref from the authorizable * @param auth the authorizable * @return the ref * @throws RepositoryException if an error occurs */
Retrieves the external identity ref from the authorizable
getIdentityRef
{ "repo_name": "mreutegg/jackrabbit-oak", "path": "oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContext.java", "license": "apache-2.0", "size": 31498 }
[ "javax.jcr.RepositoryException", "javax.jcr.Value", "org.apache.jackrabbit.api.security.user.Authorizable", "org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef", "org.jetbrains.annotations.Nullable" ]
import javax.jcr.RepositoryException; import javax.jcr.Value; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef; import org.jetbrains.annotations.Nullable;
import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; import org.apache.jackrabbit.oak.spi.security.authentication.external.*; import org.jetbrains.annotations.*;
[ "javax.jcr", "org.apache.jackrabbit", "org.jetbrains.annotations" ]
javax.jcr; org.apache.jackrabbit; org.jetbrains.annotations;
1,144,158
private void handleUIDMeta(final TSDB tsdb, final HttpQuery query) { final HttpMethod method = query.getAPIMethod(); // GET if (method == HttpMethod.GET) { final String uid = query.getRequiredQueryStringParam("uid"); final UniqueIdType type = UniqueId.stringToUniqueIdType( qu...
void function(final TSDB tsdb, final HttpQuery query) { final HttpMethod method = query.getAPIMethod(); if (method == HttpMethod.GET) { final String uid = query.getRequiredQueryStringParam("uid"); final UniqueIdType type = UniqueId.stringToUniqueIdType( query.getRequiredQueryStringParam("type")); try { final UIDMeta me...
/** * Handles CRUD calls to individual UIDMeta data entries * @param tsdb The TSDB from the RPC router * @param query The query for this request */
Handles CRUD calls to individual UIDMeta data entries
handleUIDMeta
{ "repo_name": "isavin/opentsdb", "path": "src/tsd/UniqueIdRpc.java", "license": "gpl-3.0", "size": 22102 }
[ "com.stumbleupon.async.Callback", "com.stumbleupon.async.Deferred", "net.opentsdb.meta.UIDMeta", "net.opentsdb.uid.NoSuchUniqueId", "net.opentsdb.uid.UniqueId", "org.jboss.netty.handler.codec.http.HttpMethod", "org.jboss.netty.handler.codec.http.HttpResponseStatus" ]
import com.stumbleupon.async.Callback; import com.stumbleupon.async.Deferred; import net.opentsdb.meta.UIDMeta; import net.opentsdb.uid.NoSuchUniqueId; import net.opentsdb.uid.UniqueId; import org.jboss.netty.handler.codec.http.HttpMethod; import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import com.stumbleupon.async.*; import net.opentsdb.meta.*; import net.opentsdb.uid.*; import org.jboss.netty.handler.codec.http.*;
[ "com.stumbleupon.async", "net.opentsdb.meta", "net.opentsdb.uid", "org.jboss.netty" ]
com.stumbleupon.async; net.opentsdb.meta; net.opentsdb.uid; org.jboss.netty;
2,556,759
private void setRowSpans(List<Node> parentCells, Element childTable) { List<Node> childRows = childTable.find("tbody").getChildren(); String rowSpan = childRows.size() > 1 ? String.valueOf(childRows.size()) : null; for (Node parentCellNode : parentCells) { Element parentCell = (Element) parentCellNode; ...
void function(List<Node> parentCells, Element childTable) { List<Node> childRows = childTable.find("tbody").getChildren(); String rowSpan = childRows.size() > 1 ? String.valueOf(childRows.size()) : null; for (Node parentCellNode : parentCells) { Element parentCell = (Element) parentCellNode; parentCell.attribute(STR, r...
/** * Set rowspans on all of the cells in the parent table */
Set rowspans on all of the cells in the parent table
setRowSpans
{ "repo_name": "uklance/tapestry-stitch", "path": "tapestry-stitch/src/main/java/org/lazan/t5/stitch/mixins/GridCollapse.java", "license": "mit", "size": 4192 }
[ "java.util.List", "org.apache.tapestry5.dom.Element", "org.apache.tapestry5.dom.Node" ]
import java.util.List; import org.apache.tapestry5.dom.Element; import org.apache.tapestry5.dom.Node;
import java.util.*; import org.apache.tapestry5.dom.*;
[ "java.util", "org.apache.tapestry5" ]
java.util; org.apache.tapestry5;
2,404,106
public static SimpleCALFileVault getSimpleCALFileVault(File file) { String pathString = file.toURI().toASCIIString(); return getSimpleCALFileVault(pathString); } /** * {@inheritDoc}
static SimpleCALFileVault function(File file) { String pathString = file.toURI().toASCIIString(); return getSimpleCALFileVault(pathString); } /** * {@inheritDoc}
/** * Get an instance of this class by file. * @param file the file. * @return a Vault which wraps the module specified by the given file. */
Get an instance of this class by file
getSimpleCALFileVault
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/services/SimpleCALFileVault.java", "license": "bsd-3-clause", "size": 21521 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,685,268
public void removePropertyChangeListener(PropertyChangeListener listener) { support.removePropertyChangeListener(listener); }
void function(PropertyChangeListener listener) { support.removePropertyChangeListener(listener); }
/** * Remove a property change listener from this component. * * @param listener The listener to remove */
Remove a property change listener from this component
removePropertyChangeListener
{ "repo_name": "eclipsky/HowTomcatWorks", "path": "src/org/apache/catalina/core/StandardServer.java", "license": "apache-2.0", "size": 71859 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
560,884
FullTextExpression getFullTextConstraint();
FullTextExpression getFullTextConstraint();
/** * Get the fulltext search condition expression, if any. * * @return the condition (null if none) */
Get the fulltext search condition expression, if any
getFullTextConstraint
{ "repo_name": "joansmith/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.java", "license": "apache-2.0", "size": 12205 }
[ "org.apache.jackrabbit.oak.query.fulltext.FullTextExpression" ]
import org.apache.jackrabbit.oak.query.fulltext.FullTextExpression;
import org.apache.jackrabbit.oak.query.fulltext.*;
[ "org.apache.jackrabbit" ]
org.apache.jackrabbit;
647,979
public byte[] getStateCopy() { return Arrays.copyOf(state, BYTES); }
byte[] function() { return Arrays.copyOf(state, BYTES); }
/** * Whole state getter. * Returns copy of internal representation. * * @return */
Whole state getter. Returns copy of internal representation
getStateCopy
{ "repo_name": "ph4r05/Whitebox-crypto-AES-java", "path": "src/main/java/cz/muni/fi/xklinec/whiteboxAES/State.java", "license": "bsd-3-clause", "size": 11045 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,382,646
public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
static SubjectKeyIdentifier function(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Creates an object on the base of its encoded form. */
Creates an object on the base of its encoded form
decode
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/org/apache/harmony/security/x509/SubjectKeyIdentifier.java", "license": "gpl-2.0", "size": 2471 }
[ "java.io.IOException", "org.apache.harmony.security.asn1.ASN1OctetString" ]
import java.io.IOException; import org.apache.harmony.security.asn1.ASN1OctetString;
import java.io.*; import org.apache.harmony.security.asn1.*;
[ "java.io", "org.apache.harmony" ]
java.io; org.apache.harmony;
2,206,861
public void populateApplicationData(final long applicationId) { // must be overridden by Service implementor throw new FrameworkException("populateApplicationData() method is not overridden in SubClass " + this.getClass()); }
void function(final long applicationId) { throw new FrameworkException(STR + this.getClass()); }
/** * this is a common method used to populate service related data, this method must be overridden if scrutiny process is * required for respective service. override this method in respective Service Model and set all application related data to * the model which are mapped to jsp. * @param app...
this is a common method used to populate service related data, this method must be overridden if scrutiny process is required for respective service. override this method in respective Service Model and set all application related data to the model which are mapped to jsp
populateApplicationData
{ "repo_name": "abmindiarepomanager/ABMOpenMainet", "path": "Mainet1.1/MainetServiceParent/MainetServiceCommon/src/main/java/com/abm/mainet/common/ui/model/AbstractModel.java", "license": "gpl-3.0", "size": 41539 }
[ "com.abm.mainet.common.exception.FrameworkException" ]
import com.abm.mainet.common.exception.FrameworkException;
import com.abm.mainet.common.exception.*;
[ "com.abm.mainet" ]
com.abm.mainet;
309,164
@Override public ConsistencyCheck modelConsistency(final Subset subset) { BitSet intersection = new BitSet(this.minBitsets.get(subset).length()); intersection.or(this.minBitsets.get(subset)); // we create a copy of minBitsets.get(subset) intersection.and(this.currentBitset); ...
ConsistencyCheck function(final Subset subset) { BitSet intersection = new BitSet(this.minBitsets.get(subset).length()); intersection.or(this.minBitsets.get(subset)); intersection.and(this.currentBitset); boolean consistent = (this.minBitsets.get(subset).equals(intersection)); StringBuilder message = new StringBuilder(...
/** * Utility to check whether this class is consistent according to a subset * * @param subset * the subset defining the context in which to check whether this class is consistent * @return a ConsistencyCheck instance whose boolean attribute (consistent) * indicates if ...
Utility to check whether this class is consistent according to a subset
modelConsistency
{ "repo_name": "itesla/ipst-entsoe", "path": "cim1-model/src/main/java/cim1/model/RegulatingControl.java", "license": "mpl-2.0", "size": 46908 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
279,709
public boolean doPostUpdateRoleListOfUser(String username, String[] deletedRoles, String[] newRoles, UserStoreManager userStoreManager) throws UserStoreException { if (log.isDebugEnabled()) { ...
boolean function(String username, String[] deletedRoles, String[] newRoles, UserStoreManager userStoreManager) throws UserStoreException { if (log.isDebugEnabled()) { log.debug(STR + username); } sendNotification(EVENT_TYPE_ROLE_UPDATE, username); return true; }
/** * Overridden to trigger Notification Sending module to send messages to registered modules * on PostUpdateRoleListOfUser * * @param username Username of role updated user * @param deletedRoles List of roles deleted * @param newRoles list of roles added * @param...
Overridden to trigger Notification Sending module to send messages to registered modules on PostUpdateRoleListOfUser
doPostUpdateRoleListOfUser
{ "repo_name": "isharak/carbon-identity", "path": "components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/listener/UserOperationsNotificationListener.java", "license": "apache-2.0", "size": 8695 }
[ "org.wso2.carbon.user.core.UserStoreException", "org.wso2.carbon.user.core.UserStoreManager" ]
import org.wso2.carbon.user.core.UserStoreException; import org.wso2.carbon.user.core.UserStoreManager;
import org.wso2.carbon.user.core.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,229,175
@Test public void testDeeplyNestedPartitionedTables() throws HiveException, AlreadyExistsException, IOException, MetastoreException { hive.getConf().setIntVar(HiveConf.ConfVars.METASTORE_FS_HANDLER_THREADS_COUNT, 2); int poolSize = 2; // create a deeply nested table which has more partition keys tha...
void function() throws HiveException, AlreadyExistsException, IOException, MetastoreException { hive.getConf().setIntVar(HiveConf.ConfVars.METASTORE_FS_HANDLER_THREADS_COUNT, 2); int poolSize = 2; Table testTable = createPartitionedTestTable(dbName, tableName, poolSize + 2, 0); createPartitionsDirectoriesOnFS(testTable...
/** * Tests the case when the number of partition keys are more than the threadpool size. * * @throws HiveException * @throws AlreadyExistsException * @throws IOException */
Tests the case when the number of partition keys are more than the threadpool size
testDeeplyNestedPartitionedTables
{ "repo_name": "b-slim/hive", "path": "ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java", "license": "apache-2.0", "size": 31411 }
[ "java.io.IOException", "java.util.Collections", "org.apache.hadoop.hive.conf.HiveConf", "org.apache.hadoop.hive.metastore.CheckResult", "org.apache.hadoop.hive.metastore.api.AlreadyExistsException", "org.apache.hadoop.hive.metastore.api.MetastoreException", "org.junit.Assert" ]
import java.io.IOException; import java.util.Collections; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.CheckResult; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; import org.apache.hadoop.hive.metastore.api.MetastoreException; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.metastore.*; import org.apache.hadoop.hive.metastore.api.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
2,091,408
// @NotRequired("default is { \"metrics\" }") public void setJmxFolderNames(String[] folderNames) { JmxFolderName[] jmxFolderNames = new JmxFolderName[folderNames.length]; for (int i = 0; i < jmxFolderNames.length; i++) { jmxFolderNames[i] = new JmxFolderName(folderNames[i]); } this.jmxFolderNames = jmxF...
void function(String[] folderNames) { JmxFolderName[] jmxFolderNames = new JmxFolderName[folderNames.length]; for (int i = 0; i < jmxFolderNames.length; i++) { jmxFolderNames[i] = new JmxFolderName(folderNames[i]); } this.jmxFolderNames = jmxFolderNames; }
/** * Set the sub-folder name for the metrics. Default is {"metrics"}. */
Set the sub-folder name for the metrics. Default is {"metrics"}
setJmxFolderNames
{ "repo_name": "j256/simplemetrics", "path": "src/main/java/com/j256/simplemetrics/manager/MetricsManagerJmx.java", "license": "isc", "size": 3594 }
[ "com.j256.simplejmx.common.JmxFolderName" ]
import com.j256.simplejmx.common.JmxFolderName;
import com.j256.simplejmx.common.*;
[ "com.j256.simplejmx" ]
com.j256.simplejmx;
797,596
void setOperation(Operation value);
void setOperation(Operation value);
/** * Sets the value of the '{@link org.wso2.developerstudio.bpel.humantask.model.RemoteTask#getOperation <em>Operation</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Operation</em>' reference. * @see #getOperation() * @generated */
Sets the value of the '<code>org.wso2.developerstudio.bpel.humantask.model.RemoteTask#getOperation Operation</code>' reference.
setOperation
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.wso2.developerstudio.bpel.humantask.model/src/org/wso2/developerstudio/bpel/humantask/model/RemoteTask.java", "license": "apache-2.0", "size": 4382 }
[ "org.eclipse.wst.wsdl.Operation" ]
import org.eclipse.wst.wsdl.Operation;
import org.eclipse.wst.wsdl.*;
[ "org.eclipse.wst" ]
org.eclipse.wst;
73,800
@Parameterized.Parameters public static Collection<Object[]> data() { Collection<Object[]> parameters = new ArrayList<Object[]>(); parameters.add(new Object[] { "1.0E2", "100.0" }); parameters.add(new Object[] { "1,0E2", "100,0" }); parameters.add(new Object[] { "+1.0E2", "+100...
@Parameterized.Parameters static Collection<Object[]> function() { Collection<Object[]> parameters = new ArrayList<Object[]>(); parameters.add(new Object[] { "1.0E2", "100.0" }); parameters.add(new Object[] { "1,0E2", "100,0" }); parameters.add(new Object[] { STR, STR }); parameters.add(new Object[] { STR, STR }); para...
/** * Returns a matrix of input data. * * @return a matrix of input data */
Returns a matrix of input data
data
{ "repo_name": "gammalgris/jmul", "path": "Utilities/Math-Tests/src/test/jmul/math/notation/ExpandScientificNotationValidParametersTest.java", "license": "gpl-3.0", "size": 3671 }
[ "java.util.ArrayList", "java.util.Collection", "org.junit.runners.Parameterized" ]
import java.util.ArrayList; import java.util.Collection; import org.junit.runners.Parameterized;
import java.util.*; import org.junit.runners.*;
[ "java.util", "org.junit.runners" ]
java.util; org.junit.runners;
2,862,865
public static PolicyManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { return new PolicyManager(new RestClient.Builder() .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) .withCredentials(credentials) .withSe...
static PolicyManager function(AzureTokenCredentials credentials, String subscriptionId) { return new PolicyManager(new RestClient.Builder() .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) .withCredentials(credentials) .withSerializerAdapter(new AzureJacksonAdapter()) .withResponseBui...
/** * Creates an instance of PolicyManager that exposes Authorization resource management API entry points. * * @param credentials the credentials to use * @param subscriptionId the subscription UUID * @return the PolicyManager */
Creates an instance of PolicyManager that exposes Authorization resource management API entry points
authenticate
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/policy/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/policy/v2019_06_01/implementation/PolicyManager.java", "license": "mit", "size": 5042 }
[ "com.microsoft.azure.AzureEnvironment", "com.microsoft.azure.AzureResponseBuilder", "com.microsoft.azure.credentials.AzureTokenCredentials", "com.microsoft.azure.serializer.AzureJacksonAdapter", "com.microsoft.rest.RestClient" ]
import com.microsoft.azure.AzureEnvironment; import com.microsoft.azure.AzureResponseBuilder; import com.microsoft.azure.credentials.AzureTokenCredentials; import com.microsoft.azure.serializer.AzureJacksonAdapter; import com.microsoft.rest.RestClient;
import com.microsoft.azure.*; import com.microsoft.azure.credentials.*; import com.microsoft.azure.serializer.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,876,889
@Test public void testFindNodeDifference_partitionTypeDiffers() { ProductPartitionNode origNode = new ProductPartitionNode(null, ProductDimensions.createOfferId("1234"), -1L, dimensionComparator).asSubdivision(); ProductPartitionNode newNode = new ProductPartitionNode(null, ProductDimensions...
void function() { ProductPartitionNode origNode = new ProductPartitionNode(null, ProductDimensions.createOfferId("1234"), -1L, dimensionComparator).asSubdivision(); ProductPartitionNode newNode = new ProductPartitionNode(null, ProductDimensions.createOfferId("1234"), -1L, dimensionComparator).asBiddableUnit(); assertEq...
/** * Test for when the two nodes differ in partition type. */
Test for when the two nodes differ in partition type
testFindNodeDifference_partitionTypeDiffers
{ "repo_name": "gawkermedia/googleads-java-lib", "path": "modules/adwords_axis/src/test/java/com/google/api/ads/adwords/axis/utils/v201601/shopping/ProductPartitionNodeDifferTest.java", "license": "apache-2.0", "size": 8509 }
[ "com.google.api.ads.adwords.axis.utils.v201601.shopping.ProductPartitionNodeDiffer", "org.junit.Assert" ]
import com.google.api.ads.adwords.axis.utils.v201601.shopping.ProductPartitionNodeDiffer; import org.junit.Assert;
import com.google.api.ads.adwords.axis.utils.v201601.shopping.*; import org.junit.*;
[ "com.google.api", "org.junit" ]
com.google.api; org.junit;
121,783
public void testTimestampQueryOnOracle() { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { // run this test only on Oracle if (rdbmsVendorID != null && rdbmsVendorID.equals("oracle")) ...
void function() { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { if (rdbmsVendorID != null && rdbmsVendorID.equals(STR)) { tx.begin(); Query timestampQuery = pm.newQuery(Query.SQL, STR); timestampQuery.setResultClass(java.sql.Timestamp.class); timestampQuery.setUniq...
/** * Verify CORE-2976 */
Verify CORE-2976
testTimestampQueryOnOracle
{ "repo_name": "datanucleus/tests", "path": "jdo/rdbms/src/test/org/datanucleus/tests/datastore/SQLQueryTest.java", "license": "apache-2.0", "size": 61369 }
[ "java.sql.Timestamp", "javax.jdo.PersistenceManager", "javax.jdo.Query", "javax.jdo.Transaction" ]
import java.sql.Timestamp; import javax.jdo.PersistenceManager; import javax.jdo.Query; import javax.jdo.Transaction;
import java.sql.*; import javax.jdo.*;
[ "java.sql", "javax.jdo" ]
java.sql; javax.jdo;
689,653
private void safeQueueUpdate(RowMutations mutate) throws ReplicationException, IOException{ try (Table replicationTable = getOrBlockOnReplicationTable()) { boolean updateSuccess = replicationTable.checkAndMutate(mutate.getRow(), CF_QUEUE, COL_QUEUE_OWNER, CompareFilter.CompareOp.EQUAL, serverNameB...
void function(RowMutations mutate) throws ReplicationException, IOException{ try (Table replicationTable = getOrBlockOnReplicationTable()) { boolean updateSuccess = replicationTable.checkAndMutate(mutate.getRow(), CF_QUEUE, COL_QUEUE_OWNER, CompareFilter.CompareOp.EQUAL, serverNameBytes, mutate); if (!updateSuccess) { ...
/** * Attempt to mutate a given queue in the Replication Table with a checkAndPut on the OWNER column * of the queue. Abort the server if this checkAndPut fails: which means we have somehow lost * ownership of the column or an IO Exception has occurred during the transaction. * * @param mutate Mutation t...
Attempt to mutate a given queue in the Replication Table with a checkAndPut on the OWNER column of the queue. Abort the server if this checkAndPut fails: which means we have somehow lost ownership of the column or an IO Exception has occurred during the transaction
safeQueueUpdate
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesImpl.java", "license": "apache-2.0", "size": 17202 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.RowMutations", "org.apache.hadoop.hbase.client.Table", "org.apache.hadoop.hbase.filter.CompareFilter" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.RowMutations; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.filter.CompareFilter;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,187,095
public void clearGraph() { LOGGER.trace("Method clearGraph() called."); for (Observable vObserbale : mObservables.keySet()) { vObserbale.deleteObserver(this); } mObservables.clear(); mGraphPanel.clearGraph(); }
void function() { LOGGER.trace(STR); for (Observable vObserbale : mObservables.keySet()) { vObserbale.deleteObserver(this); } mObservables.clear(); mGraphPanel.clearGraph(); }
/** * Remove all nodes and edges from the graph. */
Remove all nodes and edges from the graph
clearGraph
{ "repo_name": "trustathsh/visitmeta", "path": "visualization/src/main/java/de/hshannover/f4/trust/visitmeta/gui/GraphConnection.java", "license": "apache-2.0", "size": 16086 }
[ "java.util.Observable" ]
import java.util.Observable;
import java.util.*;
[ "java.util" ]
java.util;
1,298,114
private void initDropDownStyle() { if (headerLayout != null) { if (isDropDownStyle) { addHeaderView(headerLayout); } else { removeHeaderView(headerLayout); } return; } if (!isDropDownStyle) { return; ...
void function() { if (headerLayout != null) { if (isDropDownStyle) { addHeaderView(headerLayout); } else { removeHeaderView(headerLayout); } return; } if (!isDropDownStyle) { return; } LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); headerLayout = (RelativeLayout) i...
/** * init drop down style, only init once */
init drop down style, only init once
initDropDownStyle
{ "repo_name": "jpush/jchat-android", "path": "chatapp/src/main/java/jiguang/chat/view/listview/DropDownListView.java", "license": "mit", "size": 11826 }
[ "android.content.Context", "android.view.LayoutInflater", "android.widget.ImageView", "android.widget.LinearLayout", "android.widget.RelativeLayout" ]
import android.content.Context; import android.view.LayoutInflater; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
109,435
@Test public void testGetConvertedDTOFromDomain( ) throws Exception { logger.debug( "Starting GetConvertedDTOFromDomain" ); privilegeDTO2 = PrivilegeDomainDTOConverter.getConvertedDTOFromDomain( null, privilegeDomain ); Assert.assertNotNull( TestConstants.nullMessage, privilegeDTO2 )...
void function( ) throws Exception { logger.debug( STR ); privilegeDTO2 = PrivilegeDomainDTOConverter.getConvertedDTOFromDomain( null, privilegeDomain ); Assert.assertNotNull( TestConstants.nullMessage, privilegeDTO2 ); Assert.assertEquals( TestConstants.notEqualsMessage, privilegeDTO, privilegeDTO2 ); logger.debug( STR...
/** * Test get converted dTO from domain. * * @throws Exception the exception */
Test get converted dTO from domain
testGetConvertedDTOFromDomain
{ "repo_name": "arkoghosh11/bloom-test", "path": "bloom-converter/src/test/java/com/mana/innovative/converter/response/WhenPrivilegeThenTestPrivilegeConverterDomainDTOMethods.java", "license": "apache-2.0", "size": 7411 }
[ "com.mana.innovative.constants.TestConstants", "junit.framework.Assert" ]
import com.mana.innovative.constants.TestConstants; import junit.framework.Assert;
import com.mana.innovative.constants.*; import junit.framework.*;
[ "com.mana.innovative", "junit.framework" ]
com.mana.innovative; junit.framework;
184,445
View view = scrollView.get(); if (view != null) { int y = view.getScrollY(); if (previousY != UNDEFINED_PREVIOUS_Y_VALUE) { scrollDetector.onScrollChanged(0, y, 0, previousY); } previousY = y; } }
View view = scrollView.get(); if (view != null) { int y = view.getScrollY(); if (previousY != UNDEFINED_PREVIOUS_Y_VALUE) { scrollDetector.onScrollChanged(0, y, 0, previousY); } previousY = y; } }
/** * Dispatch ViewTreeObserver.OnScrollChangedListener to ScrollDetector */
Dispatch ViewTreeObserver.OnScrollChangedListener to ScrollDetector
onScrollChanged
{ "repo_name": "ninjinkun/ScrollFullScreen", "path": "library/src/main/java/scrollfullscreen/ui/adapter/ScrollViewAdapter.java", "license": "mit", "size": 2429 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,249,241
public Collection<BlobKey> getRequiredJarFiles() { return jobInformation.getRequiredJarFileBlobKeys(); }
Collection<BlobKey> function() { return jobInformation.getRequiredJarFileBlobKeys(); }
/** * Returns a list of BLOB keys referring to the JAR files required to run this job * @return list of BLOB keys referring to the JAR files required to run this job */
Returns a list of BLOB keys referring to the JAR files required to run this job
getRequiredJarFiles
{ "repo_name": "Xpray/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java", "license": "apache-2.0", "size": 60342 }
[ "java.util.Collection", "org.apache.flink.runtime.blob.BlobKey" ]
import java.util.Collection; import org.apache.flink.runtime.blob.BlobKey;
import java.util.*; import org.apache.flink.runtime.blob.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,745,591
EReference getLqnModel_Processor();
EReference getLqnModel_Processor();
/** * Returns the meta object for the containment reference list '{@link lqn.LqnModel#getProcessor <em>Processor</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Processor</em>'. * @see lqn.LqnModel#getProcessor() * @see #getLqnModel...
Returns the meta object for the containment reference list '<code>lqn.LqnModel#getProcessor Processor</code>'.
getLqnModel_Processor
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.lqn/src/lqn/LqnPackage.java", "license": "epl-1.0", "size": 116938 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,131,613
boolean canAddPart(ItemStack part, AEPartLocation side);
boolean canAddPart(ItemStack part, AEPartLocation side);
/** * Test if you can add a part to the specified side of the Part Host, {@link AEPartLocation}.UNKNOWN is used to * represent the cable in the middle. * * @param part to be added part * @param side part placed onto side * * @return returns false if the part cannot be added. */
Test if you can add a part to the specified side of the Part Host, <code>AEPartLocation</code>.UNKNOWN is used to represent the cable in the middle
canAddPart
{ "repo_name": "rolandoislas/PeripheralsPlusPlus", "path": "src/api/java/appeng/api/parts/IPartHost.java", "license": "gpl-2.0", "size": 5481 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
770,820
public static double entryToDouble(DatabaseEntry entry) { return entryToInput(entry).readDouble(); }
static double function(DatabaseEntry entry) { return entryToInput(entry).readDouble(); }
/** * Converts an entry buffer into a simple <code>double</code> value. * * @param entry is the source entry buffer. * * @return the resulting value. */
Converts an entry buffer into a simple <code>double</code> value
entryToDouble
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/bind/tuple/DoubleBinding.java", "license": "mit", "size": 2353 }
[ "com.sleepycat.je.DatabaseEntry" ]
import com.sleepycat.je.DatabaseEntry;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,777,716
public static void logGuiEvent( ActionEvent e ) { if ( e==null ) { getLogger("gui").log( Level.FINEST, "null ActionEvent"); return; } if ( !( getLogger("gui").isLoggable(Level.FINE ) ) ) { return; } if ( e.getSource() instanceof JCheckBox )...
static void function( ActionEvent e ) { if ( e==null ) { getLogger("gui").log( Level.FINEST, STR); return; } if ( !( getLogger("gui").isLoggable(Level.FINE ) ) ) { return; } if ( e.getSource() instanceof JCheckBox ) { JCheckBox cb= (JCheckBox)e.getSource(); logGuiEvent( e.getSource(), ( cb.isSelected() ? STR : STR ) + ...
/** * provide easy way to log all GUI events. * @param e */
provide easy way to log all GUI events
logGuiEvent
{ "repo_name": "autoplot/app", "path": "dasCoreUtil/src/org/das2/util/LoggerManager.java", "license": "gpl-2.0", "size": 22856 }
[ "java.awt.event.ActionEvent", "java.util.logging.Level", "javax.swing.JCheckBox", "javax.swing.JComboBox" ]
import java.awt.event.ActionEvent; import java.util.logging.Level; import javax.swing.JCheckBox; import javax.swing.JComboBox;
import java.awt.event.*; import java.util.logging.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
1,889,817
public int changeProperty(ModelElement element, int row, String value) { init(element); int currentRow = row; for (Stereotype ster : sterList) { getPropertyPages(extensions, ster); if (null != this.propertyPage) { this.propertyPage.changeProperty(element, currentRow, value); currentRow -= ster.g...
int function(ModelElement element, int row, String value) { init(element); int currentRow = row; for (Stereotype ster : sterList) { getPropertyPages(extensions, ster); if (null != this.propertyPage) { this.propertyPage.changeProperty(element, currentRow, value); currentRow -= ster.getDefinedTagType().size(); this.prope...
/** * Change property. * * @param element * the element * @param row * the row * @param value * the value * @return the int */
Change property
changeProperty
{ "repo_name": "ualegre/dcase", "path": "dcase/src/main/java/edu/casetools/dcase/modelio/properties/PropertyManager.java", "license": "gpl-3.0", "size": 13875 }
[ "org.modelio.metamodel.uml.infrastructure.ModelElement", "org.modelio.metamodel.uml.infrastructure.Stereotype" ]
import org.modelio.metamodel.uml.infrastructure.ModelElement; import org.modelio.metamodel.uml.infrastructure.Stereotype;
import org.modelio.metamodel.uml.infrastructure.*;
[ "org.modelio.metamodel" ]
org.modelio.metamodel;
2,250,634
protected static void closeResultSet(ResultSet rs) { if (rs != null) { try { rs.close(); } catch (SQLException e) {} } }
static void function(ResultSet rs) { if (rs != null) { try { rs.close(); } catch (SQLException e) {} } }
/** * Utility method for closing a result set that may or may not be <code>null</code>. * The result set SHOULD NOT have already been closed. * * @param rs A statement object that is to be closed. May be <code>null</code>. */
Utility method for closing a result set that may or may not be <code>null</code>. The result set SHOULD NOT have already been closed
closeResultSet
{ "repo_name": "opendatakraken/openbiwiki", "path": "openbiwiki-core/src/main/java/org/jamwiki/db/DatabaseConnection.java", "license": "mit", "size": 14537 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,443,797
public void testPristine() throws Exception { HtmlSpan span = null; assertEquals("context", title()); // Validate FacesContext Values span = (HtmlSpan) element("form:renderKitIdFC"); assertEquals("HTML_BASIC", span.asText()); span = (HtmlSpan) element("form:viewId...
void function() throws Exception { HtmlSpan span = null; assertEquals(STR, title()); span = (HtmlSpan) element(STR); assertEquals(STR, span.asText()); span = (HtmlSpan) element(STR); assertEquals(STR, span.asText()); span = (HtmlSpan) element(STR); assertEquals(STRform:remoteUserEC"); assertEquals(STRform:requestContex...
/** * <p>Verify the content of a pristine page returned when executing this * view for the first time.</p> */
Verify the content of a pristine page returned when executing this view for the first time
testPristine
{ "repo_name": "codelibs/cl-struts", "path": "contrib/struts-faces/sysclient-app/src/java/org/apache/struts/faces/sysclient/ContextTestCase.java", "license": "apache-2.0", "size": 8272 }
[ "com.gargoylesoftware.htmlunit.html.HtmlSpan" ]
import com.gargoylesoftware.htmlunit.html.HtmlSpan;
import com.gargoylesoftware.htmlunit.html.*;
[ "com.gargoylesoftware.htmlunit" ]
com.gargoylesoftware.htmlunit;
466,115
@Test public void testMultipleDependencies() { MavenProject projectA = createMavenProject("ProjectA", "test", "projectA", "1.0-SNAPSHOT", "jar"); Dependency dependencyA = createDependency("test", "library", "[1.0, 2.0)"); projectA.getDependencies().add(dependencyA); MavenProjec...
void function() { MavenProject projectA = createMavenProject(STR, "test", STR, STR, "jar"); Dependency dependencyA = createDependency("test", STR, STR); projectA.getDependencies().add(dependencyA); MavenProject projectB = createMavenProject(STR, "test", STR, STR, "jar"); Dependency dependencyB = createDependency("test"...
/** * Test multiple projects with dependencies on differing library versions declared with * multiple version definitions. */
Test multiple projects with dependencies on differing library versions declared with multiple version definitions
testMultipleDependencies
{ "repo_name": "aheritier/jenkins", "path": "maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java", "license": "mit", "size": 16125 }
[ "com.google.common.collect.Lists", "hudson.model.AbstractProject", "hudson.model.DependencyGraph", "hudson.model.MockHelper", "java.util.Collection", "java.util.List", "org.apache.maven.model.Dependency", "org.apache.maven.project.MavenProject", "org.junit.Assert", "org.mockito.Matchers", "org.m...
import com.google.common.collect.Lists; import hudson.model.AbstractProject; import hudson.model.DependencyGraph; import hudson.model.MockHelper; import java.util.Collection; import java.util.List; import org.apache.maven.model.Dependency; import org.apache.maven.project.MavenProject; import org.junit.Assert; import or...
import com.google.common.collect.*; import hudson.model.*; import java.util.*; import org.apache.maven.model.*; import org.apache.maven.project.*; import org.junit.*; import org.mockito.*;
[ "com.google.common", "hudson.model", "java.util", "org.apache.maven", "org.junit", "org.mockito" ]
com.google.common; hudson.model; java.util; org.apache.maven; org.junit; org.mockito;
182,400
private MethodInfo findMostSpecificOverride(MethodInfo proposedMethodInfo) { for (MethodInfo alreadyRegisteredMethodInfo : methodMap.values()) { Method alreadyRegisteredMethod = alreadyRegisteredMethodInfo.getMethod(); Method proposedMethod = proposedMethodInfo.getMethod(); ...
MethodInfo function(MethodInfo proposedMethodInfo) { for (MethodInfo alreadyRegisteredMethodInfo : methodMap.values()) { Method alreadyRegisteredMethod = alreadyRegisteredMethodInfo.getMethod(); Method proposedMethod = proposedMethodInfo.getMethod(); if (ObjectHelper.isOverridingMethod(getType(), proposedMethod, alread...
/** * Gets the most specific override of a given method, if any. Indeed, * overrides may have already been found while inspecting sub classes. Or * the given method could override an interface extra method. * * @param proposedMethodInfo the method for which a more specific override is * ...
Gets the most specific override of a given method, if any. Indeed, overrides may have already been found while inspecting sub classes. Or the given method could override an interface extra method
findMostSpecificOverride
{ "repo_name": "tlehoux/camel", "path": "camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java", "license": "apache-2.0", "size": 56508 }
[ "java.lang.reflect.Method", "org.apache.camel.util.ObjectHelper" ]
import java.lang.reflect.Method; import org.apache.camel.util.ObjectHelper;
import java.lang.reflect.*; import org.apache.camel.util.*;
[ "java.lang", "org.apache.camel" ]
java.lang; org.apache.camel;
1,097,036
public CountryEntity findById(String code);
CountryEntity function(String code);
/** * Find by code on the country table * * @param code * @return CountryEntity with the param asociated or null */
Find by code on the country table
findById
{ "repo_name": "raulsuarezdabo/flight", "path": "src/main/java/com/raulsuarezdabo/flight/dao/CountryDAO.java", "license": "mit", "size": 754 }
[ "com.raulsuarezdabo.flight.entity.CountryEntity" ]
import com.raulsuarezdabo.flight.entity.CountryEntity;
import com.raulsuarezdabo.flight.entity.*;
[ "com.raulsuarezdabo.flight" ]
com.raulsuarezdabo.flight;
2,470,231
public String close() { if (instance == null) { return null; } try { container.close(); instance = null; } catch (IOException e) { return e.getMessage(); } return null; }
String function() { if (instance == null) { return null; } try { container.close(); instance = null; } catch (IOException e) { return e.getMessage(); } return null; }
/** * Release the jar file and null instance so that it can be deleted */
Release the jar file and null instance so that it can be deleted
close
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/wlp.lib.extract/src/wlp/lib/extract/SelfExtractor.java", "license": "epl-1.0", "size": 62207 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
399,228
CmsCreateElementData checkCreateNewElement( CmsUUID pageStructureId, String clientId, String resourceType, String locale) throws CmsRpcException;
CmsCreateElementData checkCreateNewElement( CmsUUID pageStructureId, String clientId, String resourceType, String locale) throws CmsRpcException;
/** * To create a new element of the given type this method will check if a model resource needs to be selected, otherwise creates the new element. * Returns a bean containing either the new element data or a list of model resources to select.<p> * * @param pageStructureId the container page struct...
To create a new element of the given type this method will check if a model resource needs to be selected, otherwise creates the new element. Returns a bean containing either the new element data or a list of model resources to select
checkCreateNewElement
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/ade/containerpage/shared/rpc/I_CmsContainerpageService.java", "license": "lgpl-2.1", "size": 15597 }
[ "org.opencms.ade.containerpage.shared.CmsCreateElementData", "org.opencms.gwt.CmsRpcException", "org.opencms.util.CmsUUID" ]
import org.opencms.ade.containerpage.shared.CmsCreateElementData; import org.opencms.gwt.CmsRpcException; import org.opencms.util.CmsUUID;
import org.opencms.ade.containerpage.shared.*; import org.opencms.gwt.*; import org.opencms.util.*;
[ "org.opencms.ade", "org.opencms.gwt", "org.opencms.util" ]
org.opencms.ade; org.opencms.gwt; org.opencms.util;
2,160,279
public void selectionChanged(SelectionChangedEvent event) { // Remove any menu items for old selection. // if (createChildMenuManager != null) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createS...
void function(SelectionChangedEvent event) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createSiblingActions); } Collection<?> newSiblingDescriptors = null; ISelection selection = event.getSelection(); if (selectio...
/** * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings * that can be added to the selected object and updating the menus accordingly. * <!-- begin-user-doc --> * <!-- end-u...
This implements <code>org.eclipse.jface.viewers.ISelectionChangedListener</code>, handling <code>org.eclipse.jface.viewers.SelectionChangedEvent</code>s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly.
selectionChanged
{ "repo_name": "StephaneSeyvoz/mindEd", "path": "org.ow2.mindEd.ide.editor/src-gen/org/ow2/mindEd/ide/editor/presentation/MindideActionBarContributor.java", "license": "lgpl-3.0", "size": 14017 }
[ "java.util.Collection", "org.eclipse.emf.edit.domain.EditingDomain", "org.eclipse.emf.edit.domain.IEditingDomainProvider", "org.eclipse.jface.viewers.ISelection", "org.eclipse.jface.viewers.IStructuredSelection", "org.eclipse.jface.viewers.SelectionChangedEvent" ]
import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent;
import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.util; org.eclipse.emf; org.eclipse.jface;
2,145,498
public Entity getEntity(World world) { return handle.getEntityModifier(world).read(0); }
Entity function(World world) { return handle.getEntityModifier(world).read(0); }
/** * Retrieve the entity. * @param world - the current world of the entity. * @return The entity. */
Retrieve the entity
getEntity
{ "repo_name": "aadnk/Sneaky", "path": "Sneaky/src/main/java/com/comphenix/sneaky/packets/Packet28EntityMetadata.java", "license": "gpl-2.0", "size": 2996 }
[ "org.bukkit.World", "org.bukkit.entity.Entity" ]
import org.bukkit.World; import org.bukkit.entity.Entity;
import org.bukkit.*; import org.bukkit.entity.*;
[ "org.bukkit", "org.bukkit.entity" ]
org.bukkit; org.bukkit.entity;
2,743,543
public OffsetDateTime modifiedDate() { return this.modifiedDate; }
OffsetDateTime function() { return this.modifiedDate; }
/** * Get the modifiedDate property: Time in UTC (ISO 8601 format) when the support ticket was last modified. * * @return the modifiedDate value. */
Get the modifiedDate property: Time in UTC (ISO 8601 format) when the support ticket was last modified
modifiedDate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsInner.java", "license": "mit", "size": 17405 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,472,047
public static String getTimeText(Calendar calendar) { int minute = calendar.get(Calendar.MINUTE); int hour = calendar.get(Calendar.HOUR); String minString = (minute > 9) ? "" + minute : "0" + minute; String ampmString = (calendar.get(Calendar.AM_PM) == Calendar.AM) ? "AM" ...
static String function(Calendar calendar) { int minute = calendar.get(Calendar.MINUTE); int hour = calendar.get(Calendar.HOUR); String minString = (minute > 9) ? STR0STRAMSTRPMSTRSTR12STR:STR " + ampmString; }
/** * Returns the 12 hour time of the calendar, eg 12:04 PM * * @param calendar * @return */
Returns the 12 hour time of the calendar, eg 12:04 PM
getTimeText
{ "repo_name": "parkin/CU-Bus-Guide", "path": "main/src/main/java/com/teamparkin/mtdapp/util/Util.java", "license": "apache-2.0", "size": 6768 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,313,855
public void parse(String rawMessage) throws FormatException { Parser parser = new Parser(); try { setX12message(parser.parse(rawMessage)); } catch (IOException e) { log.error(e); } parseSegments(); }
void function(String rawMessage) throws FormatException { Parser parser = new Parser(); try { setX12message(parser.parse(rawMessage)); } catch (IOException e) { log.error(e); } parseSegments(); }
/** * Parse the <String> representation of an <X12> message into the * appropriate <X12> object. * * @param rawMessage * @throws FormatException */
Parse the representation of an message into the appropriate object
parse
{ "repo_name": "freemed/remitt", "path": "src/main/java/org/remitt/prototype/X12Message.java", "license": "gpl-2.0", "size": 9897 }
[ "java.io.IOException", "org.pb.x12.FormatException", "org.pb.x12.Parser" ]
import java.io.IOException; import org.pb.x12.FormatException; import org.pb.x12.Parser;
import java.io.*; import org.pb.x12.*;
[ "java.io", "org.pb.x12" ]
java.io; org.pb.x12;
2,301,358
public CloseableIterator<IndexStoreEntry> iterator(Object start, boolean startInclusive, Collection keysToRemove);
CloseableIterator<IndexStoreEntry> function(Object start, boolean startInclusive, Collection keysToRemove);
/** * Return all of the IndexStorageEntries that from start to the tail of the map. */
Return all of the IndexStorageEntries that from start to the tail of the map
iterator
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexStore.java", "license": "apache-2.0", "size": 4390 }
[ "java.util.Collection", "org.apache.geode.internal.cache.persistence.query.CloseableIterator" ]
import java.util.Collection; import org.apache.geode.internal.cache.persistence.query.CloseableIterator;
import java.util.*; import org.apache.geode.internal.cache.persistence.query.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,166,719
private DataReadRequest queryFitnessData() { Calendar cal = Calendar.getInstance(); Date now = new Date(); cal.setTime(now); long endTime = cal.getTimeInMillis(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); long start...
DataReadRequest function() { Calendar cal = Calendar.getInstance(); Date now = new Date(); cal.setTime(now); long endTime = cal.getTimeInMillis(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); long startTime = cal.getTimeInMillis(); return ...
/** * Query to get the num of steps since 00:00 until now */
Query to get the num of steps since 00:00 until now
queryFitnessData
{ "repo_name": "Drippler/drip-steps", "path": "app/src/main/java/nirhart/dripmysteps/StepsHelper.java", "license": "apache-2.0", "size": 2967 }
[ "com.google.android.gms.fitness.data.DataType", "com.google.android.gms.fitness.request.DataReadRequest", "java.util.Calendar", "java.util.Date", "java.util.concurrent.TimeUnit" ]
import com.google.android.gms.fitness.data.DataType; import com.google.android.gms.fitness.request.DataReadRequest; import java.util.Calendar; import java.util.Date; import java.util.concurrent.TimeUnit;
import com.google.android.gms.fitness.data.*; import com.google.android.gms.fitness.request.*; import java.util.*; import java.util.concurrent.*;
[ "com.google.android", "java.util" ]
com.google.android; java.util;
852,936
public static void preferPackageForIntent(Context context, Intent intent, String packageName) { PackageManager pm = context.getPackageManager(); if (pm != null) { for (ResolveInfo resolveInfo : pm.queryIntentActivities(intent, 0)) { if (resolveInfo.activityInfo.packageNam...
static void function(Context context, Intent intent, String packageName) { PackageManager pm = context.getPackageManager(); if (pm != null) { for (ResolveInfo resolveInfo : pm.queryIntentActivities(intent, 0)) { if (resolveInfo.activityInfo.packageName.equals(packageName)) { intent.setPackage(packageName); break; } } }...
/** * This allows the app to specify a {@code packageName} to handle the {@code intent}, if the * {@code packageName} is available on the device and can handle it. An example use is to open * a Google + stream directly using the Google + app. */
This allows the app to specify a packageName to handle the intent, if the packageName is available on the device and can handle it. An example use is to open a Google + stream directly using the Google + app
preferPackageForIntent
{ "repo_name": "SIMPLYBOYS/WorldMoviesPro", "path": "sample/src/main/java/com/github/florent37/materialviewpager/worldmovies/util/UIUtils.java", "license": "apache-2.0", "size": 35381 }
[ "android.content.Context", "android.content.Intent", "android.content.pm.PackageManager", "android.content.pm.ResolveInfo" ]
import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
1,832,661
private boolean copyFolder(File oldFile, File newFile) { boolean res = true; if (oldFile.isDirectory()) { // if directory not exists, create it if (!newFile.exists()) { newFile.mkdir(); // System.out.println("Directory copied from " + src + " to " + dest); } // list all the dire...
boolean function(File oldFile, File newFile) { boolean res = true; if (oldFile.isDirectory()) { if (!newFile.exists()) { newFile.mkdir(); } String files[] = oldFile.list(); for (String file : files) { File srcFile = new File(oldFile, file); File destFile = new File(newFile, file); res &= copyFolder(srcFile, destFile); ...
/** * Recursively copy a folder. * @param oldFile Folder to copy. * @param newFile The dir to be created. * @return Was copy successful? */
Recursively copy a folder
copyFolder
{ "repo_name": "msafin/wmc", "path": "src/org/openintents/filemanager/util/CopyHelper.java", "license": "gpl-2.0", "size": 6510 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,369,482
private boolean compare(Map<Integer, Integer> expVals) throws Exception { cmpLatch = new CountDownLatch(putThreads()); cmp = true; killLock.lock(); try { log.info("Comparing cache content."); if (!cmpLatch.await(60_000, TimeUnit.MILLISECONDS)) ...
boolean function(Map<Integer, Integer> expVals) throws Exception { cmpLatch = new CountDownLatch(putThreads()); cmp = true; killLock.lock(); try { log.info(STR); if (!cmpLatch.await(60_000, TimeUnit.MILLISECONDS)) throw new IgniteCheckedException(STR); if (compareCaches(expVals)) { log.info(STR); return true; } else { ...
/** * Compare cache content. * * @param expVals Expected values. * @return {@code True} if check passed successfully. * @throws Exception If failed. */
Compare cache content
compare
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java", "license": "apache-2.0", "size": 19521 }
[ "java.util.Map", "java.util.concurrent.CountDownLatch", "java.util.concurrent.TimeUnit", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U;
import java.util.*; import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,248,144
protected List<String> getSupportedExtensionVersions() { return Collections.singletonList("1.0"); }
List<String> function() { return Collections.singletonList("1.0"); }
/** * Returns the supported extensions versions. * * @return the list of supported versions */
Returns the supported extensions versions
getSupportedExtensionVersions
{ "repo_name": "jmnarloch/gocd-task-plugin-api", "path": "src/main/java/io/jmnarloch/cd/go/plugin/api/task/AbstractDispatchingTask.java", "license": "apache-2.0", "size": 5858 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,703,981
public ApiResponse<WhatsAppSingleMessageInfo> sendWhatsAppInteractiveButtonsMessageWithHttpInfo( WhatsAppInteractiveButtonsMessage whatsAppInteractiveButtonsMessage) throws ApiException { okhttp3.Call localVarCall = sendWhatsAppInteractiveButtonsMessageValidateBeforeCall( whatsAppInterac...
ApiResponse<WhatsAppSingleMessageInfo> function( WhatsAppInteractiveButtonsMessage whatsAppInteractiveButtonsMessage) throws ApiException { okhttp3.Call localVarCall = sendWhatsAppInteractiveButtonsMessageValidateBeforeCall( whatsAppInteractiveButtonsMessage, null); Type localVarReturnType = new TypeToken<WhatsAppSingl...
/** * Send WhatsApp interactive buttons message. Send an interactive buttons message to a single * recipient. Interactive buttons messages can only be successfully delivered, if the recipient * has contacted the business within the last 24 hours, otherwise template message should be used. * * @param what...
Send WhatsApp interactive buttons message. Send an interactive buttons message to a single recipient. Interactive buttons messages can only be successfully delivered, if the recipient has contacted the business within the last 24 hours, otherwise template message should be used
sendWhatsAppInteractiveButtonsMessageWithHttpInfo
{ "repo_name": "infobip/infobip-api-java-client", "path": "src/main/java/com/infobip/api/SendWhatsAppApi.java", "license": "apache-2.0", "size": 65361 }
[ "com.google.gson.reflect.TypeToken", "com.infobip.ApiException", "com.infobip.ApiResponse", "com.infobip.model.WhatsAppInteractiveButtonsMessage", "com.infobip.model.WhatsAppSingleMessageInfo", "java.lang.reflect.Type" ]
import com.google.gson.reflect.TypeToken; import com.infobip.ApiException; import com.infobip.ApiResponse; import com.infobip.model.WhatsAppInteractiveButtonsMessage; import com.infobip.model.WhatsAppSingleMessageInfo; import java.lang.reflect.Type;
import com.google.gson.reflect.*; import com.infobip.*; import com.infobip.model.*; import java.lang.reflect.*;
[ "com.google.gson", "com.infobip", "com.infobip.model", "java.lang" ]
com.google.gson; com.infobip; com.infobip.model; java.lang;
2,648,440
@Override public void processAndGenerateTXVersionTag(EntryEventImpl callbackEvent, RegionEntry re, TXEntryState txEntryState) { final LocalRegion owner = _getOwner(); if (shouldPerformConcurrencyChecks(owner, callbackEvent)) { try { if (txEntryState != null && txEntryState.getRemoteVersi...
void function(EntryEventImpl callbackEvent, RegionEntry re, TXEntryState txEntryState) { final LocalRegion owner = _getOwner(); if (shouldPerformConcurrencyChecks(owner, callbackEvent)) { try { if (txEntryState != null && txEntryState.getRemoteVersionTag() != null) { VersionTag remoteTag = txEntryState.getRemoteVersion...
/** * called from txApply* methods to process and generate versionTags. */
called from txApply* methods to process and generate versionTags
processAndGenerateTXVersionTag
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java", "license": "apache-2.0", "size": 100847 }
[ "org.apache.geode.internal.cache.versions.ConcurrentCacheModificationException", "org.apache.geode.internal.cache.versions.VersionStamp", "org.apache.geode.internal.cache.versions.VersionTag" ]
import org.apache.geode.internal.cache.versions.ConcurrentCacheModificationException; import org.apache.geode.internal.cache.versions.VersionStamp; import org.apache.geode.internal.cache.versions.VersionTag;
import org.apache.geode.internal.cache.versions.*;
[ "org.apache.geode" ]
org.apache.geode;
318,436
public ControlParameter getSocialAcceleration() { return socialAcceleration; }
ControlParameter function() { return socialAcceleration; }
/** * Get the {@linkplain ControlParameter} representing the social component * of the velocity update equation. * @return the socialComponent. */
Get the ControlParameter representing the social component of the velocity update equation
getSocialAcceleration
{ "repo_name": "filinep/cilib", "path": "library/src/main/java/net/sourceforge/cilib/pso/velocityprovider/StandardVelocityProvider.java", "license": "gpl-3.0", "size": 5123 }
[ "net.sourceforge.cilib.controlparameter.ControlParameter" ]
import net.sourceforge.cilib.controlparameter.ControlParameter;
import net.sourceforge.cilib.controlparameter.*;
[ "net.sourceforge.cilib" ]
net.sourceforge.cilib;
268,280
public static Options getOptions() { Options options = new Options(); for (OPTS opt : OPTS.values()) { options.addOption(opt.getOption()); } return options; }
static Options function() { Options options = new Options(); for (OPTS opt : OPTS.values()) { options.addOption(opt.getOption()); } return options; }
/** * Get an {@link org.apache.commons.cli.Options} object for all of the * options defined in this enumeration. * * @return an {@link org.apache.commons.cli.Options} object */
Get an <code>org.apache.commons.cli.Options</code> object for all of the options defined in this enumeration
getOptions
{ "repo_name": "eska-muc/dbvisualizer", "path": "com.skuehnel.dbvisualizer/src/main/java/com/skuehnel/dbvisualizer/util/OPTS.java", "license": "apache-2.0", "size": 3931 }
[ "org.apache.commons.cli.Options" ]
import org.apache.commons.cli.Options;
import org.apache.commons.cli.*;
[ "org.apache.commons" ]
org.apache.commons;
184,158
@Transactional public AdministratorModel insert(AdministratorModel model) { //select if the user exist or not HashMap<String, Object> param = new HashMap<String, Object>(); param.put("username", model.getUsername()); List<AdministratorModel> tmp = administratorDao.select(param); ...
AdministratorModel function(AdministratorModel model) { HashMap<String, Object> param = new HashMap<String, Object>(); param.put(STR, model.getUsername()); List<AdministratorModel> tmp = administratorDao.select(param); if (tmp != null && tmp.size() > 0) { throw new RuntimeException(STR); } Integer id = administratorDao...
/** * insert administrator * * @param model model * @return return data is the inserted data */
insert administrator
insert
{ "repo_name": "sunlin901203/template", "path": "sunny-template-service/src/main/java/com/sunny/template/service/AdministratorService.java", "license": "apache-2.0", "size": 3300 }
[ "com.sunny.exception.CustomRuntimeException", "com.sunny.template.model.AdministratorModel", "java.util.HashMap", "java.util.List" ]
import com.sunny.exception.CustomRuntimeException; import com.sunny.template.model.AdministratorModel; import java.util.HashMap; import java.util.List;
import com.sunny.exception.*; import com.sunny.template.model.*; import java.util.*;
[ "com.sunny.exception", "com.sunny.template", "java.util" ]
com.sunny.exception; com.sunny.template; java.util;
1,720,199
public List<String> getDescription() { return description; }
List<String> function() { return description; }
/** * Gets the description. * * @return the description */
Gets the description
getDescription
{ "repo_name": "moravianlibrary/MEditor", "path": "editor-common/editor-common-client/src/main/java/cz/mzk/editor/shared/rpc/DublinCore.java", "license": "gpl-2.0", "size": 12139 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
475,775
private List<MonitorModel> updateArray(MonitorModel model, List<MonitorModel> list) { if (list.size() < defaultBufferSize) { list.add(model); } else { list.add(model); list.remove(0); } return list; }
List<MonitorModel> function(MonitorModel model, List<MonitorModel> list) { if (list.size() < defaultBufferSize) { list.add(model); } else { list.add(model); list.remove(0); } return list; }
/** * We want to keep only 240 entries for each server, so we handle the object * array ourselves. * * @param model */
We want to keep only 240 entries for each server, so we handle the object array ourselves
updateArray
{ "repo_name": "d0k1/jmeter", "path": "src/monitor/components/org/apache/jmeter/visualizers/MonitorAccumModel.java", "license": "apache-2.0", "size": 8358 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,950,899
T parse(Uri uri, InputStream inputStream) throws IOException; }
T parse(Uri uri, InputStream inputStream) throws IOException; }
/** * Parses an object from a response. * * @param uri The source {@link Uri} of the response, after any redirection. * @param inputStream An {@link InputStream} from which the response data can be read. * @return The parsed object. * @throws ParserException If an error occurs parsing the ...
Parses an object from a response
parse
{ "repo_name": "MaTriXy/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/upstream/ParsingLoadable.java", "license": "apache-2.0", "size": 4873 }
[ "android.net.Uri", "java.io.IOException", "java.io.InputStream" ]
import android.net.Uri; import java.io.IOException; import java.io.InputStream;
import android.net.*; import java.io.*;
[ "android.net", "java.io" ]
android.net; java.io;
2,899,285
Map<String, Object> getPersistentData() { if(!ispersistent) return null; HashMap<String, Object> node = new HashMap<String, Object>(); node.put("label", label); node.put("markup", markup); node.put("x", x); node.put("y", y); node.put("z", z); ...
Map<String, Object> getPersistentData() { if(!ispersistent) return null; HashMap<String, Object> node = new HashMap<String, Object>(); node.put("label", label); node.put(STR, markup); node.put("x", x); node.put("y", y); node.put("z", z); node.put("xr", xr); node.put("zr", zr); node.put("world", world); if(desc != null)...
/** * Get configuration node to be saved * @return node */
Get configuration node to be saved
getPersistentData
{ "repo_name": "webbukkit/dynmap", "path": "DynmapCore/src/main/java/org/dynmap/markers/impl/CircleMarkerImpl.java", "license": "apache-2.0", "size": 17218 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
643,015
private void attemptPreeval(ExprNode node) { // Note that we need to catch RenderException because preevaluation may fail, e.g. when // (a) the expression uses a bidi function that needs bidiGlobalDir to be in scope, but the // apiCallScope is not currently active, // (b) the expression uses an e...
void function(ExprNode node) { SoyValue preevalResult; try { preevalResult = preevalVisitor.exec(node); } catch (RenderException e) { return; } PrimitiveNode newNode = InternalValueUtils.convertPrimitiveDataToExpr((PrimitiveData) preevalResult); node.getParent().replaceChild(node, newNode); }
/** * Attempts to preevaluate a node. If successful, the node is replaced with a new constant node in * the tree. If unsuccessful, the tree is not changed. */
Attempts to preevaluate a node. If successful, the node is replaced with a new constant node in the tree. If unsuccessful, the tree is not changed
attemptPreeval
{ "repo_name": "atul-bhouraskar/closure-templates", "path": "java/src/com/google/template/soy/sharedpasses/opti/SimplifyExprVisitor.java", "license": "apache-2.0", "size": 8472 }
[ "com.google.template.soy.data.SoyValue", "com.google.template.soy.data.internalutils.InternalValueUtils", "com.google.template.soy.data.restricted.PrimitiveData", "com.google.template.soy.exprtree.ExprNode", "com.google.template.soy.sharedpasses.render.RenderException" ]
import com.google.template.soy.data.SoyValue; import com.google.template.soy.data.internalutils.InternalValueUtils; import com.google.template.soy.data.restricted.PrimitiveData; import com.google.template.soy.exprtree.ExprNode; import com.google.template.soy.sharedpasses.render.RenderException;
import com.google.template.soy.data.*; import com.google.template.soy.data.internalutils.*; import com.google.template.soy.data.restricted.*; import com.google.template.soy.exprtree.*; import com.google.template.soy.sharedpasses.render.*;
[ "com.google.template" ]
com.google.template;
1,403,885
public Set<Format> getFormats(Plugin plugin) { return formatsByPlugin.get(plugin); }
Set<Format> function(Plugin plugin) { return formatsByPlugin.get(plugin); }
/** * Retrieves a set of formats supported by the given plugin. * * @param plugin * plugin * @return a set of formats, or <code>null</code> if no formats are supported by the given plugin */
Retrieves a set of formats supported by the given plugin
getFormats
{ "repo_name": "psnc-dl/darceo", "path": "wrdz/wrdz-zmkd/common/src/main/java/pl/psnc/synat/wrdz/zmkd/config/ZdtConfiguration.java", "license": "gpl-3.0", "size": 4638 }
[ "java.util.Set", "pl.psnc.synat.wrdz.zmkd.ddr.Plugin" ]
import java.util.Set; import pl.psnc.synat.wrdz.zmkd.ddr.Plugin;
import java.util.*; import pl.psnc.synat.wrdz.zmkd.ddr.*;
[ "java.util", "pl.psnc.synat" ]
java.util; pl.psnc.synat;
288,247
private Form getCreationForm(ProcessModel processModel) throws ProcessManagerException { try { Action creation = processModel.getCreateAction("administrateur"); return processModel.getPublicationForm(creation.getName(), "administrateur", getLanguage()); } catch (WorkflowE...
Form function(ProcessModel processModel) throws ProcessManagerException { try { Action creation = processModel.getCreateAction(STR); return processModel.getPublicationForm(creation.getName(), STR, getLanguage()); } catch (WorkflowException e) { throw new ProcessManagerException(STR, STR, e); } }
/** * Returns the form which starts a new instance. */
Returns the form which starts a new instance
getCreationForm
{ "repo_name": "stephaneperry/Silverpeas-Components", "path": "process-manager/process-manager-ejb/src/main/java/com/silverpeas/processManager/ejb/ProcessManagerBmEJB.java", "license": "agpl-3.0", "size": 27413 }
[ "com.silverpeas.form.Form", "com.silverpeas.processManager.ProcessManagerException", "com.silverpeas.workflow.api.WorkflowException", "com.silverpeas.workflow.api.model.Action", "com.silverpeas.workflow.api.model.ProcessModel" ]
import com.silverpeas.form.Form; import com.silverpeas.processManager.ProcessManagerException; import com.silverpeas.workflow.api.WorkflowException; import com.silverpeas.workflow.api.model.Action; import com.silverpeas.workflow.api.model.ProcessModel;
import com.silverpeas.*; import com.silverpeas.form.*; import com.silverpeas.workflow.api.*; import com.silverpeas.workflow.api.model.*;
[ "com.silverpeas", "com.silverpeas.form", "com.silverpeas.workflow" ]
com.silverpeas; com.silverpeas.form; com.silverpeas.workflow;
2,067,508
public String convert(StreamSource wfs, String serviceUrl) { Properties stylesheetParams = new Properties(); stylesheetParams.setProperty("serviceURL", serviceUrl); return convert(wfs, stylesheetParams); }
String function(StreamSource wfs, String serviceUrl) { Properties stylesheetParams = new Properties(); stylesheetParams.setProperty(STR, serviceUrl); return convert(wfs, stylesheetParams); }
/** * Utility method to transform a WFS response into HTML * * @param wfs * WFS response to be transformed * @param serviceUrl * The WFS URL where the response came from * @return Xml output string */
Utility method to transform a WFS response into HTML
convert
{ "repo_name": "GeoscienceAustralia/geoscience-portal", "path": "src/main/java/org/auscope/portal/xslt/GmlToHtml.java", "license": "lgpl-3.0", "size": 1922 }
[ "java.util.Properties", "javax.xml.transform.stream.StreamSource" ]
import java.util.Properties; import javax.xml.transform.stream.StreamSource;
import java.util.*; import javax.xml.transform.stream.*;
[ "java.util", "javax.xml" ]
java.util; javax.xml;
1,780,959
public static PcepEndPointsObject read(ChannelBuffer cb) throws PcepParseException { PcepObjectHeader endPointsObjHeader; int sourceIpAddress; int destIpAddress; endPointsObjHeader = PcepObjectHeader.read(cb); if (endPointsObjHeader.getObjType() == END_POINTS_OBJ_TYPE ...
static PcepEndPointsObject function(ChannelBuffer cb) throws PcepParseException { PcepObjectHeader endPointsObjHeader; int sourceIpAddress; int destIpAddress; endPointsObjHeader = PcepObjectHeader.read(cb); if (endPointsObjHeader.getObjType() == END_POINTS_OBJ_TYPE && endPointsObjHeader.getObjClass() == END_POINTS_OBJ_...
/** * Reads from channel buffer and returns object of PcepEndPointsObject. * * @param cb of channel buffer * @return object of PcepEndPointsObject * @throws PcepParseException while parsing channel buffer */
Reads from channel buffer and returns object of PcepEndPointsObject
read
{ "repo_name": "sonu283304/onos", "path": "protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepEndPointsObjectVer1.java", "license": "apache-2.0", "size": 8383 }
[ "org.jboss.netty.buffer.ChannelBuffer", "org.onosproject.pcepio.exceptions.PcepParseException", "org.onosproject.pcepio.protocol.PcepEndPointsObject", "org.onosproject.pcepio.types.PcepObjectHeader" ]
import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.pcepio.exceptions.PcepParseException; import org.onosproject.pcepio.protocol.PcepEndPointsObject; import org.onosproject.pcepio.types.PcepObjectHeader;
import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; import org.onosproject.pcepio.protocol.*; import org.onosproject.pcepio.types.*;
[ "org.jboss.netty", "org.onosproject.pcepio" ]
org.jboss.netty; org.onosproject.pcepio;
2,897,342
public static List<BibEntry> purgeEmptyEntries(Collection<BibEntry> entries) { return entries.stream().filter(e -> !e.getFieldNames().isEmpty()).collect(Collectors.toList()); }
static List<BibEntry> function(Collection<BibEntry> entries) { return entries.stream().filter(e -> !e.getFieldNames().isEmpty()).collect(Collectors.toList()); }
/** * Receives a Collection of BibEntry instances, iterates through them, and * removes all entries that have no fields set. This is useful for rooting out * an unsucessful import (wrong format) that returns a number of empty entries. */
Receives a Collection of BibEntry instances, iterates through them, and removes all entries that have no fields set. This is useful for rooting out an unsucessful import (wrong format) that returns a number of empty entries
purgeEmptyEntries
{ "repo_name": "ayanai1/jabref", "path": "src/main/java/net/sf/jabref/model/database/BibDatabases.java", "license": "mit", "size": 1315 }
[ "java.util.Collection", "java.util.List", "java.util.stream.Collectors", "net.sf.jabref.model.entry.BibEntry" ]
import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import net.sf.jabref.model.entry.BibEntry;
import java.util.*; import java.util.stream.*; import net.sf.jabref.model.entry.*;
[ "java.util", "net.sf.jabref" ]
java.util; net.sf.jabref;
823,853
public void getGeoSystem(String[] val) { if ( geoSystem == null ) { geoSystem = (MFString)getField( "geoSystem" ); } geoSystem.getValue( val ); }
void function(String[] val) { if ( geoSystem == null ) { geoSystem = (MFString)getField( STR ); } geoSystem.getValue( val ); }
/** Return the geoSystem value in the argument String[] * @param val The String[] to initialize. */
Return the geoSystem value in the argument String[]
getGeoSystem
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/geospatial/SAIGeoViewpoint.java", "license": "gpl-2.0", "size": 10436 }
[ "org.web3d.x3d.sai.MFString" ]
import org.web3d.x3d.sai.MFString;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
2,902,587
//----------------------------------------------------------------------- public static String formatPeriodISO(long startMillis, long endMillis) { return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault()); }
static String function(long startMillis, long endMillis) { return formatPeriod(startMillis, endMillis, ISO_EXTENDED_FORMAT_PATTERN, false, TimeZone.getDefault()); }
/** * <p>Formats the time gap as a string.</p> * * <p>The format used is the ISO8601 period format.</p> * * @param startMillis the start of the duration to format * @param endMillis the end of the duration to format * @return the time as a String */
Formats the time gap as a string. The format used is the ISO8601 period format
formatPeriodISO
{ "repo_name": "ganghuaChen/android-delayed", "path": "src/org/apache/commons/lang/time/DurationFormatUtils.java", "license": "gpl-3.0", "size": 25514 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
341,688
@ServiceMethod(returns = ReturnType.SINGLE) Response<Void> deleteWithResponse( String resourceGroupName, String automationAccountName, String scheduleName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<Void> deleteWithResponse( String resourceGroupName, String automationAccountName, String scheduleName, Context context);
/** * Delete the schedule identified by schedule name. * * @param resourceGroupName Name of an Azure Resource group. * @param automationAccountName The name of the automation account. * @param scheduleName The schedule name. * @param context The context to associate with this operation. ...
Delete the schedule identified by schedule name
deleteWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/fluent/SchedulesClient.java", "license": "mit", "size": 9401 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
468,485
@Test public void testUpdateRule() { System.out.println(getTestTraceHead("[CygnusGroupingRules.updateRule]") + "-------- Updating an existent rule works"); ArrayList<String> ruleFields1 = new ArrayList<String>(); ruleFields1.add("servicePath"); String ruleRegex1 =...
void function() { System.out.println(getTestTraceHead(STR) + STR); ArrayList<String> ruleFields1 = new ArrayList<String>(); ruleFields1.add(STR); String ruleRegex1 = STR; String ruleDestination1 = STR; String ruleServicePath1 = STR; CygnusGroupingRules cygnusGroupingRules = createSingleRuleGroupingRules( ruleFields1, r...
/** * [GroupingRules.updateRule] -------- Updating an existent rule works. */
[GroupingRules.updateRule] -------- Updating an existent rule works
testUpdateRule
{ "repo_name": "telefonicaid/fiware-cygnus", "path": "cygnus-common/src/test/java/com/telefonica/iot/cygnus/interceptors/CygnusGroupingRulesTest.java", "license": "agpl-3.0", "size": 20998 }
[ "java.util.ArrayList", "org.junit.Assert" ]
import java.util.ArrayList; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
664,975
@SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { for (EnumDyeColor enumdyecolor : EnumDyeColor.values()) { list.add(new ItemStack(itemIn, 1, enumdyecolor.getMetadata())); } }
@SideOnly(Side.CLIENT) void function(Item itemIn, CreativeTabs tab, List<ItemStack> list) { for (EnumDyeColor enumdyecolor : EnumDyeColor.values()) { list.add(new ItemStack(itemIn, 1, enumdyecolor.getMetadata())); } }
/** * returns a list of blocks with the same ID, but different meta (eg: wood * returns 4 blocks) */
returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
getSubBlocks
{ "repo_name": "ironcraft/nowel", "path": "src/main/java/fr/ironcraft/nowel/blocks/BlockPresent.java", "license": "mit", "size": 3788 }
[ "java.util.List", "net.minecraft.creativetab.CreativeTabs", "net.minecraft.item.EnumDyeColor", "net.minecraft.item.Item", "net.minecraft.item.ItemStack", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.*; import net.minecraft.creativetab.*; import net.minecraft.item.*; import net.minecraftforge.fml.relauncher.*;
[ "java.util", "net.minecraft.creativetab", "net.minecraft.item", "net.minecraftforge.fml" ]
java.util; net.minecraft.creativetab; net.minecraft.item; net.minecraftforge.fml;
2,339,656
@Override public void setCluster(Cluster cluster) { Cluster oldCluster = null; Lock writeLock = clusterLock.writeLock(); writeLock.lock(); try { // Change components if necessary oldCluster = this.cluster; if (oldCluster == cluster) ...
void function(Cluster cluster) { Cluster oldCluster = null; Lock writeLock = clusterLock.writeLock(); writeLock.lock(); try { oldCluster = this.cluster; if (oldCluster == cluster) return; this.cluster = cluster; if (getState().isAvailable() && (oldCluster != null) && (oldCluster instanceof Lifecycle)) { try { ((Lifecyc...
/** * Set the Cluster with which this Container is associated. * * @param cluster The newly associated Cluster */
Set the Cluster with which this Container is associated
setCluster
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/core/ContainerBase.java", "license": "apache-2.0", "size": 45077 }
[ "java.util.concurrent.locks.Lock", "org.apache.catalina.Cluster", "org.apache.catalina.Lifecycle", "org.apache.catalina.LifecycleException" ]
import java.util.concurrent.locks.Lock; import org.apache.catalina.Cluster; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException;
import java.util.concurrent.locks.*; import org.apache.catalina.*;
[ "java.util", "org.apache.catalina" ]
java.util; org.apache.catalina;
846,049
// [TARGET get(String, BlobGetOption...)] // [VARIABLE "my_blob_name"] // [VARIABLE 42] public Blob getBlob(String blobName, long generation) { // [START getBlob] Blob blob = bucket.get(blobName, BlobGetOption.generationMatch(generation)); // [END getBlob] return blob; }
Blob function(String blobName, long generation) { Blob blob = bucket.get(blobName, BlobGetOption.generationMatch(generation)); return blob; }
/** * Example of getting a blob in the bucket, only if its metageneration matches a value, * otherwise a {@link StorageException} is thrown. */
Example of getting a blob in the bucket, only if its metageneration matches a value, otherwise a <code>StorageException</code> is thrown
getBlob
{ "repo_name": "jabubake/google-cloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/BucketSnippets.java", "license": "apache-2.0", "size": 10243 }
[ "com.google.cloud.storage.Blob", "com.google.cloud.storage.Storage" ]
import com.google.cloud.storage.Blob; import com.google.cloud.storage.Storage;
import com.google.cloud.storage.*;
[ "com.google.cloud" ]
com.google.cloud;
572,456
public static void deleteCourse(Long courseId) throws MoodleRestException, UnsupportedEncodingException { Long[] courseIds=new Long[1]; courseIds[0]=courseId; deleteCourses(courseIds); }
static void function(Long courseId) throws MoodleRestException, UnsupportedEncodingException { Long[] courseIds=new Long[1]; courseIds[0]=courseId; deleteCourses(courseIds); }
/** * <p>From Moodle 2.3</p> * <p></p> * @param Course id * @throws MoodleRestException * @throws UnsupportedEncodingException */
From Moodle 2.3
deleteCourse
{ "repo_name": "bantonia/MoodleRest", "path": "src/net/beaconhillcott/moodlerest/MoodleRestCourse.java", "license": "gpl-2.0", "size": 87380 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
2,844,814
// Check the data final int rows = ArrayUtils.getLength(cost); ValidationUtils.checkStrictlyPositive(rows, "No rows"); final int cols = ArrayUtils.getLength(cost[0]); ValidationUtils.checkStrictlyPositive(cols, "No columns"); for (int i = 1; i < rows; i++) { ValidationUtils.checkArgument(Array...
final int rows = ArrayUtils.getLength(cost); ValidationUtils.checkStrictlyPositive(rows, STR); final int cols = ArrayUtils.getLength(cost[0]); ValidationUtils.checkStrictlyPositive(cols, STR); for (int i = 1; i < rows; i++) { ValidationUtils.checkArgument(ArrayUtils.getLength(cost[i]) == cols, STR, i); } final int[] da...
/** * Create a new instance. * * @param cost the cost of an assignment between row and column (as {@code cost(i,j) = [i][j]}). * @return the instance * @throws IllegalArgumentException if the array is null, empty or not rectangular */
Create a new instance
create
{ "repo_name": "aherbert/GDSC-Core", "path": "src/main/java/uk/ac/sussex/gdsc/core/match/KuhnMunkresAssignment.java", "license": "gpl-3.0", "size": 19002 }
[ "org.apache.commons.lang3.ArrayUtils", "uk.ac.sussex.gdsc.core.utils.ValidationUtils" ]
import org.apache.commons.lang3.ArrayUtils; import uk.ac.sussex.gdsc.core.utils.ValidationUtils;
import org.apache.commons.lang3.*; import uk.ac.sussex.gdsc.core.utils.*;
[ "org.apache.commons", "uk.ac.sussex" ]
org.apache.commons; uk.ac.sussex;
2,468,328
@Nullable public static ApiConfig createApiConfig(Model model, ConfigProto configProto) { ImmutableMap<String, InterfaceConfig> interfaceConfigMap = createInterfaceConfigMap(model.getDiagCollector(), configProto, model.getSymbolTable()); if (interfaceConfigMap == null) { return null; } els...
static ApiConfig function(Model model, ConfigProto configProto) { ImmutableMap<String, InterfaceConfig> interfaceConfigMap = createInterfaceConfigMap(model.getDiagCollector(), configProto, model.getSymbolTable()); if (interfaceConfigMap == null) { return null; } else { return new AutoValue_ApiConfig( interfaceConfigMap...
/** * Creates an instance of ApiConfig based on ConfigProto, linking up API interface configurations * with specified interfaces in interfaceConfigMap. On errors, null will be returned, and * diagnostics are reported to the model. */
Creates an instance of ApiConfig based on ConfigProto, linking up API interface configurations with specified interfaces in interfaceConfigMap. On errors, null will be returned, and diagnostics are reported to the model
createApiConfig
{ "repo_name": "tcoffee-google/toolkit", "path": "src/main/java/com/google/api/codegen/ApiConfig.java", "license": "apache-2.0", "size": 4363 }
[ "com.google.api.tools.framework.model.Model", "com.google.common.collect.ImmutableMap" ]
import com.google.api.tools.framework.model.Model; import com.google.common.collect.ImmutableMap;
import com.google.api.tools.framework.model.*; import com.google.common.collect.*;
[ "com.google.api", "com.google.common" ]
com.google.api; com.google.common;
2,384,395
public void testCommaSeparatedFilesAndArchives() throws Exception { Path root = new Path(getFsTestCaseDir(), "root"); Path jar = new Path("jar.jar"); getFileSystem().create(new Path(getAppPath(), jar)).close(); Path rootJar = new Path(root, "rootJar.jar"); getFileSystem().cr...
void function() throws Exception { Path root = new Path(getFsTestCaseDir(), "root"); Path jar = new Path(STR); getFileSystem().create(new Path(getAppPath(), jar)).close(); Path rootJar = new Path(root, STR); getFileSystem().create(rootJar).close(); Path file = new Path("file"); getFileSystem().create(new Path(getAppPat...
/** * https://issues.apache.org/jira/browse/OOZIE-87 * This test covers map-reduce action * @throws Exception */
HREF This test covers map-reduce action
testCommaSeparatedFilesAndArchives
{ "repo_name": "cbaenziger/oozie", "path": "sharelib/streaming/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java", "license": "apache-2.0", "size": 62797 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.filecache.DistributedCache", "org.apache.hadoop.fs.Path", "org.apache.oozie.util.XmlUtils", "org.jdom.Element" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.filecache.DistributedCache; import org.apache.hadoop.fs.Path; import org.apache.oozie.util.XmlUtils; import org.jdom.Element;
import org.apache.hadoop.conf.*; import org.apache.hadoop.filecache.*; import org.apache.hadoop.fs.*; import org.apache.oozie.util.*; import org.jdom.*;
[ "org.apache.hadoop", "org.apache.oozie", "org.jdom" ]
org.apache.hadoop; org.apache.oozie; org.jdom;
1,155,798
static Cache<String, Connection> getRemoteConnectionMap(AvaticaConnection connection) throws Exception { Field metaF = AvaticaConnection.class.getDeclaredField("meta"); metaF.setAccessible(true); Meta clientMeta = (Meta) metaF.get(connection); Field remoteMetaServiceF = clientMeta.getCla...
static Cache<String, Connection> getRemoteConnectionMap(AvaticaConnection connection) throws Exception { Field metaF = AvaticaConnection.class.getDeclaredField("meta"); metaF.setAccessible(true); Meta clientMeta = (Meta) metaF.get(connection); Field remoteMetaServiceF = clientMeta.getClass().getDeclaredField(STR); remo...
/** * Reach into the guts of a quasi-remote connection and pull out the * connection map from the other side. * TODO: refactor tests to replace reflection with package-local access */
Reach into the guts of a quasi-remote connection and pull out the connection map from the other side
getRemoteConnectionMap
{ "repo_name": "sudheeshkatkam/incubator-calcite", "path": "avatica-server/src/test/java/org/apache/calcite/avatica/RemoteDriverTest.java", "license": "apache-2.0", "size": 37191 }
[ "com.google.common.cache.Cache", "java.lang.reflect.Field", "java.sql.Connection", "org.apache.calcite.avatica.jdbc.JdbcMeta", "org.apache.calcite.avatica.remote.LocalJsonService", "org.apache.calcite.avatica.remote.LocalService" ]
import com.google.common.cache.Cache; import java.lang.reflect.Field; import java.sql.Connection; import org.apache.calcite.avatica.jdbc.JdbcMeta; import org.apache.calcite.avatica.remote.LocalJsonService; import org.apache.calcite.avatica.remote.LocalService;
import com.google.common.cache.*; import java.lang.reflect.*; import java.sql.*; import org.apache.calcite.avatica.jdbc.*; import org.apache.calcite.avatica.remote.*;
[ "com.google.common", "java.lang", "java.sql", "org.apache.calcite" ]
com.google.common; java.lang; java.sql; org.apache.calcite;
1,897,796
@Test public void matchIPProtocolTest() { Criterion criterion = Criteria.matchIPProtocol((byte) 250); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
void function() { Criterion criterion = Criteria.matchIPProtocol((byte) 250); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
/** * Tests IP protocol criterion. */
Tests IP protocol criterion
matchIPProtocolTest
{ "repo_name": "donNewtonAlpha/onos", "path": "core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java", "license": "apache-2.0", "size": 14744 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.hamcrest.MatcherAssert", "org.onosproject.codec.impl.CriterionJsonMatcher", "org.onosproject.net.flow.criteria.Criteria", "org.onosproject.net.flow.criteria.Criterion" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onosproject.codec.impl.CriterionJsonMatcher; import org.onosproject.net.flow.criteria.Criteria; import org.onosproject.net.flow.criteria.Criterion;
import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onosproject.codec.impl.*; import org.onosproject.net.flow.criteria.*;
[ "com.fasterxml.jackson", "org.hamcrest", "org.onosproject.codec", "org.onosproject.net" ]
com.fasterxml.jackson; org.hamcrest; org.onosproject.codec; org.onosproject.net;
2,070,960