auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private V getValue ( ) throws java.util.concurrent.CancellationException , java.util.concurrent.ExecutionException { int state = getState ( ) ; switch ( state ) { case com.google.common.util.concurrent.AbstractFuture.Sync.COMPLETED : if ( ( exception ) != null ) { throw new java.util.concurrent.ExecutionException ( exception ) ; } else { return value ; } case com.google.common.util.concurrent.AbstractFuture.Sync.CANCELLED : throw new java.util.concurrent.CancellationException ( "Task was cancelled." ) ; default : throw new java.lang.IllegalStateException ( ( "Error, synchronizer in invalid state: " + state ) ) ; } }

Target:
private V getValue ( ) throws java.util.concurrent.CancellationException , java.util.concurrent.ExecutionException { int state = getState ( ) ; switch ( state ) { case com.google.common.util.concurrent.AbstractFuture.Sync.COMPLETED : if ( ( exception ) != null ) { throw new java.util.concurrent.ExecutionException ( exception ) ; } else { return value ; } case com.google.common.util.concurrent.AbstractFuture.Sync.CANCELLED : case com.google.common.util.concurrent.AbstractFuture.Sync.INTERRUPTED : throw com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause ( "Task was cancelled." , exception ) ; default : throw new java.lang.IllegalStateException ( ( "Error, synchronizer in invalid state: " + state ) ) ; } }
Source:
public static com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > parseResource ( java.lang.String url ) { if ( ! ( url.startsWith ( "@" ) ) ) { return null ; } int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd == ( - 1 ) ) { return null ; } int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.resources.ResourceType type = com.android.resources.ResourceType.getEnum ( typeName ) ; if ( type == null ) { return null ; } java.lang.String name = url.substring ( nameBegin ) ; return com.android.util.Pair.of ( type , name ) ; }

Target:
private static boolean isValidResourceUrlChar ( char c ) { return ( ( ( ( java.lang.Character.isJavaIdentifierPart ( c ) ) || ( c == ':' ) ) || ( c == '/' ) ) || ( c == '.' ) ) || ( c == '+' ) ; }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUcharUcharUcharUchar args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( byte ) ( java.lang.StrictMath.min ( ( ( args.inMaxValue ) & 255 ) , java.lang.StrictMath.max ( ( ( args.inValue ) & 255 ) , ( ( args.inMinValue ) & 255 ) ) ) ) ) ; }

Target:
public static void computeConvert ( android.renderscript.cts.TestConvert.ArgumentsUintInt args ) { args.out = android.renderscript.cts.CoreMathVerifier.convertUintToInt ( args.inV ) ; }
Source:
public static com.android.jack.dx.rop.code.SourcePosition getSourcePosition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode stmt ) { if ( ( stmt.getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) { return com.android.jack.dx.rop.code.SourcePosition.NO_INFO ; } return new com.android.jack.dx.rop.code.SourcePosition ( new com.android.jack.dx.rop.cst.CstString ( stmt.getSourceInfo ( ) . getFileName ( ) ) , ( - 1 ) , stmt.getSourceInfo ( ) . getStartLine ( ) ) ; }

Target:
public static com.android.jack.dx.rop.code.SourcePosition getSourcePosition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode stmt ) { if ( ( stmt.getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) { return com.android.jack.dx.rop.code.SourcePosition.NO_INFO ; } int startLine = stmt.getSourceInfo ( ) . getStartLine ( ) ; return new com.android.jack.dx.rop.code.SourcePosition ( new com.android.jack.dx.rop.cst.CstString ( stmt.getSourceInfo ( ) . getFileName ( ) ) , ( - 1 ) , ( startLine == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN_LINE_NUMBER ) ? - 1 : startLine ) ) ; }
Source:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , int subId ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; }

Target:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , int subId ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } }
Source:
private void addAttr ( java.lang.String propertyName , com.android.ide.common.api.INode childNode , java.util.List < java.lang.String > infos ) { java.lang.String a = childNode.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , ( "layout_" + propertyName ) ) ; if ( ( a != null ) && ( ( a.length ( ) ) > 0 ) ) { java.lang.String s = ( propertyName + ": " ) + a ; infos.add ( s ) ; } }

Target:
private void addAttr ( java.lang.String propertyName , com.android.ide.common.api.INode childNode , java.util.List < java.lang.String > infos ) { java.lang.String a = childNode.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , ( ( com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_PREFIX ) + propertyName ) ) ; if ( ( a != null ) && ( ( a.length ( ) ) > 0 ) ) { java.lang.String s = ( propertyName + ": " ) + a ; infos.add ( s ) ; } }
Source:
protected static void printUsage ( @ javax.annotation.Nonnull java.io.PrintStream printStream ) { java.io.InputStream is = com.android.jack.Main.class . getResourceAsStream ( "/help.txt" ) ; if ( is == null ) { throw new java.lang.AssertionError ( ) ; } com.android.sched.util.stream.CharacterStreamSucker css = new com.android.sched.util.stream.CharacterStreamSucker ( is , printStream ) ; try { css.suck ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } finally { try { is.close ( ) ; } catch ( java.io.IOException e ) { } } }

Target:
protected static void printUsage ( @ javax.annotation.Nonnull java.io.PrintStream printStream ) { org.kohsuke.args4j.CmdLineParser parser = new org.kohsuke.args4j.CmdLineParser ( new com.android.jack.Options ( ) ) ; printStream.println ( "Usage: <options> <source files>" ) ; printStream.println ( ) ; printStream.println ( "Options:" ) ; parser.printUsage ( printStream ) ; }
Source:
private static boolean readTruncatedHMacExtension ( byte [ ] extensionData ) throws java.io.IOException { if ( extensionData == null ) { throw new java.lang.IllegalArgumentException ( "'extensionData' cannot be null" ) ; } if ( ( extensionData.length ) != 0 ) { throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.illegal_parameter ) ; } return true ; }

Target:
private static boolean readEmptyExtensionData ( byte [ ] extensionData ) throws java.io.IOException { if ( extensionData == null ) { throw new java.lang.IllegalArgumentException ( "'extensionData' cannot be null" ) ; } if ( ( extensionData.length ) != 0 ) { throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.illegal_parameter ) ; } return true ; }
Source:
private static void printBitmap ( com.android.ahat.Doc doc , com.android.tools.perflib.heap.Instance inst ) { com.android.tools.perflib.heap.Instance bitmap = com.android.ahat.InstanceUtils.getAssociatedBitmapInstance ( inst ) ; if ( bitmap != null ) { doc.section ( "Bitmap Image" ) ; doc.println ( com.android.ahat.DocString.image ( com.android.ahat.DocString.uri ( "bitmap?id=%d" , bitmap.getId ( ) ) , "bitmap image" ) ) ; } }

Target:
private static void printBitmap ( com.android.ahat.Doc doc , com.android.tools.perflib.heap.Instance inst ) { com.android.tools.perflib.heap.Instance bitmap = com.android.ahat.InstanceUtils.getAssociatedBitmapInstance ( inst ) ; if ( bitmap != null ) { doc.section ( "Bitmap Image" ) ; doc.println ( com.android.ahat.DocString.image ( com.android.ahat.DocString.formattedUri ( "bitmap?id=%d" , bitmap.getId ( ) ) , "bitmap image" ) ) ; } }
Source:
public void setModel ( @ org.jetbrains.annotations.NotNull javax.swing.table.TableModel model ) { super . setModel ( model ) ; if ( ( ! ( myColumnsSizeInitialized ) ) && ( ( model.getRowCount ( ) ) > 0 ) ) { myColumnsSizeInitialized = true ; setColumnPreferredSize ( ) ; setAutoCreateColumnsFromModel ( false ) ; getColumnModel ( ) . getColumn ( GraphTableModel.ROOT_COLUMN ) . setHeaderRenderer ( new com.intellij.vcs.log.ui.frame.VcsLogGraphTable.RootHeaderRenderer ( ) ) ; } }

Target:
private boolean initColumnSize ( ) { if ( ( ! ( myColumnsSizeInitialized ) ) && ( ( getModel ( ) . getRowCount ( ) ) > 0 ) ) { myColumnsSizeInitialized = true ; setColumnPreferredSize ( ) ; setAutoCreateColumnsFromModel ( false ) ; getColumnModel ( ) . getColumn ( GraphTableModel.ROOT_COLUMN ) . setHeaderRenderer ( new com.intellij.vcs.log.ui.frame.VcsLogGraphTable.RootHeaderRenderer ( ) ) ; return true ; } return false ; }
Source:
public static void terminate ( ) { if ( ( ( com.android.ddmlib.AndroidDebugBridge.sThis ) != null ) && ( ( com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor ) != null ) ) { com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor.stop ( ) ; com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor = null ; } com.android.ddmlib.MonitorThread monitorThread = com.android.ddmlib.MonitorThread.getInstance ( ) ; if ( monitorThread != null ) { monitorThread.quit ( ) ; } }

Target:
public static synchronized void terminate ( ) { if ( ( ( com.android.ddmlib.AndroidDebugBridge.sThis ) != null ) && ( ( com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor ) != null ) ) { com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor.stop ( ) ; com.android.ddmlib.AndroidDebugBridge.sThis.mDeviceMonitor = null ; } com.android.ddmlib.MonitorThread monitorThread = com.android.ddmlib.MonitorThread.getInstance ( ) ; if ( monitorThread != null ) { monitorThread.quit ( ) ; } com.android.ddmlib.AndroidDebugBridge.sInitialized = false ; }
Source:
private static com.android.ide.common.layout.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getFirstPosition ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent ) { if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.ide.common.layout.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , 0 ) ; } return null ; }

Target:
private static com.android.sdklib.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getFirstPosition ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent ) { if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.sdklib.util.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , 0 ) ; } return null ; }
Source:
public com.android.sched.vfs.OutputVFile createOutputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.CannotCreateFileException { java.io.File file = new java.io.File ( dir , path.getPathAsString ( getSeparator ( ) ) ) ; if ( ( ! ( file.getParentFile ( ) . mkdirs ( ) ) ) && ( ! ( file.getParentFile ( ) . isDirectory ( ) ) ) ) { throw new com.android.sched.util.file.CannotCreateFileException ( new com.android.sched.util.location.DirectoryLocation ( file.getParentFile ( ) ) ) ; } return new com.android.sched.vfs.direct.DirectFile ( file ) ; }

Target:
public com.android.sched.vfs.OutputVFile createOutputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.CannotCreateFileException { java.io.File file = new java.io.File ( dir , path.getPathAsString ( getSeparator ( ) ) ) ; if ( ( ! ( file.getParentFile ( ) . mkdirs ( ) ) ) && ( ! ( file.getParentFile ( ) . isDirectory ( ) ) ) ) { throw new com.android.sched.util.file.CannotCreateFileException ( new com.android.sched.util.location.DirectoryLocation ( file.getParentFile ( ) ) ) ; } return new com.android.sched.vfs.direct.DirectFile ( file , vfsRoot ) ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , callback ) ; }

Target:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , int timeout , android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , timeout , callback ) ; }
Source:
public void run ( ) { mNM.notify ( 1 , notificationWithNumbers ( 4444 ) ) ; }

Target:
public void run ( ) { for ( int i = 0 ; i < 10 ; i ++ ) { android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Add two notifications" ) ; mNM.notify ( 1 , notificationWithNumbers ( 1 ) ) ; mNM.notify ( 2 , notificationWithNumbers ( 2 ) ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Cancel two notifications" ) ; mNM.cancel ( 1 ) ; mNM.cancel ( 2 ) ; } }
Source:
private void contentSizeChanged ( boolean updateLayout ) { if ( ( ( mContentWidth ) | ( mContentHeight ) ) == 0 ) { return ; } if ( mHeightCanMeasure ) { if ( ( ( getMeasuredHeight ( ) ) != ( contentToView ( mContentHeight ) ) ) && updateLayout ) { requestLayout ( ) ; } } else if ( mWidthCanMeasure ) { if ( ( ( getMeasuredWidth ( ) ) != ( contentToView ( mContentWidth ) ) ) && updateLayout ) { requestLayout ( ) ; } } else { sendViewSizeZoom ( ) ; } }

Target:
private void contentSizeChanged ( boolean updateLayout ) { if ( ( ( mContentWidth ) | ( mContentHeight ) ) == 0 ) { return ; } if ( mHeightCanMeasure ) { if ( ( ( getMeasuredHeight ( ) ) != ( contentToViewDimension ( mContentHeight ) ) ) && updateLayout ) { requestLayout ( ) ; } } else if ( mWidthCanMeasure ) { if ( ( ( getMeasuredWidth ( ) ) != ( contentToViewDimension ( mContentWidth ) ) ) && updateLayout ) { requestLayout ( ) ; } } else { sendViewSizeZoom ( ) ; } }
Source:
private com.android.ims.ImsReasonInfo toImsReasonInfoProto ( com.android.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.nano.TelephonyProto.ImsReasonInfo ri = new com.android.internal.telephony.nano.TelephonyProto.ImsReasonInfo ( ) ; if ( reasonInfo != null ) { ri.reasonCode = reasonInfo.getCode ( ) ; ri.extraCode = reasonInfo.getExtraCode ( ) ; java.lang.String extraMessage = reasonInfo.getExtraMessage ( ) ; if ( extraMessage != null ) { ri.extraMessage = extraMessage ; } } return ri ; }

Target:
private android.telephony.ims.ImsReasonInfo toImsReasonInfoProto ( android.telephony.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.nano.TelephonyProto.ImsReasonInfo ri = new com.android.internal.telephony.nano.TelephonyProto.ImsReasonInfo ( ) ; if ( reasonInfo != null ) { ri.reasonCode = reasonInfo.getCode ( ) ; ri.extraCode = reasonInfo.getExtraCode ( ) ; java.lang.String extraMessage = reasonInfo.getExtraMessage ( ) ; if ( extraMessage != null ) { ri.extraMessage = extraMessage ; } } return ri ; }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.data.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }
Source:
private static com.google.common.collect.ImmutableList < com.android.build.gradle.api.GroupableProductFlavor > filterNullFromArray ( com.android.build.gradle.api.GroupableProductFlavor [ ] flavors ) { com.google.common.collect.ImmutableList.Builder < com.android.build.gradle.api.GroupableProductFlavor > builder = com.google.common.collect.ImmutableList.builder ( ) ; for ( com.android.build.gradle.api.GroupableProductFlavor flavor : flavors ) { if ( flavor != null ) { builder.add ( flavor ) ; } } return builder.build ( ) ; }

Target:
private static com.google.common.collect.ImmutableList < com.android.builder.model.ProductFlavor > filterNullFromArray ( com.android.builder.model.ProductFlavor [ ] flavors ) { com.google.common.collect.ImmutableList.Builder < com.android.builder.model.ProductFlavor > builder = com.google.common.collect.ImmutableList.builder ( ) ; for ( com.android.builder.model.ProductFlavor flavor : flavors ) { if ( flavor != null ) { builder.add ( flavor ) ; } } return builder.build ( ) ; }
Source:
public com.google.protobuf.micro.ByteStringMicro readBytes ( ) throws java.io.IOException { final int size = readRawVarint32 ( ) ; if ( ( size <= ( ( bufferSize ) - ( bufferPos ) ) ) && ( size > 0 ) ) { final com.google.protobuf.micro.ByteStringMicro result = com.google.protobuf.micro.ByteStringMicro.copyFrom ( buffer , bufferPos , size ) ; bufferPos += size ; return result ; } else { return com.google.protobuf.micro.ByteStringMicro.copyFrom ( readRawBytes ( size ) ) ; } }

Target:
public com.google.protobuf.micro.ByteStringMicro readBytes ( ) throws java.io.IOException { final int size = readRawVarint32 ( ) ; if ( ( size <= ( ( bufferSize ) - ( bufferPos ) ) ) && ( size > 0 ) ) { final com.google.protobuf.micro.ByteStringMicro result = com.google.protobuf.micro.ByteStringMicro.copyFrom ( buffer , bufferPos , size ) ; bufferPos += size ; return result ; } else if ( size == 0 ) { return ByteStringMicro.EMPTY ; } else { return com.google.protobuf.micro.ByteStringMicro.copyFrom ( readRawBytes ( size ) ) ; } }
Source:
public int purge ( ) { lock.lock ( ) ; java.util.List < java.util.Timer.ScheduledTask > tasksToRemove ; try { if ( isCancelled.get ( ) ) { return 0 ; } tasksToRemove = new java.util.LinkedList < java.util.Timer.ScheduledTask > ( ) ; for ( java.util.Timer.ScheduledTask scheduledTask : scheduledTasksPriorityQueue ) { if ( scheduledTask.timerTask.isCancelled ( ) ) { tasksToRemove.add ( scheduledTask ) ; } } scheduledTasksPriorityQueue.removeAll ( tasksToRemove ) ; } finally { lock.unlock ( ) ; } return tasksToRemove.size ( ) ; }

Target:
private int doPurge ( ) { java.util.List < java.util.Timer.ScheduledTask > tasksToRemove ; if ( isCancelled.get ( ) ) { return 0 ; } tasksToRemove = new java.util.LinkedList < java.util.Timer.ScheduledTask > ( ) ; for ( java.util.Timer.ScheduledTask scheduledTask : scheduledTasksPriorityQueue ) { if ( scheduledTask.timerTask.isCancelled ( ) ) { tasksToRemove.add ( scheduledTask ) ; } } for ( java.util.Timer.ScheduledTask s : tasksToRemove ) { scheduledTasksPriorityQueue.remove ( s ) ; } return tasksToRemove.size ( ) ; }
Source:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromProject ( project , AndroidConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_XML ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_AIDL ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_ANDROID ) ; }

Target:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromProject ( project , AndroidConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_XML ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_AIDL ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_RENDERSCRIPT ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_ANDROID ) ; }
Source:
public byte [ ] getEncoded ( ) { try { org.bouncycastle.asn1.pkcs.PrivateKeyInfo info = new org.bouncycastle.asn1.pkcs.PrivateKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.x9.X9ObjectIdentifiers.id_dsa , new org.bouncycastle.asn1.x509.DSAParameter ( dsaSpec.getP ( ) , dsaSpec.getQ ( ) , dsaSpec.getG ( ) ) ) , new org.bouncycastle.asn1.DERInteger ( getX ( ) ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
public byte [ ] getEncoded ( ) { try { org.bouncycastle.asn1.pkcs.PrivateKeyInfo info = new org.bouncycastle.asn1.pkcs.PrivateKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.x9.X9ObjectIdentifiers.id_dsa , new org.bouncycastle.asn1.x509.DSAParameter ( dsaSpec.getP ( ) , dsaSpec.getQ ( ) , dsaSpec.getG ( ) ) ) , new org.bouncycastle.asn1.ASN1Integer ( getX ( ) ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }
Source:
public boolean isBinderAlive ( ) { return miConfig.asBinder ( ) . isBinderAlive ( ) ; }

Target:
public void removeConfigCallback ( android.telephony.ims.stub.ImsConfigImplBase.Callback callback ) throws com.android.ims.ImsException { if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( "removeConfigCallback: " + callback ) ) ; try { miConfig.removeImsConfigCallback ( callback ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "removeConfigCallback()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } }
Source:
public void testSubList1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.subList ( ( - 1 ) , 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testRemove1_IndexOutOfBounds ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.remove ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getIdleTime: " + ( device.getAddress ( ) ) ) ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
public void testGetHttpMethod_NameWithoutRestPrefix ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String httpMethod = inspection.getHttpMethod ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "POST" , httpMethod ) ; }

Target:
public void testGetHttpMethod_NameWithoutRestPrefix ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String httpMethod = inspection.getHttpMethod ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "POST" , httpMethod ) ; }
Source:
private boolean deleteContentOf ( java.io.File folder ) throws java.lang.SecurityException { for ( java.io.File f : folder.listFiles ( ) ) { if ( f.isDirectory ( ) ) { if ( ( deleteContentOf ( f ) ) == false ) { return false ; } } if ( ( f.delete ( ) ) == false ) { return false ; } } return true ; }

Target:
private boolean deleteContentOf ( java.io.File folder ) throws java.lang.SecurityException { java.io.File [ ] files = folder.listFiles ( ) ; if ( files != null ) { for ( java.io.File f : files ) { if ( f.isDirectory ( ) ) { if ( ( deleteContentOf ( f ) ) == false ) { return false ; } } if ( ( f.delete ( ) ) == false ) { return false ; } } } return true ; }
Source:
public void testAesCbcHmacSha512Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }
Source:
public static java.awt.image.BufferedImage getStencilImage ( java.lang.String relativePath ) throws java.io.IOException { java.io.InputStream is = com.android.assetstudiolib.GraphicGenerator.class . getResourceAsStream ( relativePath ) ; if ( is == null ) { return null ; } try { return javax.imageio.ImageIO.read ( is ) ; } finally { com.google.common.io.Closeables.closeQuietly ( is ) ; } }

Target:
public static java.awt.image.BufferedImage getStencilImage ( java.lang.String relativePath ) throws java.io.IOException { java.io.InputStream is = com.android.assetstudiolib.GraphicGenerator.class . getResourceAsStream ( relativePath ) ; if ( is == null ) { return null ; } try { return javax.imageio.ImageIO.read ( is ) ; } finally { com.google.common.io.Closeables.close ( is , true ) ; } }
Source:
public void canUnrequestTethering ( ) throws java.lang.Exception { initTetheredStateMachine ( ConnectivityManager.TETHERING_BLUETOOTH , null ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mNMService , mStatsService , mTetherHelper ) ; inOrder.verify ( mNMService ) . untetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }

Target:
public void canUnrequestTethering ( ) throws java.lang.Exception { initTetheredStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH , null ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_UNREQUESTED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mNMService , mStatsService , mTetherHelper ) ; inOrder.verify ( mNMService ) . untetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }
Source:
public void validateUpdateParameterWithInvalidtrustRootCertSha256Fingerprint ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = android.net.wifi.hotspot2.pps.UpdateParameterTest.createUpdateParameter ( ) ; updateParam.trustRootCertSha256Fingerprint = new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.CERTIFICATE_SHA256_BYTES ) + 1 ] ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; updateParam.trustRootCertSha256Fingerprint = new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.CERTIFICATE_SHA256_BYTES ) - 1 ] ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; }

Target:
public void validateUpdateParameterWithInvalidtrustRootCertSha256Fingerprint ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = android.net.wifi.hotspot2.pps.UpdateParameterTest.createUpdateParameter ( ) ; updateParam.setTrustRootCertSha256Fingerprint ( new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.CERTIFICATE_SHA256_BYTES ) + 1 ] ) ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; updateParam.setTrustRootCertSha256Fingerprint ( new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.CERTIFICATE_SHA256_BYTES ) - 1 ] ) ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; }
Source:
static void addFileType ( java.lang.String extension , int fileType , java.lang.String mimeType , int mtpFormatCode ) { android.media.MediaFile.addFileType ( extension , fileType , mimeType ) ; android.media.MediaFile.sFileTypeToFormatMap.put ( extension , java.lang.Integer.valueOf ( mtpFormatCode ) ) ; android.media.MediaFile.sMimeTypeToFormatMap.put ( mimeType , java.lang.Integer.valueOf ( mtpFormatCode ) ) ; android.media.MediaFile.sFormatToMimeTypeMap.put ( mtpFormatCode , mimeType ) ; }

Target:
private static void addFileType ( java.lang.String extension , int fileType , java.lang.String mimeType , int mtpFormatCode , boolean primaryType ) { android.media.MediaFile.addFileType ( extension , fileType , mimeType ) ; android.media.MediaFile.sFileTypeToFormatMap.put ( extension , java.lang.Integer.valueOf ( mtpFormatCode ) ) ; android.media.MediaFile.sMimeTypeToFormatMap.put ( mimeType , java.lang.Integer.valueOf ( mtpFormatCode ) ) ; if ( primaryType ) { com.android.internal.util.Preconditions.checkArgument ( ( ! ( android.media.MediaFile.sFormatToMimeTypeMap.containsKey ( mtpFormatCode ) ) ) ) ; android.media.MediaFile.sFormatToMimeTypeMap.put ( mtpFormatCode , mimeType ) ; } }
Source:
private void verifyTimeServiceTimeWasSet ( long expectedTimeMillis ) { org.mockito.ArgumentCaptor < java.lang.Long > timeServiceTimeCaptor = org.mockito.ArgumentCaptor.forClass ( java.lang.Long.TYPE ) ; org.mockito.Mockito.verify ( mTimeServiceHelper , org.mockito.Mockito.times ( 1 ) ) . setDeviceTime ( timeServiceTimeCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( expectedTimeMillis , ( ( long ) ( timeServiceTimeCaptor.getValue ( ) ) ) ) ; }

Target:
void verifyTimeWasSet ( long expectedTimeMillis ) { org.mockito.ArgumentCaptor < java.lang.Long > timeServiceTimeCaptor = org.mockito.ArgumentCaptor.forClass ( java.lang.Long.TYPE ) ; org.mockito.Mockito.verify ( mTimeServiceHelper , org.mockito.Mockito.times ( 1 ) ) . setDeviceTime ( timeServiceTimeCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( expectedTimeMillis , ( ( long ) ( timeServiceTimeCaptor.getValue ( ) ) ) ) ; }
Source:
public void testAbiOnlyWithMultiMatch2 ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 2 ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 3 ) ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" , "bar" ) ; assertEquals ( match , result ) ; }

Target:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
public void setPreferredVoicePrivacy ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; send ( rr ) ; }

Target:
public void hangupWaitingOrBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }
Source:
public static android.app.PendingIntent getPendingIntent ( android.content.Context context , java.lang.String text ) { android.content.Intent toastIntent = new android.content.Intent ( context , com.android.example.notificationshowcase.ToastService.class ) ; toastIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; toastIntent.setAction ( ( ( ( com.android.example.notificationshowcase.ToastService.ACTION_TOAST ) + ":" ) + text ) ) ; toastIntent.putExtra ( "text" , text ) ; android.app.PendingIntent pi = android.app.PendingIntent.getService ( context , 58 , toastIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; return pi ; }

Target:
public static android.app.PendingIntent getPendingIntent ( android.content.Context context , int resId ) { java.lang.String text = context.getString ( resId ) ; android.content.Intent toastIntent = new android.content.Intent ( context , com.android.example.notificationshowcase.ToastService.class ) ; toastIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; toastIntent.setAction ( ( ( ( com.android.example.notificationshowcase.ToastService.ACTION_TOAST ) + ":" ) + resId ) ) ; toastIntent.putExtra ( "text" , text ) ; android.app.PendingIntent pi = android.app.PendingIntent.getService ( context , 58 , toastIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; return pi ; }
Source:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context ) ; }

Target:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } android.telecom.PhoneAccountHandle handle = new android.telecom.PhoneAccountHandle ( android.content.ComponentName.unflattenFromString ( status.phoneAccountComponentName ) , status.phoneAccountId ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context , handle ) ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { assertNull ( org.conscrypt.NativeCrypto.SSL_get_certificate ( s ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public void getPreferredVoicePrivacy ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE , result ) ; send ( rr ) ; }

Target:
public void switchWaitingOrHoldingAndActive ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.switchWaitingOrHoldingAndActive ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "switchWaitingOrHoldingAndActive" , e ) ; } } }
Source:
public void testConstants ( ) { android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.RT_SCOPE_HOST ) ; android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.RT_SCOPE_LINK ) ; android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.RT_SCOPE_SITE ) ; android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.IFA_F_DEPRECATED ) ; android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.IFA_F_PERMANENT ) ; android.test.MoreAsserts.assertNotEqual ( 0 , android.system.OsConstants.IFA_F_TENTATIVE ) ; }

Target:
public void testConstants ( ) { org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.RT_SCOPE_HOST ) ; org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.RT_SCOPE_LINK ) ; org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.RT_SCOPE_SITE ) ; org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.IFA_F_DEPRECATED ) ; org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.IFA_F_PERMANENT ) ; org.junit.Assert.assertNotEquals ( 0 , android.system.OsConstants.IFA_F_TENTATIVE ) ; }
Source:
public void testReadAfterWrite ( ) throws java.lang.Exception { com.android.server.wifi.WifiConfigStoreData writeData = createSingleOpenNetworkStoreData ( ) ; mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; mWifiConfigStore.write ( true , writeData ) ; com.android.server.wifi.WifiConfigStoreData readData = mWifiConfigStore.read ( ) ; com.android.server.wifi.WifiConfigStoreDataTest.assertConfigStoreDataEqual ( writeData , readData ) ; }

Target:
public void testForceWrite ( ) throws java.lang.Exception { mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; mWifiConfigStore.write ( true ) ; assertFalse ( mAlarmManager.isPending ( WifiConfigStore.BUFFERED_WRITE_ALARM_TAG ) ) ; assertTrue ( mSharedStore.isStoreWritten ( ) ) ; assertTrue ( mUserStore.isStoreWritten ( ) ) ; }
Source:
private com.android.build.gradle.ndk.NdkPlugin getNdkPlugin ( ) { org.gradle.api.Project targetProject = ( targetProjectName.isEmpty ( ) ) ? currentProject : currentProject.getRootProject ( ) . project ( targetProjectName ) ; com.android.build.gradle.ndk.NdkPlugin plugin = targetProject.getPlugins ( ) . findPlugin ( com.android.build.gradle.ndk.NdkPlugin.class ) ; if ( plugin == null ) { throw new org.gradle.api.InvalidUserDataException ( ( ( ( ( ( ( ( ( "Unable to find NdkPlugin in project '" + ( targetProjectName ) ) + "'. You may " ) + "need define your compile dependencies such that " ) + targetProject ) + " is " ) + "configured before " ) + ( currentProject ) ) + "." ) ) ; } return plugin ; }

Target:
public java.lang.String getTargetProjectName ( ) { return targetProjectName ; }
Source:
public com.android.sdklib.repository.local.LocalPkgInfo getPkgInfo ( int filter , com.android.sdklib.repository.FullRevision revision ) { assert filter == ( com.android.sdklib.repository.local.LocalSdk.PKG_BUILD_TOOLS ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : getPkgsInfos ( filter ) ) { if ( pkg instanceof com.android.sdklib.repository.local.LocalFullRevisionPkgInfo ) { com.android.sdklib.repository.local.LocalFullRevisionPkgInfo p = ( ( com.android.sdklib.repository.local.LocalFullRevisionPkgInfo ) ( pkg ) ) ; if ( p.getFullRevision ( ) . equals ( revision ) ) { return p ; } } } return null ; }

Target:
public com.android.sdklib.repository.local.LocalPkgInfo getPkgInfo ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.PkgType filter , @ com.android.annotations.NonNull java.lang.String vendorPath ) { assert ( ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_EXTRAS ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_ADDONS ) ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_PLATFORMS ) ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : getPkgsInfos ( filter ) ) { if ( ( pkg.getDesc ( ) . hasPath ( ) ) && ( vendorPath.equals ( pkg.getDesc ( ) . getPath ( ) ) ) ) { return pkg ; } } return null ; }
Source:
private libcore.tzdata.update2.BundleVersion readBundleVersion ( java.io.File unpackedContentDir ) throws java.io.IOException { android.util.Slog.i ( logTag , "Reading bundle format version" ) ; java.io.File bundleVersionFile = new java.io.File ( unpackedContentDir , TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( bundleVersionFile , BundleVersion.BUNDLE_VERSION_FILE_LENGTH ) ; try { return libcore.tzdata.update2.BundleVersion.extractFromBytes ( versionBytes ) ; } catch ( libcore.tzdata.update2.BundleException e ) { android.util.Slog.i ( logTag , ( ( ( "Invalid bundle version bytes: " + ( java.util.Arrays.toString ( versionBytes ) ) ) + ": " ) + ( e.getMessage ( ) ) ) ) ; return null ; } }

Target:
public libcore.tzdata.update2.BundleVersion getInstalledBundleVersion ( ) throws java.io.IOException , libcore.tzdata.update2.BundleException { if ( ! ( currentTzDataDir.exists ( ) ) ) { return null ; } return readBundleVersion ( currentTzDataDir ) ; }
Source:
public void setRoundingMode ( java.math.RoundingMode roundingMode ) { if ( roundingMode == null ) { throw new java.lang.NullPointerException ( "roundingMode == null" ) ; } this . roundingMode = roundingMode ; if ( roundingMode != ( java.math.RoundingMode.UNNECESSARY ) ) { double roundingIncrement = 1.0 / ( java.lang.Math.pow ( 10 , java.lang.Math.max ( 0 , getMaximumFractionDigits ( ) ) ) ) ; ndf.setRoundingMode ( roundingMode , roundingIncrement ) ; } }

Target:
public void setRoundingMode ( java.math.RoundingMode roundingMode ) { if ( roundingMode == null ) { throw new java.lang.NullPointerException ( "roundingMode == null" ) ; } this . roundingMode = roundingMode ; double roundingIncrement = 0.0 ; ndf.setRoundingMode ( roundingMode , roundingIncrement ) ; }
Source:
public void test_with_longTemporalField_secondOfDay ( ) { for ( long i : testPoints ( ( ( 24 * 60 ) * 60 ) ) ) { java.time.LocalTime test = TEST_12_30_40_987654321.with ( java.time.temporal.ChronoField.SECOND_OF_DAY , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.SECOND_OF_DAY ) , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) ) ; } }

Target:
public void test_with_longTemporalField_secondOfDay ( ) { for ( long i : testPoints ( ( ( 24 * 60 ) * 60 ) ) ) { java.time.LocalTime test = tck.java.time.TCKLocalTime.TEST_12_30_40_987654321.with ( java.time.temporal.ChronoField.SECOND_OF_DAY , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.SECOND_OF_DAY ) , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , tck.java.time.TCKLocalTime.TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) ) ; } }