code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static void histogram( GrayF64 input , double minValue , int histogram[] ) {
if( BoofConcurrency.USE_CONCURRENT ) {
ImplImageStatistics_MT.histogram(input,minValue,histogram);
} else {
ImplImageStatistics.histogram(input,minValue,histogram);
}
} | class class_name[name] begin[{]
method[histogram, return_type[void], modifier[public static], parameter[input, minValue, histogram]] begin[{]
if[member[BoofConcurrency.USE_CONCURRENT]] begin[{]
call[ImplImageStatistics_MT.histogram, parameter[member[.input], member[.minV... | Keyword[public] Keyword[static] Keyword[void] identifier[histogram] operator[SEP] identifier[GrayF64] identifier[input] , Keyword[double] identifier[minValue] , Keyword[int] identifier[histogram] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] ide... |
public boolean isFlat() {
boolean flat = true;
for (int ci = 0; ci < this.parts.size(); ci++) {
flat &= this.parts.get(ci).isPosTag();
}
return flat;
} | class class_name[name] begin[{]
method[isFlat, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], flat]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=flat, post... | Keyword[public] Keyword[boolean] identifier[isFlat] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[flat] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[ci] operator[=] Other[0] operator[SEP] identifier[ci] operator[<] Keyword[this] operator[SEP] identifie... |
public String getNameAndDimensions(boolean strict) {
Formatter buf = new Formatter();
getNameAndDimensions(buf, false, strict);
return buf.toString();
} | class class_name[name] begin[{]
method[getNameAndDimensions, return_type[type[String]], modifier[public], parameter[strict]] begin[{]
local_variable[type[Formatter], buf]
call[.getNameAndDimensions, parameter[member[.buf], literal[false], member[.strict]]]
return[call[buf.toStri... | Keyword[public] identifier[String] identifier[getNameAndDimensions] operator[SEP] Keyword[boolean] identifier[strict] operator[SEP] {
identifier[Formatter] identifier[buf] operator[=] Keyword[new] identifier[Formatter] operator[SEP] operator[SEP] operator[SEP] identifier[getNameAndDimensions] operator[SEP] ident... |
public static SanitizedContent concatHtml(SanitizedContent... contents) {
for (SanitizedContent content : contents) {
checkArgument(content.getContentKind() == ContentKind.HTML, "Can only concat HTML");
}
StringBuilder combined = new StringBuilder();
Dir dir = Dir.NEUTRAL; // Empty string is neut... | class class_name[name] begin[{]
method[concatHtml, return_type[type[SanitizedContent]], modifier[public static], parameter[contents]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(ar... | Keyword[public] Keyword[static] identifier[SanitizedContent] identifier[concatHtml] operator[SEP] identifier[SanitizedContent] operator[...] identifier[contents] operator[SEP] {
Keyword[for] operator[SEP] identifier[SanitizedContent] identifier[content] operator[:] identifier[contents] operator[SEP] {
... |
protected void repairAfterLazy() {
for (int k = 0; k < highLowContainer.size(); ++k) {
MappeableContainer c = highLowContainer.getContainerAtIndex(k);
((MutableRoaringArray) highLowContainer).setContainerAtIndex(k, c.repairAfterLazy());
}
} | class class_name[name] begin[{]
method[repairAfterLazy, return_type[void], modifier[protected], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[... | Keyword[protected] Keyword[void] identifier[repairAfterLazy] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[highLowContainer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] opera... |
protected void installChecksums( Collection metadataFiles )
throws MojoExecutionException
{
for ( Iterator it = metadataFiles.iterator(); it.hasNext(); )
{
File metadataFile = (File) it.next();
installChecksums( metadataFile );
}
} | class class_name[name] begin[{]
method[installChecksums, return_type[void], modifier[protected], parameter[metadataFiles]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expressio... | Keyword[protected] Keyword[void] identifier[installChecksums] operator[SEP] identifier[Collection] identifier[metadataFiles] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
Keyword[for] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[metadataFiles] operator[SEP] identi... |
protected Integer mapThrowableFlat(Throwable throwable) {
Class<? extends Throwable> throwableClass = throwable.getClass();
Integer resId = throwableToMsgIdMap.get(throwableClass);
if (resId == null) {
Class<? extends Throwable> closestClass = null;
Set<Entry<Class<? exte... | class class_name[name] begin[{]
method[mapThrowableFlat, return_type[type[Integer]], modifier[protected], parameter[throwable]] begin[{]
local_variable[type[Class], throwableClass]
local_variable[type[Integer], resId]
if[binary_operation[member[.resId], ==, literal[null]]] begin... | Keyword[protected] identifier[Integer] identifier[mapThrowableFlat] operator[SEP] identifier[Throwable] identifier[throwable] operator[SEP] {
identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] identifier[throwableClass] operator[=] identifier[throwable] operator[SEP] ide... |
public static Object evaluateValueExpression(String expression, Object target) {
// Executeur des methodes sur le contexte
DAOValidatorMethodExpressionExecutor methodExecutor = new DAOValidatorMethodExpressionExecutor();
// Resolver
DAOValidatorBeanELResolver resolver = new DAOValidatorBeanELResolve... | class class_name[name] begin[{]
method[evaluateValueExpression, return_type[type[Object]], modifier[public static], parameter[expression, target]] begin[{]
local_variable[type[DAOValidatorMethodExpressionExecutor], methodExecutor]
local_variable[type[DAOValidatorBeanELResolver], resolver]
... | Keyword[public] Keyword[static] identifier[Object] identifier[evaluateValueExpression] operator[SEP] identifier[String] identifier[expression] , identifier[Object] identifier[target] operator[SEP] {
identifier[DAOValidatorMethodExpressionExecutor] identifier[methodExecutor] operator[=] Keyword[new] identifier[D... |
public synchronized void close() throws IOException {
//
// Kill running tasks. Do this in a 2nd vector, called 'tasksToClose',
// because calling jobHasFinished() may result in an edit to 'tasks'.
//
TreeMap<TaskAttemptID, TaskInProgress> tasksToClose =
new TreeMap<TaskAttemptID, TaskInProgr... | class class_name[name] begin[{]
method[close, return_type[void], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[TreeMap], tasksToClose]
call[tasksToClose.putAll, parameter[member[.tasks]]]
ForStatement(body=BlockStatement(label=None, statements=[Stateme... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[TreeMap] operator[<] identifier[TaskAttemptID] , identifier[TaskInProgress] operator[>] identifier[tasksToClose] operator[=] Keyword[new] identifier[TreeMap] ope... |
@Override
public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam,
final ManufacturingProcess pEntity,
final IRequestData pRequestData) throws Exception {
if (pEntity.getItsQuantity().doubleValue() == 0) {
throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
... | class class_name[name] begin[{]
method[makeFirstPrepareForSave, return_type[void], modifier[final public], parameter[pAddParam, pEntity, pRequestData]] begin[{]
if[binary_operation[call[pEntity.getItsQuantity, parameter[]], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCr... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[makeFirstPrepareForSave] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[ManufacturingProcess] identifier[pEntity] ,... |
public void monitorExit(Local<?> monitor) {
addInstruction(new ThrowingInsn(Rops.MONITOR_EXIT, sourcePosition,
RegisterSpecList.make(monitor.spec()), catches));
} | class class_name[name] begin[{]
method[monitorExit, return_type[void], modifier[public], parameter[monitor]] begin[{]
call[.addInstruction, parameter[ClassCreator(arguments=[MemberReference(member=MONITOR_EXIT, postfix_operators=[], prefix_operators=[], qualifier=Rops, selectors=[]), MemberRefe... | Keyword[public] Keyword[void] identifier[monitorExit] operator[SEP] identifier[Local] operator[<] operator[?] operator[>] identifier[monitor] operator[SEP] {
identifier[addInstruction] operator[SEP] Keyword[new] identifier[ThrowingInsn] operator[SEP] identifier[Rops] operator[SEP] identifier[MONITOR_EXIT] , ide... |
public static String format(double[] v, int w, int d) {
DecimalFormat format = new DecimalFormat();
format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US));
format.setMinimumIntegerDigits(1);
format.setMaximumFractionDigits(d);
format.setMinimumFractionDigits(d);
format.setGroupingUs... | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public static], parameter[v, w, d]] begin[{]
local_variable[type[DecimalFormat], format]
call[format.setDecimalFormatSymbols, parameter[ClassCreator(arguments=[MemberReference(member=US, postfix_operators... | Keyword[public] Keyword[static] identifier[String] identifier[format] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[v] , Keyword[int] identifier[w] , Keyword[int] identifier[d] operator[SEP] {
identifier[DecimalFormat] identifier[format] operator[=] Keyword[new] identifier[DecimalFormat]... |
@NonNull
public <E extends T> MapperBuilder<T> bind(@NonNull Class<E> itemClass,
@NonNull Binder<? super E, ?> binder) {
//noinspection unchecked
return bind(itemClass, 0, binder, ALWAYS);
} | class class_name[name] begin[{]
method[bind, return_type[type[MapperBuilder]], modifier[public], parameter[itemClass, binder]] begin[{]
return[call[.bind, parameter[member[.itemClass], literal[0], member[.binder], member[.ALWAYS]]]]
end[}]
END[}] | annotation[@] identifier[NonNull] Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[T] operator[>] identifier[MapperBuilder] operator[<] identifier[T] operator[>] identifier[bind] operator[SEP] annotation[@] identifier[NonNull] identifier[Class] operator[<] identifier[E] operator[>] identifier[itemC... |
static Object[] tryOtherConstruction(Class c)
{
Constructor[] constructors = c.getDeclaredConstructors();
if (constructors.length == 0)
{
throw new JsonIoException("Cannot instantiate '" + c.getName() + "' - Primitive, interface, array[] or void");
}
// Sort cons... | class class_name[name] begin[{]
method[tryOtherConstruction, return_type[type[Object]], modifier[static], parameter[c]] begin[{]
local_variable[type[Constructor], constructors]
if[binary_operation[member[constructors.length], ==, literal[0]]] begin[{]
ThrowStatement(expressi... | Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[tryOtherConstruction] operator[SEP] identifier[Class] identifier[c] operator[SEP] {
identifier[Constructor] operator[SEP] operator[SEP] identifier[constructors] operator[=] identifier[c] operator[SEP] identifier[getDeclaredConstructors] op... |
public String getState() throws SIMPException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getState");
assertValidControllable();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getState", State.AWAITING_DELIVERY);
r... | class class_name[name] begin[{]
method[getState, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc],... | Keyword[public] identifier[String] identifier[getState] operator[SEP] operator[SEP] Keyword[throws] identifier[SIMPException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEnt... |
public final void setDatabaseInputDir(String databaseInputDir) {
if (DEBUG) {
System.out.println("Setting database input directory: " + databaseInputDir);
}
this.databaseInputDir = databaseInputDir;
} | class class_name[name] begin[{]
method[setDatabaseInputDir, return_type[void], modifier[final public], parameter[databaseInputDir]] begin[{]
if[member[.DEBUG]] begin[{]
call[System.out.println, parameter[binary_operation[literal["Setting database input directory: "], +, ... | Keyword[public] Keyword[final] Keyword[void] identifier[setDatabaseInputDir] operator[SEP] identifier[String] identifier[databaseInputDir] operator[SEP] {
Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] oper... |
final void setDerivedJmsFields() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setDerivedJmsFields");
if (getHdr2().getChoiceField(JsHdr2Access.JMSDELIVERYMODE) == JsHdr2Access.IS_JMSDELIVERYMODE_EMPTY) {
setJmsDeliveryMode(getDerivedJ... | class class_name[name] begin[{]
method[setDerivedJmsFields, return_type[void], modifier[final], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], me... | Keyword[final] Keyword[void] identifier[setDerivedJmsFields] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP... |
protected Channel createChannel(ChannelData channelData) throws ChannelException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "createChannel");
}
TCPChannelConfiguration newCC = new TCPChannelConfiguration(channelData);
TCPChannel channel... | class class_name[name] begin[{]
method[createChannel, return_type[type[Channel]], modifier[protected], parameter[channelData]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.... | Keyword[protected] identifier[Channel] identifier[createChannel] operator[SEP] identifier[ChannelData] identifier[channelData] operator[SEP] Keyword[throws] identifier[ChannelException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP... |
public EClass getIfcHourInDay() {
if (ifcHourInDayEClass == null) {
ifcHourInDayEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(684);
}
return ifcHourInDayEClass;
} | class class_name[name] begin[{]
method[getIfcHourInDay, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcHourInDayEClass], ==, literal[null]]] begin[{]
assign[member[.ifcHourInDayEClass], Cast(expression=MethodInvocation(a... | Keyword[public] identifier[EClass] identifier[getIfcHourInDay] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcHourInDayEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcHourInDayEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] ... |
public static SimpleFormatter<PlainTime> ofTimePattern(
String pattern,
Locale locale
) {
return new SimpleFormatter<>(
PlainTime.class,
pattern,
locale,
Leniency.SMART,
null
);
} | class class_name[name] begin[{]
method[ofTimePattern, return_type[type[SimpleFormatter]], modifier[public static], parameter[pattern, locale]] begin[{]
return[ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, d... | Keyword[public] Keyword[static] identifier[SimpleFormatter] operator[<] identifier[PlainTime] operator[>] identifier[ofTimePattern] operator[SEP] identifier[String] identifier[pattern] , identifier[Locale] identifier[locale] operator[SEP] {
Keyword[return] Keyword[new] identifier[SimpleFormatter] operator[<] op... |
public void setImage(GrayF32 image) {
scaleSpace.initialize(image);
usedScales.clear();
do {
for (int i = 0; i < scaleSpace.getNumScales(); i++) {
GrayF32 scaleImage = scaleSpace.getImageScale(i);
double sigma = scaleSpace.computeSigmaScale(i);
double pixelCurrentToInput = scaleSpace.pixelScaleCu... | class class_name[name] begin[{]
method[setImage, return_type[void], modifier[public], parameter[image]] begin[{]
call[scaleSpace.initialize, parameter[member[.image]]]
call[usedScales.clear, parameter[]]
do[call[scaleSpace.computeNextOctave, parameter[]]] begin[{... | Keyword[public] Keyword[void] identifier[setImage] operator[SEP] identifier[GrayF32] identifier[image] operator[SEP] {
identifier[scaleSpace] operator[SEP] identifier[initialize] operator[SEP] identifier[image] operator[SEP] operator[SEP] identifier[usedScales] operator[SEP] identifier[clear] operator[SEP] opera... |
public SearchResult withResults(SearchRecord... results) {
if (this.results == null) {
setResults(new java.util.ArrayList<SearchRecord>(results.length));
}
for (SearchRecord ele : results) {
this.results.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withResults, return_type[type[SearchResult]], modifier[public], parameter[results]] begin[{]
if[binary_operation[THIS[member[None.results]], ==, literal[null]]] begin[{]
call[.setResults, parameter[ClassCreator(arguments=[MemberRefe... | Keyword[public] identifier[SearchResult] identifier[withResults] operator[SEP] identifier[SearchRecord] operator[...] identifier[results] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[results] operator[==] Other[null] operator[SEP] {
identifier[setResults] operator[S... |
@SuppressWarnings("unused")
@Deprecated
private void validateSubIfd(IFD ifd, int n) {
boolean thumbnail = ifd.getParent().getImageSize() > ifd.getImageSize();
IfdTags metadata = ifd.getMetadata();
checkRequiredTag(metadata, "ImageLength", 1, "SubIFD" + n);
checkRequiredTag(metadata, "ImageWidth", 1... | class class_name[name] begin[{]
method[validateSubIfd, return_type[void], modifier[private], parameter[ifd, n]] begin[{]
local_variable[type[boolean], thumbnail]
local_variable[type[IfdTags], metadata]
call[.checkRequiredTag, parameter[member[.metadata], literal["ImageLength"], ... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Deprecated] Keyword[private] Keyword[void] identifier[validateSubIfd] operator[SEP] identifier[IFD] identifier[ifd] , Keyword[int] identifier[n] operator[SEP] {
Keyword[boolean] identifier[thumbnail] ... |
public final void mT__71() throws RecognitionException {
try {
int _type = T__71;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalPureXbase.g:69:7: ( 'typeof' )
// InternalPureXbase.g:69:9: 'typeof'
{
match("typeof");
}
... | class class_name[name] begin[{]
method[mT__71, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__71, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[final] Keyword[void] identifier[mT__71] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[T__71] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKE... |
private void updateReadHistory(JmxReadRequest pJmxReq, JSONObject pJson, long pTimestamp) {
ObjectName name = pJmxReq.getObjectName();
if (name.isPattern()) {
// We have a pattern and hence a value structure
// of bean -> attribute_key -> attribute_value
Map<String,O... | class class_name[name] begin[{]
method[updateReadHistory, return_type[void], modifier[private], parameter[pJmxReq, pJson, pTimestamp]] begin[{]
local_variable[type[ObjectName], name]
if[call[name.isPattern, parameter[]]] begin[{]
local_variable[type[Map], values]
... | Keyword[private] Keyword[void] identifier[updateReadHistory] operator[SEP] identifier[JmxReadRequest] identifier[pJmxReq] , identifier[JSONObject] identifier[pJson] , Keyword[long] identifier[pTimestamp] operator[SEP] {
identifier[ObjectName] identifier[name] operator[=] identifier[pJmxReq] operator[SEP] ident... |
@Override
public List<String> getNodeNames(CommandContext ctx, OperationRequestAddress prefix) {
ModelControllerClient client = ctx.getModelControllerClient();
if(client == null) {
return Collections.emptyList();
}
if(prefix.isEmpty()) {
throw new IllegalArg... | class class_name[name] begin[{]
method[getNodeNames, return_type[type[List]], modifier[public], parameter[ctx, prefix]] begin[{]
local_variable[type[ModelControllerClient], client]
if[binary_operation[member[.client], ==, literal[null]]] begin[{]
return[call[Collections.empt... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getNodeNames] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[OperationRequestAddress] identifier[prefix] operator[SEP] {
identifier[ModelControllerClient] identifier[c... |
public <R extends JmxRequest> Object handleRequest(JsonRequestHandler<R> pRequestHandler, R pJmxReq)
throws MBeanException, ReflectionException, AttributeNotFoundException, InstanceNotFoundException, NotChangedException {
AttributeNotFoundException attrException = null;
InstanceNotFoundExcep... | class class_name[name] begin[{]
method[handleRequest, return_type[type[Object]], modifier[public], parameter[pRequestHandler, pJmxReq]] begin[{]
local_variable[type[AttributeNotFoundException], attrException]
local_variable[type[InstanceNotFoundException], objNotFoundException]
ForState... | Keyword[public] operator[<] identifier[R] Keyword[extends] identifier[JmxRequest] operator[>] identifier[Object] identifier[handleRequest] operator[SEP] identifier[JsonRequestHandler] operator[<] identifier[R] operator[>] identifier[pRequestHandler] , identifier[R] identifier[pJmxReq] operator[SEP] Keyword[throws] ide... |
public static void initialize(final AbstractConfig config, final BenchmarkResult result) {
METERS_TO_BENCH.clear();
METERS_TO_BENCH.addAll(Arrays.asList(config.getMeters()));
EXECUTOR.clear();
BENCHRES = result;
CONFIG = config;
} | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[public static], parameter[config, result]] begin[{]
call[METERS_TO_BENCH.clear, parameter[]]
call[METERS_TO_BENCH.addAll, parameter[call[Arrays.asList, parameter[call[config.getMeters, parameter[]]]]]... | Keyword[public] Keyword[static] Keyword[void] identifier[initialize] operator[SEP] Keyword[final] identifier[AbstractConfig] identifier[config] , Keyword[final] identifier[BenchmarkResult] identifier[result] operator[SEP] {
identifier[METERS_TO_BENCH] operator[SEP] identifier[clear] operator[SEP] operator[SEP] ... |
private static CommandLine parseArgs(String[] args) throws ParseException {
Options options = new Options();
// Cluster
Option o = new Option("c", "cluster", true,
"cluster for which jobs are processed");
o.setArgName("cluster");
o.setRequired(true);
options.addOption(o);
// Input
... | class class_name[name] begin[{]
method[parseArgs, return_type[type[CommandLine]], modifier[private static], parameter[args]] begin[{]
local_variable[type[Options], options]
local_variable[type[Option], o]
call[o.setArgName, parameter[literal["cluster"]]]
call[o.s... | Keyword[private] Keyword[static] identifier[CommandLine] identifier[parseArgs] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[Options] identifier[options] operator[=] Keyword[new] identifier[Options] operator[SEP... |
public static boolean haveBackend() {
for (DeepWaterParameters.Backend b : DeepWaterParameters.Backend.values()) {
if (DeepwaterMojoModel.createDeepWaterBackend(b.toString()) != null) return true;
}
return false;
} | class class_name[name] begin[{]
method[haveBackend, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toStri... | Keyword[public] Keyword[static] Keyword[boolean] identifier[haveBackend] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[DeepWaterParameters] operator[SEP] identifier[Backend] identifier[b] operator[:] identifier[DeepWaterParameters] operator[SEP] identifier[Backend] operator[SEP] identifier... |
private int[] buildIndex(final int[] counts, int[] positions, int minsupp) {
// Count the number of frequent items:
int numfreq = 0;
for(int i = 0; i < counts.length; i++) {
if(counts[i] >= minsupp) {
++numfreq;
}
}
// Build the index table
int[] idx = new int[numfreq];
f... | class class_name[name] begin[{]
method[buildIndex, return_type[type[int]], modifier[private], parameter[counts, positions, minsupp]] begin[{]
local_variable[type[int], numfreq]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReferenc... | Keyword[private] Keyword[int] operator[SEP] operator[SEP] identifier[buildIndex] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[counts] , Keyword[int] operator[SEP] operator[SEP] identifier[positions] , Keyword[int] identifier[minsupp] operator[SEP] {
Keyword[int] identifier[n... |
@NonNull
protected List<LayoutHelper> transformCards(@Nullable List<L> cards, final @NonNull List<C> data,
@NonNull List<Pair<Range<Integer>, L>> rangeCards) {
if (cards == null || cards.size() == 0) {
return new LinkedList<>();
}
... | class class_name[name] begin[{]
method[transformCards, return_type[type[List]], modifier[protected], parameter[cards, data, rangeCards]] begin[{]
if[binary_operation[binary_operation[member[.cards], ==, literal[null]], ||, binary_operation[call[cards.size, parameter[]], ==, literal[0]]]] begin[... | annotation[@] identifier[NonNull] Keyword[protected] identifier[List] operator[<] identifier[LayoutHelper] operator[>] identifier[transformCards] operator[SEP] annotation[@] identifier[Nullable] identifier[List] operator[<] identifier[L] operator[>] identifier[cards] , Keyword[final] annotation[@] identifier[NonNull] ... |
public void restore() throws IOException
{
SpoolConfig spoolConfig = new SpoolConfig(fileCleaner);
List<ItemState> listItemState = itemDataChangesLog.getAllStates();
for (int i = 0; i < this.listFixupStream.size(); i++)
{
ItemState itemState = listItemState.get(listFixupStream.get(i... | class class_name[name] begin[{]
method[restore, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[SpoolConfig], spoolConfig]
local_variable[type[List], listItemState]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotatio... | Keyword[public] Keyword[void] identifier[restore] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[SpoolConfig] identifier[spoolConfig] operator[=] Keyword[new] identifier[SpoolConfig] operator[SEP] identifier[fileCleaner] operator[SEP] operator[SEP] identifier[List] operator[<] i... |
private static void encodeKey(ByteBuf buf, byte[] key) {
if (key == null || key.length == 0) {
return;
}
buf.writeBytes(key);
} | class class_name[name] begin[{]
method[encodeKey, return_type[void], modifier[private static], parameter[buf, key]] begin[{]
if[binary_operation[binary_operation[member[.key], ==, literal[null]], ||, binary_operation[member[key.length], ==, literal[0]]]] begin[{]
return[None]
... | Keyword[private] Keyword[static] Keyword[void] identifier[encodeKey] operator[SEP] identifier[ByteBuf] identifier[buf] , Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[||] identifier[key] operator[SEP] identif... |
@Override
public List<Class<?>> getModules() {
return Arrays.asList(
CommunicationsModuleDomModule.class,
DocumentModule.class,
CountryModule.class,
DemoModuleDomSubmodule.class,
DemoAppApplicationModuleFixtureSubmodule.class,
... | class class_name[name] begin[{]
method[getModules, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[call[Arrays.asList, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Communica... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getModules] operator[SEP] operator[SEP] {
Keyword[return] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[CommunicationsModuleD... |
public List evaluate(Record record) {
// fast path (not functionally necessary):
if (fields.size() == 1) {
Object first = fields.get(0);
if (first instanceof String) {
return Collections.singletonList(first);
} else {
String ref = ((Field) first).getName();
if (ref.leng... | class class_name[name] begin[{]
method[evaluate, return_type[type[List]], modifier[public], parameter[record]] begin[{]
if[binary_operation[call[fields.size, parameter[]], ==, literal[1]]] begin[{]
local_variable[type[Object], first]
if[binary_operation[membe... | Keyword[public] identifier[List] identifier[evaluate] operator[SEP] identifier[Record] identifier[record] operator[SEP] {
Keyword[if] operator[SEP] identifier[fields] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] {
identifier[Object] identifier[first] o... |
public static CPDefinition fetchByLtD_S_Last(Date displayDate, int status,
OrderByComparator<CPDefinition> orderByComparator) {
return getPersistence()
.fetchByLtD_S_Last(displayDate, status, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByLtD_S_Last, return_type[type[CPDefinition]], modifier[public static], parameter[displayDate, status, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPDefinition] identifier[fetchByLtD_S_Last] operator[SEP] identifier[Date] identifier[displayDate] , Keyword[int] identifier[status] , identifier[OrderByComparator] operator[<] identifier[CPDefinition] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[... |
public static String addPredicate(String query, String predicateCond) {
if (Strings.isNullOrEmpty(predicateCond)) {
return query;
}
String normalizedQuery = query.toLowerCase().trim();
checkArgument(normalizedQuery.contains(" from "),
"query does not contain 'from': " + query);
... | class class_name[name] begin[{]
method[addPredicate, return_type[type[String]], modifier[public static], parameter[query, predicateCond]] begin[{]
if[call[Strings.isNullOrEmpty, parameter[member[.predicateCond]]]] begin[{]
return[member[.query]]
else begin[{]
None
en... | Keyword[public] Keyword[static] identifier[String] identifier[addPredicate] operator[SEP] identifier[String] identifier[query] , identifier[String] identifier[predicateCond] operator[SEP] {
Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[predicateCo... |
@SuppressWarnings("unchecked")
public static void addExtensionProvider(String elementName, String namespace,
Object provider) {
validate(elementName, namespace);
// First remove existing providers
String key = removeExtensionProvider(elementName, namespace);
if (provider ... | class class_name[name] begin[{]
method[addExtensionProvider, return_type[void], modifier[public static], parameter[elementName, namespace, provider]] begin[{]
call[.validate, parameter[member[.elementName], member[.namespace]]]
local_variable[type[String], key]
if[binary... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[addExtensionProvider] operator[SEP] identifier[String] identifier[elementName] , identifier[String] identifier[namespace] , identifier[Object] identifier[provider] operator[S... |
public static byte[] getSHA256(byte[] input, boolean asSingleton){
if(SHA256_INSTANCE == null){
if(asSingleton){
try {
SHA256_INSTANCE = MessageDigest.getInstance("SHA-256");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
}else{
return getHash("SHA-256", input);
}
... | class class_name[name] begin[{]
method[getSHA256, return_type[type[byte]], modifier[public static], parameter[input, asSingleton]] begin[{]
if[binary_operation[member[.SHA256_INSTANCE], ==, literal[null]]] begin[{]
if[member[.asSingleton]] begin[{]
TrySta... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getSHA256] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[input] , Keyword[boolean] identifier[asSingleton] operator[SEP] {
Keyword[if] operator[SEP] identifier[SHA256_INSTANCE] operator[==] Other[null] oper... |
protected Map<ByteBuffer, AbstractType> getValidatorMap(CfDef cfDef) throws IOException
{
Map<ByteBuffer, AbstractType> validators = new HashMap<ByteBuffer, AbstractType>();
for (ColumnDef cd : cfDef.getColumn_metadata())
{
if (cd.getValidation_class() != null && !cd.getValidatio... | class class_name[name] begin[{]
method[getValidatorMap, return_type[type[Map]], modifier[protected], parameter[cfDef]] begin[{]
local_variable[type[Map], validators]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=... | Keyword[protected] identifier[Map] operator[<] identifier[ByteBuffer] , identifier[AbstractType] operator[>] identifier[getValidatorMap] operator[SEP] identifier[CfDef] identifier[cfDef] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Map] operator[<] identifier[ByteBuffer] , identifier[Abst... |
@Override
public void fatal(String msg, Throwable e) {
log.logIfEnabled(FQCN, Level.FATAL, null, msg, e);
} | class class_name[name] begin[{]
method[fatal, return_type[void], modifier[public], parameter[msg, e]] begin[{]
call[log.logIfEnabled, parameter[member[.FQCN], member[Level.FATAL], literal[null], member[.msg], member[.e]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[fatal] operator[SEP] identifier[String] identifier[msg] , identifier[Throwable] identifier[e] operator[SEP] {
identifier[log] operator[SEP] identifier[logIfEnabled] operator[SEP] identifier[FQCN] , identifier[Level] operator[SEP] ident... |
static public double[] regres(Vec xData, Vec yData)
{
//find y = a + B *x
double[] toReturn = new double[2];
//B value
toReturn[1] = DescriptiveStatistics.sampleCorCoeff(xData, yData)*yData.standardDeviation()/xData.standardDeviation();
//a value
toReturn[0] = yData.... | class class_name[name] begin[{]
method[regres, return_type[type[double]], modifier[public static], parameter[xData, yData]] begin[{]
local_variable[type[double], toReturn]
assign[member[.toReturn], binary_operation[binary_operation[call[DescriptiveStatistics.sampleCorCoeff, parameter[me... | Keyword[static] Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[regres] operator[SEP] identifier[Vec] identifier[xData] , identifier[Vec] identifier[yData] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[toReturn] operator[=] Keyword[new] Keyword[double] operator[SE... |
@Override
public Request<DescribeFpgaImagesRequest> getDryRunRequest() {
Request<DescribeFpgaImagesRequest> request = new DescribeFpgaImagesRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | class class_name[name] begin[{]
method[getDryRunRequest, return_type[type[Request]], modifier[public], parameter[]] begin[{]
local_variable[type[Request], request]
call[request.addParameter, parameter[literal["DryRun"], call[Boolean.toString, parameter[literal[true]]]]]
return[m... | annotation[@] identifier[Override] Keyword[public] identifier[Request] operator[<] identifier[DescribeFpgaImagesRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] {
identifier[Request] operator[<] identifier[DescribeFpgaImagesRequest] operator[>] identifier[request] operator[=] Keyword... |
@Override
public synchronized void removeEndpoint(QName serviceName, String endpoint)
throws ServiceLocatorException, InterruptedException {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Removing endpoint " + endpoint + " for service " + serviceName + "...");
}
RootNod... | class class_name[name] begin[{]
method[removeEndpoint, return_type[void], modifier[synchronized public], parameter[serviceName, endpoint]] begin[{]
if[call[LOG.isLoggable, parameter[member[Level.FINE]]]] begin[{]
call[LOG.fine, parameter[binary_operation[binary_operation... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[removeEndpoint] operator[SEP] identifier[QName] identifier[serviceName] , identifier[String] identifier[endpoint] operator[SEP] Keyword[throws] identifier[ServiceLocatorException] , identifier[InterruptedException] {
... |
private <T> Observable<PollingState<T>> pollPostOrDeleteAsync(final PollingState<T> pollingState, final Type resourceType) {
pollingState.withResourceType(resourceType);
pollingState.withSerializerAdapter(restClient().serializerAdapter());
return Observable.just(true)
.flatMap(ne... | class class_name[name] begin[{]
method[pollPostOrDeleteAsync, return_type[type[Observable]], modifier[private], parameter[pollingState, resourceType]] begin[{]
call[pollingState.withResourceType, parameter[member[.resourceType]]]
call[pollingState.withSerializerAdapter, paramete... | Keyword[private] operator[<] identifier[T] operator[>] identifier[Observable] operator[<] identifier[PollingState] operator[<] identifier[T] operator[>] operator[>] identifier[pollPostOrDeleteAsync] operator[SEP] Keyword[final] identifier[PollingState] operator[<] identifier[T] operator[>] identifier[pollingState] , K... |
public static String getValue(Manifest manifest, Attributes.Name name) {
String value = manifest.getMainAttributes().getValue(name);
if (value == null) {
for (Attributes attributes : manifest.getEntries().values()) {
value = attributes.getValue(name);
}
}
return value;
} | class class_name[name] begin[{]
method[getValue, return_type[type[String]], modifier[public static], parameter[manifest, name]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
ForStatement(body=BlockStatement(labe... | Keyword[public] Keyword[static] identifier[String] identifier[getValue] operator[SEP] identifier[Manifest] identifier[manifest] , identifier[Attributes] operator[SEP] identifier[Name] identifier[name] operator[SEP] {
identifier[String] identifier[value] operator[=] identifier[manifest] operator[SEP] identifier[... |
@Override
public String exportTransaction() throws SystemException {
// blow up if there's no tran
final UOWCoordinator uowCoord = _uowc.getUOWCoord();
if (uowCoord == null || !uowCoord.isGlobal()) {
throw new SystemException("No global transaction");
}
// TODO ... | class class_name[name] begin[{]
method[exportTransaction, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[UOWCoordinator], uowCoord]
if[binary_operation[binary_operation[member[.uowCoord], ==, literal[null]], ||, call[uowCoord.isGlobal, parameter[]... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[exportTransaction] operator[SEP] operator[SEP] Keyword[throws] identifier[SystemException] {
Keyword[final] identifier[UOWCoordinator] identifier[uowCoord] operator[=] identifier[_uowc] operator[SEP] identifier[getUOWCoord] operator... |
public Map<Long, Integer> computeDays(List<Long> sortedDates) {
if (sortedDates.isEmpty()) {
return Collections.<Long, Integer> emptyMap();
}
Map<Long, Integer> days = new HashMap<Long, Integer>();
long lastDate = System.currentTimeMillis();
int dayCounter = 0;
... | class class_name[name] begin[{]
method[computeDays, return_type[type[Map]], modifier[public], parameter[sortedDates]] begin[{]
if[call[sortedDates.isEmpty, parameter[]]] begin[{]
return[call[.Collections, parameter[]]]
else begin[{]
None
end[}]
local_variable... | Keyword[public] identifier[Map] operator[<] identifier[Long] , identifier[Integer] operator[>] identifier[computeDays] operator[SEP] identifier[List] operator[<] identifier[Long] operator[>] identifier[sortedDates] operator[SEP] {
Keyword[if] operator[SEP] identifier[sortedDates] operator[SEP] identifier[isEmpt... |
static public String showRequestDetail(HttpServletRequest req) {
StringBuilder sbuff = new StringBuilder();
sbuff.append("Request Info\n");
sbuff.append(" req.getServerName(): ").append(req.getServerName()).append("\n");
sbuff.append(" req.getServerPort(): ").append(req.getServerPort()).append("\n... | class class_name[name] begin[{]
method[showRequestDetail, return_type[type[String]], modifier[public static], parameter[req]] begin[{]
local_variable[type[StringBuilder], sbuff]
call[sbuff.append, parameter[literal["Request Info\n"]]]
call[sbuff.append, parameter[literal... | Keyword[static] Keyword[public] identifier[String] identifier[showRequestDetail] operator[SEP] identifier[HttpServletRequest] identifier[req] operator[SEP] {
identifier[StringBuilder] identifier[sbuff] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sbuff] ... |
public AbstractBuilder getFieldBuilder(ClassWriter classWriter)
throws Exception {
return FieldBuilder.getInstance(context, classWriter.getClassDoc(),
writerFactory.getFieldWriter(classWriter));
} | class class_name[name] begin[{]
method[getFieldBuilder, return_type[type[AbstractBuilder]], modifier[public], parameter[classWriter]] begin[{]
return[call[FieldBuilder.getInstance, parameter[member[.context], call[classWriter.getClassDoc, parameter[]], call[writerFactory.getFieldWriter, parameter[membe... | Keyword[public] identifier[AbstractBuilder] identifier[getFieldBuilder] operator[SEP] identifier[ClassWriter] identifier[classWriter] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[FieldBuilder] operator[SEP] identifier[getInstance] operator[SEP] identifier[context] , identifie... |
public int read(byte b[], int off, int len) {
if (b == null) {
throw new NullPointerException();
}
else if (off < 0 || len < 0 || len > b.length - off) {
throw new IndexOutOfBoundsException();
}
if (pos >= count) {
return -1;
}
... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[b, off, len]] begin[{]
if[binary_operation[member[.b], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postf... | Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] identifier[b] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] {
Keyword[if] operator[SEP] identifier[b] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[ne... |
public void encodeData(AsnOutputStream asnOs) throws MAPException {
try {
if (this.choice == null)
throw new MAPException("Error while encoding the " + _PrimitiveName + ": choice is not defined");
if ((this.choice == PSSubscriberStateChoice.psPDPActiveNotReachableForPag... | class class_name[name] begin[{]
method[encodeData, return_type[void], modifier[public], parameter[asnOs]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=choice, postfix_operato... | Keyword[public] Keyword[void] identifier[encodeData] operator[SEP] identifier[AsnOutputStream] identifier[asnOs] operator[SEP] Keyword[throws] identifier[MAPException] {
Keyword[try] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[choice] operator[==] Other[null] operator[SEP] Keywo... |
public BoundingBox getBoundingBox(Projection projection) {
ProjectionTransform webMercatorToProjection = ProjectionFactory
.getProjection(ProjectionConstants.EPSG_WEB_MERCATOR)
.getTransformation(projection);
return webMercatorBoundingBox
.transform(webMer... | class class_name[name] begin[{]
method[getBoundingBox, return_type[type[BoundingBox]], modifier[public], parameter[projection]] begin[{]
local_variable[type[ProjectionTransform], webMercatorToProjection]
return[call[webMercatorBoundingBox.transform, parameter[member[.webMercatorToProjection]]]]... | Keyword[public] identifier[BoundingBox] identifier[getBoundingBox] operator[SEP] identifier[Projection] identifier[projection] operator[SEP] {
identifier[ProjectionTransform] identifier[webMercatorToProjection] operator[=] identifier[ProjectionFactory] operator[SEP] identifier[getProjection] operator[SEP] identi... |
public String generateHELMFromFastaNucleotide(String notation)
throws FastaFormatException, org.helm.notation2.parser.exceptionparser.NotationException,
ChemistryException, MonomerLoadingException, NucleotideLoadingException {
String result = FastaFormat.generateRNAPolymersFromFastaFormatHELM1(notation).toHE... | class class_name[name] begin[{]
method[generateHELMFromFastaNucleotide, return_type[type[String]], modifier[public], parameter[notation]] begin[{]
local_variable[type[String], result]
call[.setMonomerFactoryToDefault, parameter[member[.notation]]]
return[member[.result]]
end... | Keyword[public] identifier[String] identifier[generateHELMFromFastaNucleotide] operator[SEP] identifier[String] identifier[notation] operator[SEP] Keyword[throws] identifier[FastaFormatException] , identifier[org] operator[SEP] identifier[helm] operator[SEP] identifier[notation2] operator[SEP] identifier[parser] opera... |
public void marshall(PutApprovalResultRequest putApprovalResultRequest, ProtocolMarshaller protocolMarshaller) {
if (putApprovalResultRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(putAppr... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[putApprovalResultRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.putApprovalResultRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[PutApprovalResultRequest] identifier[putApprovalResultRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[putApprovalResultRequest] operator[==] Other[null] opera... |
private Producer<EncodedImage> newEncodedCacheMultiplexToTranscodeSequence(
Producer<EncodedImage> inputProducer) {
if (WebpSupportStatus.sIsWebpSupportRequired &&
(!mWebpSupportEnabled || WebpSupportStatus.sWebpBitmapFactory == null)) {
inputProducer = mProducerFactory.newWebpTranscodeProducer(... | class class_name[name] begin[{]
method[newEncodedCacheMultiplexToTranscodeSequence, return_type[type[Producer]], modifier[private], parameter[inputProducer]] begin[{]
if[binary_operation[member[WebpSupportStatus.sIsWebpSupportRequired], &&, binary_operation[member[.mWebpSupportEnabled], ||, bin... | Keyword[private] identifier[Producer] operator[<] identifier[EncodedImage] operator[>] identifier[newEncodedCacheMultiplexToTranscodeSequence] operator[SEP] identifier[Producer] operator[<] identifier[EncodedImage] operator[>] identifier[inputProducer] operator[SEP] {
Keyword[if] operator[SEP] identifier[WebpSup... |
public ValidationConfigType<T> constraintMapping(String ... values)
{
if (values != null)
{
for(String name: values)
{
childNode.createChild("constraint-mapping").text(name);
}
}
return this;
} | class class_name[name] begin[{]
method[constraintMapping, return_type[type[ValidationConfigType]], modifier[public], parameter[values]] begin[{]
if[binary_operation[member[.values], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpres... | Keyword[public] identifier[ValidationConfigType] operator[<] identifier[T] operator[>] identifier[constraintMapping] operator[SEP] identifier[String] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] identifier[values] operator[!=] Other[null] operator[SEP] {
Keyword[for] oper... |
public Observable<ServiceResponseWithHeaders<Void, PoolDisableAutoScaleHeaders>> disableAutoScaleWithServiceResponseAsync(String poolId) {
if (this.client.batchUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.batchUrl() is required and cannot be null.");
}
i... | class class_name[name] begin[{]
method[disableAutoScaleWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[poolId]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.batchUrl, parameter[]]], ==, literal[null]]] begin[{]
ThrowStatement(ex... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Void] , identifier[PoolDisableAutoScaleHeaders] operator[>] operator[>] identifier[disableAutoScaleWithServiceResponseAsync] operator[SEP] identifier[String] identifier[poolId] operator[SEP] {
Keywor... |
public void marshall(DeleteDynamicThingGroupRequest deleteDynamicThingGroupRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteDynamicThingGroupRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshalle... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteDynamicThingGroupRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteDynamicThingGroupRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCrea... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteDynamicThingGroupRequest] identifier[deleteDynamicThingGroupRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteDynamicThingGroupRequest] operator[==]... |
public byte[] init(byte[] key){
keySize = key.length;
byte[] iv = new byte[keySize];
new SecureRandom().nextBytes(iv);
init(iv, key);
return iv;
} | class class_name[name] begin[{]
method[init, return_type[type[byte]], modifier[public], parameter[key]] begin[{]
assign[member[.keySize], member[key.length]]
local_variable[type[byte], iv]
ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_ope... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[init] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
identifier[keySize] operator[=] identifier[key] operator[SEP] identifier[length] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[iv... |
@Nonnull
@ReturnsMutableCopy
public ICommonsMap <String, String> parse (@Nullable final String sStr, @Nullable final char [] aSeparators)
{
if (ArrayHelper.isEmpty (aSeparators))
return new CommonsHashMap <> ();
char cSep = aSeparators[0];
if (sStr != null)
{
// Find the first separat... | class class_name[name] begin[{]
method[parse, return_type[type[ICommonsMap]], modifier[public], parameter[sStr, aSeparators]] begin[{]
if[call[ArrayHelper.isEmpty, parameter[member[.aSeparators]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_op... | annotation[@] identifier[Nonnull] annotation[@] identifier[ReturnsMutableCopy] Keyword[public] identifier[ICommonsMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[parse] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sStr] , annotation[@] i... |
public void registerDataSource(String name, DataSource dataSource) {
if (dataSource == null) {
throw new NullPointerException("dataSource");
}
if (StringUtils.isBlank(name)) {
throw new IllegalArgumentException("blank name");
}
if (name.equals("*")) {
... | class class_name[name] begin[{]
method[registerDataSource, return_type[void], modifier[public], parameter[name, dataSource]] begin[{]
if[binary_operation[member[.dataSource], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[],... | Keyword[public] Keyword[void] identifier[registerDataSource] operator[SEP] identifier[String] identifier[name] , identifier[DataSource] identifier[dataSource] operator[SEP] {
Keyword[if] operator[SEP] identifier[dataSource] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifi... |
protected PosSize guessNextBGZFPos(int p, int end) {
try { for (;;) {
for (;;) {
in.seek(p);
IOUtils.readFully(in, buf.array(), 0, 4);
int n = buf.getInt(0);
if (n == BGZF_MAGIC)
break;
// Skip ahead a bit more than 1 byte if you can.
if (n >>> 8 == ... | class class_name[name] begin[{]
method[guessNextBGZFPos, return_type[type[PosSize]], modifier[protected], parameter[p, end]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Meth... | Keyword[protected] identifier[PosSize] identifier[guessNextBGZFPos] operator[SEP] Keyword[int] identifier[p] , Keyword[int] identifier[end] operator[SEP] {
Keyword[try] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] ope... |
public alluxio.grpc.WorkerInfoField getFieldRanges(int index) {
return fieldRanges_converter_.convert(fieldRanges_.get(index));
} | class class_name[name] begin[{]
method[getFieldRanges, return_type[type[alluxio]], modifier[public], parameter[index]] begin[{]
return[call[fieldRanges_converter_.convert, parameter[call[fieldRanges_.get, parameter[member[.index]]]]]]
end[}]
END[}] | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[WorkerInfoField] identifier[getFieldRanges] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[return] identifier[fieldRanges_converter_] operator[SEP] identifier[convert] operator[SEP] identifier[fieldR... |
public List<MappedClass> getSubTypes(final MappedClass mc) {
List<MappedClass> subtypes = new ArrayList<MappedClass>();
for (MappedClass mappedClass : getMappedClasses()) {
if (mappedClass.isSubType(mc)) {
subtypes.add(mappedClass);
}
}
return sub... | class class_name[name] begin[{]
method[getSubTypes, return_type[type[List]], modifier[public], parameter[mc]] begin[{]
local_variable[type[List], subtypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=mc, postf... | Keyword[public] identifier[List] operator[<] identifier[MappedClass] operator[>] identifier[getSubTypes] operator[SEP] Keyword[final] identifier[MappedClass] identifier[mc] operator[SEP] {
identifier[List] operator[<] identifier[MappedClass] operator[>] identifier[subtypes] operator[=] Keyword[new] identifier[Ar... |
private boolean is(Type formalType) {
if (runtimeType.equals(formalType)) {
return true;
}
if (formalType instanceof WildcardType) {
// if "formalType" is <? extends Foo>, "this" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
... | class class_name[name] begin[{]
method[is, return_type[type[boolean]], modifier[private], parameter[formalType]] begin[{]
if[call[runtimeType.equals, parameter[member[.formalType]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[binary_o... | Keyword[private] Keyword[boolean] identifier[is] operator[SEP] identifier[Type] identifier[formalType] operator[SEP] {
Keyword[if] operator[SEP] identifier[runtimeType] operator[SEP] identifier[equals] operator[SEP] identifier[formalType] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] ... |
public <E> E getFieldValue(ProfileField<E> field) {
if (field == null) {
throw new NullPointerException();
}
String val = mFields.getString(field.getIdentifier());
return val == null ? null : ProfileFieldConverter.forField(field).fromStorageString(val);
} | class class_name[name] begin[{]
method[getFieldValue, return_type[type[E]], modifier[public], parameter[field]] begin[{]
if[binary_operation[member[.field], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, ... | Keyword[public] operator[<] identifier[E] operator[>] identifier[E] identifier[getFieldValue] operator[SEP] identifier[ProfileField] operator[<] identifier[E] operator[>] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] {
Keyword[thro... |
@Override
public Object convertRequest(ServiceRequestContext ctx, AggregatedHttpMessage request,
Class<?> expectedResultType) throws Exception {
if (expectedResultType == String.class ||
expectedResultType == CharSequence.class) {
final MediaType cont... | class class_name[name] begin[{]
method[convertRequest, return_type[type[Object]], modifier[public], parameter[ctx, request, expectedResultType]] begin[{]
if[binary_operation[binary_operation[member[.expectedResultType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, s... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[convertRequest] operator[SEP] identifier[ServiceRequestContext] identifier[ctx] , identifier[AggregatedHttpMessage] identifier[request] , identifier[Class] operator[<] operator[?] operator[>] identifier[expectedResultType] operator[SEP] ... |
public synchronized void process(GrayF32 image, List<Point2D_F64> sides) {
if( sides.size() != 4 )
throw new IllegalArgumentException("Expected 4 sidesCollision");
updateScore(image,sides);
if( currentScore < bestScore ) {
bestScore = currentScore;
if( bestImage == null ) {
bestImage = new Buffered... | class class_name[name] begin[{]
method[process, return_type[void], modifier[synchronized public], parameter[image, sides]] begin[{]
if[binary_operation[call[sides.size, parameter[]], !=, literal[4]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[process] operator[SEP] identifier[GrayF32] identifier[image] , identifier[List] operator[<] identifier[Point2D_F64] operator[>] identifier[sides] operator[SEP] {
Keyword[if] operator[SEP] identifier[sides] operator[SEP] identifier[size] operator[SEP... |
public Where<T, ID> idEq(ID id) throws SQLException {
if (idColumnName == null) {
throw new SQLException("Object has no id column specified");
}
addClause(new SimpleComparison(idColumnName, idFieldType, id, SimpleComparison.EQUAL_TO_OPERATION));
return this;
} | class class_name[name] begin[{]
method[idEq, return_type[type[Where]], modifier[public], parameter[id]] begin[{]
if[binary_operation[member[.idColumnName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[... | Keyword[public] identifier[Where] operator[<] identifier[T] , identifier[ID] operator[>] identifier[idEq] operator[SEP] identifier[ID] identifier[id] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[idColumnName] operator[==] Other[null] operator[SEP] {
Ke... |
public void error(Object m, Throwable t) {
logger.error(String.valueOf(m), t);
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[public], parameter[m, t]] begin[{]
call[logger.error, parameter[call[String.valueOf, parameter[member[.m]]], member[.t]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[error] operator[SEP] identifier[Object] identifier[m] , identifier[Throwable] identifier[t] operator[SEP] {
identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[m] operator[SEP] , ... |
public GOVMinimalPerfectHashFunction<T> build() throws IOException {
if (built) throw new IllegalStateException("This builder has been already used");
built = true;
if (transform == null) {
if (chunkedHashStore != null) transform = chunkedHashStore.transform();
else throw new IllegalArgumentException("... | class class_name[name] begin[{]
method[build, return_type[type[GOVMinimalPerfectHashFunction]], modifier[public], parameter[]] begin[{]
if[member[.built]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], ... | Keyword[public] identifier[GOVMinimalPerfectHashFunction] operator[<] identifier[T] operator[>] identifier[build] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[built] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[... |
public final void mAND() throws RecognitionException {
try {
int _type = AND;
int _channel = DEFAULT_TOKEN_CHANNEL;
// EventFilter.g:33:5: ( 'and' )
// EventFilter.g:33:7: 'and'
{
match("and");
}
state.type = _t... | class class_name[name] begin[{]
method[mAND, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=AND, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[final] Keyword[void] identifier[mAND] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[AND] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CH... |
public CloudTask get(String jobId, String taskId) {
return getWithServiceResponseAsync(jobId, taskId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[CloudTask]], modifier[public], parameter[jobId, taskId]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.jobId], member[.taskId]]]]
end[}]
END[}] | Keyword[public] identifier[CloudTask] identifier[get] operator[SEP] identifier[String] identifier[jobId] , identifier[String] identifier[taskId] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[jobId] , identifier[taskId] operator[SEP] operator[SEP] identifier[to... |
public static Expression millisToStr(String expression, String format) {
return millisToStr(x(expression), format);
} | class class_name[name] begin[{]
method[millisToStr, return_type[type[Expression]], modifier[public static], parameter[expression, format]] begin[{]
return[call[.millisToStr, parameter[call[.x, parameter[member[.expression]]], member[.format]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Expression] identifier[millisToStr] operator[SEP] identifier[String] identifier[expression] , identifier[String] identifier[format] operator[SEP] {
Keyword[return] identifier[millisToStr] operator[SEP] identifier[x] operator[SEP] identifier[expression] operator[SEP] , ... |
protected static void validateExpression(FacesContext context, UIComponent source,
String expression, char separatorChar) {
if (context.isProjectStage(ProjectStage.Development)) {
// checks the whole expression doesn't start with ":@"
// keywords are always related to the c... | class class_name[name] begin[{]
method[validateExpression, return_type[void], modifier[static protected], parameter[context, source, expression, separatorChar]] begin[{]
if[call[context.isProjectStage, parameter[member[ProjectStage.Development]]]] begin[{]
if[call[expres... | Keyword[protected] Keyword[static] Keyword[void] identifier[validateExpression] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[source] , identifier[String] identifier[expression] , Keyword[char] identifier[separatorChar] operator[SEP] {
Keyword[if] operator[SEP... |
private List<Entity> findAllBatch(List<Object> ids) {
String entityTypeId = getEntityType().getId();
Multimap<Boolean, Object> partitionedIds =
Multimaps.index(
ids, id -> transactionInformation.isEntityDirty(EntityKey.create(entityTypeId, id)));
Collection<Object> cleanIds = partitioned... | class class_name[name] begin[{]
method[findAllBatch, return_type[type[List]], modifier[private], parameter[ids]] begin[{]
local_variable[type[String], entityTypeId]
local_variable[type[Multimap], partitionedIds]
local_variable[type[Collection], cleanIds]
local_variable[type[Coll... | Keyword[private] identifier[List] operator[<] identifier[Entity] operator[>] identifier[findAllBatch] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[ids] operator[SEP] {
identifier[String] identifier[entityTypeId] operator[=] identifier[getEntityType] operator[SEP] operator[... |
public void put(int index, long value) {
if(desc.get(index) != Cursor.FIELD_TYPE_INTEGER) {
throw new IllegalArgumentException("Inserting an integer, but expecting " + getTypeName(desc.get(index)));
}
this.values.add(index, value);
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[index, value]] begin[{]
if[binary_operation[call[desc.get, parameter[member[.index]]], !=, member[Cursor.FIELD_TYPE_INTEGER]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Binary... | Keyword[public] Keyword[void] identifier[put] operator[SEP] Keyword[int] identifier[index] , Keyword[long] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[desc] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[!=] identifier[Cursor] operator[SEP] identi... |
public static String getZooKeeperEnsemble(Configuration flinkConf)
throws IllegalConfigurationException {
String zkQuorum = flinkConf.getValue(HighAvailabilityOptions.HA_ZOOKEEPER_QUORUM);
if (zkQuorum == null || StringUtils.isBlank(zkQuorum)) {
throw new IllegalConfigurationException("No ZooKeeper quorum s... | class class_name[name] begin[{]
method[getZooKeeperEnsemble, return_type[type[String]], modifier[public static], parameter[flinkConf]] begin[{]
local_variable[type[String], zkQuorum]
if[binary_operation[binary_operation[member[.zkQuorum], ==, literal[null]], ||, call[StringUtils.isBlank... | Keyword[public] Keyword[static] identifier[String] identifier[getZooKeeperEnsemble] operator[SEP] identifier[Configuration] identifier[flinkConf] operator[SEP] Keyword[throws] identifier[IllegalConfigurationException] {
identifier[String] identifier[zkQuorum] operator[=] identifier[flinkConf] operator[SEP] ident... |
public void setLocale(Object loc) throws JspTagException {
if (loc == null
|| (loc instanceof String && ((String) loc).length() == 0)) {
this.locale = null;
} else if (loc instanceof Locale) {
this.locale = (Locale) loc;
} else {
locale = Util.... | class class_name[name] begin[{]
method[setLocale, return_type[void], modifier[public], parameter[loc]] begin[{]
if[binary_operation[binary_operation[member[.loc], ==, literal[null]], ||, binary_operation[binary_operation[member[.loc], instanceof, type[String]], &&, binary_operation[Cast(express... | Keyword[public] Keyword[void] identifier[setLocale] operator[SEP] identifier[Object] identifier[loc] operator[SEP] Keyword[throws] identifier[JspTagException] {
Keyword[if] operator[SEP] identifier[loc] operator[==] Other[null] operator[||] operator[SEP] identifier[loc] Keyword[instanceof] identifier[String] ope... |
public static Weeks standardWeeksIn(ReadablePeriod period) {
int amount = BaseSingleFieldPeriod.standardPeriodIn(period, DateTimeConstants.MILLIS_PER_WEEK);
return Weeks.weeks(amount);
} | class class_name[name] begin[{]
method[standardWeeksIn, return_type[type[Weeks]], modifier[public static], parameter[period]] begin[{]
local_variable[type[int], amount]
return[call[Weeks.weeks, parameter[member[.amount]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Weeks] identifier[standardWeeksIn] operator[SEP] identifier[ReadablePeriod] identifier[period] operator[SEP] {
Keyword[int] identifier[amount] operator[=] identifier[BaseSingleFieldPeriod] operator[SEP] identifier[standardPeriodIn] operator[SEP] identifier[period] , id... |
public void setResults(com.google.api.ads.admanager.axis.v201902.LineItemCreativeAssociation[] results) {
this.results = results;
} | class class_name[name] begin[{]
method[setResults, return_type[void], modifier[public], parameter[results]] begin[{]
assign[THIS[member[None.results]], member[.results]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setResults] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[LineItemCreativeAs... |
public static Request newUpdateOpenGraphObjectRequest(Session session, OpenGraphObject openGraphObject,
Callback callback) {
if (openGraphObject == null) {
throw new FacebookException("openGraphObject cannot be null");
}
String path = openGraphObject.getId();
if ... | class class_name[name] begin[{]
method[newUpdateOpenGraphObjectRequest, return_type[type[Request]], modifier[public static], parameter[session, openGraphObject, callback]] begin[{]
if[binary_operation[member[.openGraphObject], ==, literal[null]]] begin[{]
ThrowStatement(expression=C... | Keyword[public] Keyword[static] identifier[Request] identifier[newUpdateOpenGraphObjectRequest] operator[SEP] identifier[Session] identifier[session] , identifier[OpenGraphObject] identifier[openGraphObject] , identifier[Callback] identifier[callback] operator[SEP] {
Keyword[if] operator[SEP] identifier[openGr... |
public List<JspConfigType<WebAppType<T>>> getAllJspConfig()
{
List<JspConfigType<WebAppType<T>>> list = new ArrayList<JspConfigType<WebAppType<T>>>();
List<Node> nodeList = childNode.get("jsp-config");
for(Node node: nodeList)
{
JspConfigType<WebAppType<T>> type = new JspConfigTypeI... | class class_name[name] begin[{]
method[getAllJspConfig, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], list]
local_variable[type[List], nodeList]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[]... | Keyword[public] identifier[List] operator[<] identifier[JspConfigType] operator[<] identifier[WebAppType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllJspConfig] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[JspConfigType] operator[<] identifier[WebAppTyp... |
public void updateInsideEntryTerminal(int spanStart, int spanEnd,
int terminalSpanStart, int terminalSpanEnd, Factor factor) {
Preconditions.checkArgument(factor.getVars().size() == 2);
// The first entry initializes the chart at this span.
if (sumProduct) {
updateEntrySumProduct(insideChart[spa... | class class_name[name] begin[{]
method[updateInsideEntryTerminal, return_type[void], modifier[public], parameter[spanStart, spanEnd, terminalSpanStart, terminalSpanEnd, factor]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[call[factor.getVars, parameter[]], ==, literal[... | Keyword[public] Keyword[void] identifier[updateInsideEntryTerminal] operator[SEP] Keyword[int] identifier[spanStart] , Keyword[int] identifier[spanEnd] , Keyword[int] identifier[terminalSpanStart] , Keyword[int] identifier[terminalSpanEnd] , identifier[Factor] identifier[factor] operator[SEP] {
identifier[Pr... |
public static TimePartitioning of(Type type, long expirationMs) {
return newBuilder(type).setExpirationMs(expirationMs).build();
} | class class_name[name] begin[{]
method[of, return_type[type[TimePartitioning]], modifier[public static], parameter[type, expirationMs]] begin[{]
return[call[.newBuilder, parameter[member[.type]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[TimePartitioning] identifier[of] operator[SEP] identifier[Type] identifier[type] , Keyword[long] identifier[expirationMs] operator[SEP] {
Keyword[return] identifier[newBuilder] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[setExpirationMs] opera... |
@Override
public void setAttribute(ObjectName name,
Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, IOException {
final String sourceMethod = "setAttribute";
checkConn... | class class_name[name] begin[{]
method[setAttribute, return_type[void], modifier[public], parameter[name, attribute]] begin[{]
local_variable[type[String], sourceMethod]
call[.checkConnection, parameter[]]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
T... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] identifier[ObjectName] identifier[name] , identifier[Attribute] identifier[attribute] operator[SEP] Keyword[throws] identifier[InstanceNotFoundException] , identifier[AttributeNotFoundException] , identifier[Inval... |
private static char[] createSha512Hash(final char[] password) {
try {
final MessageDigest digest = MessageDigest.getInstance("SHA-512");
digest.update(ByteUtil.toBytes(password));
final byte[] byteData = digest.digest();
final StringBuilder sb = new StringBuilder... | class class_name[name] begin[{]
method[createSha512Hash, return_type[type[char]], modifier[private static], parameter[password]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_o... | Keyword[private] Keyword[static] Keyword[char] operator[SEP] operator[SEP] identifier[createSha512Hash] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[password] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[MessageDigest] identifier[digest] operator[=] ide... |
private SmbResource advance () {
while ( this.delegate.hasNext() ) {
FileEntry fe = this.delegate.next();
if ( this.filter == null ) {
try {
return adapt(fe);
}
catch ( MalformedURLException e ) {
log... | class class_name[name] begin[{]
method[advance, return_type[type[SmbResource]], modifier[private], parameter[]] begin[{]
while[THIS[member[None.delegate]call[None.hasNext, parameter[]]]] begin[{]
local_variable[type[FileEntry], fe]
if[binary_operation[THIS[me... | Keyword[private] identifier[SmbResource] identifier[advance] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[delegate] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[FileEntry] identifier[fe] operator[=] Keywor... |
public Map<String, String> results(OutputVariable outputVariable) {
return results(outputVariable, TimeUnit.NanoSeconds);
} | class class_name[name] begin[{]
method[results, return_type[type[Map]], modifier[public], parameter[outputVariable]] begin[{]
return[call[.results, parameter[member[.outputVariable], member[TimeUnit.NanoSeconds]]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[results] operator[SEP] identifier[OutputVariable] identifier[outputVariable] operator[SEP] {
Keyword[return] identifier[results] operator[SEP] identifier[outputVariable] , identifier[TimeUnit] operator[SE... |
static int getBackoff(Context context) {
final SharedPreferences prefs = getGCMPreferences(context);
return prefs.getInt(BACKOFF_MS, DEFAULT_BACKOFF_MS);
} | class class_name[name] begin[{]
method[getBackoff, return_type[type[int]], modifier[static], parameter[context]] begin[{]
local_variable[type[SharedPreferences], prefs]
return[call[prefs.getInt, parameter[member[.BACKOFF_MS], member[.DEFAULT_BACKOFF_MS]]]]
end[}]
END[}] | Keyword[static] Keyword[int] identifier[getBackoff] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[final] identifier[SharedPreferences] identifier[prefs] operator[=] identifier[getGCMPreferences] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] identifi... |
@Override
public <T> T getInjectionTargetContextData(Class<T> data)
{
if (data.isAssignableFrom(getClass()))
return data.cast(this);
// Return null if requested context data is not available
return null;
} | class class_name[name] begin[{]
method[getInjectionTargetContextData, return_type[type[T]], modifier[public], parameter[data]] begin[{]
if[call[data.isAssignableFrom, parameter[call[.getClass, parameter[]]]]] begin[{]
return[call[data.cast, parameter[THIS[]]]]
else begin[{]
None
... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getInjectionTargetContextData] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[SEP] identifi... |
public static <O> Cli<O> createCliUsingInstance(final O options) throws InvalidOptionSpecificationException
{
return new CliInstanceImpl<O>(options);
} | class class_name[name] begin[{]
method[createCliUsingInstance, return_type[type[Cli]], modifier[public static], parameter[options]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_... | Keyword[public] Keyword[static] operator[<] identifier[O] operator[>] identifier[Cli] operator[<] identifier[O] operator[>] identifier[createCliUsingInstance] operator[SEP] Keyword[final] identifier[O] identifier[options] operator[SEP] Keyword[throws] identifier[InvalidOptionSpecificationException] {
Keyword[ret... |
public static boolean disjoint(Collection<?> c1, Collection<?> c2) {
// The collection to be used for contains(). Preference is given to
// the collection who's contains() has lower O() complexity.
Collection<?> contains = c2;
// The collection to be iterated. If the collections' contain... | class class_name[name] begin[{]
method[disjoint, return_type[type[boolean]], modifier[public static], parameter[c1, c2]] begin[{]
local_variable[type[Collection], contains]
local_variable[type[Collection], iterate]
if[binary_operation[member[.c1], instanceof, type[Set]]] begin[{... | Keyword[public] Keyword[static] Keyword[boolean] identifier[disjoint] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[c1] , identifier[Collection] operator[<] operator[?] operator[>] identifier[c2] operator[SEP] {
identifier[Collection] operator[<] operator[?] operator[>] ide... |
public Set<Object> getAllSources() {
Set<Object> allSources = new LinkedHashSet<>();
if (!CollectionUtils.isEmpty(this.primarySources)) {
allSources.addAll(this.primarySources);
}
if (!CollectionUtils.isEmpty(this.sources)) {
allSources.addAll(this.sources);
}
return Collections.unmodifiableSet(allSou... | class class_name[name] begin[{]
method[getAllSources, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], allSources]
if[call[CollectionUtils.isEmpty, parameter[THIS[member[None.primarySources]]]]] begin[{]
call[allSources.ad... | Keyword[public] identifier[Set] operator[<] identifier[Object] operator[>] identifier[getAllSources] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[Object] operator[>] identifier[allSources] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] operator[SE... |
static <INN extends CoreMap & HasWord> void mergeTwoDocumentsByLongestSequence(
List<INN> mainDocument,
List<INN> auxDocument,
Set<String> auxLabels,
String background ) {
class Sequence {
String type;
int start;
int len;
Sequence (String type, int start, int len) {
this.t... | class class_name[name] begin[{]
method[mergeTwoDocumentsByLongestSequence, return_type[void], modifier[static], parameter[mainDocument, auxDocument, auxLabels, background]] begin[{]
class class_name[Sequence] begin[{]
type[String] field[type]
typ... | Keyword[static] operator[<] identifier[INN] Keyword[extends] identifier[CoreMap] operator[&] identifier[HasWord] operator[>] Keyword[void] identifier[mergeTwoDocumentsByLongestSequence] operator[SEP] identifier[List] operator[<] identifier[INN] operator[>] identifier[mainDocument] , identifier[List] operator[<] identi... |
@Override
public synchronized void start() {
startTime = System.currentTimeMillis();
ensureCurrentState(STATE.INITED);
changeState(STATE.STARTED);
LOG.info("Service:" + getName() + " is started.");
} | class class_name[name] begin[{]
method[start, return_type[void], modifier[synchronized public], parameter[]] begin[{]
assign[member[.startTime], call[System.currentTimeMillis, parameter[]]]
call[.ensureCurrentState, parameter[member[STATE.INITED]]]
call[.changeSt... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
identifier[startTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[ensureCurrentState] operator... |
public static final Function<String,Date> toDate(final String pattern, final Locale locale) {
return new ToDate(pattern, locale);
} | class class_name[name] begin[{]
method[toDate, return_type[type[Function]], modifier[final public static], parameter[pattern, locale]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=loc... | Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[String] , identifier[Date] operator[>] identifier[toDate] operator[SEP] Keyword[final] identifier[String] identifier[pattern] , Keyword[final] identifier[Locale] identifier[locale] operator[SEP] {
Keyword[return] Keyword... |
public void addFile (File file)
{
if (!files_.containsKey (file)) {
long modifiedTime = file.exists() ? file.lastModified() : -1;
files_.put (file, new Long (modifiedTime));
}
} | class class_name[name] begin[{]
method[addFile, return_type[void], modifier[public], parameter[file]] begin[{]
if[call[files_.containsKey, parameter[member[.file]]]] begin[{]
local_variable[type[long], modifiedTime]
call[files_.put, parameter[member[.file], C... | Keyword[public] Keyword[void] identifier[addFile] operator[SEP] identifier[File] identifier[file] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[files_] operator[SEP] identifier[containsKey] operator[SEP] identifier[file] operator[SEP] operator[SEP] {
Keyword[long] identifier[modifie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.