code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public final Object getObject(Cipher c)
throws IOException, ClassNotFoundException, IllegalBlockSizeException,
BadPaddingException
{
/*
* Unseal the object
*/
byte[] content = c.doFinal(this.encryptedContent);
/*
* De-serialize it
*/
... | class class_name[name] begin[{]
method[getObject, return_type[type[Object]], modifier[final public], parameter[c]] begin[{]
local_variable[type[byte], content]
local_variable[type[ByteArrayInputStream], b]
local_variable[type[ObjectInput], a]
TryStatement(block=[LocalVariableDec... | Keyword[public] Keyword[final] identifier[Object] identifier[getObject] operator[SEP] identifier[Cipher] identifier[c] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] , identifier[IllegalBlockSizeException] , identifier[BadPaddingException] {
Keyword[byte] operator[S... |
public static Configuration createConfiguration(UnderFileSystemConfiguration conf) {
Preconditions.checkNotNull(conf, "conf");
Configuration hdfsConf = new Configuration();
// Load HDFS site properties from the given file and overwrite the default HDFS conf,
// the path of this file can be passed throu... | class class_name[name] begin[{]
method[createConfiguration, return_type[type[Configuration]], modifier[public static], parameter[conf]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.conf], literal["conf"]]]
local_variable[type[Configuration], hdfsConf]
ForStatement... | Keyword[public] Keyword[static] identifier[Configuration] identifier[createConfiguration] operator[SEP] identifier[UnderFileSystemConfiguration] identifier[conf] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[conf] , literal[String] operator[SEP] operat... |
public static Map loadYamlProperties(final Resource... resource) {
val factory = new YamlPropertiesFactoryBean();
factory.setResolutionMethod(YamlProcessor.ResolutionMethod.OVERRIDE);
factory.setResources(resource);
factory.setSingleton(true);
factory.afterPropertiesSet();
... | class class_name[name] begin[{]
method[loadYamlProperties, return_type[type[Map]], modifier[public static], parameter[resource]] begin[{]
local_variable[type[val], factory]
call[factory.setResolutionMethod, parameter[member[YamlProcessor.ResolutionMethod.OVERRIDE]]]
call... | Keyword[public] Keyword[static] identifier[Map] identifier[loadYamlProperties] operator[SEP] Keyword[final] identifier[Resource] operator[...] identifier[resource] operator[SEP] {
identifier[val] identifier[factory] operator[=] Keyword[new] identifier[YamlPropertiesFactoryBean] operator[SEP] operator[SEP] operat... |
public static Method getMethod(Class<?> type, Class<?>... parameterTypes) {
return WhiteboxImpl.getMethod(type, parameterTypes);
} | class class_name[name] begin[{]
method[getMethod, return_type[type[Method]], modifier[public static], parameter[type, parameterTypes]] begin[{]
return[call[WhiteboxImpl.getMethod, parameter[member[.type], member[.parameterTypes]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Method] identifier[getMethod] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[parameterTypes] operator[SEP] {
Keyword[return] identifier[WhiteboxImpl] ... |
private static void adjustQuality(Map<String, Float> pFormatQuality, String pFormat, float pFactor) {
Float oldValue = pFormatQuality.get(pFormat);
if (oldValue != null) {
pFormatQuality.put(pFormat, oldValue * pFactor);
//System.out.println("New vallue after multiplying with... | class class_name[name] begin[{]
method[adjustQuality, return_type[void], modifier[private static], parameter[pFormatQuality, pFormat, pFactor]] begin[{]
local_variable[type[Float], oldValue]
if[binary_operation[member[.oldValue], !=, literal[null]]] begin[{]
call... | Keyword[private] Keyword[static] Keyword[void] identifier[adjustQuality] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Float] operator[>] identifier[pFormatQuality] , identifier[String] identifier[pFormat] , Keyword[float] identifier[pFactor] operator[SEP] {
identifier[Float] ident... |
public static MountStatus fromValue(int value) {
MountStatus mountStatus = VALUES.get(value);
if (mountStatus == null) {
mountStatus = new MountStatus(value);
VALUES.put(value, mountStatus);
}
return mountStatus;
} | class class_name[name] begin[{]
method[fromValue, return_type[type[MountStatus]], modifier[public static], parameter[value]] begin[{]
local_variable[type[MountStatus], mountStatus]
if[binary_operation[member[.mountStatus], ==, literal[null]]] begin[{]
assign[memb... | Keyword[public] Keyword[static] identifier[MountStatus] identifier[fromValue] operator[SEP] Keyword[int] identifier[value] operator[SEP] {
identifier[MountStatus] identifier[mountStatus] operator[=] identifier[VALUES] operator[SEP] identifier[get] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keywo... |
public synchronized void setAsciiStream(String parameterName,
java.io.InputStream x) throws SQLException {
super.setAsciiStream(findParameterIndex(parameterName), x);
} | class class_name[name] begin[{]
method[setAsciiStream, return_type[void], modifier[synchronized public], parameter[parameterName, x]] begin[{]
SuperMethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=parameterName, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[setAsciiStream] operator[SEP] identifier[String] identifier[parameterName] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[InputStream] identifier[x] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[super] op... |
public long add(long instant, long months) {
int i_months = (int)months;
if (i_months == months) {
return add(instant, i_months);
}
// Copied from add(long, int) and modified slightly:
long timePart = iChronology.getMillisOfDay(instant);
int thisYear = iChr... | class class_name[name] begin[{]
method[add, return_type[type[long]], modifier[public], parameter[instant, months]] begin[{]
local_variable[type[int], i_months]
if[binary_operation[member[.i_months], ==, member[.months]]] begin[{]
return[call[.add, parameter[member[.instant],... | Keyword[public] Keyword[long] identifier[add] operator[SEP] Keyword[long] identifier[instant] , Keyword[long] identifier[months] operator[SEP] {
Keyword[int] identifier[i_months] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[months] operator[SEP] Keyword[if] operator[SEP] identifier[i_months] ... |
public void startElement(
String namespaceURI,
String localName,
String name,
Attributes atts)
throws org.xml.sax.SAXException
{
if (m_inEntityRef)
return;
if (m_needToCallStartDocument)
{
startDocumentInternal();
m... | class class_name[name] begin[{]
method[startElement, return_type[void], modifier[public], parameter[namespaceURI, localName, name, atts]] begin[{]
if[member[.m_inEntityRef]] begin[{]
return[None]
else begin[{]
None
end[}]
if[member[.m_needToCallStartDocument]] be... | Keyword[public] Keyword[void] identifier[startElement] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localName] , identifier[String] identifier[name] , identifier[Attributes] identifier[atts] operator[SEP] Keyword[throws] identifier[org] operator[SEP] identifier[xml] opera... |
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
final java.io.ObjectOutputStream.PutField fields = s.putFields();
final Object[] data;
synchronized (this) {
fields.put("capacityIncrement", capacityIncrement);
fields.put("ele... | class class_name[name] begin[{]
method[writeObject, return_type[void], modifier[private], parameter[s]] begin[{]
local_variable[type[java], fields]
local_variable[type[Object], data]
SYNCHRONIZED[THIS[]] BEGIN[{]
call[fields.put, parameter[literal["capaci... | Keyword[private] Keyword[void] identifier[writeObject] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[ObjectOutputStream] identifier[s] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[IOException] {
Keyword[final] identifi... |
public OptionalLong maxByDouble(LongToDoubleFunction keyExtractor) {
return collect(PrimitiveBox::new, (box, l) -> {
double key = keyExtractor.applyAsDouble(l);
if (!box.b || Double.compare(box.d, key) < 0) {
box.b = true;
box.d = key;
... | class class_name[name] begin[{]
method[maxByDouble, return_type[type[OptionalLong]], modifier[public], parameter[keyExtractor]] begin[{]
return[call[.collect, parameter[MethodReference(expression=MemberReference(member=PrimitiveBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ... | Keyword[public] identifier[OptionalLong] identifier[maxByDouble] operator[SEP] identifier[LongToDoubleFunction] identifier[keyExtractor] operator[SEP] {
Keyword[return] identifier[collect] operator[SEP] identifier[PrimitiveBox] operator[::] Keyword[new] , operator[SEP] identifier[box] , identifier[l] operator[... |
public RepositoryFile getRepositoryFile() throws ResourceException {
if (_fileRef == null || _fileRef.get() == null) {
throw new ResourceException(this, "RepositoryFile '" + _qualifiedPath
+ "' is not available since it was not serializable. The RepositoryFileResource instance ca... | class class_name[name] begin[{]
method[getRepositoryFile, return_type[type[RepositoryFile]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[._fileRef], ==, literal[null]], ||, binary_operation[call[_fileRef.get, parameter[]], ==, literal[null]]]] begin[{]
... | Keyword[public] identifier[RepositoryFile] identifier[getRepositoryFile] operator[SEP] operator[SEP] Keyword[throws] identifier[ResourceException] {
Keyword[if] operator[SEP] identifier[_fileRef] operator[==] Other[null] operator[||] identifier[_fileRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] ... |
public static boolean isFieldDeprecated(JavacNode field) {
if (!(field.get() instanceof JCVariableDecl)) return false;
JCVariableDecl fieldNode = (JCVariableDecl) field.get();
if ((fieldNode.mods.flags & Flags.DEPRECATED) != 0) {
return true;
}
for (JavacNode child : field.down()) {
if (annotationTypeMa... | class class_name[name] begin[{]
method[isFieldDeprecated, return_type[type[boolean]], modifier[public static], parameter[field]] begin[{]
if[binary_operation[call[field.get, parameter[]], instanceof, type[JCVariableDecl]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isFieldDeprecated] operator[SEP] identifier[JavacNode] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[field] operator[SEP] identifier[get] operator[SEP] operator[SEP] Keyword[instanceof] identifier[JCVar... |
private void iconvertDataPrimitiveScalar(BaseType dodsScalar, IndexIterator ii) {
if (dodsScalar instanceof DString) {
String sval = ((DString) dodsScalar).getValue();
ii.setObjectNext(sval);
} else if (dodsScalar instanceof DUInt32) {
int ival = ((DUInt32) dodsScalar).getValue();
... | class class_name[name] begin[{]
method[iconvertDataPrimitiveScalar, return_type[void], modifier[private], parameter[dodsScalar, ii]] begin[{]
if[binary_operation[member[.dodsScalar], instanceof, type[DString]]] begin[{]
local_variable[type[String], sval]
call... | Keyword[private] Keyword[void] identifier[iconvertDataPrimitiveScalar] operator[SEP] identifier[BaseType] identifier[dodsScalar] , identifier[IndexIterator] identifier[ii] operator[SEP] {
Keyword[if] operator[SEP] identifier[dodsScalar] Keyword[instanceof] identifier[DString] operator[SEP] {
identifi... |
public static int find(Object[] array, Object object) {
for (int i = 0; i < array.length; i++) {
if (array[i] == object) {
// hadles both nulls
return i;
}
if (object != null && object.equals(array[i])) {
return i;
... | class class_name[name] begin[{]
method[find, return_type[type[int]], modifier[public static], parameter[array, object]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=array, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[static] Keyword[int] identifier[find] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[array] , identifier[Object] identifier[object] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] ... |
@Deprecated
@SuppressWarnings("unused")
public void middleClick() { // TODO(andreastt): Add this to Actions
Point point = coordinates.inViewPort();
exec.mouseAction(point.x, point.y, OperaMouseKeys.MIDDLE);
} | class class_name[name] begin[{]
method[middleClick, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Point], point]
call[exec.mouseAction, parameter[member[point.x], member[point.y], member[OperaMouseKeys.MIDDLE]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[middleClick] operator[SEP] operator[SEP] {
identifier[Point] identifier[point] operator[=] identifier[coordinates] operator[SEP] identifier[inViewPo... |
public static String hostAndPortToUrlString(String host, int port) throws UnknownHostException {
return ipAddressAndPortToUrlString(InetAddress.getByName(host), port);
} | class class_name[name] begin[{]
method[hostAndPortToUrlString, return_type[type[String]], modifier[public static], parameter[host, port]] begin[{]
return[call[.ipAddressAndPortToUrlString, parameter[call[InetAddress.getByName, parameter[member[.host]]], member[.port]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[hostAndPortToUrlString] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] Keyword[throws] identifier[UnknownHostException] {
Keyword[return] identifier[ipAddressAndPortToUrlString] operator[SEP] identifie... |
@Override
public void endVisit(VariableDeclarationFragment fragment) {
//TODO(malvania): Add field to elementReferenceMap when field detection is enabled and the
// ElementUtil.getBinaryName() method doesn't break when called on a static block's
// ExecutableElement.
//String fieldID = stitchFieldId... | class class_name[name] begin[{]
method[endVisit, return_type[void], modifier[public], parameter[fragment]] begin[{]
local_variable[type[Element], element]
if[binary_operation[member[.element], instanceof, type[TypeElement]]] begin[{]
local_variable[type[TypeElement], type]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[endVisit] operator[SEP] identifier[VariableDeclarationFragment] identifier[fragment] operator[SEP] {
identifier[Element] identifier[element] operator[=] identifier[fragment] operator[SEP] identifier[getVariableElement] operator[SEP] oper... |
static int mergeBasicConstraints(X509Certificate cert, int maxPathLength) {
int pathLenConstraint = cert.getBasicConstraints();
if (!X509CertImpl.isSelfIssued(cert)) {
maxPathLength--;
}
if (pathLenConstraint < maxPathLength) {
maxPathLength = pathLenConstraint... | class class_name[name] begin[{]
method[mergeBasicConstraints, return_type[type[int]], modifier[static], parameter[cert, maxPathLength]] begin[{]
local_variable[type[int], pathLenConstraint]
if[call[X509CertImpl.isSelfIssued, parameter[member[.cert]]]] begin[{]
me... | Keyword[static] Keyword[int] identifier[mergeBasicConstraints] operator[SEP] identifier[X509Certificate] identifier[cert] , Keyword[int] identifier[maxPathLength] operator[SEP] {
Keyword[int] identifier[pathLenConstraint] operator[=] identifier[cert] operator[SEP] identifier[getBasicConstraints] operator[SEP] o... |
@Nonnull
public static IHCConversionSettings createConversionSettings ()
{
// Create HTML without namespaces
final HCConversionSettings aRealCS = HCSettings.getMutableConversionSettings ().getClone ();
aRealCS.getMutableXMLWriterSettings ().setEmitNamespaces (false);
// Remove any "HCCustomizerAuto... | class class_name[name] begin[{]
method[createConversionSettings, return_type[type[IHCConversionSettings]], modifier[public static], parameter[]] begin[{]
local_variable[type[HCConversionSettings], aRealCS]
call[aRealCS.getMutableXMLWriterSettings, parameter[]]
local_variable[typ... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[IHCConversionSettings] identifier[createConversionSettings] operator[SEP] operator[SEP] {
Keyword[final] identifier[HCConversionSettings] identifier[aRealCS] operator[=] identifier[HCSettings] operator[SEP] identifier[getMutableConversi... |
private static void traverseAndBuild(int height, int pos, List<Sha256Hash> allLeafHashes, byte[] includeBits,
List<Boolean> matchedChildBits, List<Sha256Hash> resultHashes) {
boolean parentOfMatch = false;
// Is this node a parent of at least one matched hash?
... | class class_name[name] begin[{]
method[traverseAndBuild, return_type[void], modifier[private static], parameter[height, pos, allLeafHashes, includeBits, matchedChildBits, resultHashes]] begin[{]
local_variable[type[boolean], parentOfMatch]
ForStatement(body=BlockStatement(label=None, statements... | Keyword[private] Keyword[static] Keyword[void] identifier[traverseAndBuild] operator[SEP] Keyword[int] identifier[height] , Keyword[int] identifier[pos] , identifier[List] operator[<] identifier[Sha256Hash] operator[>] identifier[allLeafHashes] , Keyword[byte] operator[SEP] operator[SEP] identifier[includeBits] , i... |
public static JTSGeometryExpression<?> collect(Expression<? extends Geometry> expr1, Expression<? extends Geometry> expr2) {
return geometryOperation(SpatialOps.COLLECT2, expr1, expr2);
} | class class_name[name] begin[{]
method[collect, return_type[type[JTSGeometryExpression]], modifier[public static], parameter[expr1, expr2]] begin[{]
return[call[.geometryOperation, parameter[member[SpatialOps.COLLECT2], member[.expr1], member[.expr2]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[JTSGeometryExpression] operator[<] operator[?] operator[>] identifier[collect] operator[SEP] identifier[Expression] operator[<] operator[?] Keyword[extends] identifier[Geometry] operator[>] identifier[expr1] , identifier[Expression] operator[<] operator[?] Keyword[extends] id... |
public void marshall(UpdateRequestValidatorRequest updateRequestValidatorRequest, ProtocolMarshaller protocolMarshaller) {
if (updateRequestValidatorRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateRequestValidatorRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateRequestValidatorRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateRequestValidatorRequest] identifier[updateRequestValidatorRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateRequestValidatorRequest] operator[==] Ot... |
protected Dataset getDatasetOrThrowException(final Uri uri) {
final Dataset dataset = mMatcher.matchDataset(uri);
if (dataset == null) {
throw new IllegalArgumentException("Unsupported URI: " + uri);
}
if (dataset instanceof ContextDataset) {
((ContextDataset)dataset).setContext(getContext());
}
retur... | class class_name[name] begin[{]
method[getDatasetOrThrowException, return_type[type[Dataset]], modifier[protected], parameter[uri]] begin[{]
local_variable[type[Dataset], dataset]
if[binary_operation[member[.dataset], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cl... | Keyword[protected] identifier[Dataset] identifier[getDatasetOrThrowException] operator[SEP] Keyword[final] identifier[Uri] identifier[uri] operator[SEP] {
Keyword[final] identifier[Dataset] identifier[dataset] operator[=] identifier[mMatcher] operator[SEP] identifier[matchDataset] operator[SEP] identifier[uri] o... |
public static Map<Integer, Integer> refineSymmetry(Map<Integer, Integer> alignment,int k) throws StructureException {
// Store scores
Map<Integer, Double> scores = null;
scores = initializeScores(alignment,scores, k);
// Store eligible residues
// Eligible if:
// 1. score(x)>0
// 2. f^K-1(x) is define... | class class_name[name] begin[{]
method[refineSymmetry, return_type[type[Map]], modifier[public static], parameter[alignment, k]] begin[{]
local_variable[type[Map], scores]
assign[member[.scores], call[.initializeScores, parameter[member[.alignment], member[.scores], member[.k]]]]
... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[refineSymmetry] operator[SEP] identifier[Map] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[alignment] , Keyword[int] identifier[k] operator[SEP] Keyword[throws]... |
public IPromise connectRequiredServices() {
Log.Info(this, "connecting required services ..");
if ( requiredServices.size() == 0 ) {
return resolve();
}
IPromise res = new Promise<>();
serviceRegistry.get().getServiceMap().then((smap, err) -> {
List<IPromi... | class class_name[name] begin[{]
method[connectRequiredServices, return_type[type[IPromise]], modifier[public], parameter[]] begin[{]
call[Log.Info, parameter[THIS[], literal["connecting required services .."]]]
if[binary_operation[call[requiredServices.size, parameter[]], ==, li... | Keyword[public] identifier[IPromise] identifier[connectRequiredServices] operator[SEP] operator[SEP] {
identifier[Log] operator[SEP] identifier[Info] operator[SEP] Keyword[this] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requiredServices] operator[SEP] identifier[size] op... |
public void marshall(ListInventoryEntriesRequest listInventoryEntriesRequest, ProtocolMarshaller protocolMarshaller) {
if (listInventoryEntriesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshal... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[listInventoryEntriesRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listInventoryEntriesRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(ar... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListInventoryEntriesRequest] identifier[listInventoryEntriesRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listInventoryEntriesRequest] operator[==] Other[nu... |
private HttpURLConnection createHeadConnection(String path) throws IOException {
HttpURLConnection connection = createHttpURLConnectionToMassive(path);
connection.setRequestMethod("HEAD");
return connection;
} | class class_name[name] begin[{]
method[createHeadConnection, return_type[type[HttpURLConnection]], modifier[private], parameter[path]] begin[{]
local_variable[type[HttpURLConnection], connection]
call[connection.setRequestMethod, parameter[literal["HEAD"]]]
return[member[.connec... | Keyword[private] identifier[HttpURLConnection] identifier[createHeadConnection] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[HttpURLConnection] identifier[connection] operator[=] identifier[createHttpURLConnectionToMassive] operator[SEP] ide... |
@Override
public void addAlias(Object key, Object[] aliasArray) {
final String methodName = "addAlias(key, aliasArray)";
functionNotAvailable(methodName);
} | class class_name[name] begin[{]
method[addAlias, return_type[void], modifier[public], parameter[key, aliasArray]] begin[{]
local_variable[type[String], methodName]
call[.functionNotAvailable, parameter[member[.methodName]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addAlias] operator[SEP] identifier[Object] identifier[key] , identifier[Object] operator[SEP] operator[SEP] identifier[aliasArray] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] oper... |
public void deleteCurrent(SITransaction transaction)
throws SISessionUnavailableException, SISessionDroppedException,
SIResourceException, SIConnectionLostException, SILimitExceededException,
SIIncorrectCallException,
SIErrorException, SIMPMessageNotLockedException
{
if (TraceComponen... | class class_name[name] begin[{]
method[deleteCurrent, return_type[void], modifier[public], parameter[transaction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPILockedMessageEnumeration.tc.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[deleteCurrent] operator[SEP] identifier[SITransaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifier[SIResourceException] , identifier[SIConnectionLostException] , identifi... |
public double set(double value)
{
String prevValue = setString(Double.toString(limit(value)));
if (prevValue == null) {
prevValue = getDefaultValue();
if (prevValue == null) {
return noValue();
}
}
double v = Double.parseDouble(pre... | class class_name[name] begin[{]
method[set, return_type[type[double]], modifier[public], parameter[value]] begin[{]
local_variable[type[String], prevValue]
if[binary_operation[member[.prevValue], ==, literal[null]]] begin[{]
assign[member[.prevValue], call[.getDe... | Keyword[public] Keyword[double] identifier[set] operator[SEP] Keyword[double] identifier[value] operator[SEP] {
identifier[String] identifier[prevValue] operator[=] identifier[setString] operator[SEP] identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[limit] operator[SEP] identifier[v... |
@Override
public void initializeParts() {
super.initializeParts();
node = new StackPane();
fieldLabel = new Label();
readOnlyLabel = new Label();
editableSpinner = new Spinner<>();
editableSpinner.setEditable(true);
} | class class_name[name] begin[{]
method[initializeParts, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=initializeParts, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
assign[mem... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initializeParts] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[initializeParts] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[=] Keyword[new] identifier[StackPane] operator[SEP] operator[SEP]... |
@NotNull
public static Metadata readMetadata(@NotNull final InputStream inputStream, final long streamLength, final FileType fileType) throws IOException, ImageProcessingException
{
switch (fileType) {
case Jpeg:
return JpegMetadataReader.readMetadata(inputStream);
... | class class_name[name] begin[{]
method[readMetadata, return_type[type[Metadata]], modifier[public static], parameter[inputStream, streamLength, fileType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['Jpeg'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReferenc... | annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[Metadata] identifier[readMetadata] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[InputStream] identifier[inputStream] , Keyword[final] Keyword[long] identifier[streamLength] , Keyword[final] identifier[FileType] i... |
public boolean removeLastOccurrence(Object o) {
if (o != null) {
int mask = elements.length - 1;
int i = (tail - 1) & mask;
for (Object x; (x = elements[i]) != null; i = (i - 1) & mask) {
if (o.equals(x)) {
delete(i);
re... | class class_name[name] begin[{]
method[removeLastOccurrence, return_type[type[boolean]], modifier[public], parameter[o]] begin[{]
if[binary_operation[member[.o], !=, literal[null]]] begin[{]
local_variable[type[int], mask]
local_variable[type[int], i]
ForStat... | Keyword[public] Keyword[boolean] identifier[removeLastOccurrence] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[!=] Other[null] operator[SEP] {
Keyword[int] identifier[mask] operator[=] identifier[elements] operator[SEP] identifier[leng... |
static void export(String path, String queueName, DbConn cnx) throws JqmXmlException
{
// Argument tests
if (queueName == null)
{
throw new IllegalArgumentException("queue name cannot be null");
}
if (cnx == null)
{
throw new IllegalArgumentExc... | class class_name[name] begin[{]
method[export, return_type[void], modifier[static], parameter[path, queueName, cnx]] begin[{]
if[binary_operation[member[.queueName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_o... | Keyword[static] Keyword[void] identifier[export] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[queueName] , identifier[DbConn] identifier[cnx] operator[SEP] Keyword[throws] identifier[JqmXmlException] {
Keyword[if] operator[SEP] identifier[queueName] operator[==] Other[null]... |
public static List<CommerceOrderNote> toModels(
CommerceOrderNoteSoap[] soapModels) {
if (soapModels == null) {
return null;
}
List<CommerceOrderNote> models = new ArrayList<CommerceOrderNote>(soapModels.length);
for (CommerceOrderNoteSoap soapModel : soapModels) {
models.add(toModel(soapModel));
}
... | class class_name[name] begin[{]
method[toModels, return_type[type[List]], modifier[public static], parameter[soapModels]] begin[{]
if[binary_operation[member[.soapModels], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_vari... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceOrderNote] operator[>] identifier[toModels] operator[SEP] identifier[CommerceOrderNoteSoap] operator[SEP] operator[SEP] identifier[soapModels] operator[SEP] {
Keyword[if] operator[SEP] identifier[soapModels] operator[==] Other[null] ... |
@Nullable
public static Date parseDate(String dateValue, Collection<String> dateFormats) {
return parseDate(dateValue, dateFormats, DEFAULT_TWO_DIGIT_YEAR_START);
} | class class_name[name] begin[{]
method[parseDate, return_type[type[Date]], modifier[public static], parameter[dateValue, dateFormats]] begin[{]
return[call[.parseDate, parameter[member[.dateValue], member[.dateFormats], member[.DEFAULT_TWO_DIGIT_YEAR_START]]]]
end[}]
END[}] | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[Date] identifier[parseDate] operator[SEP] identifier[String] identifier[dateValue] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[dateFormats] operator[SEP] {
Keyword[return] identifier[parseDate] opera... |
void defineAttributesForStrictMode() {
Context cx = Context.getContext();
if (!cx.isStrictMode()) {
return;
}
setGetterOrSetter("caller", 0, new ThrowTypeError("caller"), true);
setGetterOrSetter("caller", 0, new ThrowTypeError("caller"), false);
setGetterOrSe... | class class_name[name] begin[{]
method[defineAttributesForStrictMode, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[Context], cx]
if[call[cx.isStrictMode, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[void] identifier[defineAttributesForStrictMode] operator[SEP] operator[SEP] {
identifier[Context] identifier[cx] operator[=] identifier[Context] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[cx] operator[SEP] identifier[isS... |
public static <N, V> HColumn<N, V> createColumn(N name, V value) {
return createColumn(name, value, createClock());
} | class class_name[name] begin[{]
method[createColumn, return_type[type[HColumn]], modifier[public static], parameter[name, value]] begin[{]
return[call[.createColumn, parameter[member[.name], member[.value], call[.createClock, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[N] , identifier[V] operator[>] identifier[HColumn] operator[<] identifier[N] , identifier[V] operator[>] identifier[createColumn] operator[SEP] identifier[N] identifier[name] , identifier[V] identifier[value] operator[SEP] {
Keyword[return] identifier[cre... |
@Override
@Deprecated
public void write(ObjectOutput output) throws IOException {
if (!output.equals(oos)) {
throw new IllegalArgumentException("Attempting to write to a different stream than the one that created this PutField");
}
for (EmulatedFields.ObjectSlot slot : emulat... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[output]] begin[{]
if[call[output.equals, parameter[member[.oos]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=Non... | annotation[@] identifier[Override] annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ObjectOutput] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[output] operator[SEP] identifi... |
private static NoSuchBeingException missingConstructorException(Class<?> clazz, Object... arguments)
{
Type[] types = new Type[arguments.length];
for(int i = 0; i < arguments.length; ++i) {
types[i] = arguments[i].getClass();
}
return new NoSuchBeingException("Missing constructor(%s) for |... | class class_name[name] begin[{]
method[missingConstructorException, return_type[type[NoSuchBeingException]], modifier[private static], parameter[clazz, arguments]] begin[{]
local_variable[type[Type], types]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=... | Keyword[private] Keyword[static] identifier[NoSuchBeingException] identifier[missingConstructorException] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[Object] operator[...] identifier[arguments] operator[SEP] {
identifier[Type] operator[SEP] operator[SEP] id... |
String processVersion(String version) {
if (version == null || version.trim().isEmpty() || version.equals(APPENGINE_CONFIG)) {
throw new IllegalArgumentException(VERSION_ERROR);
} else if (version.equals(GCLOUD_CONFIG)) {
return null;
}
return version;
} | class class_name[name] begin[{]
method[processVersion, return_type[type[String]], modifier[default], parameter[version]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.version], ==, literal[null]], ||, call[version.trim, parameter[]]], ||, call[version.equals, parameter[... | identifier[String] identifier[processVersion] operator[SEP] identifier[String] identifier[version] operator[SEP] {
Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[||] identifier[version] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] o... |
public void marshall(APNSChannelRequest aPNSChannelRequest, ProtocolMarshaller protocolMarshaller) {
if (aPNSChannelRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(aPNSChannelRequest.getBun... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[aPNSChannelRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.aPNSChannelRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[APNSChannelRequest] identifier[aPNSChannelRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[aPNSChannelRequest] operator[==] Other[null] operator[SEP] {
... |
@SuppressWarnings({"fallthrough", "PMD.MissingBreakInSwitch",
"PMD.SwitchStmtsShouldHaveDefault", "NullAway"})
private @Nullable Expirable<V> postProcess(Expirable<V> expirable,
EntryProcessorEntry<K, V> entry, long currentTimeMS) {
switch (entry.getAction()) {
case NONE:
if (expirable == ... | class class_name[name] begin[{]
method[postProcess, return_type[type[Expirable]], modifier[private], parameter[expirable, entry, currentTimeMS]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['NONE'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=expirable... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String] , literal[String] , literal[String]
} operator[SEP] Keyword[private] annotation[@] identifier[Nullable] identifier[Expirable] operator[<] identifier[V] operator[>] identifier[postProcess] operator[SEP] identifier[E... |
protected void initializeDynamicTypeStructures( MethodVisitor mv, ClassDefinition classDef) {
if ( classDef.isFullTraiting() ) {
mv.visitVarInsn( ALOAD, 0 );
mv.visitTypeInsn( NEW, Type.getInternalName( TraitFieldTMSImpl.class ) );
mv.visitInsn( DUP );
mv.visitMe... | class class_name[name] begin[{]
method[initializeDynamicTypeStructures, return_type[void], modifier[protected], parameter[mv, classDef]] begin[{]
if[call[classDef.isFullTraiting, parameter[]]] begin[{]
call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]]
... | Keyword[protected] Keyword[void] identifier[initializeDynamicTypeStructures] operator[SEP] identifier[MethodVisitor] identifier[mv] , identifier[ClassDefinition] identifier[classDef] operator[SEP] {
Keyword[if] operator[SEP] identifier[classDef] operator[SEP] identifier[isFullTraiting] operator[SEP] operator[SE... |
protected IScope createStaticFeaturesScope(EObject featureCall, IScope parent, IFeatureScopeSession session) {
return new StaticImportsScope(parent, session, asAbstractFeatureCall(featureCall));
} | class class_name[name] begin[{]
method[createStaticFeaturesScope, return_type[type[IScope]], modifier[protected], parameter[featureCall, parent, session]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberR... | Keyword[protected] identifier[IScope] identifier[createStaticFeaturesScope] operator[SEP] identifier[EObject] identifier[featureCall] , identifier[IScope] identifier[parent] , identifier[IFeatureScopeSession] identifier[session] operator[SEP] {
Keyword[return] Keyword[new] identifier[StaticImportsScope] operat... |
@Override
public final long optLong(final String key, final long defaultValue) {
Long result = optLong(key);
return result == null ? defaultValue : result;
} | class class_name[name] begin[{]
method[optLong, return_type[type[long]], modifier[final public], parameter[key, defaultValue]] begin[{]
local_variable[type[Long], result]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_oper... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[long] identifier[optLong] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] Keyword[long] identifier[defaultValue] operator[SEP] {
identifier[Long] identifier[result] operator[=] identifier[optLong] operator... |
public void wakeup() {
synchronized(worker) {
if (!started) {
return;
}
if (!this.isSynchronized) {
this.isSynchronized = true;
scheduler.submit(worker,worker.getQueueNumber());
}
... | class class_name[name] begin[{]
method[wakeup, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.worker]] BEGIN[{]
if[member[.started]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[wakeup] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[worker] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[started] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[i... |
private void manageService(Entity rawEntity){
CloudFoundryService cloudFoundryService;
if (rawEntity instanceof CloudFoundryService){
cloudFoundryService = (CloudFoundryService) rawEntity;
String serviceName = cloudFoundryService
.getConfig(CloudFou... | class class_name[name] begin[{]
method[manageService, return_type[void], modifier[private], parameter[rawEntity]] begin[{]
local_variable[type[CloudFoundryService], cloudFoundryService]
if[binary_operation[member[.rawEntity], instanceof, type[CloudFoundryService]]] begin[{]
... | Keyword[private] Keyword[void] identifier[manageService] operator[SEP] identifier[Entity] identifier[rawEntity] operator[SEP] {
identifier[CloudFoundryService] identifier[cloudFoundryService] operator[SEP] Keyword[if] operator[SEP] identifier[rawEntity] Keyword[instanceof] identifier[CloudFoundryService] operato... |
@NullSafe
public static String defaultIfBlank(String value, String... defaultValues) {
if (isBlank(value)) {
for (String defaultValue : defaultValues) {
if (hasText(defaultValue)) {
return defaultValue;
}
}
}
return value;
} | class class_name[name] begin[{]
method[defaultIfBlank, return_type[type[String]], modifier[public static], parameter[value, defaultValues]] begin[{]
if[call[.isBlank, parameter[member[.value]]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=... | annotation[@] identifier[NullSafe] Keyword[public] Keyword[static] identifier[String] identifier[defaultIfBlank] operator[SEP] identifier[String] identifier[value] , identifier[String] operator[...] identifier[defaultValues] operator[SEP] {
Keyword[if] operator[SEP] identifier[isBlank] operator[SEP] identifier[... |
public boolean modified() {
if (log.isDebugEnabled())
log.debug("modified()");
for (Entry<String,ResourceEntry> entry : resourceEntries.entrySet()) {
long cachedLastModified = entry.getValue().lastModified;
long lastModified = resources.getClassLoaderResource(
... | class class_name[name] begin[{]
method[modified, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[literal["modified()"]]]
else begin[{]
None
end[}]
ForStatement(bo... | Keyword[public] Keyword[boolean] identifier[modified] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP... |
public static List<String> convertPinyinList2TonePinyinList(List<Pinyin> pinyinList)
{
List<String> tonePinyinList = new ArrayList<String>(pinyinList.size());
for (Pinyin pinyin : pinyinList)
{
tonePinyinList.add(pinyin.getPinyinWithToneMark());
}
return tonePiny... | class class_name[name] begin[{]
method[convertPinyinList2TonePinyinList, return_type[type[List]], modifier[public static], parameter[pinyinList]] begin[{]
local_variable[type[List], tonePinyinList]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInv... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[convertPinyinList2TonePinyinList] operator[SEP] identifier[List] operator[<] identifier[Pinyin] operator[>] identifier[pinyinList] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] ide... |
public static void writeFlowId(Message message, String flowId) {
Map<String, List<String>> headers = getOrCreateProtocolHeader(message);
headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId));
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("HTTP header '" + FLOWID_HTTP_H... | class class_name[name] begin[{]
method[writeFlowId, return_type[void], modifier[public static], parameter[message, flowId]] begin[{]
local_variable[type[Map], headers]
call[headers.put, parameter[member[.FLOWID_HTTP_HEADER_NAME], call[Collections.singletonList, parameter[member[.flowId]... | Keyword[public] Keyword[static] Keyword[void] identifier[writeFlowId] operator[SEP] identifier[Message] identifier[message] , identifier[String] identifier[flowId] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier... |
public String processAndMerge(final List<Resource> resources, final ProcessingCriteria criteria)
throws IOException {
notNull(criteria);
LOG.debug("criteria: {}", criteria);
callbackRegistry.onBeforeMerge();
try {
notNull(resources);
LOG.debug("process and merge resources: {}", resourc... | class class_name[name] begin[{]
method[processAndMerge, return_type[type[String]], modifier[public], parameter[resources, criteria]] begin[{]
call[.notNull, parameter[member[.criteria]]]
call[LOG.debug, parameter[literal["criteria: {}"], member[.criteria]]]
call[... | Keyword[public] identifier[String] identifier[processAndMerge] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Resource] operator[>] identifier[resources] , Keyword[final] identifier[ProcessingCriteria] identifier[criteria] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[... |
@Override
public DeleteConfigRuleResult deleteConfigRule(DeleteConfigRuleRequest request) {
request = beforeClientExecution(request);
return executeDeleteConfigRule(request);
} | class class_name[name] begin[{]
method[deleteConfigRule, return_type[type[DeleteConfigRuleResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeleteConfigRule, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[DeleteConfigRuleResult] identifier[deleteConfigRule] operator[SEP] identifier[DeleteConfigRuleRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP... |
public boolean isBeanGenericType() {
String stripped = type;
if (isArrayType()) {
stripped = type.substring(0, type.length() - 2);
}
return bean.isTypeGenerifiedBy(stripped);
} | class class_name[name] begin[{]
method[isBeanGenericType, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[String], stripped]
if[call[.isArrayType, parameter[]]] begin[{]
assign[member[.stripped], call[type.substring, parame... | Keyword[public] Keyword[boolean] identifier[isBeanGenericType] operator[SEP] operator[SEP] {
identifier[String] identifier[stripped] operator[=] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[isArrayType] operator[SEP] operator[SEP] operator[SEP] {
identifier[stripped] operator[=]... |
public long skip(final long byteCount) throws IOException {
if (byteCount <= 0) {
return 0;
}
final int bSize = (int) Math.min(MAX_SKIP_BUFFER_SIZE, byteCount);
final byte[] b = new byte[bSize];
long skipped = 0;
while (skipped < byteCount) {
final int toRead = (int) Math.min(byteCou... | class class_name[name] begin[{]
method[skip, return_type[type[long]], modifier[public], parameter[byteCount]] begin[{]
if[binary_operation[member[.byteCount], <=, literal[0]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
local_variable[type[int], bSi... | Keyword[public] Keyword[long] identifier[skip] operator[SEP] Keyword[final] Keyword[long] identifier[byteCount] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[byteCount] operator[<=] Other[0] operator[SEP] {
Keyword[return] Other[0] operator[SEP]
} ... |
protected CertPathValidatorResult validate(CertPath certPath) throws CertPathValidatorException {
List<? extends Certificate> certificates = certPath.getCertificates();
if (certificates.size() == 0) {
return null;
}
X509Certificate cert;
TBSCertificateStructure tbsC... | class class_name[name] begin[{]
method[validate, return_type[type[CertPathValidatorResult]], modifier[protected], parameter[certPath]] begin[{]
local_variable[type[List], certificates]
if[binary_operation[call[certificates.size, parameter[]], ==, literal[0]]] begin[{]
return... | Keyword[protected] identifier[CertPathValidatorResult] identifier[validate] operator[SEP] identifier[CertPath] identifier[certPath] operator[SEP] Keyword[throws] identifier[CertPathValidatorException] {
identifier[List] operator[<] operator[?] Keyword[extends] identifier[Certificate] operator[>] identifier[certi... |
public void addExecuteOnlyIfColumnExists(String theTableName, String theColumnName) {
myConditionalOnExistenceOf.add(new TableAndColumn(theTableName, theColumnName));
} | class class_name[name] begin[{]
method[addExecuteOnlyIfColumnExists, return_type[void], modifier[public], parameter[theTableName, theColumnName]] begin[{]
call[myConditionalOnExistenceOf.add, parameter[ClassCreator(arguments=[MemberReference(member=theTableName, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[void] identifier[addExecuteOnlyIfColumnExists] operator[SEP] identifier[String] identifier[theTableName] , identifier[String] identifier[theColumnName] operator[SEP] {
identifier[myConditionalOnExistenceOf] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[TableAndColum... |
private TypePair getPropertyType(Object bean, String name) throws IllegalAccessException, InvocationTargetException {
try {
PropertyDescriptor propDescriptor = PropertyUtils.getPropertyDescriptor(bean, name);
if(propDescriptor!=null) {
Method m = propDescriptor.getWriteMe... | class class_name[name] begin[{]
method[getPropertyType, return_type[type[TypePair]], modifier[private], parameter[bean, name]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(mem... | Keyword[private] identifier[TypePair] identifier[getPropertyType] operator[SEP] identifier[Object] identifier[bean] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IllegalAccessException] , identifier[InvocationTargetException] {
Keyword[try] {
identifier[PropertyDescr... |
protected Collection<T> convertToSingleElementCollection(final Object value) {
Collection<T> collection = createCollection(0);
//noinspection unchecked
collection.add((T) value);
return collection;
} | class class_name[name] begin[{]
method[convertToSingleElementCollection, return_type[type[Collection]], modifier[protected], parameter[value]] begin[{]
local_variable[type[Collection], collection]
call[collection.add, parameter[Cast(expression=MemberReference(member=value, postfix_opera... | Keyword[protected] identifier[Collection] operator[<] identifier[T] operator[>] identifier[convertToSingleElementCollection] operator[SEP] Keyword[final] identifier[Object] identifier[value] operator[SEP] {
identifier[Collection] operator[<] identifier[T] operator[>] identifier[collection] operator[=] identifier... |
public int openForWrite(String Filename, WaveFile OtherWave)
{
return openForWrite(Filename, OtherWave.getSamplingRate(), OtherWave.getBitsPerSample(), OtherWave.getNumChannels());
} | class class_name[name] begin[{]
method[openForWrite, return_type[type[int]], modifier[public], parameter[Filename, OtherWave]] begin[{]
return[call[.openForWrite, parameter[member[.Filename], call[OtherWave.getSamplingRate, parameter[]], call[OtherWave.getBitsPerSample, parameter[]], call[OtherWave.get... | Keyword[public] Keyword[int] identifier[openForWrite] operator[SEP] identifier[String] identifier[Filename] , identifier[WaveFile] identifier[OtherWave] operator[SEP] {
Keyword[return] identifier[openForWrite] operator[SEP] identifier[Filename] , identifier[OtherWave] operator[SEP] identifier[getSamplingRate] ... |
private <T extends ServiceType> Binding getBinding(String nameAttribute, T parent) {
Bindings bindings = parent.getBindings();
if (bindings != null) {
for (Binding binding : bindings.getBinding()) {
if (binding.getName().equals(nameAttribute)) {
return binding;
}
}
} else {
bindings = new... | class class_name[name] begin[{]
method[getBinding, return_type[type[Binding]], modifier[private], parameter[nameAttribute, parent]] begin[{]
local_variable[type[Bindings], bindings]
if[binary_operation[member[.bindings], !=, literal[null]]] begin[{]
ForStatement(body=BlockSt... | Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[ServiceType] operator[>] identifier[Binding] identifier[getBinding] operator[SEP] identifier[String] identifier[nameAttribute] , identifier[T] identifier[parent] operator[SEP] {
identifier[Bindings] identifier[bindings] operator[=] identifie... |
public void setParameters(Map<String, Object> parameters) {
if (parameters != null) {
this.tmpStore.putAll(parameters);
}
} | class class_name[name] begin[{]
method[setParameters, return_type[void], modifier[public], parameter[parameters]] begin[{]
if[binary_operation[member[.parameters], !=, literal[null]]] begin[{]
THIS[member[None.tmpStore]call[None.putAll, parameter[member[.parameters]]]]
... | Keyword[public] Keyword[void] identifier[setParameters] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[SEP] {
Keyword[if] operator[SEP] identifier[parameters] operator[!=] Other[null] operator[SEP] {
Keyword[this] operator... |
@Override
public GetDiskSnapshotResult getDiskSnapshot(GetDiskSnapshotRequest request) {
request = beforeClientExecution(request);
return executeGetDiskSnapshot(request);
} | class class_name[name] begin[{]
method[getDiskSnapshot, return_type[type[GetDiskSnapshotResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetDiskSnapshot, parameter[member[.req... | annotation[@] identifier[Override] Keyword[public] identifier[GetDiskSnapshotResult] identifier[getDiskSnapshot] operator[SEP] identifier[GetDiskSnapshotRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o... |
private void configureJobLevelMetrics(final JobRunner jobRunner) {
this.logger.info("Configuring Azkaban metrics tracking for jobrunner object");
if (MetricReportManager.isAvailable()) {
final MetricReportManager metricManager = MetricReportManager.getInstance();
// Adding NumRunningJobMetric liste... | class class_name[name] begin[{]
method[configureJobLevelMetrics, return_type[void], modifier[private], parameter[jobRunner]] begin[{]
THIS[member[None.logger]call[None.info, parameter[literal["Configuring Azkaban metrics tracking for jobrunner object"]]]]
if[call[MetricReportMan... | Keyword[private] Keyword[void] identifier[configureJobLevelMetrics] operator[SEP] Keyword[final] identifier[JobRunner] identifier[jobRunner] operator[SEP] {
Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator... |
@BeforeSuite(alwaysRun=true)
@Parameters(value={"parameters"})
public static void startSelenium(String parameters)
{
parametersMap = parameterScanner(parameters);
parametersInfo();
String browserName = parametersMap.get("browser"),
profile = parametersMap.get("profile"),
chromeDriverBin = parame... | class class_name[name] begin[{]
method[startSelenium, return_type[void], modifier[public static], parameter[parameters]] begin[{]
assign[member[.parametersMap], call[.parameterScanner, parameter[member[.parameters]]]]
call[.parametersInfo, parameter[]]
local_variable[typ... | annotation[@] identifier[BeforeSuite] operator[SEP] identifier[alwaysRun] operator[=] literal[boolean] operator[SEP] annotation[@] identifier[Parameters] operator[SEP] identifier[value] operator[=] {
literal[String]
} operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[startSelenium] operat... |
public static <G, A, ERR, I extends Iterable<? extends G>> Or<I, Every<ERR>>
combined(Iterable<? extends Or<? extends G, ? extends Every<? extends ERR>>> input,
Collector<? super G, A, I> collector) {
A goods = collector.supplier().get();
Vector<ERR> errs = Vector.empty();
for (Or<? extends G, ... | class class_name[name] begin[{]
method[combined, return_type[type[Or]], modifier[public static], parameter[input, collector]] begin[{]
local_variable[type[A], goods]
local_variable[type[Vector], errs]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodI... | Keyword[public] Keyword[static] operator[<] identifier[G] , identifier[A] , identifier[ERR] , identifier[I] Keyword[extends] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[G] operator[>] operator[>] identifier[Or] operator[<] identifier[I] , identifier[Every] operator[<] identifier[ERR] op... |
public String getFileContentsAsString(final File file, final String encoding)
throws IOException {
LOG.info("Getting files contents as string: " + file);
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(
file), encoding));
StringBuilder builder = new... | class class_name[name] begin[{]
method[getFileContentsAsString, return_type[type[String]], modifier[public], parameter[file, encoding]] begin[{]
call[LOG.info, parameter[binary_operation[literal["Getting files contents as string: "], +, member[.file]]]]
local_variable[type[BufferedReade... | Keyword[public] identifier[String] identifier[getFileContentsAsString] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[String] identifier[encoding] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] lite... |
protected Set<String> normalizeWhitelist(Set<String> whitelist) {
Set<String> result = new HashSet<>();
for (String line : whitelist) {
String trimmed = line.trim();
if (trimmed.isEmpty() || trimmed.charAt(0) == '#') {
// strip out empty lines and comments.
continue;
}
/... | class class_name[name] begin[{]
method[normalizeWhitelist, return_type[type[Set]], modifier[protected], parameter[whitelist]] begin[{]
local_variable[type[Set], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclara... | Keyword[protected] identifier[Set] operator[<] identifier[String] operator[>] identifier[normalizeWhitelist] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[whitelist] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[result] operator[=] Key... |
@Override
public final void make(final Map<String, Object> pReqVars) throws Exception {
@SuppressWarnings("unchecked")
AFactoryAppBeans<RS> factoryAppBeans =
(AFactoryAppBeans<RS>) this.factoryAndServlet.getFactoryAppBeans();
this.factoryAndServlet.getHttpServlet().getServletContext()
.setAttr... | class class_name[name] begin[{]
method[make, return_type[void], modifier[final public], parameter[pReqVars]] begin[{]
local_variable[type[AFactoryAppBeans], factoryAppBeans]
THIS[member[None.factoryAndServlet]call[None.getHttpServlet, parameter[]]call[None.getServletContext, parameter[]... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[make] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pReqVars] operator[SEP] Keyword[throws] identifier[Exception] {
annotation[@] identifier[Suppre... |
private void wrongUsage() {
String usage = "Usage: java -cp $PATH_TO_OPENCMS_JAR org.opencms.rmi.CmsRemoteShellClient\n"
+ " -script=[path to script] (optional) \n"
+ " -registryPort=[port of RMI registry] (optional, default is "
+ CmsRemoteShellConstants.DEFAULT_PORT
... | class class_name[name] begin[{]
method[wrongUsage, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], usage]
call[System.out.println, parameter[member[.usage]]]
call[System.exit, parameter[literal[1]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[wrongUsage] operator[SEP] operator[SEP] {
identifier[String] identifier[usage] operator[=] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[CmsRemoteShellConstants] operator[SEP] identifier[DEFAULT_PORT] operator[+] literal[S... |
public static <T, K> KeyedStream<T, K> reinterpretAsKeyedStream(
DataStream<T> stream,
KeySelector<T, K> keySelector) {
return reinterpretAsKeyedStream(
stream,
keySelector,
TypeExtractor.getKeySelectorTypes(keySelector, stream.getType()));
} | class class_name[name] begin[{]
method[reinterpretAsKeyedStream, return_type[type[KeyedStream]], modifier[public static], parameter[stream, keySelector]] begin[{]
return[call[.reinterpretAsKeyedStream, parameter[member[.stream], member[.keySelector], call[TypeExtractor.getKeySelectorTypes, parameter[me... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] operator[>] identifier[KeyedStream] operator[<] identifier[T] , identifier[K] operator[>] identifier[reinterpretAsKeyedStream] operator[SEP] identifier[DataStream] operator[<] identifier[T] operator[>] identifier[stream] , identifier[KeySelect... |
@Indexable(type = IndexableType.DELETE)
@Override
public CommerceShipment deleteCommerceShipment(
CommerceShipment commerceShipment) {
return commerceShipmentPersistence.remove(commerceShipment);
} | class class_name[name] begin[{]
method[deleteCommerceShipment, return_type[type[CommerceShipment]], modifier[public], parameter[commerceShipment]] begin[{]
return[call[commerceShipmentPersistence.remove, parameter[member[.commerceShipment]]]]
end[}]
END[}] | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CommerceShipment] identifier[deleteCommerceShipment] operator[SEP] identifier[CommerceShipment] identifier... |
public Boolean getAsBoolean() {
if (value instanceof String) {
return Boolean.parseBoolean((String)value);
}
return (Boolean)value;
} | class class_name[name] begin[{]
method[getAsBoolean, return_type[type[Boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.value], instanceof, type[String]]] begin[{]
return[call[Boolean.parseBoolean, parameter[Cast(expression=MemberReference(member=value, ... | Keyword[public] identifier[Boolean] identifier[getAsBoolean] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] {
Keyword[return] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] operator[SEP] identifie... |
public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
return (getClosedByMergeRequests(projectIdOrPath, issueIid, getDefaultPerPage()).all());
} | class class_name[name] begin[{]
method[getClosedByMergeRequests, return_type[type[List]], modifier[public], parameter[projectIdOrPath, issueIid]] begin[{]
return[call[.getClosedByMergeRequests, parameter[member[.projectIdOrPath], member[.issueIid], call[.getDefaultPerPage, parameter[]]]]]
end[}]
EN... | Keyword[public] identifier[List] operator[<] identifier[MergeRequest] operator[>] identifier[getClosedByMergeRequests] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[Integer] identifier[issueIid] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[S... |
public void setPatterns(final List<String> patterns) {
// Check sanity
validateDiSetterCalledBeforeInitialization("patternPrefix");
// Check sanity
if (patterns != null) {
// Assign internal state
this.patterns = new ArrayList<String>();
this.patter... | class class_name[name] begin[{]
method[setPatterns, return_type[void], modifier[public], parameter[patterns]] begin[{]
call[.validateDiSetterCalledBeforeInitialization, parameter[literal["patternPrefix"]]]
if[binary_operation[member[.patterns], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setPatterns] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[patterns] operator[SEP] {
identifier[validateDiSetterCalledBeforeInitialization] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator... |
public static boolean[] toBooleanArray(Collection<Boolean> c){
boolean arr[] = new boolean[c.size()];
int i=0;
for(Boolean item: c)
arr[i++] = item;
return arr;
} | class class_name[name] begin[{]
method[toBooleanArray, return_type[type[boolean]], modifier[public static], parameter[c]] begin[{]
local_variable[type[boolean], arr]
local_variable[type[int], i]
ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(memb... | Keyword[public] Keyword[static] Keyword[boolean] operator[SEP] operator[SEP] identifier[toBooleanArray] operator[SEP] identifier[Collection] operator[<] identifier[Boolean] operator[>] identifier[c] operator[SEP] {
Keyword[boolean] identifier[arr] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[bool... |
protected String escapeApostrophes(String text) {
String resultString;
if (text.contains("'")) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("concat('");
stringBuilder.append(text.replace("'", "',\"'\",'"));
stringBuilder.append("')");
resultString = stringBuilder.t... | class class_name[name] begin[{]
method[escapeApostrophes, return_type[type[String]], modifier[protected], parameter[text]] begin[{]
local_variable[type[String], resultString]
if[call[text.contains, parameter[literal["'"]]]] begin[{]
local_variable[type[StringBuilder], string... | Keyword[protected] identifier[String] identifier[escapeApostrophes] operator[SEP] identifier[String] identifier[text] operator[SEP] {
identifier[String] identifier[resultString] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP]... |
protected void adjustSyncTimeout(int timeoutMs) {
int timeoutSec = (timeoutMs + 999) / 1000;
// Finds out the smallest timeout which is powers of 2 and larger than
// timeoutMs.
for (int i = 0; i < 32; ++i) {
if ((1 << i) >= timeoutSec) {
LOG.debug("Adjust timeout to {} sec", 1 << i);
... | class class_name[name] begin[{]
method[adjustSyncTimeout, return_type[void], modifier[protected], parameter[timeoutMs]] begin[{]
local_variable[type[int], timeoutSec]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl... | Keyword[protected] Keyword[void] identifier[adjustSyncTimeout] operator[SEP] Keyword[int] identifier[timeoutMs] operator[SEP] {
Keyword[int] identifier[timeoutSec] operator[=] operator[SEP] identifier[timeoutMs] operator[+] Other[999] operator[SEP] operator[/] Other[1000] operator[SEP] Keyword[for] operator[SEP]... |
public <K, V> Set<Map.Entry<K, V>> entrySet(Map<K, V> map) {
return map.entrySet();
} | class class_name[name] begin[{]
method[entrySet, return_type[type[Set]], modifier[public], parameter[map]] begin[{]
return[call[map.entrySet, parameter[]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[entrySet] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] ... |
@Override
public ListCoreDefinitionsResult listCoreDefinitions(ListCoreDefinitionsRequest request) {
request = beforeClientExecution(request);
return executeListCoreDefinitions(request);
} | class class_name[name] begin[{]
method[listCoreDefinitions, return_type[type[ListCoreDefinitionsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListCoreDefinitions, parameter... | annotation[@] identifier[Override] Keyword[public] identifier[ListCoreDefinitionsResult] identifier[listCoreDefinitions] operator[SEP] identifier[ListCoreDefinitionsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ope... |
private boolean isValid(Variant variant) {
return (variant.getReference().matches(VARIANT_STRING_PATTERN)
&& variant.getAlternate().matches(VARIANT_STRING_PATTERN)
&& !variant.getAlternate().equals(variant.getReference()));
} | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[private], parameter[variant]] begin[{]
return[binary_operation[binary_operation[call[variant.getReference, parameter[]], &&, call[variant.getAlternate, parameter[]]], &&, call[variant.getAlternate, parameter[]]]]
e... | Keyword[private] Keyword[boolean] identifier[isValid] operator[SEP] identifier[Variant] identifier[variant] operator[SEP] {
Keyword[return] operator[SEP] identifier[variant] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] identifier[VARIANT_STRIN... |
public List<FlowEvent> getFlowEvents(FlowKey flowKey) throws IOException {
byte[] startKey =
Bytes.add(flowKeyConverter.toBytes(flowKey), Constants.SEP_BYTES);
Scan scan = new Scan(startKey);
scan.setFilter(new WhileMatchFilter(new PrefixFilter(startKey)));
List<FlowEvent> results = new ArrayLi... | class class_name[name] begin[{]
method[getFlowEvents, return_type[type[List]], modifier[public], parameter[flowKey]] begin[{]
local_variable[type[byte], startKey]
local_variable[type[Scan], scan]
call[scan.setFilter, parameter[ClassCreator(arguments=[ClassCreator(arguments=[Memb... | Keyword[public] identifier[List] operator[<] identifier[FlowEvent] operator[>] identifier[getFlowEvents] operator[SEP] identifier[FlowKey] identifier[flowKey] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[startKey] operator[=] identifier[Bytes] opera... |
public String textOutput(BoundingBox boundingBox) {
StringBuilder output = new StringBuilder();
output.append("\tMin Longitude: " + boundingBox.getMinLongitude());
output.append("\n\tMin Latitude: " + boundingBox.getMinLatitude());
output.append("\n\tMax Longitude: " + boundingBox.getMaxLongitude());
output.a... | class class_name[name] begin[{]
method[textOutput, return_type[type[String]], modifier[public], parameter[boundingBox]] begin[{]
local_variable[type[StringBuilder], output]
call[output.append, parameter[binary_operation[literal["\tMin Longitude: "], +, call[boundingBox.getMinLongitude, ... | Keyword[public] identifier[String] identifier[textOutput] operator[SEP] identifier[BoundingBox] identifier[boundingBox] operator[SEP] {
identifier[StringBuilder] identifier[output] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identi... |
private ImmutableMultimap<RelationDefinition, ExtensionalDataNode> extractDataNodeMap(IntermediateQuery query,
InnerJoinNode joinNode) {
return query.getChildren(joinNode).stream()
.filter(c -> c instanceof... | class class_name[name] begin[{]
method[extractDataNodeMap, return_type[type[ImmutableMultimap]], modifier[private], parameter[query, joinNode]] begin[{]
return[call[query.getChildren, parameter[member[.joinNode]]]]
end[}]
END[}] | Keyword[private] identifier[ImmutableMultimap] operator[<] identifier[RelationDefinition] , identifier[ExtensionalDataNode] operator[>] identifier[extractDataNodeMap] operator[SEP] identifier[IntermediateQuery] identifier[query] , identifier[InnerJoinNode] identifier[joinNode] operator[SEP] {
Keyword[return] i... |
public static void main(final String[] args) throws Exception {
if (args.length < 1) {
printUsage();
return;
}
for (int i = 0; i < args.length; i++) {
String s = args[i];
if (s.equals("--db")) {
db = args[i + 1];
... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
if[binary_operation[member[args.length], <, literal[1]]] begin[{]
call[.printUsage, parameter[]]
return[None]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[<] Other[1] operat... |
public <T extends BaseNlpEntity> List<T> getEntities(Class<T> clazz) {
List<BaseNlpEntity> resultList = new ArrayList<>();
for (BaseNlpEntity item : getEntities()) {
if (item.getClass().equals(clazz)) {
resultList.add(item);
}
}
return (List<T>) resultList;
} | class class_name[name] begin[{]
method[getEntities, return_type[type[List]], modifier[public], parameter[clazz]] begin[{]
local_variable[type[List], resultList]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getClass, postfix... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[BaseNlpEntity] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getEntities] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] {
identifier[List] operator[<] iden... |
private Element addSoapEnvelopeBody(Document doc) {
Element env = doc.createElementNS(IfmapStrings.SOAP_ENV_NS_URI,
IfmapStrings.SOAP_PREFIXED_ENV_EL_NAME);
Element body = doc.createElementNS(IfmapStrings.SOAP_ENV_NS_URI,
IfmapStrings.SOAP_PREFIXED_BODY_EL_NAME);
doc.appendChild(env);
env.appendChild(bo... | class class_name[name] begin[{]
method[addSoapEnvelopeBody, return_type[type[Element]], modifier[private], parameter[doc]] begin[{]
local_variable[type[Element], env]
local_variable[type[Element], body]
call[doc.appendChild, parameter[member[.env]]]
call[env.appe... | Keyword[private] identifier[Element] identifier[addSoapEnvelopeBody] operator[SEP] identifier[Document] identifier[doc] operator[SEP] {
identifier[Element] identifier[env] operator[=] identifier[doc] operator[SEP] identifier[createElementNS] operator[SEP] identifier[IfmapStrings] operator[SEP] identifier[SOAP_EN... |
public static Sprite circle(int diameter, int color, int lineWidth) {
int[] pix = new int[diameter * diameter];
for (int i = 0; i < lineWidth; i++) {
drawCircle(pix, diameter - i, diameter, color);
}
return new Sprite(diameter, diameter, pix);
} | class class_name[name] begin[{]
method[circle, return_type[type[Sprite]], modifier[public static], parameter[diameter, color, lineWidth]] begin[{]
local_variable[type[int], pix]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[M... | Keyword[public] Keyword[static] identifier[Sprite] identifier[circle] operator[SEP] Keyword[int] identifier[diameter] , Keyword[int] identifier[color] , Keyword[int] identifier[lineWidth] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[pix] operator[=] Keyword[new] Keyword[int] operator[SEP... |
public OIdentifiable getKeyAt(final int iIndex) {
if (rids != null && rids[iIndex] != null)
return rids[iIndex];
final ORecordId rid = itemFromStream(iIndex);
if (rids != null)
rids[iIndex] = rid;
return rid;
} | class class_name[name] begin[{]
method[getKeyAt, return_type[type[OIdentifiable]], modifier[public], parameter[iIndex]] begin[{]
if[binary_operation[binary_operation[member[.rids], !=, literal[null]], &&, binary_operation[member[.rids], !=, literal[null]]]] begin[{]
return[member[.rids]]
... | Keyword[public] identifier[OIdentifiable] identifier[getKeyAt] operator[SEP] Keyword[final] Keyword[int] identifier[iIndex] operator[SEP] {
Keyword[if] operator[SEP] identifier[rids] operator[!=] Other[null] operator[&&] identifier[rids] operator[SEP] identifier[iIndex] operator[SEP] operator[!=] Other[null] ope... |
private CalculateAge resolveCalculateAge(Expression e, DateTimePrecision p) {
CalculateAge operator = of.createCalculateAge()
.withPrecision(p)
.withOperand(e);
builder.resolveUnaryCall("System", "CalculateAge", operator);
return operator;
} | class class_name[name] begin[{]
method[resolveCalculateAge, return_type[type[CalculateAge]], modifier[private], parameter[e, p]] begin[{]
local_variable[type[CalculateAge], operator]
call[builder.resolveUnaryCall, parameter[literal["System"], literal["CalculateAge"], member[.operator]]]... | Keyword[private] identifier[CalculateAge] identifier[resolveCalculateAge] operator[SEP] identifier[Expression] identifier[e] , identifier[DateTimePrecision] identifier[p] operator[SEP] {
identifier[CalculateAge] identifier[operator] operator[=] identifier[of] operator[SEP] identifier[createCalculateAge] operato... |
@Override
public Object map(Object input) {
String str = input.toString();
if (exceptions.contains(str)) {
return str;
} else {
return newValue;
}
} | class class_name[name] begin[{]
method[map, return_type[type[Object]], modifier[public], parameter[input]] begin[{]
local_variable[type[String], str]
if[call[exceptions.contains, parameter[member[.str]]]] begin[{]
return[member[.str]]
else begin[{]
return... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[map] operator[SEP] identifier[Object] identifier[input] operator[SEP] {
identifier[String] identifier[str] operator[=] identifier[input] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operat... |
public com.google.api.ads.admanager.axis.v201902.LineItem getLineItem() {
return lineItem;
} | class class_name[name] begin[{]
method[getLineItem, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.lineItem]]
end[}]
END[}] | Keyword[public] 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[LineItem] identifier[getLineItem] operator[SEP] operator[SEP] {
... |
public static boolean is64bits() {
String arch = System.getProperty("sun.arch.data.model");
if (Strings.isNullOrEmpty(arch)) {
arch = System.getProperty("os.arch");
}
return is64bits(arch);
} | class class_name[name] begin[{]
method[is64bits, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], arch]
if[call[Strings.isNullOrEmpty, parameter[member[.arch]]]] begin[{]
assign[member[.arch], call[System.get... | Keyword[public] Keyword[static] Keyword[boolean] identifier[is64bits] operator[SEP] operator[SEP] {
identifier[String] identifier[arch] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Strings] oper... |
public void setTense(String tense) {
if(StringUtils.isBlank(tense)) {
setTense(TENSE.UNSET);
}
else {
if(TENSE.FUTURE.toString().equalsIgnoreCase(tense.trim())) {
setTense(TENSE.FUTURE);
}
if(TENSE.PAST.toString().equalsIgnoreCase(tense.trim())) {
setTense(TENSE.PAST)... | class class_name[name] begin[{]
method[setTense, return_type[void], modifier[public], parameter[tense]] begin[{]
if[call[StringUtils.isBlank, parameter[member[.tense]]]] begin[{]
call[.setTense, parameter[member[TENSE.UNSET]]]
else begin[{]
... | Keyword[public] Keyword[void] identifier[setTense] operator[SEP] identifier[String] identifier[tense] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[tense] operator[SEP] operator[SEP] {
identifier[setTense] operator[SEP] ide... |
public static Stream<MutableIntTuple> coordinates(
Order order, IntTuple arraySize)
{
if (order == Order.COLEXICOGRAPHICAL)
{
return colexicographicalCoordinates(arraySize);
}
return lexicographicalCoordinates(arraySize);
} | class class_name[name] begin[{]
method[coordinates, return_type[type[Stream]], modifier[public static], parameter[order, arraySize]] begin[{]
if[binary_operation[member[.order], ==, member[Order.COLEXICOGRAPHICAL]]] begin[{]
return[call[.colexicographicalCoordinates, parameter[membe... | Keyword[public] Keyword[static] identifier[Stream] operator[<] identifier[MutableIntTuple] operator[>] identifier[coordinates] operator[SEP] identifier[Order] identifier[order] , identifier[IntTuple] identifier[arraySize] operator[SEP] {
Keyword[if] operator[SEP] identifier[order] operator[==] identifier[Order]... |
public IfcFanTypeEnum createIfcFanTypeEnumFromString(EDataType eDataType, String initialValue) {
IfcFanTypeEnum result = IfcFanTypeEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"... | class class_name[name] begin[{]
method[createIfcFanTypeEnumFromString, return_type[type[IfcFanTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcFanTypeEnum], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowSt... | Keyword[public] identifier[IfcFanTypeEnum] identifier[createIfcFanTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcFanTypeEnum] identifier[result] operator[=] identifier[IfcFanTypeEnum] operator[SEP] identif... |
private void cleanContentLeadingSpaces()
{
if (getContent().length() > 0) {
if (fPreviousInlineText.length() == 0
|| fPreviousInlineText
.charAt(fPreviousInlineText.length() - 1) == ' ')
{
trimLeadingWhiteSpaces();
}
... | class class_name[name] begin[{]
method[cleanContentLeadingSpaces, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[.getContent, parameter[]], >, literal[0]]] begin[{]
if[binary_operation[binary_operation[call[fPreviousInlineText.length... | Keyword[private] Keyword[void] identifier[cleanContentLeadingSpaces] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
Keyword[if] operator[SEP] id... |
public void shutdown() {
lock.lock();
try {
isShutdown = true;
notEmpty.signalAll();
notFull.signalAll();
}
finally {
lock.unlock();
}
} | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[public], parameter[]] begin[{]
call[lock.lock, parameter[]]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isShutdown, postfix_operators=[], prefix_operators=[]... | Keyword[public] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] {
identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[isShutdown] operator[=] literal[boolean] operator[SEP] identifier[notEmpty] operator[SEP] identifier[sign... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.