_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q165400 | ApkLoader.getCompileTimeSdkResourceTable | validation | @Nonnull
synchronized public PackageResourceTable getCompileTimeSdkResourceTable() {
if (compiletimeSdkResourceTable == null) {
ResourceTableFactory resourceTableFactory = new ResourceTableFactory();
compiletimeSdkResourceTable = resourceTableFactory
.newFrameworkResourceTable(new ResourcePa... | java | {
"resource": ""
} |
q165401 | ShadowView.dump | validation | @SuppressWarnings("UnusedDeclaration")
@Deprecated
public static void dump(View view) {
ShadowView shadowView = Shadow.extract(view);
shadowView.dump();
} | java | {
"resource": ""
} |
q165402 | ShadowView.innerText | validation | @SuppressWarnings("UnusedDeclaration")
public static String innerText(View view) {
ShadowView shadowView = Shadow.extract(view);
return shadowView.innerText();
} | java | {
"resource": ""
} |
q165403 | ShadowInstrumentation.getAppropriateWrappers | validation | private List<Wrapper> getAppropriateWrappers(Intent intent, String receiverPermission) {
broadcastIntents.add(intent);
List<Wrapper> result = new ArrayList<>();
List<Wrapper> copy = new ArrayList<>();
copy.addAll(registeredReceivers);
String intentClass =
intent.getComponent() != null ? in... | java | {
"resource": ""
} |
q165404 | ShadowInstrumentation.postIntent | validation | private ListenableFuture<BroadcastResultHolder> postIntent(
final Wrapper wrapper,
final Intent intent,
ListenableFuture<BroadcastResultHolder> oldResult,
final AtomicBoolean abort,
final Context context) {
final Handler scheduler =
(wrapper.scheduler != null) ? wrapper.schedul... | java | {
"resource": ""
} |
q165405 | ShadowColor.RGBToHSV | validation | @Implementation
protected static void RGBToHSV(int red, int green, int blue, float hsv[]) {
java.awt.Color.RGBtoHSB(red, green, blue, hsv);
hsv[0] = hsv[0] * 360;
} | java | {
"resource": ""
} |
q165406 | ShadowTrace.beginSection | validation | @Implementation(minSdk = JELLY_BEAN_MR2)
protected static void beginSection(String sectionName) {
if (Trace.isTagEnabled(TRACE_TAG_APP)) {
if (crashOnIncorrectUsage) {
if (sectionName.length() > MAX_SECTION_NAME_LEN) {
throw new IllegalArgumentException("sectionName is too long");
... | java | {
"resource": ""
} |
q165407 | ShadowTrace.endSection | validation | @Implementation(minSdk = JELLY_BEAN_MR2)
protected static void endSection() {
if (Trace.isTagEnabled(TRACE_TAG_APP)) {
synchronized (lock) {
if (currentSections.isEmpty()) {
Log.e(TAG, "Trying to end a trace section that was never started");
return;
}
previousSec... | java | {
"resource": ""
} |
q165408 | Injector.getProvider | validation | @SuppressWarnings("unchecked")
@Nonnull
private synchronized <T> Provider<T> getProvider(final Key<T> key) {
// Previously-gotten providers (including those from subinjectors) will already be present.
return (Provider<T>) providers.computeIfAbsent(key, k -> {
// @AutoFactory requests are always handle... | java | {
"resource": ""
} |
q165409 | FileMap.create | validation | boolean create(String origFileName, int fd, long offset, int length,
boolean readOnly)
{
this.mFileName = origFileName;
this.fd = fd;
this.mDataOffset = offset;
this.readOnly = readOnly;
return true;
} | java | {
"resource": ""
} |
q165410 | PausedExecutorService.runAll | validation | public int runAll() {
int numTasksRun = 0;
if (Thread.currentThread().equals(executorThread)) {
Logger.info("ignoring request to execute task - called from executor's own thread");
return numTasksRun;
}
while (hasQueuedTasks()) {
runNext();
numTasksRun++;
}
return numTask... | java | {
"resource": ""
} |
q165411 | PausedExecutorService.runNext | validation | public boolean runNext() {
if (!hasQueuedTasks()) {
return false;
}
if (Thread.currentThread().equals(executorThread)) {
Logger.info("ignoring request to execute task - called from executor's own thread");
return false;
}
Runnable task = deferredTasks.poll();
task.run();
re... | java | {
"resource": ""
} |
q165412 | ShadowAudioManager.requestAudioFocus | validation | @Implementation(minSdk = O)
protected int requestAudioFocus(android.media.AudioFocusRequest audioFocusRequest) {
lastAudioFocusRequest = new AudioFocusRequest(audioFocusRequest);
return nextResponseValue;
} | java | {
"resource": ""
} |
q165413 | ShadowAudioManager.abandonAudioFocusRequest | validation | @Implementation(minSdk = O)
protected int abandonAudioFocusRequest(android.media.AudioFocusRequest audioFocusRequest) {
lastAbandonedAudioFocusRequest = audioFocusRequest;
return nextResponseValue;
} | java | {
"resource": ""
} |
q165414 | ShadowMediaCodec.native_start | validation | @Implementation(minSdk = LOLLIPOP)
protected void native_start() {
// Currently only support async-mode.
if (callback == null) {
return;
}
// Report the format as changed, to simulate adding codec specific info before making input
// buffers available.
HashMap<String, Object> format = n... | java | {
"resource": ""
} |
q165415 | ShadowMediaCodec.getBuffer | validation | @Implementation(minSdk = LOLLIPOP)
protected ByteBuffer getBuffer(boolean input, int index) {
ByteBuffer[] buffers = input ? inputBuffers : outputBuffers;
return (index >= 0 && index < buffers.length) ? buffers[index] : null;
} | java | {
"resource": ""
} |
q165416 | ShadowMediaCodec.native_queueInputBuffer | validation | @Implementation(minSdk = LOLLIPOP)
protected void native_queueInputBuffer(
int index, int offset, int size, long presentationTimeUs, int flags) {
// Check if this should be the last buffer cycle.
if ((flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) {
reachedEos = true;
}
BufferInfo in... | java | {
"resource": ""
} |
q165417 | ShadowMediaCodec.releaseOutputBuffer | validation | @Implementation(minSdk = LOLLIPOP)
protected void releaseOutputBuffer(int index, boolean render, boolean updatePTS, long timeNs) {
if (reachedEos) {
return;
}
makeInputBufferAvailable(index);
} | java | {
"resource": ""
} |
q165418 | ShadowUsageStatsManager.simulateTimeChange | validation | public void simulateTimeChange(long offsetToAddInMillis) {
ImmutableMap.Builder<Long, Event> eventMapBuilder = ImmutableMap.builder();
for (Event event : eventsByTimeStamp.values()) {
long newTimestamp = event.getTimeStamp() + offsetToAddInMillis;
eventMapBuilder.put(
newTimestamp, EventBu... | java | {
"resource": ""
} |
q165419 | LegacyManifestParser.metaDataToBundle | validation | private static Bundle metaDataToBundle(Map<String, Object> meta) {
if (meta.size() == 0) {
return null;
}
Bundle bundle = new Bundle();
for (Map.Entry<String, Object> entry : meta.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
if (Boolean.class.isIn... | java | {
"resource": ""
} |
q165420 | ShadowSQLiteConnection.convertSQLWithLocalizedUnicodeCollator | validation | static String convertSQLWithLocalizedUnicodeCollator(String sql) {
Matcher matcher = COLLATE_LOCALIZED_UNICODE_PATTERN.matcher(sql);
return matcher.replaceAll(" COLLATE NOCASE");
} | java | {
"resource": ""
} |
q165421 | ShadowApplicationPackageManager.newPackageInfo | validation | private static PackageInfo newPackageInfo(PackageInfo orig) {
Parcel parcel = Parcel.obtain();
orig.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
return PackageInfo.CREATOR.createFromParcel(parcel);
} | java | {
"resource": ""
} |
q165422 | ShadowApplicationPackageManager.isGrantedForBackwardsCompatibility | validation | private boolean isGrantedForBackwardsCompatibility(String pkgName, PackageInfo permissionsInfo) {
// Note: it might be cleaner to auto-grant these permissions when the package is added to the
// PackageManager. But many existing tests modify the requested permissions _after_ adding the
// package to the Pac... | java | {
"resource": ""
} |
q165423 | ShadowApplicationPackageManager.applyFlagsToComponentInfo | validation | private void applyFlagsToComponentInfo(ComponentInfo componentInfo, int flags)
throws NameNotFoundException {
componentInfo.name = (componentInfo.name == null) ? "" : componentInfo.name;
ApplicationInfo applicationInfo = componentInfo.applicationInfo;
boolean isApplicationEnabled = true;
if (appli... | java | {
"resource": ""
} |
q165424 | ShadowApplicationPackageManager.getPermissionIndex | validation | private int getPermissionIndex(PackageInfo packageInfo, String permissionName) {
if (packageInfo.requestedPermissions != null) {
for (int i = 0; i < packageInfo.requestedPermissions.length; i++) {
if (permissionName.equals(packageInfo.requestedPermissions[i])) {
return i;
}
}
... | java | {
"resource": ""
} |
q165425 | ShadowApplicationPackageManager.getUserBadgedIcon | validation | @Implementation(minSdk = LOLLIPOP)
protected Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
return icon;
} | java | {
"resource": ""
} |
q165426 | ShadowApplicationPackageManager.hasProfileOwnerOrDeviceOwnerOnCurrentUser | validation | private boolean hasProfileOwnerOrDeviceOwnerOnCurrentUser() {
DevicePolicyManager devicePolicyManager =
(DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
return devicePolicyManager.getProfileOwner() != null
|| (UserHandle.of(UserHandle.myUserId()).isSystem()
... | java | {
"resource": ""
} |
q165427 | StringResources.extractCodePoint | validation | private static char[] extractCodePoint(String codePoint) {
try {
return Character.toChars(Integer.valueOf(codePoint, 16));
} catch (IllegalArgumentException e) {
// This may be caused by NumberFormatException of Integer.valueOf() or
// IllegalArgumentException of Character.toChars().
thr... | java | {
"resource": ""
} |
q165428 | Reflector.reflector | validation | public static <T> T reflector(Class<T> iClass, Object target) {
Class<?> targetClass = determineTargetClass(iClass);
Constructor<? extends T> ctor = (Constructor<? extends T>) CACHE.get(iClass);
try {
if (ctor == null) {
Class<? extends T> reflectorClass = createReflectorClass(iClass, targetC... | java | {
"resource": ""
} |
q165429 | ShadowContentResolver.getStatus | validation | public static Status getStatus(Account account, String authority, boolean create) {
Map<Account, Status> map = syncableAccounts.get(authority);
if (map == null) {
map = new HashMap<>();
syncableAccounts.put(authority, map);
}
Status status = map.get(account);
if (status == null && create... | java | {
"resource": ""
} |
q165430 | ShadowContentResolver.getContentObservers | validation | public Collection<ContentObserver> getContentObservers(Uri uri) {
ArrayList<ContentObserver> observers = new ArrayList<>(1);
for (ContentObserverEntry entry : contentObservers) {
if (entry.matches(uri)) {
observers.add(entry.observer);
}
}
return observers;
} | java | {
"resource": ""
} |
q165431 | ShadowDisplayManager.addDisplay | validation | public static int addDisplay(String qualifiersStr) {
int id = getShadowDisplayManagerGlobal().addDisplay(createDisplayInfo(qualifiersStr, null));
shadowMainLooper().idle();
return id;
} | java | {
"resource": ""
} |
q165432 | ShadowDisplayManager.changeDisplay | validation | static void changeDisplay(int displayId, Consumer<DisplayConfig> consumer) {
DisplayInfo displayInfo = DisplayManagerGlobal.getInstance().getDisplayInfo(displayId);
if (displayInfo != null) {
DisplayConfig displayConfig = new DisplayConfig(displayInfo);
consumer.accept(displayConfig);
displayC... | java | {
"resource": ""
} |
q165433 | ShadowDebug.fixTracePath | validation | private static String fixTracePath(String tracePath) {
String defaultTraceBody = "dmtrace";
String defaultTraceExtension = ".trace";
if (tracePath == null || tracePath.charAt(0) != '/') {
final File dir = RuntimeEnvironment.application.getExternalFilesDir(null);
if (tracePath == null) {
... | java | {
"resource": ""
} |
q165434 | CronSequenceGenerator.findNext | validation | private int findNext(BitSet bits, int value, Calendar calendar, int field, int nextField, List<Integer> lowerOrders) {
int nextValue = bits.nextSetBit(value);
// roll over if needed
if (nextValue == -1) {
calendar.add(nextField, 1);
reset(calendar, Arrays.asList(field));
nextValue = bits.nextSetBit(0);
... | java | {
"resource": ""
} |
q165435 | CronSequenceGenerator.reset | validation | private void reset(Calendar calendar, List<Integer> fields) {
for (int field : fields) {
calendar.set(field, field == Calendar.DAY_OF_MONTH ? 1 : 0);
}
} | java | {
"resource": ""
} |
q165436 | CronSequenceGenerator.parse | validation | private void parse(String expression) throws IllegalArgumentException {
String[] fields = Strings.splitIgnoreBlank(expression, " ");
if (fields.length != 6) {
throw new IllegalArgumentException(String.format(
"Cron expression must consist of 6 fields (found %d in \"%s\")", fields.length, expression));
}
... | java | {
"resource": ""
} |
q165437 | GeneratorAdapter.getArgIndex | validation | private int getArgIndex(final int arg) {
int index = (access & Opcodes.ACC_STATIC) == 0 ? 1 : 0;
for (int i = 0; i < arg; i++) {
index += argumentTypes[i].getSize();
}
return index;
} | java | {
"resource": ""
} |
q165438 | GeneratorAdapter.loadInsn | validation | private void loadInsn(final Type type, final int index) {
mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), index);
} | java | {
"resource": ""
} |
q165439 | GeneratorAdapter.storeInsn | validation | private void storeInsn(final Type type, final int index) {
mv.visitVarInsn(type.getOpcode(Opcodes.ISTORE), index);
} | java | {
"resource": ""
} |
q165440 | GeneratorAdapter.loadArgs | validation | public void loadArgs(final int arg, final int count) {
int index = getArgIndex(arg);
for (int i = 0; i < count; ++i) {
Type t = argumentTypes[arg + i];
loadInsn(t, index);
index += t.getSize();
}
} | java | {
"resource": ""
} |
q165441 | GeneratorAdapter.loadArgArray | validation | public void loadArgArray() {
push(argumentTypes.length);
newArray(OBJECT_TYPE);
for (int i = 0; i < argumentTypes.length; i++) {
dup();
push(i);
loadArg(i);
box(argumentTypes[i]);
arrayStore(OBJECT_TYPE);
}
} | java | {
"resource": ""
} |
q165442 | GeneratorAdapter.loadLocal | validation | public void loadLocal(final int local, final Type type) {
setLocalType(local, type);
loadInsn(type, local);
} | java | {
"resource": ""
} |
q165443 | GeneratorAdapter.storeLocal | validation | public void storeLocal(final int local, final Type type) {
setLocalType(local, type);
storeInsn(type, local);
} | java | {
"resource": ""
} |
q165444 | GeneratorAdapter.swap | validation | public void swap(final Type prev, final Type type) {
if (type.getSize() == 1) {
if (prev.getSize() == 1) {
swap(); // same as dupX1(), pop();
} else {
dupX2();
pop();
}
} else {
if (prev.getSize() == 1) {
... | java | {
"resource": ""
} |
q165445 | GeneratorAdapter.box | validation | public void box(final Type type) {
if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) {
return;
}
if (type == Type.VOID_TYPE) {
push((String) null);
} else {
Type boxed = getBoxedType(type);
newInstance(boxed);
i... | java | {
"resource": ""
} |
q165446 | GeneratorAdapter.unbox | validation | public void unbox(final Type type) {
Type t = NUMBER_TYPE;
Method sig = null;
switch (type.getSort()) {
case Type.VOID:
return;
case Type.CHAR:
t = CHARACTER_TYPE;
sig = CHAR_VALUE;
break;
case Type.BOOLEAN:
t = ... | java | {
"resource": ""
} |
q165447 | GeneratorAdapter.ifCmp | validation | public void ifCmp(final Type type, final int mode, final Label label) {
switch (type.getSort()) {
case Type.LONG:
mv.visitInsn(Opcodes.LCMP);
break;
case Type.DOUBLE:
mv.visitInsn(mode == GE || mode == GT ? Opcodes.DCMPL
: Opcodes.DCMPG);
... | java | {
"resource": ""
} |
q165448 | GeneratorAdapter.fieldInsn | validation | private void fieldInsn(final int opcode, final Type ownerType,
final String name, final Type fieldType) {
mv.visitFieldInsn(opcode, ownerType.getInternalName(), name,
fieldType.getDescriptor());
} | java | {
"resource": ""
} |
q165449 | GeneratorAdapter.getStatic | validation | public void getStatic(final Type owner, final String name, final Type type) {
fieldInsn(Opcodes.GETSTATIC, owner, name, type);
} | java | {
"resource": ""
} |
q165450 | GeneratorAdapter.putStatic | validation | public void putStatic(final Type owner, final String name, final Type type) {
fieldInsn(Opcodes.PUTSTATIC, owner, name, type);
} | java | {
"resource": ""
} |
q165451 | GeneratorAdapter.getField | validation | public void getField(final Type owner, final String name, final Type type) {
fieldInsn(Opcodes.GETFIELD, owner, name, type);
} | java | {
"resource": ""
} |
q165452 | GeneratorAdapter.putField | validation | public void putField(final Type owner, final String name, final Type type) {
fieldInsn(Opcodes.PUTFIELD, owner, name, type);
} | java | {
"resource": ""
} |
q165453 | GeneratorAdapter.invokeInsn | validation | private void invokeInsn(final int opcode, final Type type,
final Method method, final boolean itf) {
String owner = type.getSort() == Type.ARRAY ? type.getDescriptor()
: type.getInternalName();
mv.visitMethodInsn(opcode, owner, method.getName(),
method.getDesc... | java | {
"resource": ""
} |
q165454 | GeneratorAdapter.invokeVirtual | validation | public void invokeVirtual(final Type owner, final Method method) {
invokeInsn(Opcodes.INVOKEVIRTUAL, owner, method, false);
} | java | {
"resource": ""
} |
q165455 | GeneratorAdapter.invokeConstructor | validation | public void invokeConstructor(final Type type, final Method method) {
invokeInsn(Opcodes.INVOKESPECIAL, type, method, false);
} | java | {
"resource": ""
} |
q165456 | GeneratorAdapter.invokeStatic | validation | public void invokeStatic(final Type owner, final Method method) {
invokeInsn(Opcodes.INVOKESTATIC, owner, method, false);
} | java | {
"resource": ""
} |
q165457 | GeneratorAdapter.invokeInterface | validation | public void invokeInterface(final Type owner, final Method method) {
invokeInsn(Opcodes.INVOKEINTERFACE, owner, method, true);
} | java | {
"resource": ""
} |
q165458 | GeneratorAdapter.throwException | validation | public void throwException(final Type type, final String msg) {
newInstance(type);
dup();
push(msg);
invokeConstructor(type, Method.getMethod("void <init> (String)"));
throwException();
} | java | {
"resource": ""
} |
q165459 | GeneratorAdapter.checkCast | validation | public void checkCast(final Type type) {
if (!type.equals(OBJECT_TYPE)) {
typeInsn(Opcodes.CHECKCAST, type);
}
} | java | {
"resource": ""
} |
q165460 | MethodWriter.visitImplicitFirstFrame | validation | private void visitImplicitFirstFrame() {
// There can be at most descriptor.length() + 1 locals
int frameIndex = startFrame(0, descriptor.length() + 1, 0);
if ((access & Opcodes.ACC_STATIC) == 0) {
if ((access & ACC_CONSTRUCTOR) == 0) {
frame[frameIndex++] = Frame.OBJ... | java | {
"resource": ""
} |
q165461 | MethodWriter.startFrame | validation | private int startFrame(final int offset, final int nLocal, final int nStack) {
int n = 3 + nLocal + nStack;
if (frame == null || frame.length < n) {
frame = new int[n];
}
frame[0] = offset;
frame[1] = nLocal;
frame[2] = nStack;
return 3;
} | java | {
"resource": ""
} |
q165462 | ClassWriter.newMethodItem | validation | Item newMethodItem(final String owner, final String name,
final String desc, final boolean itf) {
int type = itf ? IMETH : METH;
key3.set(type, owner, name, desc);
Item result = get(key3);
if (result == null) {
put122(type, newClass(owner), newNameType(name, desc)... | java | {
"resource": ""
} |
q165463 | ClassWriter.newFloat | validation | Item newFloat(final float value) {
key.set(value);
Item result = get(key);
if (result == null) {
pool.putByte(FLOAT).putInt(key.intVal);
result = new Item(index++, key);
put(result);
}
return result;
} | java | {
"resource": ""
} |
q165464 | ClassWriter.newString | validation | private Item newString(final String value) {
key2.set(STR, value, null, null);
Item result = get(key2);
if (result == null) {
pool.put12(STR, newUTF8(value));
result = new Item(index++, key2);
put(result);
}
return result;
} | java | {
"resource": ""
} |
q165465 | ClassWriter.newNameTypeItem | validation | Item newNameTypeItem(final String name, final String desc) {
key2.set(NAME_TYPE, name, desc, null);
Item result = get(key2);
if (result == null) {
put122(NAME_TYPE, newUTF8(name), newUTF8(desc));
result = new Item(index++, key2);
put(result);
}
... | java | {
"resource": ""
} |
q165466 | ClassWriter.get | validation | private Item get(final Item key) {
Item i = items[key.hashCode % items.length];
while (i != null && (i.type != key.type || !key.isEqualTo(i))) {
i = i.next;
}
return i;
} | java | {
"resource": ""
} |
q165467 | ClassWriter.put122 | validation | private void put122(final int b, final int s1, final int s2) {
pool.put12(b, s1).putShort(s2);
} | java | {
"resource": ""
} |
q165468 | ClassWriter.put112 | validation | private void put112(final int b1, final int b2, final int s) {
pool.put11(b1, b2).putShort(s);
} | java | {
"resource": ""
} |
q165469 | AnnotationVisitor.visitEnum | validation | public void visitEnum(String name, String desc, String value) {
if (av != null) {
av.visitEnum(name, desc, value);
}
} | java | {
"resource": ""
} |
q165470 | AnnotationVisitor.visitAnnotation | validation | public AnnotationVisitor visitAnnotation(String name, String desc) {
if (av != null) {
return av.visitAnnotation(name, desc);
}
return null;
} | java | {
"resource": ""
} |
q165471 | Images.pos4twist | validation | private static int pos4twist(double rank,
double phase,
double period,
int hOrW,
int xOrY,
int yOrX) {
double dyOrX = Math.PI * rank * yOrX / hOrW ... | java | {
"resource": ""
} |
q165472 | Images.createJPEG4 | validation | private static BufferedImage createJPEG4(Raster raster) {
int w = raster.getWidth();
int h = raster.getHeight();
byte[] rgb = new byte[w * h * 3];
float[] Y = raster.getSamples(0, 0, w, h, 0, (float[]) null);
float[] Cb = raster.getSamples(0, 0, w, h, 1, (float[]) null);
... | java | {
"resource": ""
} |
q165473 | MethodVisitor.visitParameter | validation | public void visitParameter(String name, int access) {
if (api < Opcodes.ASM5) {
throw new RuntimeException();
}
if (mv != null) {
mv.visitParameter(name, access);
}
} | java | {
"resource": ""
} |
q165474 | MethodVisitor.visitAnnotation | validation | public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
if (mv != null) {
return mv.visitAnnotation(desc, visible);
}
return null;
} | java | {
"resource": ""
} |
q165475 | MethodVisitor.visitParameterAnnotation | validation | public AnnotationVisitor visitParameterAnnotation(int parameter,
String desc, boolean visible) {
if (mv != null) {
return mv.visitParameterAnnotation(parameter, desc, visible);
}
return null;
} | java | {
"resource": ""
} |
q165476 | MethodVisitor.visitTypeInsn | validation | public void visitTypeInsn(int opcode, String type) {
if (mv != null) {
mv.visitTypeInsn(opcode, type);
}
} | java | {
"resource": ""
} |
q165477 | MethodVisitor.visitFieldInsn | validation | public void visitFieldInsn(int opcode, String owner, String name,
String desc) {
if (mv != null) {
mv.visitFieldInsn(opcode, owner, name, desc);
}
} | java | {
"resource": ""
} |
q165478 | MethodVisitor.visitMethodInsn | validation | @Deprecated
public void visitMethodInsn(int opcode, String owner, String name,
String desc) {
if (api >= Opcodes.ASM5) {
boolean itf = opcode == Opcodes.INVOKEINTERFACE;
visitMethodInsn(opcode, owner, name, desc, itf);
return;
}
if (mv != null)... | java | {
"resource": ""
} |
q165479 | MethodVisitor.visitTableSwitchInsn | validation | public void visitTableSwitchInsn(int min, int max, Label dflt,
Label... labels) {
if (mv != null) {
mv.visitTableSwitchInsn(min, max, dflt, labels);
}
} | java | {
"resource": ""
} |
q165480 | MethodVisitor.visitLookupSwitchInsn | validation | public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) {
if (mv != null) {
mv.visitLookupSwitchInsn(dflt, keys, labels);
}
} | java | {
"resource": ""
} |
q165481 | MethodVisitor.visitMultiANewArrayInsn | validation | public void visitMultiANewArrayInsn(String desc, int dims) {
if (mv != null) {
mv.visitMultiANewArrayInsn(desc, dims);
}
} | java | {
"resource": ""
} |
q165482 | MethodVisitor.visitLocalVariableAnnotation | validation | public AnnotationVisitor visitLocalVariableAnnotation(int typeRef,
TypePath typePath, Label[] start, Label[] end, int[] index,
String desc, boolean visible) {
if (api < Opcodes.ASM5) {
throw new RuntimeException();
}
if (mv != null) {
return mv.vis... | java | {
"resource": ""
} |
q165483 | MethodVisitor.visitLineNumber | validation | public void visitLineNumber(int line, Label start) {
if (mv != null) {
mv.visitLineNumber(line, start);
}
} | java | {
"resource": ""
} |
q165484 | ClassReader.readFrameType | validation | private int readFrameType(final Object[] frame, final int index, int v,
final char[] buf, final Label[] labels) {
int type = b[v++] & 0xFF;
switch (type) {
case 0:
frame[index] = Opcodes.TOP;
break;
case 1:
frame[index] = Opcodes.INTEGER;
... | java | {
"resource": ""
} |
q165485 | Frame.set | validation | final void set(ClassWriter cw, final int nLocal, final Object[] local,
final int nStack, final Object[] stack) {
int i = convert(cw, nLocal, local, inputLocals);
while (i < local.length) {
inputLocals[i++] = TOP;
}
int nStackTop = 0;
for (int j = 0; j < nS... | java | {
"resource": ""
} |
q165486 | Frame.get | validation | private int get(final int local) {
if (outputLocals == null || local >= outputLocals.length) {
// this local has never been assigned in this basic block,
// so it is still equal to its value in the input frame
return LOCAL | local;
} else {
int type = outp... | java | {
"resource": ""
} |
q165487 | Frame.set | validation | private void set(final int local, final int type) {
// creates and/or resizes the output local variables array if necessary
if (outputLocals == null) {
outputLocals = new int[10];
}
int n = outputLocals.length;
if (local >= n) {
int[] t = new int[Math.max(... | java | {
"resource": ""
} |
q165488 | Frame.push | validation | private void push(final ClassWriter cw, final String desc) {
int type = type(cw, desc);
if (type != 0) {
push(type);
if (type == LONG || type == DOUBLE) {
push(TOP);
}
}
} | java | {
"resource": ""
} |
q165489 | Frame.type | validation | private static int type(final ClassWriter cw, final String desc) {
String t;
int index = desc.charAt(0) == '(' ? desc.indexOf(')') + 1 : 0;
switch (desc.charAt(index)) {
case 'V':
return 0;
case 'Z':
case 'C':
case 'B':
case 'S':
case '... | java | {
"resource": ""
} |
q165490 | Frame.pop | validation | private void pop(final int elements) {
if (outputStackTop >= elements) {
outputStackTop -= elements;
} else {
// if the number of elements to be popped is greater than the number
// of elements in the output stack, clear it, and pops the remaining
// eleme... | java | {
"resource": ""
} |
q165491 | Frame.pop | validation | private void pop(final String desc) {
char c = desc.charAt(0);
if (c == '(') {
pop((Type.getArgumentsAndReturnSizes(desc) >> 2) - 1);
} else if (c == 'J' || c == 'D') {
pop(2);
} else {
pop(1);
}
} | java | {
"resource": ""
} |
q165492 | Frame.init | validation | private void init(final int var) {
// creates and/or resizes the initializations array if necessary
if (initializations == null) {
initializations = new int[2];
}
int n = initializations.length;
if (initializationCount >= n) {
int[] t = new int[Math.max(in... | java | {
"resource": ""
} |
q165493 | Frame.init | validation | private int init(final ClassWriter cw, final int t) {
int s;
if (t == UNINITIALIZED_THIS) {
s = OBJECT | cw.addType(cw.thisName);
} else if ((t & (DIM | BASE_KIND)) == UNINITIALIZED) {
String type = cw.typeTable[t & BASE_VALUE].strVal1;
s = OBJECT | cw.addType... | java | {
"resource": ""
} |
q165494 | ClassVisitor.visitSource | validation | public void visitSource(String source, String debug) {
if (cv != null) {
cv.visitSource(source, debug);
}
} | java | {
"resource": ""
} |
q165495 | ClassVisitor.visitOuterClass | validation | public void visitOuterClass(String owner, String name, String desc) {
if (cv != null) {
cv.visitOuterClass(owner, name, desc);
}
} | java | {
"resource": ""
} |
q165496 | ClassVisitor.visitAnnotation | validation | public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
if (cv != null) {
return cv.visitAnnotation(desc, visible);
}
return null;
} | java | {
"resource": ""
} |
q165497 | ClassVisitor.visitTypeAnnotation | validation | public AnnotationVisitor visitTypeAnnotation(int typeRef,
TypePath typePath, String desc, boolean visible) {
if (api < Opcodes.ASM5) {
throw new RuntimeException();
}
if (cv != null) {
return cv.visitTypeAnnotation(typeRef, typePath, desc, visible);
}
... | java | {
"resource": ""
} |
q165498 | Maths.extract | validation | public static int extract(int bs, int low, int high) {
bs = bs >> low;
int mask = 0;
for (int i = 0; i < (high - low); i++) {
mask += 1 << i;
}
return bs & mask;
} | java | {
"resource": ""
} |
q165499 | Type.getObjectType | validation | public static Type getObjectType(final String internalName) {
char[] buf = internalName.toCharArray();
return new Type(buf[0] == '[' ? ARRAY : OBJECT, buf, 0, buf.length);
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.