code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static Config getConfig(@Nonnull final URI configLocation, @Nullable final String configName)
{
final ConfigFactory configFactory = new ConfigFactory(configLocation, configName);
return new Config(configFactory.load());
} | class class_name[name] begin[{]
method[getConfig, return_type[type[Config]], modifier[public static], parameter[configLocation, configName]] begin[{]
local_variable[type[ConfigFactory], configFactory]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=load, postfix_operators=[... | Keyword[public] Keyword[static] identifier[Config] identifier[getConfig] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[URI] identifier[configLocation] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[configName] operator[SEP] {
Keyword[final] identifi... |
public static CommerceOrder fetchByUuid_C_Last(String uuid, long companyId,
OrderByComparator<CommerceOrder> orderByComparator) {
return getPersistence()
.fetchByUuid_C_Last(uuid, companyId, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByUuid_C_Last, return_type[type[CommerceOrder]], modifier[public static], parameter[uuid, companyId, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceOrder] identifier[fetchByUuid_C_Last] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CommerceOrder] operator[>] identifier[orderByComparator] operator[SEP] {
Keywor... |
@Override
public String cipherSuite()
{
if (! (_s instanceof SSLSocket)) {
return super.cipherSuite();
}
SSLSocket sslSocket = (SSLSocket) _s;
SSLSession sslSession = sslSocket.getSession();
if (sslSession != null) {
return sslSession.getCipherSuite();
}
else {
... | class class_name[name] begin[{]
method[cipherSuite, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[._s], instanceof, type[SSLSocket]]] begin[{]
return[SuperMethodInvocation(arguments=[], member=cipherSuite, postfix_operators=[], prefix_... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[cipherSuite] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[_s] Keyword[instanceof] identifier[SSLSocket] operator[SEP] operator[SEP] {
Keyword[return] Keyword[super] operator... |
public final String prn(final Map<String, Object> pRqVs,
final BigDecimal pVal) {
return this.srvNumberToString.print(pVal.toString(),
(String) pRqVs.get("decSepv"), //user's preferences
(String) pRqVs.get("decGrSepv"),
(Integer) pRqVs.get("priceDp"),
(Integer) pRqVs.get("dig... | class class_name[name] begin[{]
method[prn, return_type[type[String]], modifier[final public], parameter[pRqVs, pVal]] begin[{]
return[THIS[member[None.srvNumberToString]call[None.print, parameter[call[pVal.toString, parameter[]], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[]... | Keyword[public] Keyword[final] identifier[String] identifier[prn] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pRqVs] , Keyword[final] identifier[BigDecimal] identifier[pVal] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] i... |
public void runBenchmark() throws Exception {
System.out.print(HORIZONTAL_RULE);
System.out.println(" Setup & Initialization");
System.out.println(HORIZONTAL_RULE);
// connect to one or more servers, loop until success
connect(client, config.servers);
for (long i = 0; i... | class class_name[name] begin[{]
method[runBenchmark, return_type[void], modifier[public], parameter[]] begin[{]
call[System.out.print, parameter[member[.HORIZONTAL_RULE]]]
call[System.out.println, parameter[literal[" Setup & Initialization"]]]
call[System.out.pri... | Keyword[public] Keyword[void] identifier[runBenchmark] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[HORIZONTAL_RULE] operator[SEP] operator[SEP] identifier[System] operator[SEP] identi... |
protected void buildAndShowDialog(@Nullable Bundle savedInstanceState) {
final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
final String title = dialogConfiguration.title();
if (title != null) {
dialogBuilder.setTitle(title);
}
final int iconReso... | class class_name[name] begin[{]
method[buildAndShowDialog, return_type[void], modifier[protected], parameter[savedInstanceState]] begin[{]
local_variable[type[AlertDialog], dialogBuilder]
local_variable[type[String], title]
if[binary_operation[member[.title], !=, literal[null]]]... | Keyword[protected] Keyword[void] identifier[buildAndShowDialog] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[savedInstanceState] operator[SEP] {
Keyword[final] identifier[AlertDialog] operator[SEP] identifier[Builder] identifier[dialogBuilder] operator[=] Keyword[new] identifier... |
public ListActiveCoursesInAccountOptions searchTerm(String searchTerm) {
if(searchTerm == null || searchTerm.length() < 3) {
throw new IllegalArgumentException("Search term must be at least 3 characters");
}
addSingleItem("search_term", searchTerm);
return this;
} | class class_name[name] begin[{]
method[searchTerm, return_type[type[ListActiveCoursesInAccountOptions]], modifier[public], parameter[searchTerm]] begin[{]
if[binary_operation[binary_operation[member[.searchTerm], ==, literal[null]], ||, binary_operation[call[searchTerm.length, parameter[]], <, ... | Keyword[public] identifier[ListActiveCoursesInAccountOptions] identifier[searchTerm] operator[SEP] identifier[String] identifier[searchTerm] operator[SEP] {
Keyword[if] operator[SEP] identifier[searchTerm] operator[==] Other[null] operator[||] identifier[searchTerm] operator[SEP] identifier[length] operator[SEP]... |
public static String serializePropertyName(String name) {
StringBuilder stringBuilder = new StringBuilder();
for (char ch : name.toCharArray()) {
if (Character.isLetterOrDigit(ch) || HYPHEN == ch || DOT == ch) {
stringBuilder.append(ch);
} else {
... | class class_name[name] begin[{]
method[serializePropertyName, return_type[type[String]], modifier[public static], parameter[name]] begin[{]
local_variable[type[StringBuilder], stringBuilder]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=... | Keyword[public] Keyword[static] identifier[String] identifier[serializePropertyName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[StringBuilder] identifier[stringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] oper... |
private String getHalfMatrixString(Permutation permutation) {
StringBuilder builder = new StringBuilder(permutation.size());
int size = permutation.size();
for (int indexI = 0; indexI < size - 1; indexI++) {
for (int indexJ = indexI + 1; indexJ < size; indexJ++) {
bui... | class class_name[name] begin[{]
method[getHalfMatrixString, return_type[type[String]], modifier[private], parameter[permutation]] begin[{]
local_variable[type[StringBuilder], builder]
local_variable[type[int], size]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(b... | Keyword[private] identifier[String] identifier[getHalfMatrixString] operator[SEP] identifier[Permutation] identifier[permutation] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[permutation] operator[SEP] identifier[size] o... |
@Override
public MonetaryAmount apply(MonetaryAmount amount) {
Objects.requireNonNull(amount, "Amount required.");
return amount.multiply(percentValue);
} | class class_name[name] begin[{]
method[apply, return_type[type[MonetaryAmount]], modifier[public], parameter[amount]] begin[{]
call[Objects.requireNonNull, parameter[member[.amount], literal["Amount required."]]]
return[call[amount.multiply, parameter[member[.percentValue]]]]
end[}]... | annotation[@] identifier[Override] Keyword[public] identifier[MonetaryAmount] identifier[apply] operator[SEP] identifier[MonetaryAmount] identifier[amount] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[amount] , literal[String] operator[SEP] operator[SEP] ... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Instance, OperationMetadata> createInstanceAsync(
LocationName parent, String instanceId, Instance instance) {
CreateInstanceRequest request =
CreateInstanceReques... | class class_name[name] begin[{]
method[createInstanceAsync, return_type[type[OperationFuture]], modifier[final public], parameter[parent, instanceId, instance]] begin[{]
local_variable[type[CreateInstanceRequest], request]
return[call[.createInstanceAsync, parameter[member[.request]]]]
end[... | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Instance] , identifier[OperationMetadata] operator[>] identifier[createInstanceAsync] operator[SEP] identifier[LocationName] identifier[parent] , identifier[S... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "MultiPoint", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_GeometricAggregate")
public JAXBElement<MultiPointType> createMultiPoint(MultiPointType value) {
return new JAXBElement<MultiPointType>(_MultiPoin... | class class_name[name] begin[{]
method[createMultiPoint, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_MultiPoint_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_ope... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
public String dumpCounters() {
// CHECK IF STATISTICS ARE ACTIVED
if (recording < 0)
return "Counters: <no recording>";
final StringBuilder buffer = new StringBuilder();
synchronized (counters) {
buffer.append("DUMPING COUNTERS (last reset on: " + lastReset.toString() + ")...");
... | class class_name[name] begin[{]
method[dumpCounters, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.recording], <, literal[0]]] begin[{]
return[literal["Counters: <no recording>"]]
else begin[{]
None
end[}]
local_variable[t... | Keyword[public] identifier[String] identifier[dumpCounters] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[recording] operator[<] Other[0] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifie... |
public final boolean isReadOnly() {
Entry<?> entry = getEntry();
Calendar calendar = entry.getCalendar();
if (calendar != null) {
return calendar.isReadOnly();
}
return false;
} | class class_name[name] begin[{]
method[isReadOnly, return_type[type[boolean]], modifier[final public], parameter[]] begin[{]
local_variable[type[Entry], entry]
local_variable[type[Calendar], calendar]
if[binary_operation[member[.calendar], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[final] Keyword[boolean] identifier[isReadOnly] operator[SEP] operator[SEP] {
identifier[Entry] operator[<] operator[?] operator[>] identifier[entry] operator[=] identifier[getEntry] operator[SEP] operator[SEP] operator[SEP] identifier[Calendar] identifier[calendar] operator[=] identifier[... |
public void eval(int[] context, double[] outsums) {
for (int oid = 0; oid < numOutcomes; oid++) {
outsums[oid] = iprob;
numfeats[oid] = 0;
}
int[] activeOutcomes;
double[] activeParameters;
for (int i = 0; i < context.length; i++) {
Context predParams = params[context[i]];
a... | class class_name[name] begin[{]
method[eval, return_type[void], modifier[public], parameter[context, outsums]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outsums, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[void] identifier[eval] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[context] , Keyword[double] operator[SEP] operator[SEP] identifier[outsums] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[oid] operator[=] Other[0] operator[SEP] identifier[oid] o... |
public static SecretKey generateKey(String algorithm, byte[] key) {
Assert.notBlank(algorithm, "Algorithm is blank!");
SecretKey secretKey = null;
if (algorithm.startsWith("PBE")) {
// PBE密钥
secretKey = generatePBEKey(algorithm, (null == key) ? null : StrUtil.str(key, CharsetUtil.CHARSET_UTF_8).toCharA... | class class_name[name] begin[{]
method[generateKey, return_type[type[SecretKey]], modifier[public static], parameter[algorithm, key]] begin[{]
call[Assert.notBlank, parameter[member[.algorithm], literal["Algorithm is blank!"]]]
local_variable[type[SecretKey], secretKey]
... | Keyword[public] Keyword[static] identifier[SecretKey] identifier[generateKey] operator[SEP] identifier[String] identifier[algorithm] , Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notBlank] operator[SEP] identifier[algorithm] , literal[St... |
private Boolean getReplaceableValue(Expression expr) {
return TranslationUtil.hasSideEffect(expr) ? null : getKnownValue(expr);
} | class class_name[name] begin[{]
method[getReplaceableValue, return_type[type[Boolean]], modifier[private], parameter[expr]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=... | Keyword[private] identifier[Boolean] identifier[getReplaceableValue] operator[SEP] identifier[Expression] identifier[expr] operator[SEP] {
Keyword[return] identifier[TranslationUtil] operator[SEP] identifier[hasSideEffect] operator[SEP] identifier[expr] operator[SEP] operator[?] Other[null] operator[:] identifi... |
public static Function<Object,Integer> methodForInteger(final String methodName, final Object... optionalParameters) {
return new Call<Object,Integer>(Types.INTEGER, methodName, VarArgsUtil.asOptionalObjectArray(Object.class,optionalParameters));
} | class class_name[name] begin[{]
method[methodForInteger, return_type[type[Function]], modifier[public static], parameter[methodName, optionalParameters]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=INTEGER, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[]), Me... | Keyword[public] Keyword[static] identifier[Function] operator[<] identifier[Object] , identifier[Integer] operator[>] identifier[methodForInteger] operator[SEP] Keyword[final] identifier[String] identifier[methodName] , Keyword[final] identifier[Object] operator[...] identifier[optionalParameters] operator[SEP] {
... |
private synchronized ListenableFuture<?> updateUserMemory(String allocationTag, long delta)
{
if (delta >= 0) {
enforceUserMemoryLimit(queryMemoryContext.getUserMemory(), delta, maxUserMemory);
return memoryPool.reserve(queryId, allocationTag, delta);
}
memoryPool.fre... | class class_name[name] begin[{]
method[updateUserMemory, return_type[type[ListenableFuture]], modifier[synchronized private], parameter[allocationTag, delta]] begin[{]
if[binary_operation[member[.delta], >=, literal[0]]] begin[{]
call[.enforceUserMemoryLimit, parameter[c... | Keyword[private] Keyword[synchronized] identifier[ListenableFuture] operator[<] operator[?] operator[>] identifier[updateUserMemory] operator[SEP] identifier[String] identifier[allocationTag] , Keyword[long] identifier[delta] operator[SEP] {
Keyword[if] operator[SEP] identifier[delta] operator[>=] Other[0] oper... |
File findFinalizedEditsFile(long startTxId, long endTxId) throws IOException {
File ret = new File(sd.getCurrentDir(),
NNStorage.getFinalizedEditsFileName(startTxId, endTxId));
if (!ret.exists()) {
throw new IOException(
"No edits file for range " + startTxId + "-" + endTxId);
}
... | class class_name[name] begin[{]
method[findFinalizedEditsFile, return_type[type[File]], modifier[default], parameter[startTxId, endTxId]] begin[{]
local_variable[type[File], ret]
if[call[ret.exists, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Bin... | identifier[File] identifier[findFinalizedEditsFile] operator[SEP] Keyword[long] identifier[startTxId] , Keyword[long] identifier[endTxId] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[ret] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[sd] operator[SEP] ... |
public static TraceFormat getFormatValue(Object newValue, TraceFormat defaultValue) {
if (newValue != null && newValue instanceof String) {
String strValue = ((String) newValue).toUpperCase();
try {
return TraceFormat.valueOf(strValue);
} catch (Exception e) {... | class class_name[name] begin[{]
method[getFormatValue, return_type[type[TraceFormat]], modifier[public static], parameter[newValue, defaultValue]] begin[{]
if[binary_operation[binary_operation[member[.newValue], !=, literal[null]], &&, binary_operation[member[.newValue], instanceof, type[String... | Keyword[public] Keyword[static] identifier[TraceFormat] identifier[getFormatValue] operator[SEP] identifier[Object] identifier[newValue] , identifier[TraceFormat] identifier[defaultValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[newValue] operator[!=] Other[null] operator[&&] identifier[newValue] Ke... |
@Override
protected void bind() {
Bindings.bindBidirectional(view().sourceText().textProperty(), object().pSourcePath(), new FileStringConverter());
Bindings.bindBidirectional(view().targetText().textProperty(), object().pTargetPath(), new FileStringConverter());
this.sortedList.comparator... | class class_name[name] begin[{]
method[bind, return_type[void], modifier[protected], parameter[]] begin[{]
call[Bindings.bindBidirectional, parameter[call[.view, parameter[]], call[.object, parameter[]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[bind] operator[SEP] operator[SEP] {
identifier[Bindings] operator[SEP] identifier[bindBidirectional] operator[SEP] identifier[view] operator[SEP] operator[SEP] operator[SEP] identifier[sourceText] operator[SEP] operator[SEP] operator[... |
void becomeInactive() throws InternalLogException
{
if (tc.isEntryEnabled())
Tr.entry(tc, "becomeInactive", this);
_logFileHeader.changeStatus(LogFileHeader.STATUS_INACTIVE);
try
{
writeFileStatus(false);
} catch (InternalLogException exc)
{
... | class class_name[name] begin[{]
method[becomeInactive, return_type[void], modifier[default], parameter[]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["becomeInactive"], THIS[]]]
else begin[{]
None
end[}]
... | Keyword[void] identifier[becomeInactive] operator[SEP] operator[SEP] Keyword[throws] identifier[InternalLogException] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifi... |
public static File createJarPackage(IResource resource) {
JarModule jarModule = new JarModule(resource);
try {
PlatformUI.getWorkbench().getProgressService().run(false, true,
jarModule);
} catch (Exception e) {
e.printStackTrace();
return null;
}
File jarFile = jarModu... | class class_name[name] begin[{]
method[createJarPackage, return_type[type[File]], modifier[public static], parameter[resource]] begin[{]
local_variable[type[JarModule], jarModule]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getWorkbench, postfix_oper... | Keyword[public] Keyword[static] identifier[File] identifier[createJarPackage] operator[SEP] identifier[IResource] identifier[resource] operator[SEP] {
identifier[JarModule] identifier[jarModule] operator[=] Keyword[new] identifier[JarModule] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[... |
protected int persistHydrant(
FireHydrant indexToPersist,
DataSchema schema,
Interval interval,
Map<String, Object> metadataElems
)
{
synchronized (indexToPersist) {
if (indexToPersist.hasSwapped()) {
log.info(
"DataSource[%s], Interval[%s], Hydrant[%s] already ... | class class_name[name] begin[{]
method[persistHydrant, return_type[type[int]], modifier[protected], parameter[indexToPersist, schema, interval, metadataElems]] begin[{]
SYNCHRONIZED[member[.indexToPersist]] BEGIN[{]
if[call[indexToPersist.hasSwapped, parameter[]]] begin[... | Keyword[protected] Keyword[int] identifier[persistHydrant] operator[SEP] identifier[FireHydrant] identifier[indexToPersist] , identifier[DataSchema] identifier[schema] , identifier[Interval] identifier[interval] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[metadataEle... |
public static void validateStatusAtExecutionRestart(long previousExecutionId,
Properties restartJobParameters) throws JobRestartException, JobExecutionNotMostRecentException, JobExecutionAlreadyCompleteException {
Helper helper = new Helper(previousExecuti... | class class_name[name] begin[{]
method[validateStatusAtExecutionRestart, return_type[void], modifier[public static], parameter[previousExecutionId, restartJobParameters]] begin[{]
local_variable[type[Helper], helper]
call[helper.validateRestartableFalseJobsDoNotRestart, parameter[]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[validateStatusAtExecutionRestart] operator[SEP] Keyword[long] identifier[previousExecutionId] , identifier[Properties] identifier[restartJobParameters] operator[SEP] Keyword[throws] identifier[JobRestartException] , identifier[JobExecutionNotMostRecentException... |
public static ByteBuffer clearAndEnsureCapacity(ByteBuffer buffer, int elements) {
if (buffer == null || buffer.capacity() < elements) {
buffer = ByteBuffer.allocate(elements);
} else {
buffer.clear();
}
return buffer;
} | class class_name[name] begin[{]
method[clearAndEnsureCapacity, return_type[type[ByteBuffer]], modifier[public static], parameter[buffer, elements]] begin[{]
if[binary_operation[binary_operation[member[.buffer], ==, literal[null]], ||, binary_operation[call[buffer.capacity, parameter[]], <, memb... | Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[clearAndEnsureCapacity] operator[SEP] identifier[ByteBuffer] identifier[buffer] , Keyword[int] identifier[elements] operator[SEP] {
Keyword[if] operator[SEP] identifier[buffer] operator[==] Other[null] operator[||] identifier[buffer] operator[SEP... |
public static boolean copyDirectory(final File source, final File destination)
throws FileIsSecurityRestrictedException, IOException, FileIsADirectoryException,
FileIsNotADirectoryException, DirectoryAlreadyExistsException
{
return copyDirectory(source, destination, true);
} | class class_name[name] begin[{]
method[copyDirectory, return_type[type[boolean]], modifier[public static], parameter[source, destination]] begin[{]
return[call[.copyDirectory, parameter[member[.source], member[.destination], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[copyDirectory] operator[SEP] Keyword[final] identifier[File] identifier[source] , Keyword[final] identifier[File] identifier[destination] operator[SEP] Keyword[throws] identifier[FileIsSecurityRestrictedException] , identifier[IOException] , identifier[File... |
public ReservedInstancesOffering withPricingDetails(PricingDetail... pricingDetails) {
if (this.pricingDetails == null) {
setPricingDetails(new com.amazonaws.internal.SdkInternalList<PricingDetail>(pricingDetails.length));
}
for (PricingDetail ele : pricingDetails) {
this... | class class_name[name] begin[{]
method[withPricingDetails, return_type[type[ReservedInstancesOffering]], modifier[public], parameter[pricingDetails]] begin[{]
if[binary_operation[THIS[member[None.pricingDetails]], ==, literal[null]]] begin[{]
call[.setPricingDetails, par... | Keyword[public] identifier[ReservedInstancesOffering] identifier[withPricingDetails] operator[SEP] identifier[PricingDetail] operator[...] identifier[pricingDetails] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pricingDetails] operator[==] Other[null] operator[SEP] {
... |
Expression get( int idx ) {
if( parameters.size() <= idx ) {
throw new ParameterOutOfBoundsException();
}
return parameters.get( idx );
} | class class_name[name] begin[{]
method[get, return_type[type[Expression]], modifier[default], parameter[idx]] begin[{]
if[binary_operation[call[parameters.size, parameter[]], <=, member[.idx]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type... | identifier[Expression] identifier[get] operator[SEP] Keyword[int] identifier[idx] operator[SEP] {
Keyword[if] operator[SEP] identifier[parameters] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] identifier[idx] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ParameterOut... |
public static String getFileAsString(File file) throws FileNotFoundException, IOException {
byte[] inputbytes;
try (RandomAccessFile inputFile = new RandomAccessFile(file, "r")) {
int length = (int) inputFile.length();
inputbytes = new byte[length];
int numread = inp... | class class_name[name] begin[{]
method[getFileAsString, return_type[type[String]], modifier[public static], parameter[file]] begin[{]
local_variable[type[byte], inputbytes]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Ca... | Keyword[public] Keyword[static] identifier[String] identifier[getFileAsString] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[FileNotFoundException] , identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[inputbytes] operator[SEP] Keyword[try] o... |
public void set(V newReference, int newStamp) {
Pair<V> current = pair;
if (newReference != current.reference || newStamp != current.stamp)
this.pair = Pair.of(newReference, newStamp);
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[newReference, newStamp]] begin[{]
local_variable[type[Pair], current]
if[binary_operation[binary_operation[member[.newReference], !=, member[current.reference]], ||, binary_operation[member[.newSt... | Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[V] identifier[newReference] , Keyword[int] identifier[newStamp] operator[SEP] {
identifier[Pair] operator[<] identifier[V] operator[>] identifier[current] operator[=] identifier[pair] operator[SEP] Keyword[if] operator[SEP] identifier[newRef... |
protected double probTB(IntDependency dependency) {
if (verbose) {
// System.out.println("tagIndex: " + tagIndex);
System.err.println("Generating " + dependency);
}
boolean leftHeaded = dependency.leftHeaded && directional;
int hW = dependency.head.word;
int aW = dependency.ar... | class class_name[name] begin[{]
method[probTB, return_type[type[double]], modifier[protected], parameter[dependency]] begin[{]
if[member[.verbose]] begin[{]
call[System.err.println, parameter[binary_operation[literal["Generating "], +, member[.dependency]]]]
else... | Keyword[protected] Keyword[double] identifier[probTB] operator[SEP] identifier[IntDependency] identifier[dependency] operator[SEP] {
Keyword[if] operator[SEP] identifier[verbose] operator[SEP] {
identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[St... |
public void setProperties(Properties sslProps) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "setProperties");
this.sslProperties = sslProps;
} | class class_name[name] begin[{]
method[setProperties, return_type[void], modifier[public], parameter[sslProps]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[Tr.debug, parameter[member[.tc... | Keyword[public] Keyword[void] identifier[setProperties] operator[SEP] identifier[Properties] identifier[sslProps] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isD... |
private void registerExtensions() {
Iterator<Cache2kExtensionProvider> it =
ServiceLoader.load(Cache2kExtensionProvider.class, CacheManager.class.getClassLoader()).iterator();
while (it.hasNext()) {
try {
it.next().registerCache2kExtension();
} catch (ServiceConfigurationError ex) {
... | class class_name[name] begin[{]
method[registerExtensions, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(argumen... | Keyword[private] Keyword[void] identifier[registerExtensions] operator[SEP] operator[SEP] {
identifier[Iterator] operator[<] identifier[Cache2kExtensionProvider] operator[>] identifier[it] operator[=] identifier[ServiceLoader] operator[SEP] identifier[load] operator[SEP] identifier[Cache2kExtensionProvider] oper... |
public void unlock() {
ArrayList<Runnable> list;
Thread t = Thread.currentThread();
synchronized (this) {
if (t != lockingThread) return;
if (--lockedTimes > 0) return;
lockingThread = null;
list = listeners;
listeners = null;
}
if (list != null) {
for (Runnable r : list) r.run();... | class class_name[name] begin[{]
method[unlock, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], list]
local_variable[type[Thread], t]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[member[.t], !=, member[.locki... | Keyword[public] Keyword[void] identifier[unlock] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Runnable] operator[>] identifier[list] operator[SEP] identifier[Thread] identifier[t] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] oper... |
private void pruneExcessiveHistoricalRecordsIfNeeded() {
final int pruneCount = mHistoricalRecords.size() - mHistoryMaxSize;
if (pruneCount <= 0) {
return;
}
mHistoricalRecordsChanged = true;
for (int i = 0; i < pruneCount; i++) {
HistoricalRecord prunedRe... | class class_name[name] begin[{]
method[pruneExcessiveHistoricalRecordsIfNeeded, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], pruneCount]
if[binary_operation[member[.pruneCount], <=, literal[0]]] begin[{]
return[None]
else begi... | Keyword[private] Keyword[void] identifier[pruneExcessiveHistoricalRecordsIfNeeded] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[pruneCount] operator[=] identifier[mHistoricalRecords] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] identifier[mHistoryMaxSize] operato... |
@Override
public final void to(ObjectOutput out) throws IOException {
if (out == null) throw new NullPointerException();
// delegate to the equivalent internal method
_to(out);
} | class class_name[name] begin[{]
method[to, return_type[void], modifier[final public], parameter[out]] begin[{]
if[binary_operation[member[.out], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], pr... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[to] operator[SEP] identifier[ObjectOutput] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[out] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new... |
@Override
public Object[] toArray() {
if (size == 0) {
return new Object[0];
}
Object[] destination = toArray(DEFAULT_DESTINATION);
return destination;
} | class class_name[name] begin[{]
method[toArray, return_type[type[Object]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.size], ==, literal[0]]] begin[{]
return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selector... | annotation[@] identifier[Override] Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[size] operator[==] Other[0] operator[SEP] {
Keyword[return] Keyword[new] identifier[Object] operator[SEP] Other[0] op... |
public static void intToNetworkByteOrder(int num, byte[] buf, int start,
int count) {
if (count > 4) {
throw new IllegalArgumentException(
"Cannot handle more than 4 bytes");
}
for (int i = count - 1; i >= 0; i--) {
buf[start + i] = (byte)... | class class_name[name] begin[{]
method[intToNetworkByteOrder, return_type[void], modifier[public static], parameter[num, buf, start, count]] begin[{]
if[binary_operation[member[.count], >, literal[4]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operat... | Keyword[public] Keyword[static] Keyword[void] identifier[intToNetworkByteOrder] operator[SEP] Keyword[int] identifier[num] , Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[start] , Keyword[int] identifier[count] operator[SEP] {
Keyword[if] operator[SEP] identifier[count] o... |
@SuppressWarnings("unchecked")
public static <T extends AbstractHtml> Collection<T> findTagsAssignableToTag(
final boolean parallel, final Class<T> tagClass,
final AbstractHtml... fromTags)
throws NullValueException, InvalidTagException {
if (tagClass == null) {
... | class class_name[name] begin[{]
method[findTagsAssignableToTag, return_type[type[Collection]], modifier[public static], parameter[parallel, tagClass, fromTags]] begin[{]
if[binary_operation[member[.tagClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argume... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[AbstractHtml] operator[>] identifier[Collection] operator[<] identifier[T] operator[>] identifier[findTagsAssignableToTag] operator[SEP] Keyword[fi... |
public void select(TimelineEvent event, TimelineUpdater timelineUpdater) {
int index = getIndex(event);
if (timelineUpdater != null) {
// update UI
timelineUpdater.select(index);
}
} | class class_name[name] begin[{]
method[select, return_type[void], modifier[public], parameter[event, timelineUpdater]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[.timelineUpdater], !=, literal[null]]] begin[{]
call[timelineUpdater.select... | Keyword[public] Keyword[void] identifier[select] operator[SEP] identifier[TimelineEvent] identifier[event] , identifier[TimelineUpdater] identifier[timelineUpdater] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[getIndex] operator[SEP] identifier[event] operator[SEP] operator[SEP] Keyword... |
private void showResultTemplate(@NonNull SearchResults results) {
setVisibility(VISIBLE);
setText(applyTemplate(resultTemplate, results));
} | class class_name[name] begin[{]
method[showResultTemplate, return_type[void], modifier[private], parameter[results]] begin[{]
call[.setVisibility, parameter[member[.VISIBLE]]]
call[.setText, parameter[call[.applyTemplate, parameter[member[.resultTemplate], member[.results]]]]]
... | Keyword[private] Keyword[void] identifier[showResultTemplate] operator[SEP] annotation[@] identifier[NonNull] identifier[SearchResults] identifier[results] operator[SEP] {
identifier[setVisibility] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP] identifier[setText] operator[SEP] identifier[applyTem... |
private void convertTokenDefinitions() throws GrammarException,
TreeException {
tokenVisibility.clear();
Map<String, ParseTreeNode> helpers = getHelperTokens();
Map<String, ParseTreeNode> tokens = getTokens();
convertTokenDefinitions(helpers, tokens);
} | class class_name[name] begin[{]
method[convertTokenDefinitions, return_type[void], modifier[private], parameter[]] begin[{]
call[tokenVisibility.clear, parameter[]]
local_variable[type[Map], helpers]
local_variable[type[Map], tokens]
call[.convertTokenDefinitions... | Keyword[private] Keyword[void] identifier[convertTokenDefinitions] operator[SEP] operator[SEP] Keyword[throws] identifier[GrammarException] , identifier[TreeException] {
identifier[tokenVisibility] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[S... |
@Override
public IScan getScanByNumUpper(int scanNum) {
IScan scan = getNum2scan().ceilingEntry(scanNum).getValue();
if (scan != null) {
return scan;
}
return null;
} | class class_name[name] begin[{]
method[getScanByNumUpper, return_type[type[IScan]], modifier[public], parameter[scanNum]] begin[{]
local_variable[type[IScan], scan]
if[binary_operation[member[.scan], !=, literal[null]]] begin[{]
return[member[.scan]]
else begin[{]
No... | annotation[@] identifier[Override] Keyword[public] identifier[IScan] identifier[getScanByNumUpper] operator[SEP] Keyword[int] identifier[scanNum] operator[SEP] {
identifier[IScan] identifier[scan] operator[=] identifier[getNum2scan] operator[SEP] operator[SEP] operator[SEP] identifier[ceilingEntry] operator[SEP]... |
public static <T> List<T> getListUnsafe(final List list, final Class<T> clazz, final Integer... path) {
return (List<T>) getUnsafe(list, List.class, path);
} | class class_name[name] begin[{]
method[getListUnsafe, return_type[type[List]], modifier[public static], parameter[list, clazz, path]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefer... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getListUnsafe] operator[SEP] Keyword[final] identifier[List] identifier[list] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , Keyword[fin... |
public R isGreaterThan(V lower) {
return create(e -> Expressions.call(Operators.GREATER_THAN, e, Expressions.literal(lower)));
} | class class_name[name] begin[{]
method[isGreaterThan, return_type[type[R]], modifier[public], parameter[lower]] begin[{]
return[call[.create, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=GREATER_THAN, postfix_operators=[], prefix_operators=[], qualifier=Operators, ... | Keyword[public] identifier[R] identifier[isGreaterThan] operator[SEP] identifier[V] identifier[lower] operator[SEP] {
Keyword[return] identifier[create] operator[SEP] identifier[e] operator[->] identifier[Expressions] operator[SEP] identifier[call] operator[SEP] identifier[Operators] operator[SEP] identifier[GRE... |
public static @CheckForNull URL _findResource(ClassLoader cl, String name) {
return (URL) invoke(FIND_RESOURCE, RuntimeException.class, cl, name);
} | class class_name[name] begin[{]
method[_findResource, return_type[type[URL]], modifier[public static], parameter[cl, name]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=FIND_RESOURCE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefere... | Keyword[public] Keyword[static] annotation[@] identifier[CheckForNull] identifier[URL] identifier[_findResource] operator[SEP] identifier[ClassLoader] identifier[cl] , identifier[String] identifier[name] operator[SEP] {
Keyword[return] operator[SEP] identifier[URL] operator[SEP] identifier[invoke] operator[SEP]... |
@NonNull
@Override
public GroupBy groupBy(@NonNull Expression... expressions) {
if (expressions == null) {
throw new IllegalArgumentException("expressions cannot be null.");
}
return new GroupBy(this, Arrays.asList(expressions));
} | class class_name[name] begin[{]
method[groupBy, return_type[type[GroupBy]], modifier[public], parameter[expressions]] begin[{]
if[binary_operation[member[.expressions], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | annotation[@] identifier[NonNull] annotation[@] identifier[Override] Keyword[public] identifier[GroupBy] identifier[groupBy] operator[SEP] annotation[@] identifier[NonNull] identifier[Expression] operator[...] identifier[expressions] operator[SEP] {
Keyword[if] operator[SEP] identifier[expressions] operator[==] ... |
private Long tokenMatch(SNode tok) {
// check if the span is a matched node
SFeature featMatched = tok.getFeature(ANNIS_NS, FEAT_MATCHEDNODE);
Long matchRaw = featMatched == null ? null : featMatched.getValue_SNUMERIC();
return matchRaw;
} | class class_name[name] begin[{]
method[tokenMatch, return_type[type[Long]], modifier[private], parameter[tok]] begin[{]
local_variable[type[SFeature], featMatched]
local_variable[type[Long], matchRaw]
return[member[.matchRaw]]
end[}]
END[}] | Keyword[private] identifier[Long] identifier[tokenMatch] operator[SEP] identifier[SNode] identifier[tok] operator[SEP] {
identifier[SFeature] identifier[featMatched] operator[=] identifier[tok] operator[SEP] identifier[getFeature] operator[SEP] identifier[ANNIS_NS] , identifier[FEAT_MATCHEDNODE] operator[SEP] o... |
public static void crossValidate(Job.ValidatedJob job) {
if (job.state != Job.JobState.RUNNING) return; //don't do cross-validation if the full model builder failed
if (job.validation != null)
throw new IllegalArgumentException("Cannot provide validation dataset and n_folds > 0 at the same time.");
if... | class class_name[name] begin[{]
method[crossValidate, return_type[void], modifier[public static], parameter[job]] begin[{]
if[binary_operation[member[job.state], !=, member[Job.JobState.RUNNING]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operatio... | Keyword[public] Keyword[static] Keyword[void] identifier[crossValidate] operator[SEP] identifier[Job] operator[SEP] identifier[ValidatedJob] identifier[job] operator[SEP] {
Keyword[if] operator[SEP] identifier[job] operator[SEP] identifier[state] operator[!=] identifier[Job] operator[SEP] identifier[JobState] op... |
private void checkHandler(SipServletRequest request) {
MobicentsSipSession sipSessionImpl = (MobicentsSipSession)request.getSession();
if(sipSessionImpl.getHandler() == null) {
try {
sipSessionImpl.setHandler(sipContext.getServletHandler());
// ((SipApplicationSessionImpl)sipSessionImpl.getApplicationSess... | class class_name[name] begin[{]
method[checkHandler, return_type[void], modifier[private], parameter[request]] begin[{]
local_variable[type[MobicentsSipSession], sipSessionImpl]
if[binary_operation[call[sipSessionImpl.getHandler, parameter[]], ==, literal[null]]] begin[{]
Tr... | Keyword[private] Keyword[void] identifier[checkHandler] operator[SEP] identifier[SipServletRequest] identifier[request] operator[SEP] {
identifier[MobicentsSipSession] identifier[sipSessionImpl] operator[=] operator[SEP] identifier[MobicentsSipSession] operator[SEP] identifier[request] operator[SEP] identifier[g... |
CharPriority[] reserveCharacters(char[] chars, char[] reservedCharacters) {
if (reservedCharacters == null || reservedCharacters.length == 0) {
CharPriority[] result = new CharPriority[chars.length];
for (int i = 0; i < chars.length; i++) {
result[i] = priorityLookupMap.get(chars[i]);
}
... | class class_name[name] begin[{]
method[reserveCharacters, return_type[type[CharPriority]], modifier[default], parameter[chars, reservedCharacters]] begin[{]
if[binary_operation[binary_operation[member[.reservedCharacters], ==, literal[null]], ||, binary_operation[member[reservedCharacters.lengt... | identifier[CharPriority] operator[SEP] operator[SEP] identifier[reserveCharacters] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[chars] , Keyword[char] operator[SEP] operator[SEP] identifier[reservedCharacters] operator[SEP] {
Keyword[if] operator[SEP] identifier[reservedCharacters] operato... |
public void marshall(DeleteEmailChannelRequest deleteEmailChannelRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteEmailChannelRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(dele... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteEmailChannelRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteEmailChannelRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argume... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteEmailChannelRequest] identifier[deleteEmailChannelRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteEmailChannelRequest] operator[==] Other[null] op... |
private JButton getBtnCancel() {
if (btnCancel == null) {
btnCancel = new JButton();
btnCancel.setText(Constant.messages.getString("all.button.cancel"));
btnCancel.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
... | class class_name[name] begin[{]
method[getBtnCancel, return_type[type[JButton]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.btnCancel], ==, literal[null]]] begin[{]
assign[member[.btnCancel], ClassCreator(arguments=[], body=None, constructor_typ... | Keyword[private] identifier[JButton] identifier[getBtnCancel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[btnCancel] operator[==] Other[null] operator[SEP] {
identifier[btnCancel] operator[=] Keyword[new] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[b... |
public String getDefaultTableName()
{
String name = getName();
int lastDotPos = name.lastIndexOf('.');
int lastDollarPos = name.lastIndexOf('$');
return lastDollarPos > lastDotPos ? name.substring(lastDollarPos + 1) : name.substring(lastDotPos + 1);
} | class class_name[name] begin[{]
method[getDefaultTableName, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], name]
local_variable[type[int], lastDotPos]
local_variable[type[int], lastDollarPos]
return[TernaryExpression(condition=Bin... | Keyword[public] identifier[String] identifier[getDefaultTableName] operator[SEP] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[lastDotPos] operator[=] identifier[name] operator[SEP] identifier[lastIndexOf] ope... |
public static <T extends Messages> T getEncoder(Class<T> cls) {
return get(cls, ENCODER);
} | class class_name[name] begin[{]
method[getEncoder, return_type[type[T]], modifier[public static], parameter[cls]] begin[{]
return[call[.get, parameter[member[.cls], member[.ENCODER]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Messages] operator[>] identifier[T] identifier[getEncoder] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] operator[SEP] {
Keyword[return] identifier[get] operator[SEP] identifier[cls] , i... |
public void marshall(CreateHITRequest createHITRequest, ProtocolMarshaller protocolMarshaller) {
if (createHITRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createHITRequest.getMaxAssignme... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createHITRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createHITRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateHITRequest] identifier[createHITRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createHITRequest] operator[==] Other[null] operator[SEP] {
Ke... |
@Override
public void start(PrintStream writer, String[] params) {
// Parse the arguments
parse(params);
// Create a new belief set about neighbours
BeliefSetField[] fields = {new BeliefSetField("name", String.class, true),
new BeliefSetField("gender", String.class, false),};
try {
... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[writer, params]] begin[{]
call[.parse, parameter[member[.params]]]
local_variable[type[BeliefSetField], fields]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[PrintStream] identifier[writer] , identifier[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] {
identifier[parse] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifie... |
public static RedissonNodeConfig fromJSON(File file) throws IOException {
ConfigSupport support = new ConfigSupport();
return support.fromJSON(file, RedissonNodeConfig.class);
} | class class_name[name] begin[{]
method[fromJSON, return_type[type[RedissonNodeConfig]], modifier[public static], parameter[file]] begin[{]
local_variable[type[ConfigSupport], support]
return[call[support.fromJSON, parameter[member[.file], ClassReference(postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[static] identifier[RedissonNodeConfig] identifier[fromJSON] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ConfigSupport] identifier[support] operator[=] Keyword[new] identifier[ConfigSupport] operator[SEP] operator[SEP] ... |
public Analysis<SolutionType> setNumRuns(String searchID, int n){
if(!searches.containsKey(searchID)){
throw new UnknownIDException("No search with ID " + searchID + " has been added.");
}
if(n <= 0){
throw new IllegalArgumentException("Number of runs should be strictly p... | class class_name[name] begin[{]
method[setNumRuns, return_type[type[Analysis]], modifier[public], parameter[searchID, n]] begin[{]
if[call[searches.containsKey, parameter[member[.searchID]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryO... | Keyword[public] identifier[Analysis] operator[<] identifier[SolutionType] operator[>] identifier[setNumRuns] operator[SEP] identifier[String] identifier[searchID] , Keyword[int] identifier[n] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[searches] operator[SEP] identifier[containsKey] operato... |
public static String encodeHash(double latitude, double longitude, int length) {
Preconditions.checkArgument(length > 0 && length <=12, "length must be between 1 and 12");
Preconditions.checkArgument(latitude >= -90 && latitude <= 90,
"latitude must be between -90 and 90 inclusive");
... | class class_name[name] begin[{]
method[encodeHash, return_type[type[String]], modifier[public static], parameter[latitude, longitude, length]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[binary_operation[member[.length], >, literal[0]], &&, binary_operation[member[.len... | Keyword[public] Keyword[static] identifier[String] identifier[encodeHash] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[longitude] , Keyword[int] identifier[length] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[lengt... |
public static Object runMethod(Object object, String method, Object... args) throws JException
{
try
{
final Method m = object.getClass().getMethod(method);
return m.invoke(object, args);
}
catch (Exception e)
{
throw new JException(e);
}
} | class class_name[name] begin[{]
method[runMethod, return_type[type[Object]], modifier[public static], parameter[object, method, args]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=g... | Keyword[public] Keyword[static] identifier[Object] identifier[runMethod] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[method] , identifier[Object] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[JException] {
Keyword[try] {
Keyword[final... |
@Override
public void onReceiveSuggestionsResult(final @NonNull SuggestionsResult result, final @NonNull String bucket) {
// Add the mentions and notify the editor/dropdown of the changes on the UI thread
post(new Runnable() {
@Override
public void run() {
if ... | class class_name[name] begin[{]
method[onReceiveSuggestionsResult, return_type[void], modifier[public], parameter[result, bucket]] begin[{]
call[.post, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onReceiveSuggestionsResult] operator[SEP] Keyword[final] annotation[@] identifier[NonNull] identifier[SuggestionsResult] identifier[result] , Keyword[final] annotation[@] identifier[NonNull] identifier[String] identifier[bucket] operator[SEP] ... |
public String getRequestPath() {
Map<String,String> requestHeaders = getRequestHeaders();
if (requestHeaders == null)
return null;
String path = requestHeaders.get(Listener.METAINFO_REQUEST_PATH);
return path.startsWith("/") ? path : "/" + path;
} | class class_name[name] begin[{]
method[getRequestPath, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], requestHeaders]
if[binary_operation[member[.requestHeaders], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getRequestPath] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[requestHeaders] operator[=] identifier[getRequestHeaders] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ide... |
protected void adjustIndexMap(Iterable<? extends Element> elements) {
for (Element element : elements) {
if (shouldAddToIndexMap(element)) {
String name = utils.isPackage(element)
? utils.getPackageName((PackageElement)element)
: utils.... | class class_name[name] begin[{]
method[adjustIndexMap, return_type[void], modifier[protected], parameter[elements]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=... | Keyword[protected] Keyword[void] identifier[adjustIndexMap] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Element] operator[>] identifier[elements] operator[SEP] {
Keyword[for] operator[SEP] identifier[Element] identifier[element] operator[:] identifier[elements] operato... |
public void publishEvents(EventTranslatorVararg<E> translator, int batchStartsAt, int batchSize, Object[]... args) {
checkBounds(batchStartsAt, batchSize, args);
final long finalSequence = sequencer.next(batchSize);
translateAndPublishBatch(translator, batchStartsAt, batchSize, finalSequence, ar... | class class_name[name] begin[{]
method[publishEvents, return_type[void], modifier[public], parameter[translator, batchStartsAt, batchSize, args]] begin[{]
call[.checkBounds, parameter[member[.batchStartsAt], member[.batchSize], member[.args]]]
local_variable[type[long], finalSequence]
... | Keyword[public] Keyword[void] identifier[publishEvents] operator[SEP] identifier[EventTranslatorVararg] operator[<] identifier[E] operator[>] identifier[translator] , Keyword[int] identifier[batchStartsAt] , Keyword[int] identifier[batchSize] , identifier[Object] operator[SEP] operator[SEP] operator[...] identifier[... |
public void setPluginList(Path src) {
if (pluginList == null) {
pluginList = src;
} else {
pluginList.append(src);
}
} | class class_name[name] begin[{]
method[setPluginList, return_type[void], modifier[public], parameter[src]] begin[{]
if[binary_operation[member[.pluginList], ==, literal[null]]] begin[{]
assign[member[.pluginList], member[.src]]
else begin[{]
... | Keyword[public] Keyword[void] identifier[setPluginList] operator[SEP] identifier[Path] identifier[src] operator[SEP] {
Keyword[if] operator[SEP] identifier[pluginList] operator[==] Other[null] operator[SEP] {
identifier[pluginList] operator[=] identifier[src] operator[SEP]
}
Keyword[else... |
private void createRelation(String resourceName, String targetPath, String relationType, boolean importCase)
throws CmsException {
CmsResource resource = readResource(resourceName, CmsResourceFilter.IGNORE_EXPIRATION);
CmsResource target = readResource(targetPath, CmsResourceFilter.IGNORE_EXPIRATIO... | class class_name[name] begin[{]
method[createRelation, return_type[void], modifier[private], parameter[resourceName, targetPath, relationType, importCase]] begin[{]
local_variable[type[CmsResource], resource]
local_variable[type[CmsResource], target]
call[.createRelation, parame... | Keyword[private] Keyword[void] identifier[createRelation] operator[SEP] identifier[String] identifier[resourceName] , identifier[String] identifier[targetPath] , identifier[String] identifier[relationType] , Keyword[boolean] identifier[importCase] operator[SEP] Keyword[throws] identifier[CmsException] {
ident... |
public MultiNote[] normalize() {
Hashtable splitter = new Hashtable();
for (int i=0; i<m_notes.size(); i++) {
Note note = (Note)m_notes.elementAt(i);
Short key = note.getStrictDuration();
if (splitter.containsKey(key))
((Vector)splitter.get(key)).addElement(note);
else {
Vector v... | class class_name[name] begin[{]
method[normalize, return_type[type[MultiNote]], modifier[public], parameter[]] begin[{]
local_variable[type[Hashtable], splitter]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | Keyword[public] identifier[MultiNote] operator[SEP] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] {
identifier[Hashtable] identifier[splitter] operator[=] Keyword[new] identifier[Hashtable] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[... |
protected static Class mapTypeahead(Class c) {
if(c != null) {
if( PCAModel.class.isAssignableFrom(c) )
return TypeaheadPCAModelKeyRequest.class;
if( NBModel.class.isAssignableFrom(c) )
return TypeaheadNBModelKeyRequest.class;
if( Model.class.isAssignableFrom(c))
return Typ... | class class_name[name] begin[{]
method[mapTypeahead, return_type[type[Class]], modifier[static protected], parameter[c]] begin[{]
if[binary_operation[member[.c], !=, literal[null]]] begin[{]
if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[protected] Keyword[static] identifier[Class] identifier[mapTypeahead] operator[SEP] identifier[Class] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[PCAModel] operator[SEP] Keyword[class] opera... |
@Override
public AverageClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input)
throws Exception {
super.run(input);
DataSet<LocalClusteringCoefficient.Result<K>> localClusteringCoefficient = input
.run(new LocalClusteringCoefficient<K, VV, EV>()
.setParallelism(parallelism));
averageClusteringC... | class class_name[name] begin[{]
method[run, return_type[type[AverageClusteringCoefficient]], modifier[public], parameter[input]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=run, postfix_ope... | annotation[@] identifier[Override] Keyword[public] identifier[AverageClusteringCoefficient] operator[<] identifier[K] , identifier[VV] , identifier[EV] operator[>] identifier[run] operator[SEP] identifier[Graph] operator[<] identifier[K] , identifier[VV] , identifier[EV] operator[>] identifier[input] operator[SEP] ... |
private Path.Entry<ZipFile> getPackageFile() throws IOException {
// Extract package name from configuration
Value.UTF8 name = configuration.get(Value.UTF8.class, Trie.fromString("package/name"));
// Extract package version from
Value.UTF8 version = configuration.get(Value.UTF8.class, Trie.fromString("package/v... | class class_name[name] begin[{]
method[getPackageFile, return_type[type[Path]], modifier[private], parameter[]] begin[{]
local_variable[type[Value], name]
local_variable[type[Value], version]
local_variable[type[Trie], pkg]
return[call[project.getRepositoryRoot, parameter[]]]
... | Keyword[private] identifier[Path] operator[SEP] identifier[Entry] operator[<] identifier[ZipFile] operator[>] identifier[getPackageFile] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Value] operator[SEP] identifier[UTF8] identifier[name] operator[=] identifier[configuration] op... |
public final void init(FilterConfig filterConfig) throws ServletException {
Assert.notNull(filterConfig, "FilterConfig must not be null");
logger.debug("Initializing filter '{}'", filterConfig.getFilterName());
this.filterConfig = filterConfig;
initParams(filterConfig);
// Let subclasses do whateve... | class class_name[name] begin[{]
method[init, return_type[void], modifier[final public], parameter[filterConfig]] begin[{]
call[Assert.notNull, parameter[member[.filterConfig], literal["FilterConfig must not be null"]]]
call[logger.debug, parameter[literal["Initializing filter '{... | Keyword[public] Keyword[final] Keyword[void] identifier[init] operator[SEP] identifier[FilterConfig] identifier[filterConfig] operator[SEP] Keyword[throws] identifier[ServletException] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[filterConfig] , literal[String] operator[SEP] o... |
@SuppressWarnings("unchecked")
public static Throwable getCausedBy(Throwable throwable, Class<? extends Exception>... causeClasses) {
Throwable cause = throwable;
while (cause != null) {
for (Class<? extends Exception> causeClass : causeClasses) {
if (causeClass.isInstance(cause)) {
return cause;
}... | class class_name[name] begin[{]
method[getCausedBy, return_type[type[Throwable]], modifier[public static], parameter[throwable, causeClasses]] begin[{]
local_variable[type[Throwable], cause]
while[binary_operation[member[.cause], !=, literal[null]]] begin[{]
ForStatement(bod... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Throwable] identifier[getCausedBy] operator[SEP] identifier[Throwable] identifier[throwable] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] o... |
private void fillRampDataIntoBuffers(final int[] leftBuffer, final int[] rightBuffer, final ChannelMemory aktMemo)
{
// Remember changeable values
final int currentTuningPos = aktMemo.currentTuningPos;
final int currentSamplePos = aktMemo.currentSamplePos;
final int currentDirection = aktMemo.currentDirection;... | class class_name[name] begin[{]
method[fillRampDataIntoBuffers, return_type[void], modifier[private], parameter[leftBuffer, rightBuffer, aktMemo]] begin[{]
local_variable[type[int], currentTuningPos]
local_variable[type[int], currentSamplePos]
local_variable[type[int], currentDirection]... | Keyword[private] Keyword[void] identifier[fillRampDataIntoBuffers] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[leftBuffer] , Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[rightBuffer] , Keyword[final] identifier[ChannelMemory] identifier[aktMemo] operator[SEP]... |
private VirtualTransformedRenditionMetadata getCropRendition(NavigableSet<RenditionMetadata> candidates) {
RenditionMetadata original = getOriginalRendition();
if (original == null) {
return null;
}
Double scaleFactor = getCropScaleFactor();
CropDimension scaledCropDimension = new CropDimensio... | class class_name[name] begin[{]
method[getCropRendition, return_type[type[VirtualTransformedRenditionMetadata]], modifier[private], parameter[candidates]] begin[{]
local_variable[type[RenditionMetadata], original]
if[binary_operation[member[.original], ==, literal[null]]] begin[{]
... | Keyword[private] identifier[VirtualTransformedRenditionMetadata] identifier[getCropRendition] operator[SEP] identifier[NavigableSet] operator[<] identifier[RenditionMetadata] operator[>] identifier[candidates] operator[SEP] {
identifier[RenditionMetadata] identifier[original] operator[=] identifier[getOriginalRe... |
public static boolean deleteFile(File file) throws IOException {
if (file.isDirectory()) {
throw new IOException("File " + file + " isn't a file.");
}
if (!file.delete()) {
if (System.getProperty("os.name").equalsIgnoreCase("windows")) {
file = file.getCanonicalFile();
System.gc();
}
try {
... | class class_name[name] begin[{]
method[deleteFile, return_type[type[boolean]], modifier[public static], parameter[file]] begin[{]
if[call[file.isDirectory, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Lite... | Keyword[public] Keyword[static] Keyword[boolean] identifier[deleteFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] {
K... |
public void marshall(GetDeploymentStatusRequest getDeploymentStatusRequest, ProtocolMarshaller protocolMarshaller) {
if (getDeploymentStatusRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(g... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getDeploymentStatusRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getDeploymentStatusRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetDeploymentStatusRequest] identifier[getDeploymentStatusRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getDeploymentStatusRequest] operator[==] Other[null]... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<ExportAssetsResponse, ExportAssetsRequest> exportAssetsAsync(
ExportAssetsRequest request) {
return exportAssetsOperationCallable().futureCall(request);
} | class class_name[name] begin[{]
method[exportAssetsAsync, return_type[type[OperationFuture]], modifier[final public], parameter[request]] begin[{]
return[call[.exportAssetsOperationCallable, parameter[]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[ExportAssetsResponse] , identifier[ExportAssetsRequest] operator[>] identifier[exportAssetsAsync] operator[SEP] identifier[ExportAssetsRequest] identifier[requ... |
private DefaultSipApplicationRouterInfo parseSipApplicationRouterInfo(String sipApplicationRouterInfoStringified)
throws ParseException {
// there will always have 6 parameters in a SipApplicationRouterInfo for the default applicationRouterInfo
String[] sipApplicationRouterInfoParameters ... | class class_name[name] begin[{]
method[parseSipApplicationRouterInfo, return_type[type[DefaultSipApplicationRouterInfo]], modifier[private], parameter[sipApplicationRouterInfoStringified]] begin[{]
local_variable[type[String], sipApplicationRouterInfoParameters]
ForStatement(body=BlockStatement... | Keyword[private] identifier[DefaultSipApplicationRouterInfo] identifier[parseSipApplicationRouterInfo] operator[SEP] identifier[String] identifier[sipApplicationRouterInfoStringified] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[String] operator[SEP] operator[SEP] identifier[sipApplicati... |
public OvhTemplateModem templateModem_name_GET(String name) throws IOException {
String qPath = "/xdsl/templateModem/{name}";
StringBuilder sb = path(qPath, name);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhTemplateModem.class);
} | class class_name[name] begin[{]
method[templateModem_name_GET, return_type[type[OvhTemplateModem]], modifier[public], parameter[name]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.convertTo, ... | Keyword[public] identifier[OvhTemplateModem] identifier[templateModem_name_GET] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operato... |
private boolean defineEntity(String name, char value)
{
StringBuffer sb = new StringBuffer("&");
sb.append(name);
sb.append(';');
String entityString = sb.toString();
boolean extra = defineChar2StringMapping(entityString, value);
return extra;
} | class class_name[name] begin[{]
method[defineEntity, return_type[type[boolean]], modifier[private], parameter[name, value]] begin[{]
local_variable[type[StringBuffer], sb]
call[sb.append, parameter[member[.name]]]
call[sb.append, parameter[literal[';']]]
local_va... | Keyword[private] Keyword[boolean] identifier[defineEntity] operator[SEP] identifier[String] identifier[name] , Keyword[char] identifier[value] operator[SEP] {
identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] ident... |
@Override
public boolean isTabu(Move<? super SolutionType> move, SolutionType currentSolution) {
// apply move
move.apply(currentSolution);
// check: contained in tabu memory?
boolean tabu = memory.contains(currentSolution);
// undo move
move.undo(currentSolution);
... | class class_name[name] begin[{]
method[isTabu, return_type[type[boolean]], modifier[public], parameter[move, currentSolution]] begin[{]
call[move.apply, parameter[member[.currentSolution]]]
local_variable[type[boolean], tabu]
call[move.undo, parameter[member[.currentSolu... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isTabu] operator[SEP] identifier[Move] operator[<] operator[?] Keyword[super] identifier[SolutionType] operator[>] identifier[move] , identifier[SolutionType] identifier[currentSolution] operator[SEP] {
identifier[move] operator[SEP]... |
@SuppressWarnings("unused")
public void setPrefix(String prefix, String namespace) throws IOException {
if (startTagIncomplete)
closeStartTag();
// assert prefix != null;
// assert namespace != null;
if (prefix == null) {
prefix = "";
}
if (!namesInterned) {
prefix = prefix.intern(); // will throw... | class class_name[name] begin[{]
method[setPrefix, return_type[void], modifier[public], parameter[prefix, namespace]] begin[{]
if[member[.startTagIncomplete]] begin[{]
call[.closeStartTag, parameter[]]
else begin[{]
None
end[}]
if[binary_operation[memb... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setPrefix] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[namespace] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[S... |
public double get(double x, double epsilon)
{
Point nearest = getNearest(x, epsilon);
return nearest.getY();
} | class class_name[name] begin[{]
method[get, return_type[type[double]], modifier[public], parameter[x, epsilon]] begin[{]
local_variable[type[Point], nearest]
return[call[nearest.getY, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[double] identifier[get] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[epsilon] operator[SEP] {
identifier[Point] identifier[nearest] operator[=] identifier[getNearest] operator[SEP] identifier[x] , identifier[epsilon] operator[SEP] operator[SEP] Keyword[return... |
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationReference reference) throws Exception {
try {
setCurrentProcessApplication(reference);
return callable.call();
}
finally {
clear();
}
} | class class_name[name] begin[{]
method[withProcessApplicationContext, return_type[type[T]], modifier[public static], parameter[callable, reference]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[withProcessApplicationContext] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[callable] , identifier[ProcessApplicationReference] identifier[reference] operator[SEP] Keyword[throws] ident... |
public void unlink(Object source, CollectionDescriptor cds, List referencesToUnlink)
{
for(int i = 0; i < referencesToUnlink.size(); i++)
{
unlink(source, cds, referencesToUnlink.get(i));
}
} | class class_name[name] begin[{]
method[unlink, return_type[void], modifier[public], parameter[source, cds, referencesToUnlink]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=source, postfix_operators=[... | Keyword[public] Keyword[void] identifier[unlink] operator[SEP] identifier[Object] identifier[source] , identifier[CollectionDescriptor] identifier[cds] , identifier[List] identifier[referencesToUnlink] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] iden... |
public final static byte[] readByteArray(final ObjectInputStream s) throws IOException {
final byte[] a = new byte[readVByte(s)];
s.readFully(a);
return a;
} | class class_name[name] begin[{]
method[readByteArray, return_type[type[byte]], modifier[final public static], parameter[s]] begin[{]
local_variable[type[byte], a]
call[s.readFully, parameter[member[.a]]]
return[member[.a]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[readByteArray] operator[SEP] Keyword[final] identifier[ObjectInputStream] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[a... |
@Override
public void loadFromProperties(Properties props) {
String strValue = props.getProperty(container.getSimpleName() + "." + name);
if (strValue == null)
return;
try {
long value = Long.parseLong(strValue);
set(value);
} catch (NumberFormatE... | class class_name[name] begin[{]
method[loadFromProperties, return_type[void], modifier[public], parameter[props]] begin[{]
local_variable[type[String], strValue]
if[binary_operation[member[.strValue], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[loadFromProperties] operator[SEP] identifier[Properties] identifier[props] operator[SEP] {
identifier[String] identifier[strValue] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] identifier[container] op... |
protected void addAccountToString(String sender, List<User> userList2) {
Common.getInstance().getServerCaller().getPlayerCaller().sendMessage(sender, "{{DARK_RED}}Converting accounts. This may take a while.");
Common.getInstance().getStorageHandler().getStorageEngine().saveImporterUsers(userList2);
... | class class_name[name] begin[{]
method[addAccountToString, return_type[void], modifier[protected], parameter[sender, userList2]] begin[{]
call[Common.getInstance, parameter[]]
call[Common.getInstance, parameter[]]
call[Common.getInstance, parameter[]]
end[}]
... | Keyword[protected] Keyword[void] identifier[addAccountToString] operator[SEP] identifier[String] identifier[sender] , identifier[List] operator[<] identifier[User] operator[>] identifier[userList2] operator[SEP] {
identifier[Common] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP]... |
public static FullTypeSignature getTypeSignature(String typeSignatureString,
boolean useInternalFormFullyQualifiedName) {
String key;
if (!useInternalFormFullyQualifiedName) {
key = typeSignatureString.replace('.', '/')
.replace('$', '.');
} else {
key = typeSignatureString;
}
// we always use ... | class class_name[name] begin[{]
method[getTypeSignature, return_type[type[FullTypeSignature]], modifier[public static], parameter[typeSignatureString, useInternalFormFullyQualifiedName]] begin[{]
local_variable[type[String], key]
if[member[.useInternalFormFullyQualifiedName]] begin[{]
... | Keyword[public] Keyword[static] identifier[FullTypeSignature] identifier[getTypeSignature] operator[SEP] identifier[String] identifier[typeSignatureString] , Keyword[boolean] identifier[useInternalFormFullyQualifiedName] operator[SEP] {
identifier[String] identifier[key] operator[SEP] Keyword[if] operator[SEP] ... |
public static byte[] readFile(File file) throws IOException {
// Open file
RandomAccessFile f = new RandomAccessFile(file, "r");
try {
// Get and check length
long longlength = f.length();
int length = (int) longlength;
if (length != longlength) {
... | class class_name[name] begin[{]
method[readFile, return_type[type[byte]], modifier[public static], parameter[file]] begin[{]
local_variable[type[RandomAccessFile], f]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodIn... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[readFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[RandomAccessFile] identifier[f] operator[=] Keyword[new] identifier[RandomAccessFile] operator[SEP] ide... |
public void writeColumn(String value) throws IllegalArgumentException, IOException
{
if (value == null)
{
if (! this.nullableColumns[this.currentColumn])
{
throw new IllegalArgumentException(
"Bulk load will fail as a null value cann... | class class_name[name] begin[{]
method[writeColumn, return_type[void], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
if[THIS[member[None.nullableColumns]ArraySelector(index=This(postfix_operators=[], prefix_... | Keyword[public] Keyword[void] identifier[writeColumn] operator[SEP] identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[IOException] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
Keyword[if] oper... |
public void addInheritedMemberSummary(AbstractMemberWriter mw, ClassDoc cd,
ProgramElementDoc member, boolean isFirst, Content linksTree) {
if (! isFirst) {
linksTree.addContent(", ");
}
mw.addInheritedSummaryLink(cd, member, linksTree);
} | class class_name[name] begin[{]
method[addInheritedMemberSummary, return_type[void], modifier[public], parameter[mw, cd, member, isFirst, linksTree]] begin[{]
if[member[.isFirst]] begin[{]
call[linksTree.addContent, parameter[literal[", "]]]
else begin[{]
None
... | Keyword[public] Keyword[void] identifier[addInheritedMemberSummary] operator[SEP] identifier[AbstractMemberWriter] identifier[mw] , identifier[ClassDoc] identifier[cd] , identifier[ProgramElementDoc] identifier[member] , Keyword[boolean] identifier[isFirst] , identifier[Content] identifier[linksTree] operator[SEP] ... |
public int getVersion(final Object iPojo) {
checkOpenness();
final ODocument record = getRecordByUserObject(iPojo, false);
if (record != null)
return record.getVersion();
return OObjectSerializerHelper.getObjectVersion(iPojo);
} | class class_name[name] begin[{]
method[getVersion, return_type[type[int]], modifier[public], parameter[iPojo]] begin[{]
call[.checkOpenness, parameter[]]
local_variable[type[ODocument], record]
if[binary_operation[member[.record], !=, literal[null]]] begin[{]
return[call... | Keyword[public] Keyword[int] identifier[getVersion] operator[SEP] Keyword[final] identifier[Object] identifier[iPojo] operator[SEP] {
identifier[checkOpenness] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ODocument] identifier[record] operator[=] identifier[getRecordByUserObject] operator[... |
void errorDownload(OfflineDownloadOptions offlineDownload, String error, String errorMessage) {
stateChangeDispatcher.onError(offlineDownload, error, errorMessage);
offlineDownloads.remove(offlineDownload);
} | class class_name[name] begin[{]
method[errorDownload, return_type[void], modifier[default], parameter[offlineDownload, error, errorMessage]] begin[{]
call[stateChangeDispatcher.onError, parameter[member[.offlineDownload], member[.error], member[.errorMessage]]]
call[offlineDownl... | Keyword[void] identifier[errorDownload] operator[SEP] identifier[OfflineDownloadOptions] identifier[offlineDownload] , identifier[String] identifier[error] , identifier[String] identifier[errorMessage] operator[SEP] {
identifier[stateChangeDispatcher] operator[SEP] identifier[onError] operator[SEP] identifier[... |
protected DatasetBuilder readCatalogRef(DatasetBuilder parent, Element catRefElem) {
String title = catRefElem.getAttributeValue("title", Catalog.xlinkNS);
if (title == null) {
title = catRefElem.getAttributeValue("name");
}
String href = catRefElem.getAttributeValue("href", Catalog.xlinkNS);
... | class class_name[name] begin[{]
method[readCatalogRef, return_type[type[DatasetBuilder]], modifier[protected], parameter[parent, catRefElem]] begin[{]
local_variable[type[String], title]
if[binary_operation[member[.title], ==, literal[null]]] begin[{]
assign[memb... | Keyword[protected] identifier[DatasetBuilder] identifier[readCatalogRef] operator[SEP] identifier[DatasetBuilder] identifier[parent] , identifier[Element] identifier[catRefElem] operator[SEP] {
identifier[String] identifier[title] operator[=] identifier[catRefElem] operator[SEP] identifier[getAttributeValue] op... |
public SetTimeSeekVodOperation buildSetTimeSeekVodOperation(int hours, int minutes, int seconds){
return new SetTimeSeekVodOperation(getOperationFactory(), hours, minutes, seconds);
} | class class_name[name] begin[{]
method[buildSetTimeSeekVodOperation, return_type[type[SetTimeSeekVodOperation]], modifier[public], parameter[hours, minutes, seconds]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOperationFactory, postfix_operators=[], prefix_operator... | Keyword[public] identifier[SetTimeSeekVodOperation] identifier[buildSetTimeSeekVodOperation] operator[SEP] Keyword[int] identifier[hours] , Keyword[int] identifier[minutes] , Keyword[int] identifier[seconds] operator[SEP] {
Keyword[return] Keyword[new] identifier[SetTimeSeekVodOperation] operator[SEP] identifi... |
public static Fragment attributeIndex(
@Nullable VarProperty varProperty, Variable start, Label label, Object attributeValue) {
String attributeIndex = Schema.generateAttributeIndex(label, attributeValue.toString());
return new AutoValue_AttributeIndexFragment(varProperty, start, attributeIn... | class class_name[name] begin[{]
method[attributeIndex, return_type[type[Fragment]], modifier[public static], parameter[varProperty, start, label, attributeValue]] begin[{]
local_variable[type[String], attributeIndex]
return[ClassCreator(arguments=[MemberReference(member=varProperty, postfix_ope... | Keyword[public] Keyword[static] identifier[Fragment] identifier[attributeIndex] operator[SEP] annotation[@] identifier[Nullable] identifier[VarProperty] identifier[varProperty] , identifier[Variable] identifier[start] , identifier[Label] identifier[label] , identifier[Object] identifier[attributeValue] operator[SEP]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.