code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static TranslatecontentResult translatecontent(String accessToken, String lfrom, String lto, File content, String charsetName) {
HttpPost httpPost = new HttpPost(BASE_URI + "/cgi-bin/media/voice/translatecontent");
byte[] data;
try (BufferedReader reader = new BufferedReader(new Inpu... | class class_name[name] begin[{]
method[translatecontent, return_type[type[TranslatecontentResult]], modifier[public static], parameter[accessToken, lfrom, lto, content, charsetName]] begin[{]
local_variable[type[HttpPost], httpPost]
local_variable[type[byte], data]
TryStatement(block=[L... | Keyword[public] Keyword[static] identifier[TranslatecontentResult] identifier[translatecontent] operator[SEP] identifier[String] identifier[accessToken] , identifier[String] identifier[lfrom] , identifier[String] identifier[lto] , identifier[File] identifier[content] , identifier[String] identifier[charsetName] ope... |
private void updateEnabledItems() {
PickerSpinnerAdapter adapter = (PickerSpinnerAdapter) getAdapter();
// if the current item is out of range, we have no choice but to reset it
if(!isInDateRange(getSelectedDate())) {
final Calendar today = Calendar.getInstance();
if(isIn... | class class_name[name] begin[{]
method[updateEnabledItems, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[PickerSpinnerAdapter], adapter]
if[call[.isInDateRange, parameter[call[.getSelectedDate, parameter[]]]]] begin[{]
local_variable[type[Ca... | Keyword[private] Keyword[void] identifier[updateEnabledItems] operator[SEP] operator[SEP] {
identifier[PickerSpinnerAdapter] identifier[adapter] operator[=] operator[SEP] identifier[PickerSpinnerAdapter] operator[SEP] identifier[getAdapter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] oper... |
public static final String foldCase(String str, int options) {
if (str.length() <= 100) {
if (str.isEmpty()) {
return str;
}
// Collect and apply only changes.
// Good if no or few changes. Bad (slow) if many changes.
Edits edits = new ... | class class_name[name] begin[{]
method[foldCase, return_type[type[String]], modifier[final public static], parameter[str, options]] begin[{]
if[binary_operation[call[str.length, parameter[]], <=, literal[100]]] begin[{]
if[call[str.isEmpty, parameter[]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[foldCase] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[options] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] Other[100... |
private Node buildFromPoints(int lower, int upper) {
if (upper == lower) {
return null;
}
final Node node = new Node();
node.index = lower;
if (upper - lower > 1) {
// choose an arbitrary vantage point and move it to the start
int i = random.nextInt(upper - lower - 1) + lower;
listS... | class class_name[name] begin[{]
method[buildFromPoints, return_type[type[Node]], modifier[private], parameter[lower, upper]] begin[{]
if[binary_operation[member[.upper], ==, member[.lower]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_varia... | Keyword[private] identifier[Node] identifier[buildFromPoints] operator[SEP] Keyword[int] identifier[lower] , Keyword[int] identifier[upper] operator[SEP] {
Keyword[if] operator[SEP] identifier[upper] operator[==] identifier[lower] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
... |
public PutOperation<K, V> applyOperation(K key, PutOperation<K, V> existing, Operation<K, V> operation) {
final Result<K, V> newValue = operation.apply(existing);
if (newValue == null) {
return null;
} else {
return newValue.asOperationExpiringAt(Long.MAX_VALUE);
}
} | class class_name[name] begin[{]
method[applyOperation, return_type[type[PutOperation]], modifier[public], parameter[key, existing, operation]] begin[{]
local_variable[type[Result], newValue]
if[binary_operation[member[.newValue], ==, literal[null]]] begin[{]
return[literal[n... | Keyword[public] identifier[PutOperation] operator[<] identifier[K] , identifier[V] operator[>] identifier[applyOperation] operator[SEP] identifier[K] identifier[key] , identifier[PutOperation] operator[<] identifier[K] , identifier[V] operator[>] identifier[existing] , identifier[Operation] operator[<] identifier[K... |
boolean isSkipped(String path) {
Mapping mapping = mappings.get(path);
return mapping != null && mapping.isSkipped();
} | class class_name[name] begin[{]
method[isSkipped, return_type[type[boolean]], modifier[default], parameter[path]] begin[{]
local_variable[type[Mapping], mapping]
return[binary_operation[binary_operation[member[.mapping], !=, literal[null]], &&, call[mapping.isSkipped, parameter[]]]]
end[}]
... | Keyword[boolean] identifier[isSkipped] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[Mapping] identifier[mapping] operator[=] identifier[mappings] operator[SEP] identifier[get] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[mapping] operator[!... |
private static boolean isScrollable(AccessibilityNodeInfoCompat node) {
if (node.isScrollable()) {
return true;
}
return supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD,
AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
... | class class_name[name] begin[{]
method[isScrollable, return_type[type[boolean]], modifier[private static], parameter[node]] begin[{]
if[call[node.isScrollable, parameter[]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
return[call[.supportsAnyActi... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isScrollable] operator[SEP] identifier[AccessibilityNodeInfoCompat] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[isScrollable] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return... |
public static ConicGeneral_F64 convert(DMatrix3x3 src , ConicGeneral_F64 dst ) {
if( dst == null )
dst = new ConicGeneral_F64();
dst.A = src.a11; dst.B = 2*src.a12; dst.D = 2*src.a13;
dst.C = src.a22; dst.E = 2*src.a23;
dst.F = src.a33;
return dst;
} | class class_name[name] begin[{]
method[convert, return_type[type[ConicGeneral_F64]], modifier[public static], parameter[src, dst]] begin[{]
if[binary_operation[member[.dst], ==, literal[null]]] begin[{]
assign[member[.dst], ClassCreator(arguments=[], body=None, constructor_type_argu... | Keyword[public] Keyword[static] identifier[ConicGeneral_F64] identifier[convert] operator[SEP] identifier[DMatrix3x3] identifier[src] , identifier[ConicGeneral_F64] identifier[dst] operator[SEP] {
Keyword[if] operator[SEP] identifier[dst] operator[==] Other[null] operator[SEP] identifier[dst] operator[=] Keywor... |
@Nullable
protected byte [] getBoundary (@Nonnull final String sContentType)
{
// Parameter parser can handle null input
final ICommonsMap <String, String> aParams = new ParameterParser ().setLowerCaseNames (true)
.parse (sContentType, n... | class class_name[name] begin[{]
method[getBoundary, return_type[type[byte]], modifier[protected], parameter[sContentType]] begin[{]
local_variable[type[ICommonsMap], aParams]
local_variable[type[String], sBoundaryStr]
if[binary_operation[member[.sBoundaryStr], ==, literal[null]]... | annotation[@] identifier[Nullable] Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[getBoundary] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sContentType] operator[SEP] {
Keyword[final] identifier[ICommonsMap] operator[<] identifier[String] ... |
public static Class[] getParameters(String signature) throws FacesException
{
ArrayList<Class> params = new ArrayList<Class>();
// Signature is of the form
// <return-type> S <method-name S? '('
// < <arg-type> ( ',' <arg-type> )* )? ')'
int start = signature.indexOf('(') + 1... | class class_name[name] begin[{]
method[getParameters, return_type[type[Class]], modifier[public static], parameter[signature]] begin[{]
local_variable[type[ArrayList], params]
local_variable[type[int], start]
local_variable[type[boolean], lastArg]
while[literal[true]] be... | Keyword[public] Keyword[static] identifier[Class] operator[SEP] operator[SEP] identifier[getParameters] operator[SEP] identifier[String] identifier[signature] operator[SEP] Keyword[throws] identifier[FacesException] {
identifier[ArrayList] operator[<] identifier[Class] operator[>] identifier[params] operator[=] ... |
public static long getLong(final String name, final long defaultValue) {
String value = get(name);
if (value == null) {
return defaultValue;
}
value = value.trim().toLowerCase();
try {
return Long.parseLong(value);
}
catch (NumberFormatException nfex) {
return defaultValue;
}
} | class class_name[name] begin[{]
method[getLong, return_type[type[long]], modifier[public static], parameter[name, defaultValue]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[member[.defaultValue]]
... | Keyword[public] Keyword[static] Keyword[long] identifier[getLong] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[long] identifier[defaultValue] operator[SEP] {
identifier[String] identifier[value] operator[=] identifier[get] operator[SEP] identifier[name] operator[SEP]... |
public void disableJdbcLogging(WSRdbManagedConnectionImpl mc) throws ResourceException {
mc.mcf.reallySetLogWriter(null);
mc.mcf.loggingEnabled = false;
} | class class_name[name] begin[{]
method[disableJdbcLogging, return_type[void], modifier[public], parameter[mc]] begin[{]
call[mc.mcf.reallySetLogWriter, parameter[literal[null]]]
assign[member[mc.mcf.loggingEnabled], literal[false]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[disableJdbcLogging] operator[SEP] identifier[WSRdbManagedConnectionImpl] identifier[mc] operator[SEP] Keyword[throws] identifier[ResourceException] {
identifier[mc] operator[SEP] identifier[mcf] operator[SEP] identifier[reallySetLogWriter] operator[SEP] Other[null] operat... |
protected void connect(final InetSocketAddress localEP, final InetSocketAddress serverCtrlEP,
final CRI cri, final boolean useNAT) throws KNXException, InterruptedException
{
if (state != CLOSED)
throw new IllegalStateException("open connection");
ctrlEndpt = serverCtrlEP;
if (ctrlEndpt.isUnresolved())
t... | class class_name[name] begin[{]
method[connect, return_type[void], modifier[protected], parameter[localEP, serverCtrlEP, cri, useNAT]] begin[{]
if[binary_operation[member[.state], !=, member[.CLOSED]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pref... | Keyword[protected] Keyword[void] identifier[connect] operator[SEP] Keyword[final] identifier[InetSocketAddress] identifier[localEP] , Keyword[final] identifier[InetSocketAddress] identifier[serverCtrlEP] , Keyword[final] identifier[CRI] identifier[cri] , Keyword[final] Keyword[boolean] identifier[useNAT] operator[SE... |
protected boolean writeSpaceship(int type, boolean simulate) {
if (type != COMPARE_TO) return false;
/*
we will actually do
(x < y) ? -1 : ((x == y) ? 0 : 1)
which is the essence of what the call with Integers would do
this compiles to something along... | class class_name[name] begin[{]
method[writeSpaceship, return_type[type[boolean]], modifier[protected], parameter[type, simulate]] begin[{]
if[binary_operation[member[.type], !=, member[.COMPARE_TO]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[m... | Keyword[protected] Keyword[boolean] identifier[writeSpaceship] operator[SEP] Keyword[int] identifier[type] , Keyword[boolean] identifier[simulate] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[!=] identifier[COMPARE_TO] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[i... |
private static void register(ObjectName objectName, Object mbean) {
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
try {
if (!server.isRegistered(objectName)) {
server.registerMBean(mbean, objectName);
}
} catch (InstanceAlreadyExistsException
| MBeanRegistratio... | class class_name[name] begin[{]
method[register, return_type[void], modifier[private static], parameter[objectName, mbean]] begin[{]
local_variable[type[MBeanServer], server]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=objectName, postfix_operato... | Keyword[private] Keyword[static] Keyword[void] identifier[register] operator[SEP] identifier[ObjectName] identifier[objectName] , identifier[Object] identifier[mbean] operator[SEP] {
identifier[MBeanServer] identifier[server] operator[=] identifier[ManagementFactory] operator[SEP] identifier[getPlatformMBeanSer... |
public final int getCodePointValue(int ch)
{
int offset;
// fastpath for U+0000..U+D7FF
if(0 <= ch && ch < UTF16.LEAD_SURROGATE_MIN_VALUE) {
// copy of getRawOffset()
offset = (m_index_[ch >> INDEX_STAGE_1_SHIFT_] << INDEX_STAGE_2_SHIFT_)
+ (ch & ... | class class_name[name] begin[{]
method[getCodePointValue, return_type[type[int]], modifier[final public], parameter[ch]] begin[{]
local_variable[type[int], offset]
if[binary_operation[binary_operation[literal[0], <=, member[.ch]], &&, binary_operation[member[.ch], <, member[UTF16.LEAD_S... | Keyword[public] Keyword[final] Keyword[int] identifier[getCodePointValue] operator[SEP] Keyword[int] identifier[ch] operator[SEP] {
Keyword[int] identifier[offset] operator[SEP] Keyword[if] operator[SEP] Other[0] operator[<=] identifier[ch] operator[&&] identifier[ch] operator[<] identifier[UTF16] operator[SEP] ... |
public static void delete(@NotNull String path, @NotNull Handler handler) {
staticInstance().delete(prefixPath(path), handler);
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public static], parameter[path, handler]] begin[{]
call[.staticInstance, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[delete] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[path] , annotation[@] identifier[NotNull] identifier[Handler] identifier[handler] operator[SEP] {
identifier[staticInstance] operator[SEP] operator[SEP] operator[SEP] id... |
void openBuffer() {
if(buffer == null) {
try {
buffer = input.map(MapMode.READ_ONLY, 0, input.size());
}
catch(IOException e) {
throw new AbortException("Cannot map input bundle.", e);
}
}
} | class class_name[name] begin[{]
method[openBuffer, return_type[void], modifier[default], parameter[]] begin[{]
if[binary_operation[member[.buffer], ==, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buffer, p... | Keyword[void] identifier[openBuffer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[buffer] operator[==] Other[null] operator[SEP] {
Keyword[try] {
identifier[buffer] operator[=] identifier[input] operator[SEP] identifier[map] operator[SEP] identifier[MapMode] operat... |
protected boolean isZero( int index ) {
double bottom = Math.abs(diag[index])+Math.abs(diag[index+1]);
return( Math.abs(off[index]) <= bottom*UtilEjml.EPS);
} | class class_name[name] begin[{]
method[isZero, return_type[type[boolean]], modifier[protected], parameter[index]] begin[{]
local_variable[type[double], bottom]
return[binary_operation[call[Math.abs, parameter[member[.off]]], <=, binary_operation[member[.bottom], *, member[UtilEjml.EPS]]]]
e... | Keyword[protected] Keyword[boolean] identifier[isZero] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[double] identifier[bottom] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[diag] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[+] ... |
public void Time_Normalization()
{
norm_setyear();
norm_setmonth();
norm_setday();
norm_sethour();
norm_setminute();
norm_setsecond();
norm_setTotal();
norm_setBaseRelated();
norm_setCurRelated();
modifyTimeBase();
_tp_origin.tunit = _tp.tunit.clone();
String [] time_grid=new String[6];
... | class class_name[name] begin[{]
method[Time_Normalization, return_type[void], modifier[public], parameter[]] begin[{]
call[.norm_setyear, parameter[]]
call[.norm_setmonth, parameter[]]
call[.norm_setday, parameter[]]
call[.norm_sethour, parameter[... | Keyword[public] Keyword[void] identifier[Time_Normalization] operator[SEP] operator[SEP] {
identifier[norm_setyear] operator[SEP] operator[SEP] operator[SEP] identifier[norm_setmonth] operator[SEP] operator[SEP] operator[SEP] identifier[norm_setday] operator[SEP] operator[SEP] operator[SEP] identifier[norm_setho... |
protected BufferedImage create_FOREGROUND_Image(final int WIDTH, final boolean WITH_CENTER_KNOB, final ForegroundType TYPE) {
return create_FOREGROUND_Image(WIDTH, WITH_CENTER_KNOB, TYPE, null);
} | class class_name[name] begin[{]
method[create_FOREGROUND_Image, return_type[type[BufferedImage]], modifier[protected], parameter[WIDTH, WITH_CENTER_KNOB, TYPE]] begin[{]
return[call[.create_FOREGROUND_Image, parameter[member[.WIDTH], member[.WITH_CENTER_KNOB], member[.TYPE], literal[null]]]]
end[}]... | Keyword[protected] identifier[BufferedImage] identifier[create_FOREGROUND_Image] operator[SEP] Keyword[final] Keyword[int] identifier[WIDTH] , Keyword[final] Keyword[boolean] identifier[WITH_CENTER_KNOB] , Keyword[final] identifier[ForegroundType] identifier[TYPE] operator[SEP] {
Keyword[return] identifier[cre... |
@Override
public synchronized void update(Map<String, Object> config) {
// Update called by TrConfigurator and FFDCConfigurator
super.update(config);
ivLog.updateLoggingAttributes();
ivTrace.updateLoggingAttributes();
// ivText.ivEnabled = config.containsKey(HpelConstants.TEXT... | class class_name[name] begin[{]
method[update, return_type[void], modifier[synchronized public], parameter[config]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=update, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[update] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[config] operator[SEP] {
Keyword[super] operator[SEP] identifier[update] operator[SEP] identifier[conf... |
public String getFullPath(String path) {
if (StringUtils.isEmpty(pathPrefix)) {
return path;
}
return PathNormalizer.asPath(pathPrefix + path);
} | class class_name[name] begin[{]
method[getFullPath, return_type[type[String]], modifier[public], parameter[path]] begin[{]
if[call[StringUtils.isEmpty, parameter[member[.pathPrefix]]]] begin[{]
return[member[.path]]
else begin[{]
None
end[}]
return[call[PathN... | Keyword[public] identifier[String] identifier[getFullPath] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[pathPrefix] operator[SEP] operator[SEP] {
Keyword[return] identifier... |
public QualifiedJobId getQualifiedJobIdFromResult(Result result)
throws RowKeyParseException {
if (result == null) {
throw new RowKeyParseException(
"Cannot parse empty row key from result in HBase table: "
+ Constants.HISTORY_RAW_TABLE);
}
return idConv.fromBytes(result... | class class_name[name] begin[{]
method[getQualifiedJobIdFromResult, return_type[type[QualifiedJobId]], modifier[public], parameter[result]] begin[{]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(op... | Keyword[public] identifier[QualifiedJobId] identifier[getQualifiedJobIdFromResult] operator[SEP] identifier[Result] identifier[result] operator[SEP] Keyword[throws] identifier[RowKeyParseException] {
Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] {
Keyword[throw] K... |
public static void write(InputStream is, File f) {
OutputStream os = null;
try {
os = new FileOutputStream(f);
int read = 0;
byte[] buffer = new byte[8096];
while ((read = is.read(buffer)) > 0) {
os.write(buffer, 0, read);
}
... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[is, f]] begin[{]
local_variable[type[OutputStream], os]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=os, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[InputStream] identifier[is] , identifier[File] identifier[f] operator[SEP] {
identifier[OutputStream] identifier[os] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[os] operator[=] Keyword[new] id... |
static String stringLiteralWithDoubleQuotes(String value, String indent) {
StringBuilder result = new StringBuilder(value.length() + 2);
result.append('"');
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
// trivial case: single quote must not be escaped
if (c == '\'')... | class class_name[name] begin[{]
method[stringLiteralWithDoubleQuotes, return_type[type[String]], modifier[static], parameter[value, indent]] begin[{]
local_variable[type[StringBuilder], result]
call[result.append, parameter[literal['"']]]
ForStatement(body=BlockStatement(label=N... | Keyword[static] identifier[String] identifier[stringLiteralWithDoubleQuotes] operator[SEP] identifier[String] identifier[value] , identifier[String] identifier[indent] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[value] ... |
public void invoke(BurlapInput in, BurlapOutput out)
throws Exception
{
invoke(_service, in, out);
} | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public], parameter[in, out]] begin[{]
call[.invoke, parameter[member[._service], member[.in], member[.out]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[invoke] operator[SEP] identifier[BurlapInput] identifier[in] , identifier[BurlapOutput] identifier[out] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[invoke] operator[SEP] identifier[_service] , identifier[in] , identifier[out] operator[SEP] operator... |
public boolean addVertex(Vertex<T> v)
{
if( verticies.containsValue(v) == false )
{
verticies.put(v.getName(), v);
return true;
}
return false;
} | class class_name[name] begin[{]
method[addVertex, return_type[type[boolean]], modifier[public], parameter[v]] begin[{]
if[binary_operation[call[verticies.containsValue, parameter[member[.v]]], ==, literal[false]]] begin[{]
call[verticies.put, parameter[call[v.getName, pa... | Keyword[public] Keyword[boolean] identifier[addVertex] operator[SEP] identifier[Vertex] operator[<] identifier[T] operator[>] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[verticies] operator[SEP] identifier[containsValue] operator[SEP] identifier[v] operator[SEP] operator[==] literal[boolea... |
public static Intent mailto(List<String> to, List<String> cc, List<String> bcc, String subject,
String body) {
return new Intent(ACTION_SENDTO, Uris.mailto(to, cc, bcc, subject, body));
} | class class_name[name] begin[{]
method[mailto, return_type[type[Intent]], modifier[public static], parameter[to, cc, bcc, subject, body]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=ACTION_SENDTO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(... | Keyword[public] Keyword[static] identifier[Intent] identifier[mailto] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[to] , identifier[List] operator[<] identifier[String] operator[>] identifier[cc] , identifier[List] operator[<] identifier[String] operator[>] identifier[bcc] , i... |
private List<BBContainer> getOutputBuffers(Collection<SnapshotTableTask> tableTasks, boolean noSchedule)
{
final int desired = tableTasks.size();
while (true) {
int available = m_availableSnapshotBuffers.get();
//Limit the number of buffers used concurrently
if (... | class class_name[name] begin[{]
method[getOutputBuffers, return_type[type[List]], modifier[private], parameter[tableTasks, noSchedule]] begin[{]
local_variable[type[int], desired]
while[literal[true]] begin[{]
local_variable[type[int], available]
if[b... | Keyword[private] identifier[List] operator[<] identifier[BBContainer] operator[>] identifier[getOutputBuffers] operator[SEP] identifier[Collection] operator[<] identifier[SnapshotTableTask] operator[>] identifier[tableTasks] , Keyword[boolean] identifier[noSchedule] operator[SEP] {
Keyword[final] Keyword[int] i... |
public static base_responses delete(nitro_service client, appfwlearningdata resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
appfwlearningdata deleteresources[] = new appfwlearningdata[resources.length];
for (int i=0;i<resources.length;i++){
de... | class class_name[name] begin[{]
method[delete, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operatio... | Keyword[public] Keyword[static] identifier[base_responses] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[appfwlearningdata] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[r... |
public void showIndeterminate(final int id, int status) {
final BaseNotificationItem notification = get(id);
if (notification == null) {
return;
}
notification.updateStatus(status);
notification.show(false);
} | class class_name[name] begin[{]
method[showIndeterminate, return_type[void], modifier[public], parameter[id, status]] begin[{]
local_variable[type[BaseNotificationItem], notification]
if[binary_operation[member[.notification], ==, literal[null]]] begin[{]
return[None]
... | Keyword[public] Keyword[void] identifier[showIndeterminate] operator[SEP] Keyword[final] Keyword[int] identifier[id] , Keyword[int] identifier[status] operator[SEP] {
Keyword[final] identifier[BaseNotificationItem] identifier[notification] operator[=] identifier[get] operator[SEP] identifier[id] operator[SEP] o... |
private static void writeZonePropsByTime(Writer writer, boolean isDst, String tzname,
int fromOffset, int toOffset, long time, boolean withRDATE) throws IOException {
beginZoneProps(writer, isDst, tzname, fromOffset, toOffset, time);
if (withRDATE) {
writer.write(ICAL_RDATE);
... | class class_name[name] begin[{]
method[writeZonePropsByTime, return_type[void], modifier[private static], parameter[writer, isDst, tzname, fromOffset, toOffset, time, withRDATE]] begin[{]
call[.beginZoneProps, parameter[member[.writer], member[.isDst], member[.tzname], member[.fromOffset], memb... | Keyword[private] Keyword[static] Keyword[void] identifier[writeZonePropsByTime] operator[SEP] identifier[Writer] identifier[writer] , Keyword[boolean] identifier[isDst] , identifier[String] identifier[tzname] , Keyword[int] identifier[fromOffset] , Keyword[int] identifier[toOffset] , Keyword[long] identifier[time]... |
public boolean detectRootManagementApps(String[] additionalRootManagementApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>(Arrays.asList(Const.knownRootAppsPackages));
if (additionalRootManagementApps!=null ... | class class_name[name] begin[{]
method[detectRootManagementApps, return_type[type[boolean]], modifier[public], parameter[additionalRootManagementApps]] begin[{]
local_variable[type[ArrayList], packages]
if[binary_operation[binary_operation[member[.additionalRootManagementApps], !=, lite... | Keyword[public] Keyword[boolean] identifier[detectRootManagementApps] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[additionalRootManagementApps] operator[SEP] {
identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[packages] operator[=] Keyword[new] identifier[Arr... |
public void destroy(long disconnectRequestTimeout) throws WorkspaceApiException {
try {
if (this.workspaceInitialized) {
notifications.disconnect(disconnectRequestTimeout);
sessionApi.logout();
}
} catch (Exception e) {
throw new... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[disconnectRequestTimeout]] begin[{]
TryStatement(block=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=workspaceInitialized, postfix_op... | Keyword[public] Keyword[void] identifier[destroy] operator[SEP] Keyword[long] identifier[disconnectRequestTimeout] operator[SEP] Keyword[throws] identifier[WorkspaceApiException] {
Keyword[try] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[workspaceInitialized] operator[SEP] {
... |
public ValueList getValues(PExp exp, ObjectContext ctxt)
{
try
{
return exp.apply(af.getExpressionValueCollector(), ctxt);// FIXME: should we handle exceptions like this
} catch (AnalysisException e)
{
return null; // Most have none
}
} | class class_name[name] begin[{]
method[getValues, return_type[type[ValueList]], modifier[public], parameter[exp, ctxt]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExpressionValueCollector, postfix_operators=[], prefix_ope... | Keyword[public] identifier[ValueList] identifier[getValues] operator[SEP] identifier[PExp] identifier[exp] , identifier[ObjectContext] identifier[ctxt] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[exp] operator[SEP] identifier[apply] operator[SEP] identifier[af] operator[SEP] identifier[... |
public static int dp2px(Context context, float dpVal) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
dpVal, context.getResources().getDisplayMetrics());
} | class class_name[name] begin[{]
method[dp2px, return_type[type[int]], modifier[public static], parameter[context, dpVal]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=COMPLEX_UNIT_DIP, postfix_operators=[], prefix_operators=[], qualifier=TypedValue, selectors=[]), ... | Keyword[public] Keyword[static] Keyword[int] identifier[dp2px] operator[SEP] identifier[Context] identifier[context] , Keyword[float] identifier[dpVal] operator[SEP] {
Keyword[return] operator[SEP] Keyword[int] operator[SEP] identifier[TypedValue] operator[SEP] identifier[applyDimension] operator[SEP] identifie... |
@SuppressWarnings("unchecked")
public static <T> T[] remove(T[] array, int index) throws IllegalArgumentException {
return (T[]) remove((Object) array, index);
} | class class_name[name] begin[{]
method[remove, return_type[type[T]], modifier[public static], parameter[array, index]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=Ref... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[i... |
public boolean isPathAvailable(Path path) {
try {
Configuration conf = HadoopUtils.newConfiguration();
FileSystem fs = FileSystem.get(this.getFsURI(), conf);
if (fs.exists(path)) {
return true;
} else {
log.warn("The data path [" + path + "] is not available on FileSystem: " ... | class class_name[name] begin[{]
method[isPathAvailable, return_type[type[boolean]], modifier[public], parameter[path]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newConfiguration,... | Keyword[public] Keyword[boolean] identifier[isPathAvailable] operator[SEP] identifier[Path] identifier[path] operator[SEP] {
Keyword[try] {
identifier[Configuration] identifier[conf] operator[=] identifier[HadoopUtils] operator[SEP] identifier[newConfiguration] operator[SEP] operator[SEP] operator[SEP... |
public static boolean isAncestor(Path possibleAncestor, Path fullPath) {
return !relativizePath(fullPath, possibleAncestor).equals(getPathWithoutSchemeAndAuthority(fullPath));
} | class class_name[name] begin[{]
method[isAncestor, return_type[type[boolean]], modifier[public static], parameter[possibleAncestor, fullPath]] begin[{]
return[call[.relativizePath, parameter[member[.fullPath], member[.possibleAncestor]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAncestor] operator[SEP] identifier[Path] identifier[possibleAncestor] , identifier[Path] identifier[fullPath] operator[SEP] {
Keyword[return] operator[!] identifier[relativizePath] operator[SEP] identifier[fullPath] , identifier[possibleAncestor] op... |
public static DataBuffer readShapeFromDisk(File readFrom) throws IOException {
try (FileInputStream os = new FileInputStream(readFrom)) {
FileChannel channel = os.getChannel();
// we read shapeinfo up to max_rank value, which is 32
int len = (int) Math.min((32 * 2 + 3) * 8, r... | class class_name[name] begin[{]
method[readShapeFromDisk, return_type[type[DataBuffer]], modifier[public static], parameter[readFrom]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=g... | Keyword[public] Keyword[static] identifier[DataBuffer] identifier[readShapeFromDisk] operator[SEP] identifier[File] identifier[readFrom] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] operator[SEP] identifier[FileInputStream] identifier[os] operator[=] Keyword[new] identifier[FileInputStrea... |
public Properties getPropertiesFromDynamicSelectionInfo(Map<String, Object> connectionInfo) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getPropertiesFromDynamicSelectionInfo", new Object[] { connectionInfo });
if (connectionInfo == null) {
if... | class class_name[name] begin[{]
method[getPropertiesFromDynamicSelectionInfo, return_type[type[Properties]], modifier[public], parameter[connectionInfo]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[public] identifier[Properties] identifier[getPropertiesFromDynamicSelectionInfo] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[connectionInfo] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTra... |
private Map<CtClass, Set<CtMethod>> find(final CtMethod declaredMethod, final int level, final Map<CtClass, Set<CtMethod>> dict) {
if (level < 0) {
throw new IllegalArgumentException("level < 0");
}
addToMap(declaredMethod.getDeclaringClass(), declaredMethod, dict);
if (level > 0) {
try {
declaredMeth... | class class_name[name] begin[{]
method[find, return_type[type[Map]], modifier[private], parameter[declaredMethod, level, dict]] begin[{]
if[binary_operation[member[.level], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[private] identifier[Map] operator[<] identifier[CtClass] , identifier[Set] operator[<] identifier[CtMethod] operator[>] operator[>] identifier[find] operator[SEP] Keyword[final] identifier[CtMethod] identifier[declaredMethod] , Keyword[final] Keyword[int] identifier[level] , Keyword[final] identifier[Map] op... |
public int set(int index, int element)
{
boundsCheck(index);
int prev = array[index];
array[index] = element;
return prev;
} | class class_name[name] begin[{]
method[set, return_type[type[int]], modifier[public], parameter[index, element]] begin[{]
call[.boundsCheck, parameter[member[.index]]]
local_variable[type[int], prev]
assign[member[.array], member[.element]]
return[member[.prev]]
... | Keyword[public] Keyword[int] identifier[set] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[element] operator[SEP] {
identifier[boundsCheck] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[int] identifier[prev] operator[=] identifier[array] operator[SEP] identifier[in... |
public OAuth2StoreBuilder addAdditionalParameter(String key, String value) {
oAuth2Store.getAdditionalParameters().put(key, value);
return this;
} | class class_name[name] begin[{]
method[addAdditionalParameter, return_type[type[OAuth2StoreBuilder]], modifier[public], parameter[key, value]] begin[{]
call[oAuth2Store.getAdditionalParameters, parameter[]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[OAuth2StoreBuilder] identifier[addAdditionalParameter] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
identifier[oAuth2Store] operator[SEP] identifier[getAdditionalParameters] operator[SEP] operator[SEP] operator[SEP] identifier... |
static Set<PathMatcher> createPathMatcherSet(final String[] targets) {
return Arrays.stream(targets)
.map(inclusion -> FileSystems.getDefault().getPathMatcher("glob:" + inclusion))
.collect(Collectors.toSet());
} | class class_name[name] begin[{]
method[createPathMatcherSet, return_type[type[Set]], modifier[static], parameter[targets]] begin[{]
return[call[Arrays.stream, parameter[member[.targets]]]]
end[}]
END[}] | Keyword[static] identifier[Set] operator[<] identifier[PathMatcher] operator[>] identifier[createPathMatcherSet] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[targets] operator[SEP] {
Keyword[return] identifier[Arrays] operator[SEP] identifier[stream] operator[SEP] identi... |
public void getProxyInfos(Collection<ProxyInfo> result) {
for (Map.Entry<String, DistributedObjectFuture> entry : proxies.entrySet()) {
DistributedObjectFuture future = entry.getValue();
if (future.isSetAndInitialized()) {
String proxyName = entry.getKey();
... | class class_name[name] begin[{]
method[getProxyInfos, return_type[void], modifier[public], parameter[result]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=... | Keyword[public] Keyword[void] identifier[getProxyInfos] operator[SEP] identifier[Collection] operator[<] identifier[ProxyInfo] operator[>] identifier[result] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[DistributedObjectFu... |
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <U> Flowable<T> delay(final Function<? super T, ? extends Publisher<U>> itemDelayIndicator) {
ObjectHelper.requireNonNull(itemDelayIndicator, "itemDelayIndicator is null");
ret... | class class_name[name] begin[{]
method[delay, return_type[type[Flowable]], modifier[final public], parameter[itemDelayIndicator]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.itemDelayIndicator], literal["itemDelayIndicator is null"]]]
return[call[.flatMap, parameter[cal... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[publ... |
public void setDeptype(String v) {
if (Dependency_Type.featOkTst && ((Dependency_Type)jcasType).casFeat_deptype == null)
jcasType.jcas.throwFeatMissing("deptype", "com.digitalpebble.rasp.Dependency");
jcasType.ll_cas.ll_setStringValue(addr, ((Dependency_Type)jcasType).casFeatCode_deptype, v);} | class class_name[name] begin[{]
method[setDeptype, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[Dependency_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] Keyword[void] identifier[setDeptype] operator[SEP] identifier[String] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[Dependency_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Dependency_Type] operator[SEP] identifier[jcasType] ope... |
public int unmapClass(int clazz) {
Col c = _c[_c.length-1];
if (c._isByte)
return clazz;
else {
// OK, this is not fully correct bad handle corner-cases like for example dataset uses classes only
// with 0 and 3. Our API reports that there are 4 classes but in fact there are only 2 classes... | class class_name[name] begin[{]
method[unmapClass, return_type[type[int]], modifier[public], parameter[clazz]] begin[{]
local_variable[type[Col], c]
if[member[c._isByte]] begin[{]
return[member[.clazz]]
else begin[{]
if[binary_operation[member[.clazz], >=... | Keyword[public] Keyword[int] identifier[unmapClass] operator[SEP] Keyword[int] identifier[clazz] operator[SEP] {
identifier[Col] identifier[c] operator[=] identifier[_c] operator[SEP] identifier[_c] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identi... |
public static Set<Bugsnag> uncaughtExceptionClients() {
UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
if (handler instanceof ExceptionHandler) {
ExceptionHandler bugsnagHandler = (ExceptionHandler) handler;
return Collections.unmodifiableSet(bugs... | class class_name[name] begin[{]
method[uncaughtExceptionClients, return_type[type[Set]], modifier[public static], parameter[]] begin[{]
local_variable[type[UncaughtExceptionHandler], handler]
if[binary_operation[member[.handler], instanceof, type[ExceptionHandler]]] begin[{]
... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Bugsnag] operator[>] identifier[uncaughtExceptionClients] operator[SEP] operator[SEP] {
identifier[UncaughtExceptionHandler] identifier[handler] operator[=] identifier[Thread] operator[SEP] identifier[getDefaultUncaughtExceptionHandler] opera... |
public String getString(String name)
{
InputStream in = null;
if(name == null)
throw new NullPointerException("name is null");
try
{
if((in = loader.getResourceAsStream(prefix + name))==null)
throw new ResourceException("Unable to find resource for " + name);
return IOUtils.toString(in);
}
ca... | class class_name[name] begin[{]
method[getString, return_type[type[String]], modifier[public], parameter[name]] begin[{]
local_variable[type[InputStream], in]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfi... | Keyword[public] identifier[String] identifier[getString] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] ide... |
public static void setAutoIncreamentIdValue(Object po,String autoGeneratedId,Object idValue) throws Exception, NoSuchMethodException{
String setterName = "set" + StringUtils.capitalize(autoGeneratedId);
Method setter = po.getClass().getDeclaredMethod(setterName, idValue.getClass());
setter.invoke(po, idValue);
} | class class_name[name] begin[{]
method[setAutoIncreamentIdValue, return_type[void], modifier[public static], parameter[po, autoGeneratedId, idValue]] begin[{]
local_variable[type[String], setterName]
local_variable[type[Method], setter]
call[setter.invoke, parameter[member[.po],... | Keyword[public] Keyword[static] Keyword[void] identifier[setAutoIncreamentIdValue] operator[SEP] identifier[Object] identifier[po] , identifier[String] identifier[autoGeneratedId] , identifier[Object] identifier[idValue] operator[SEP] Keyword[throws] identifier[Exception] , identifier[NoSuchMethodException] {
... |
public static <A, B> Generator<PMatrix4x4D<A, B>> create()
{
return new PMatrix4x4DGenerator<>(PrimitiveGenerators.doubles(
GeneratorConstants.BOUND_LARGE_DOUBLE_LOWER,
GeneratorConstants.BOUND_LARGE_DOUBLE_UPPER
));
} | class class_name[name] begin[{]
method[create, return_type[type[Generator]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=BOUND_LARGE_DOUBLE_LOWER, postfix_operators=[], prefix_operators=[], qualifier=GeneratorConstants... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] operator[>] identifier[Generator] operator[<] identifier[PMatrix4x4D] operator[<] identifier[A] , identifier[B] operator[>] operator[>] identifier[create] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[PMatrix4x4DG... |
public void registerFileResource(final String file) {
try {
_resourceMap.put(file, new File(file).toURI().toURL());
} catch (Exception e) {
throw new RuntimeException(e);
}
} | class class_name[name] begin[{]
method[registerFileResource, return_type[void], modifier[public], parameter[file]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), C... | Keyword[public] Keyword[void] identifier[registerFileResource] operator[SEP] Keyword[final] identifier[String] identifier[file] operator[SEP] {
Keyword[try] {
identifier[_resourceMap] operator[SEP] identifier[put] operator[SEP] identifier[file] , Keyword[new] identifier[File] operator[SEP] identifier... |
protected void extendRealmClasspath()
throws MojoExecutionException {
List<URL> urls = new ArrayList<>();
for (String fileName : compileClasspathElements) {
File pathElem = new File(fileName);
try {
URL url = pathElem.toURI().toURL();
... | class class_name[name] begin[{]
method[extendRealmClasspath, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[List], urls]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimension... | Keyword[protected] Keyword[void] identifier[extendRealmClasspath] operator[SEP] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
identifier[List] operator[<] identifier[URL] operator[>] identifier[urls] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operato... |
private synchronized void doAddRoot(final WatchedDirectory pWatchedDirectory) {
final Object key = requireNonNull(pWatchedDirectory.getKey(), KEY_IS_NULL);
final Path directory = requireNonNull(pWatchedDirectory.getDirectory(), DIRECTORY_IS_NULL);
if (!isDirectory(directory)) {
thro... | class class_name[name] begin[{]
method[doAddRoot, return_type[void], modifier[synchronized private], parameter[pWatchedDirectory]] begin[{]
local_variable[type[Object], key]
local_variable[type[Path], directory]
if[call[.isDirectory, parameter[member[.directory]]]] begin[{]
... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[doAddRoot] operator[SEP] Keyword[final] identifier[WatchedDirectory] identifier[pWatchedDirectory] operator[SEP] {
Keyword[final] identifier[Object] identifier[key] operator[=] identifier[requireNonNull] operator[SEP] identifier[pWatchedDirectory] o... |
public static void draw_tkp_K()
{
Tortoise.setAngle(180);
Tortoise.setX(MakeALogo.XValue + 150);
Tortoise.setY(MakeALogo.YValue + 15);
Tortoise.turn(180);
Tortoise.move(200);
Tortoise.turn(90);
Tortoise.move(30);
Tortoise.turn(90);
Tortoise.move(128);
Tortoise.turn(-150);
T... | class class_name[name] begin[{]
method[draw_tkp_K, return_type[void], modifier[public static], parameter[]] begin[{]
call[Tortoise.setAngle, parameter[literal[180]]]
call[Tortoise.setX, parameter[binary_operation[member[MakeALogo.XValue], +, literal[150]]]]
call[... | Keyword[public] Keyword[static] Keyword[void] identifier[draw_tkp_K] operator[SEP] operator[SEP] {
identifier[Tortoise] operator[SEP] identifier[setAngle] operator[SEP] Other[180] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[setX] operator[SEP] identifier[MakeALogo] operator[SEP] ide... |
public boolean removeTransactionAware(TransactionAware txAware) {
Preconditions.checkState(currentTx == null, "Cannot remove TransactionAware while there is an active transaction.");
return txAwares.remove(txAware);
} | class class_name[name] begin[{]
method[removeTransactionAware, return_type[type[boolean]], modifier[public], parameter[txAware]] begin[{]
call[Preconditions.checkState, parameter[binary_operation[member[.currentTx], ==, literal[null]], literal["Cannot remove TransactionAware while there is an a... | Keyword[public] Keyword[boolean] identifier[removeTransactionAware] operator[SEP] identifier[TransactionAware] identifier[txAware] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[currentTx] operator[==] Other[null] , literal[String] operator[SEP] operator[... |
@Override public int compare(Row o1, Row o2)
{
Integer parent1 = o1.getInteger("parent_wbs_id");
Integer parent2 = o2.getInteger("parent_wbs_id");
int result = NumberHelper.compare(parent1, parent2);
if (result == 0)
{
Integer seq1 = o1.getInteger("seq_num");
Integer s... | class class_name[name] begin[{]
method[compare, return_type[type[int]], modifier[public], parameter[o1, o2]] begin[{]
local_variable[type[Integer], parent1]
local_variable[type[Integer], parent2]
local_variable[type[int], result]
if[binary_operation[member[.result], ==, ... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[Row] identifier[o1] , identifier[Row] identifier[o2] operator[SEP] {
identifier[Integer] identifier[parent1] operator[=] identifier[o1] operator[SEP] identifier[getInteger] operator[SEP] literal[String] ... |
public static TableBuilder configureKeyValueRendering(TableBuilder builder, String delimiter) {
return builder.on(CellMatchers.ofType(Map.class))
.addFormatter(new MapFormatter(delimiter))
.addAligner(new KeyValueHorizontalAligner(delimiter.trim()))
.addSizer(new KeyValueSizeConstraints(delimiter))
.a... | class class_name[name] begin[{]
method[configureKeyValueRendering, return_type[type[TableBuilder]], modifier[public static], parameter[builder, delimiter]] begin[{]
return[call[builder.on, parameter[call[CellMatchers.ofType, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] Keyword[static] identifier[TableBuilder] identifier[configureKeyValueRendering] operator[SEP] identifier[TableBuilder] identifier[builder] , identifier[String] identifier[delimiter] operator[SEP] {
Keyword[return] identifier[builder] operator[SEP] identifier[on] operator[SEP] identifier[CellMatc... |
private void markst(Subre t) {
assert t != null;
t.flags |= Subre.INUSE;
if (t.left != null) {
markst(t.left);
}
if (t.right != null) {
markst(t.right);
}
} | class class_name[name] begin[{]
method[markst, return_type[void], modifier[private], parameter[t]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_op... | Keyword[private] Keyword[void] identifier[markst] operator[SEP] identifier[Subre] identifier[t] operator[SEP] {
Keyword[assert] identifier[t] operator[!=] Other[null] operator[SEP] identifier[t] operator[SEP] identifier[flags] operator[|=] identifier[Subre] operator[SEP] identifier[INUSE] operator[SEP] Keyword[i... |
@Override
public V get(K key) {
return !isEmpty() ? get(key, hash(key)) : null;
} | class class_name[name] begin[{]
method[get, return_type[type[V]], modifier[public], parameter[key]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), if_false=Literal(p... | annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[get] operator[SEP] identifier[K] identifier[key] operator[SEP] {
Keyword[return] operator[!] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] identifier[get] operator[SEP] identifier[key] , identifier[hash] operator[SEP] iden... |
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
throw new java.sql.SQLFeatureNotSupportedException();
} | class class_name[name] begin[{]
method[getParentLogger, return_type[type[java]], modifier[public], parameter[]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=Referen... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[logging] operator[SEP] identifier[Logger] identifier[getParentLogger] operator[SEP] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLFeatureNotSupportedException] {
Key... |
private NameID buildNameId(final RequestAbstractType authnRequest,
final Object assertion,
final SamlRegisteredService service,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
fi... | class class_name[name] begin[{]
method[buildNameId, return_type[type[NameID]], modifier[private], parameter[authnRequest, assertion, service, adaptor, messageContext]] begin[{]
local_variable[type[val], supportedNameFormats]
local_variable[type[val], requiredNameFormat]
call[.va... | Keyword[private] identifier[NameID] identifier[buildNameId] operator[SEP] Keyword[final] identifier[RequestAbstractType] identifier[authnRequest] , Keyword[final] identifier[Object] identifier[assertion] , Keyword[final] identifier[SamlRegisteredService] identifier[service] , Keyword[final] identifier[SamlRegistered... |
public final void synpred172_Java_fragment() throws RecognitionException {
Token y=null;
ParserRuleReturnScope z =null;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:787:6: (y= 'else' ( 'if' parExpression )? z= statement )
// src/main/resources/org/drools/compiler/semantics/java/parser... | class class_name[name] begin[{]
method[synpred172_Java_fragment, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[Token], y]
local_variable[type[ParserRuleReturnScope], z]
assign[member[.y], Cast(expression=MethodInvocation(arguments=[... | Keyword[public] Keyword[final] Keyword[void] identifier[synpred172_Java_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[Token] identifier[y] operator[=] Other[null] operator[SEP] identifier[ParserRuleReturnScope] identifier[z] operator[=] Other[null] operator[S... |
@Nullable
@OverrideOnDemand
protected ICommonsSet <String> onShowSelectedObjectCustomAttrs (@Nonnull final WPECTYPE aWPEC,
@Nonnull final DATATYPE aSelectedObject,
@Nonnull final Map <... | class class_name[name] begin[{]
method[onShowSelectedObjectCustomAttrs, return_type[type[ICommonsSet]], modifier[protected], parameter[aWPEC, aSelectedObject, aCustomAttrs, aViewForm]] begin[{]
return[literal[null]]
end[}]
END[}] | annotation[@] identifier[Nullable] annotation[@] identifier[OverrideOnDemand] Keyword[protected] identifier[ICommonsSet] operator[<] identifier[String] operator[>] identifier[onShowSelectedObjectCustomAttrs] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[WPECTYPE] identifier[aWPEC] , annotat... |
void append(T logItem) throws IOException {
Exceptions.checkNotClosed(this.closed.get(), this);
long seqNo = logItem.getSequenceNumber();
Exceptions.checkArgument(this.lastSerializedSequenceNumber < seqNo, "logItem",
"Invalid sequence number. Expected: greater than %d, given: %d.... | class class_name[name] begin[{]
method[append, return_type[void], modifier[default], parameter[logItem]] begin[{]
call[Exceptions.checkNotClosed, parameter[THIS[member[None.closed]call[None.get, parameter[]]], THIS[]]]
local_variable[type[long], seqNo]
call[Exceptions.ch... | Keyword[void] identifier[append] operator[SEP] identifier[T] identifier[logItem] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Exceptions] operator[SEP] identifier[checkNotClosed] operator[SEP] Keyword[this] operator[SEP] identifier[closed] operator[SEP] identifier[get] operator[SEP] operato... |
public void logout(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) {
Assert.notNull(request, "HttpServletRequest required");
if (invalidateHttpSession) {
HttpSession session = request.getSession(false);
if (session != null) {
logger.debug("Invalidating session: ... | class class_name[name] begin[{]
method[logout, return_type[void], modifier[public], parameter[request, response, authentication]] begin[{]
call[Assert.notNull, parameter[member[.request], literal["HttpServletRequest required"]]]
if[member[.invalidateHttpSession]] begin[{]
... | Keyword[public] Keyword[void] identifier[logout] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[Authentication] identifier[authentication] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] ide... |
protected boolean editorErrorMatches(final EditorError perror) {
return perror != null && perror.getEditor() != null
&& (equals(perror.getEditor()) || perror.getEditor().equals(asEditor()));
} | class class_name[name] begin[{]
method[editorErrorMatches, return_type[type[boolean]], modifier[protected], parameter[perror]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.perror], !=, literal[null]], &&, binary_operation[call[perror.getEditor, parameter[]], !=, literal[nu... | Keyword[protected] Keyword[boolean] identifier[editorErrorMatches] operator[SEP] Keyword[final] identifier[EditorError] identifier[perror] operator[SEP] {
Keyword[return] identifier[perror] operator[!=] Other[null] operator[&&] identifier[perror] operator[SEP] identifier[getEditor] operator[SEP] operator[SEP] op... |
public int getIntegerBelief(String name){
Object belief = introspector.getBeliefBase(this).get(name);
int count = 0;
if (belief!=null) {
count = (Integer) belief;
}
return (Integer) count;
} | class class_name[name] begin[{]
method[getIntegerBelief, return_type[type[int]], modifier[public], parameter[name]] begin[{]
local_variable[type[Object], belief]
local_variable[type[int], count]
if[binary_operation[member[.belief], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[int] identifier[getIntegerBelief] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[Object] identifier[belief] operator[=] identifier[introspector] operator[SEP] identifier[getBeliefBase] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[get] op... |
public void reset() {
if (getListViewWrapper() == null) {
throw new IllegalStateException("Call setAbsListView() on this AnimationAdapter first!");
}
assert mViewAnimator != null;
mViewAnimator.reset();
mGridViewPossiblyMeasuring = true;
mGridViewMeasuringPo... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[.getListViewWrapper, parameter[]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getListViewWrapper] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operat... |
public void check()
{
for (AnnotationTypeDeclaration atd : _atds)
{
Collection<Declaration> decls = getAnnotationProcessorEnvironment().getDeclarationsAnnotatedWith(atd);
for (Declaration decl : decls)
{
check(decl);
}
}
} | class class_name[name] begin[{]
method[check, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get... | Keyword[public] Keyword[void] identifier[check] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[AnnotationTypeDeclaration] identifier[atd] operator[:] identifier[_atds] operator[SEP] {
identifier[Collection] operator[<] identifier[Declaration] operator[>] identifier[decls] operato... |
private static final boolean checkInt(String s)
{
try {
//Coverity[FB.DLS_DEAD_LOCAL_STORE]
int val = Integer.parseInt(s);
if(DebugValueChecking) {
DAPNode.log.debug("Attribute.checkInt() - string: '" + s + "' value: " + val);
}
r... | class class_name[name] begin[{]
method[checkInt, return_type[type[boolean]], modifier[final private static], parameter[s]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=... | Keyword[private] Keyword[static] Keyword[final] Keyword[boolean] identifier[checkInt] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[val] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[s] operator[SEP] ... |
public IConceptMap<IConceptSet> getAffectedSubsumptions() {
int size = 0;
for (Context ctx : affectedContexts) {
if (ctx.hasNewSubsumptions()) {
size++;
}
}
IConceptMap<IConceptSet> res = new DenseConceptMap<IConceptSet>(size);
// Collect ... | class class_name[name] begin[{]
method[getAffectedSubsumptions, return_type[type[IConceptMap]], modifier[public], parameter[]] begin[{]
local_variable[type[int], size]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=hasNewSubs... | Keyword[public] identifier[IConceptMap] operator[<] identifier[IConceptSet] operator[>] identifier[getAffectedSubsumptions] operator[SEP] operator[SEP] {
Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Context] identifier[ctx] operator[:] identifier[affecte... |
public GetTagsResult withTags(String... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList<String>(tags.length));
}
for (String ele : tags) {
this.tags.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withTags, return_type[type[GetTagsResult]], modifier[public], parameter[tags]] begin[{]
if[binary_operation[THIS[member[None.tags]], ==, literal[null]]] begin[{]
call[.setTags, parameter[ClassCreator(arguments=[MemberReference(membe... | Keyword[public] identifier[GetTagsResult] identifier[withTags] operator[SEP] identifier[String] operator[...] identifier[tags] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[tags] operator[==] Other[null] operator[SEP] {
identifier[setTags] operator[SEP] Keyword[new] ... |
public Collection<String> getSubKeys() {
WINBASE.FILETIME lpftLastWriteTime;
TreeSet<String> subKeys = new TreeSet<>();
char[] lpName = new char[256];
IntByReference lpcName = new IntByReference(256);
lpftLastWriteTime = new WINBASE.FILETIME();
int dwIndex = 0;
w... | class class_name[name] begin[{]
method[getSubKeys, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
local_variable[type[WINBASE], lpftLastWriteTime]
local_variable[type[TreeSet], subKeys]
local_variable[type[char], lpName]
local_variable[type[IntByReference... | Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getSubKeys] operator[SEP] operator[SEP] {
identifier[WINBASE] operator[SEP] identifier[FILETIME] identifier[lpftLastWriteTime] operator[SEP] identifier[TreeSet] operator[<] identifier[String] operator[>] identifier[subKe... |
public static void install() {
synchronized (log()) {
if (!cInstalled) {
cInstalled = true;
cOriginalOut = System.out;
cOriginalErr = System.err;
cSystemOut = new LogEventParsingOutputStream
(log(), ... | class class_name[name] begin[{]
method[install, return_type[void], modifier[public static], parameter[]] begin[{]
SYNCHRONIZED[call[.log, parameter[]]] BEGIN[{]
if[member[.cInstalled]] begin[{]
assign[member[.cInstalled], literal[true]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[install] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[log] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[cInstalled] operator[SEP] {
identifier[cInstal... |
protected PGPPublicKey retrievePublicKey(PGPPublicKeyRing publicKeyRing, KeyFilter<PGPPublicKey> keyFilter) {
LOGGER.trace("retrievePublicKey(PGPPublicKeyRing, KeyFilter<PGPPublicKey>)");
PGPPublicKey result = null;
Iterator<PGPPublicKey> publicKeyIterator = publicKeyRing.getPublicKeys();
LOGGER.debug("... | class class_name[name] begin[{]
method[retrievePublicKey, return_type[type[PGPPublicKey]], modifier[protected], parameter[publicKeyRing, keyFilter]] begin[{]
call[LOGGER.trace, parameter[literal["retrievePublicKey(PGPPublicKeyRing, KeyFilter<PGPPublicKey>)"]]]
local_variable[type[PGPPub... | Keyword[protected] identifier[PGPPublicKey] identifier[retrievePublicKey] operator[SEP] identifier[PGPPublicKeyRing] identifier[publicKeyRing] , identifier[KeyFilter] operator[<] identifier[PGPPublicKey] operator[>] identifier[keyFilter] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[trace] operato... |
public static Field getOptionalField(Class<?> clazz, String fieldName)
{
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
return field;
}
catch(NoSuchFieldException expectable) {}
catch(SecurityException e) {
throw new BugError(e);
... | class class_name[name] begin[{]
method[getOptionalField, return_type[type[Field]], modifier[public static], parameter[clazz, fieldName]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberRef... | Keyword[public] Keyword[static] identifier[Field] identifier[getOptionalField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[fieldName] operator[SEP] {
Keyword[try] {
identifier[Field] identifier[field] operator[=] identifier[cla... |
@Override
public String send() {
String messageID = null;
try {
messageID = super.send();
} catch (EmailException e) {
// check if original Exception is of type SendFailedException which
// should have been thrown by javax.mail.Transport.send()
... | class class_name[name] begin[{]
method[send, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], messageID]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=messageID, postfix_operators=[], prefix_operat... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[send] operator[SEP] operator[SEP] {
identifier[String] identifier[messageID] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[messageID] operator[=] Keyword[super] operator[SEP] identifier[send] operator[SE... |
private static String getBroadcastDateIgnoringCatchupRights(JsonArray broadcastArray, String broadcastType) {
String broadcastDate = "";
for(int i = 0; i < broadcastArray.size(); i++) {
JsonObject broadcastObject = broadcastArray.get(i).getAsJsonObject();
if... | class class_name[name] begin[{]
method[getBroadcastDateIgnoringCatchupRights, return_type[type[String]], modifier[private static], parameter[broadcastArray, broadcastType]] begin[{]
local_variable[type[String], broadcastDate]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariabl... | Keyword[private] Keyword[static] identifier[String] identifier[getBroadcastDateIgnoringCatchupRights] operator[SEP] identifier[JsonArray] identifier[broadcastArray] , identifier[String] identifier[broadcastType] operator[SEP] {
identifier[String] identifier[broadcastDate] operator[=] literal[String] operator[SE... |
public BusItinerary getBusItinerary(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusItinerary itinerary : this.itineraries) {
if (cmp.compare(nam... | class class_name[name] begin[{]
method[getBusItinerary, return_type[type[BusItinerary]], modifier[public], parameter[name, nameComparator]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[BusItinerary] identifier[getBusItinerary] operator[SEP] identifier[String] identifier[name] , identifier[Comparator] operator[<] identifier[String] operator[>] identifier[nameComparator] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] ... |
public void checkout() throws RepositoryException, UnsupportedRepositoryOperationException
{
checkValid();
if (!session.getAccessManager().hasPermission(getACL(), new String[]{PermissionType.SET_PROPERTY},
session.getUserState().getIdentity()))
{
throw new AccessDeniedException("... | class class_name[name] begin[{]
method[checkout, return_type[void], modifier[public], parameter[]] begin[{]
call[.checkValid, parameter[]]
if[call[session.getAccessManager, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(opera... | Keyword[public] Keyword[void] identifier[checkout] operator[SEP] operator[SEP] Keyword[throws] identifier[RepositoryException] , identifier[UnsupportedRepositoryOperationException] {
identifier[checkValid] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[session] operat... |
public static boolean isEmoji(String string) {
if (string == null) return false;
EmojiParser.UnicodeCandidate unicodeCandidate = EmojiParser.getNextUnicodeCandidate(string.toCharArray(), 0);
return unicodeCandidate != null &&
unicodeCandidate.getEmojiStartIndex() == 0 &&
unicodeCand... | class class_name[name] begin[{]
method[isEmoji, return_type[type[boolean]], modifier[public static], parameter[string]] begin[{]
if[binary_operation[member[.string], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[EmojiPa... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isEmoji] operator[SEP] identifier[String] identifier[string] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[EmojiParser] operator[SEP] identif... |
private void parseFeatures(JsonParser jp) throws IOException, SQLException {
jp.nextToken(); // FIELD_NAME features
// Passes all the properties until "Feature" object is found
while(!jp.getText().equalsIgnoreCase(GeoJsonField.FEATURES) &&
!jp.getText().equalsIgnoreCase(GeoJsonFi... | class class_name[name] begin[{]
method[parseFeatures, return_type[void], modifier[private], parameter[jp]] begin[{]
call[jp.nextToken, parameter[]]
while[binary_operation[call[jp.getText, parameter[]], &&, call[jp.getText, parameter[]]]] begin[{]
call[jp.... | Keyword[private] Keyword[void] identifier[parseFeatures] operator[SEP] identifier[JsonParser] identifier[jp] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SQLException] {
identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP... |
@SuppressWarnings("unchecked")
public synchronized <T> List<T> getInstances(Key<T> key) {
checkState(injector != null && poolScope != null, "WorkerPool has not been initialized, make sure Boot module and ServiceGraph is used");
checkArgument(injector.getExistingBinding(key) != null, "Binding for %s not found", key... | class class_name[name] begin[{]
method[getInstances, return_type[type[List]], modifier[synchronized public], parameter[key]] begin[{]
call[.checkState, parameter[binary_operation[binary_operation[member[.injector], !=, literal[null]], &&, binary_operation[member[.poolScope], !=, literal[null]]]... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[synchronized] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getInstances] operator[SEP] identifier[Key] operator[<] identifier[T] operator[>] identifie... |
public <A extends Annotation> void registerProcessor(final Class<A> annoClass, final FieldProcessor<A> processor) {
ArgUtils.notNull(annoClass, "annoClass");
ArgUtils.notNull(processor, "processor");
pocessorMap.put(annoClass, processor);
} | class class_name[name] begin[{]
method[registerProcessor, return_type[void], modifier[public], parameter[annoClass, processor]] begin[{]
call[ArgUtils.notNull, parameter[member[.annoClass], literal["annoClass"]]]
call[ArgUtils.notNull, parameter[member[.processor], literal["proc... | Keyword[public] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] Keyword[void] identifier[registerProcessor] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[A] operator[>] identifier[annoClass] , Keyword[final] identifier[FieldProcessor] operator[<] identifier[A] oper... |
@Override
public Agreement getWsagObject(String serializedData) throws ParserException{
Agreement agreement = null;
try{
logger.info("Will parse {}", serializedData);
agreement = mapper.readValue(serializedData, Agreement.class);
logger.info("Agreement parse... | class class_name[name] begin[{]
method[getWsagObject, return_type[type[Agreement]], modifier[public], parameter[serializedData]] begin[{]
local_variable[type[Agreement], agreement]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefi... | annotation[@] identifier[Override] Keyword[public] identifier[Agreement] identifier[getWsagObject] operator[SEP] identifier[String] identifier[serializedData] operator[SEP] Keyword[throws] identifier[ParserException] {
identifier[Agreement] identifier[agreement] operator[=] Other[null] operator[SEP] Keyword[try]... |
public void setRequestedBytes(int newRequestedBytes)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setRequestedBytes", newRequestedBytes);
requestedBytes = newRequestedBytes;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this... | class class_name[name] begin[{]
method[setRequestedBytes, return_type[void], modifier[public], parameter[newRequestedBytes]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, para... | Keyword[public] Keyword[void] identifier[setRequestedBytes] operator[SEP] Keyword[int] identifier[newRequestedBytes] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[... |
public void init(Object env, Map<String,Object> properties, Object applet)
{
super.init(env, properties, applet);
if (this.registerUniqueApplication(null, null) != Constants.NORMAL_RETURN)
{
this.free(); // Don't start this application (It's already running somewhere)
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[env, properties, applet]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=env, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, po... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Object] identifier[env] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] , identifier[Object] identifier[applet] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operato... |
public static String getJarHome(Object o)
{
String path = o.getClass().getProtectionDomain()
.getCodeSource().getLocation().getFile();
File jarFile = new File(path);
return jarFile.getParentFile().getAbsolutePath();
} | class class_name[name] begin[{]
method[getJarHome, return_type[type[String]], modifier[public static], parameter[o]] begin[{]
local_variable[type[String], path]
local_variable[type[File], jarFile]
return[call[jarFile.getParentFile, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getJarHome] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getProtectionDomain] opera... |
protected boolean checkIfMatch(final HttpServletRequest request, final HttpServletResponse response, final Attributes resourceAttributes)
throws IOException {
final String eTag = resourceAttributes.getETag();
final String headerValue = request.getHeader("If-Match");
if (headerValue != null) {
if (headerVal... | class class_name[name] begin[{]
method[checkIfMatch, return_type[type[boolean]], modifier[protected], parameter[request, response, resourceAttributes]] begin[{]
local_variable[type[String], eTag]
local_variable[type[String], headerValue]
if[binary_operation[member[.headerValue],... | Keyword[protected] Keyword[boolean] identifier[checkIfMatch] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[Attributes] identifier[resourceAttributes] operator[SEP] Keyword[throws] identi... |
private void processAddDependency(Node n, Node parent) {
CodingConvention convention = compiler.getCodingConvention();
List<String> typeDecls =
convention.identifyTypeDeclarationCall(n);
// TODO(nnaze): Use of addDependency() should someday cause a warning
// as we migrate users to explicit goo... | class class_name[name] begin[{]
method[processAddDependency, return_type[void], modifier[private], parameter[n, parent]] begin[{]
local_variable[type[CodingConvention], convention]
local_variable[type[List], typeDecls]
if[binary_operation[member[.typeDecls], !=, literal[null]]] ... | Keyword[private] Keyword[void] identifier[processAddDependency] operator[SEP] identifier[Node] identifier[n] , identifier[Node] identifier[parent] operator[SEP] {
identifier[CodingConvention] identifier[convention] operator[=] identifier[compiler] operator[SEP] identifier[getCodingConvention] operator[SEP] oper... |
public static String capitalize(final String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return str;
}
final int firstCodepoint = str.codePointAt(0);
final int newCodePoint = Character.toTitleCase(firstCodepoint);
if (firstCodepoint ... | class class_name[name] begin[{]
method[capitalize, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[int], strLen]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, binary_operation[assign[member[.strLen], call[str.... | Keyword[public] Keyword[static] identifier[String] identifier[capitalize] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] {
Keyword[int] identifier[strLen] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] operator[SEP] identifier[strLen] ... |
public void printConstraint(PrintWriter pw)
{
Enumeration ec = getClauses();
boolean first = true;
while (ec.hasMoreElements()) {
Clause cl = (Clause)ec.nextElement();
if(!first) pw.print(" & ");
cl.printConstraint(pw);
... | class class_name[name] begin[{]
method[printConstraint, return_type[void], modifier[public], parameter[pw]] begin[{]
local_variable[type[Enumeration], ec]
local_variable[type[boolean], first]
while[call[ec.hasMoreElements, parameter[]]] begin[{]
local_variable[type[C... | Keyword[public] Keyword[void] identifier[printConstraint] operator[SEP] identifier[PrintWriter] identifier[pw] operator[SEP] {
identifier[Enumeration] identifier[ec] operator[=] identifier[getClauses] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[first] operator[=] literal[boolean] operat... |
private List<WyilFile> getExternals() throws IOException {
ArrayList<WyilFile> externals = new ArrayList<>();
List<Build.Package> pkgs = project.getPackages();
// Consider each package in turn and identify all contained WyilFiles
for (int i = 0; i != pkgs.size(); ++i) {
Build.Package p = pkgs.get(i);
// F... | class class_name[name] begin[{]
method[getExternals, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[ArrayList], externals]
local_variable[type[List], pkgs]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotation... | Keyword[private] identifier[List] operator[<] identifier[WyilFile] operator[>] identifier[getExternals] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ArrayList] operator[<] identifier[WyilFile] operator[>] identifier[externals] operator[=] Keyword[new] identifier[ArrayList] ope... |
public String resolveSystemReverse(String systemId)
throws MalformedURLException, IOException {
Vector resolved = resolveAllSystemReverse(systemId);
if (resolved != null && resolved.size() > 0) {
return (String) resolved.elementAt(0);
} else {
return null;
}
} | class class_name[name] begin[{]
method[resolveSystemReverse, return_type[type[String]], modifier[public], parameter[systemId]] begin[{]
local_variable[type[Vector], resolved]
if[binary_operation[binary_operation[member[.resolved], !=, literal[null]], &&, binary_operation[call[resolved.s... | Keyword[public] identifier[String] identifier[resolveSystemReverse] operator[SEP] identifier[String] identifier[systemId] operator[SEP] Keyword[throws] identifier[MalformedURLException] , identifier[IOException] {
identifier[Vector] identifier[resolved] operator[=] identifier[resolveAllSystemReverse] operator[S... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "Rectangle", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_SurfacePatch")
public JAXBElement<RectangleType> createRectangle(RectangleType value) {
return new JAXBElement<RectangleType>(_Rectangle_QNAME, Rec... | class class_name[name] begin[{]
method[createRectangle, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Rectangle_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_opera... | 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... |
@NonNull
public SelfT withKeyspace(@Nullable String keyspaceName) {
return withKeyspace(keyspaceName == null ? null : CqlIdentifier.fromCql(keyspaceName));
} | class class_name[name] begin[{]
method[withKeyspace, return_type[type[SelfT]], modifier[public], parameter[keyspaceName]] begin[{]
return[call[.withKeyspace, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=keyspaceName, postfix_operators=[], prefix_operators=[], qu... | annotation[@] identifier[NonNull] Keyword[public] identifier[SelfT] identifier[withKeyspace] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[keyspaceName] operator[SEP] {
Keyword[return] identifier[withKeyspace] operator[SEP] identifier[keyspaceName] operator[==] Other[null] operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.