auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( args [ 1 ] ) ; java.lang.System.out.println ( "Hello, world!" ) ; Main.set ( 0 ) ; Main.set ( 1 ) ; Main.set ( 2 ) ; Main.set ( 4 ) ; Main.set ( 8 ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( args [ 1 ] ) ; java.lang.System.out.println ( "Hello, world!" ) ; if ( Main.checkLivePhase ( ) ) { java.lang.System.out.println ( "Agent in live phase." ) ; } Main.set ( 0 ) ; Main.set ( 1 ) ; Main.set ( 2 ) ; Main.set ( 4 ) ; Main.set ( 8 ) ; }
Source:
public void test_getPrivateExponent ( ) throws java.lang.Exception { java.security.KeyFactory gen = java.security.KeyFactory.getInstance ( "RSA" ) ; final java.math.BigInteger n = java.math.BigInteger.valueOf ( 3233 ) ; final java.math.BigInteger d = java.math.BigInteger.valueOf ( 2753 ) ; java.security.interfaces.RSAPrivateKey key = ( ( java.security.interfaces.RSAPrivateKey ) ( gen.generatePrivate ( new java.security.spec.RSAPrivateKeySpec ( n , d ) ) ) ) ; assertEquals ( "invalid private exponent" , d , key.getPrivateExponent ( ) ) ; }

Target:
private static java.security.interfaces.RSAPrivateKey getNonCRTKey ( java.security.Provider p ) throws java.lang.Exception { java.security.KeyFactory gen = java.security.KeyFactory.getInstance ( "RSA" , p ) ; return ( ( java.security.interfaces.RSAPrivateKey ) ( gen.generatePrivate ( new java.security.spec.RSAPrivateKeySpec ( tests.security.interfaces.RSAPrivateKeyTest.SIMPLE_N , tests.security.interfaces.RSAPrivateKeyTest.SIMPLE_D ) ) ) ) ; }
Source:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDONS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDON ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public boolean onKeyMultiple ( final int keyCode , final int repeatCount , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyMultiple ( keyCode , repeatCount , event ) ; } } ) ; return ret ; } com.android.webview.chromium.UnimplementedWebViewApi.invoke ( ) ; return false ; }

Target:
public void onDraw ( final android.graphics.Canvas canvas ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDraw ( canvas ) ; } } ) ; return ; } mAwContents.onDraw ( canvas ) ; }
Source:
void updatePhoneState ( ) { com.android.internal.telephony.PhoneConstants.State oldState = state ; if ( getRingingCall ( ) . isRinging ( ) ) { state = PhoneConstants.State.RINGING ; } else if ( ( getForegroundCall ( ) . isIdle ( ) ) && ( getBackgroundCall ( ) . isIdle ( ) ) ) { state = PhoneConstants.State.IDLE ; } else { state = PhoneConstants.State.OFFHOOK ; } if ( ( state ) != oldState ) { android.util.Log.d ( com.android.internal.telephony.sip.SipPhoneBase.LOG_TAG , ( " ^^^ new phone state: " + ( state ) ) ) ; notifyPhoneStateChanged ( ) ; } }

Target:
void updatePhoneState ( ) { com.android.internal.telephony.PhoneConstants.State oldState = state ; if ( getRingingCall ( ) . isRinging ( ) ) { state = PhoneConstants.State.RINGING ; } else if ( ( getForegroundCall ( ) . isIdle ( ) ) && ( getBackgroundCall ( ) . isIdle ( ) ) ) { state = PhoneConstants.State.IDLE ; } else { state = PhoneConstants.State.OFFHOOK ; } if ( ( state ) != oldState ) { android.telephony.Rlog.d ( com.android.internal.telephony.sip.SipPhoneBase.LOG_TAG , ( " ^^^ new phone state: " + ( state ) ) ) ; notifyPhoneStateChanged ( ) ; } }
Source:
public void exit ( ) { android.os.Message message = getCurrentMessage ( ) ; if ( ( ( message != null ) && ( ! ( isQuit ( message ) ) ) ) && ( ( mCurrentDevice ) == null ) ) { stateLogWtfStack ( "mCurrentDevice is null on exit() to non-quitting state" ) ; } mPrevState = this ; }

Target:
void broadcastAudioState ( android.bluetooth.BluetoothDevice device , int fromState , int toState ) { stateLogD ( ( ( ( ( ( "broadcastAudioState: " + device ) + ": " ) + fromState ) + "->" ) + toState ) ) ; if ( fromState == ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ) { terminateScoUsingVirtualVoiceCall ( ) ; } android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED ) ; intent.putExtra ( BluetoothProfile.EXTRA_PREVIOUS_STATE , fromState ) ; intent.putExtra ( BluetoothProfile.EXTRA_STATE , toState ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; mService.sendBroadcastAsUser ( intent , UserHandle.ALL , HeadsetService.BLUETOOTH_PERM ) ; }
Source:
protected void fillDexLists ( @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > mainDexList , @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > anyDexList ) { final com.android.jack.library.OutputJackLibrary jackOutputLibrary = com.android.jack.Jack.getSession ( ) . getJackOutputLibrary ( ) ; for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : com.android.jack.Jack.getSession ( ) . getTypesToEmit ( ) ) { if ( type.containsMarker ( com.android.jack.backend.dex.MainDexMarker.class ) ) { mainDexList.add ( getDexInputVFileOfType ( jackOutputLibrary , type ) ) ; } else { anyDexList.add ( getDexInputVFileOfType ( jackOutputLibrary , type ) ) ; } } }

Target:
public void finishMerge ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVDir ) throws com.android.jack.backend.dex.DexWritingException { for ( int i = 0 ; i < ( mergers.size ( ) ) ; i ++ ) { finishMerge ( mergers.get ( i ) , getOutputDex ( outputVDir , ( i + 1 ) ) ) ; } }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nScriptSetTimeZone ( long script , byte [ ] timeZone , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetTimeZone ( curCon , script , timeZone , mUseInc ) ; }
Source:
protected void setAid ( java.lang.String aid ) { mAid = aid ; }

Target:
public void loadEFTransparent ( int fileid , int size , com.android.internal.telephony.Message onLoaded ) { com.android.internal.telephony.Message response = obtainMessage ( com.android.internal.telephony.IccFileHandler.EVENT_READ_BINARY_DONE , fileid , 0 , onLoaded ) ; mCi.iccIOForApp ( com.android.internal.telephony.IccFileHandler.COMMAND_READ_BINARY , fileid , getEFPath ( fileid ) , 0 , 0 , size , null , null , mAid , response ) ; }
Source:
public void callSessionRemoveParticipantsRequestFailed ( com.android.ims.internal.ImsCallSession session , com.android.ims.ImsReasonInfo reasonInfo ) { loge ( ( "callSessionRemoveParticipantsRequestFailed :: reasonInfo=" + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionRemoveParticipantsRequestFailed :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallRemoveParticipantsRequestFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionRemoveParticipantsRequestFailed :: " , t ) ; } } }

Target:
public void callSessionRemoveParticipantsRequestFailed ( android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsReasonInfo reasonInfo ) { loge ( ( "callSessionRemoveParticipantsRequestFailed :: reasonInfo=" + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionRemoveParticipantsRequestFailed :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallRemoveParticipantsRequestFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionRemoveParticipantsRequestFailed :: " , t ) ; } } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_USER_SWITCHED.equals ( intent.getAction ( ) ) ) { int fuid = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; com.android.bluetooth.Utils.setForegroundUserId ( fuid ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_USER_SWITCHED.equals ( intent.getAction ( ) ) ) { int fuid = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; com.android.bluetooth.Utils.setForegroundUserId ( fuid ) ; com.android.bluetooth.btservice.AdapterService.setForegroundUserIdNative ( fuid ) ; } }
Source:
public java.util.Collection < com.android.sched.marker.Marker > getAllMarkers ( ) { if ( ( markers ) == null ) { return com.android.sched.marker.LocalMarkerManager.EMPTY_MARKER ; } for ( com.android.sched.marker.Marker marker : markers.values ( ) ) { assert checkGetAccess ( marker.getClass ( ) ) ; } assert ( markers ) != null ; return markers.values ( ) ; }

Target:
public java.util.Collection < com.android.sched.marker.Marker > getAllMarkers ( ) { synchronized ( lock ) { if ( ( markers ) == null ) { return com.android.sched.marker.LocalMarkerManager.EMPTY_MARKER ; } for ( com.android.sched.marker.Marker marker : markers.values ( ) ) { assert checkGetAccess ( marker.getClass ( ) ) ; } assert ( markers ) != null ; return markers.values ( ) ; } }
Source:
public void idmap ( java.lang.String targetApkPath , java.lang.String overlayApkPath , int uid ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.idmap ( targetApkPath , overlayApkPath , uid ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void idmap ( java.lang.String targetApkPath , java.lang.String overlayApkPath , int uid ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.idmap ( targetApkPath , overlayApkPath , uid ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public org.objectweb.asm.MethodVisitor visitMethod ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.String [ ] exceptions ) { if ( ( ! ( found ) ) && ( shouldStub ( access , name , desc ) ) ) { found = true ; } return null ; }

Target:
public org.objectweb.asm.MethodVisitor visitMethod ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.String [ ] exceptions ) { if ( ( ! ( found ) ) && ( shouldStubAsDefaultMethod ( access , name , desc ) ) ) { found = true ; } return null ; }
Source:
public void test_checkedListRandomAccessSerializationCompatability ( ) throws java.lang.Exception { java.util.List < java.lang.String > c = new java.util.ArrayList < java.lang.String > ( ) ; assertTrue ( ( c instanceof java.util.RandomAccess ) ) ; c = java.util.Collections.checkedList ( c , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/java/util/Collections_CheckedListRandomAccess.golden.ser" ) ; }

Target:
public void test_checkedListRandomAccessSerializationCompatability ( ) throws java.lang.Exception { java.util.List < java.lang.String > c = new java.util.ArrayList < java.lang.String > ( ) ; assertTrue ( ( c instanceof java.util.RandomAccess ) ) ; c = java.util.Collections.checkedList ( c , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/tests/api/java/util/Collections_CheckedListRandomAccess.golden.ser" ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mDatabaseFile = new java.io.File ( "/sqlite_stmt_journals" , "database_test.db" ) ; if ( mDatabaseFile.exists ( ) ) { mDatabaseFile.delete ( ) ; } mDatabase = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase ( mDatabaseFile.getPath ( ) , null ) ; assertNotNull ( mDatabase ) ; mDatabase.execSQL ( ( "CREATE TABLE test (_id INTEGER PRIMARY KEY, " + "name TEXT, age INTEGER, address TEXT);" ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.io.File dbDir = getContext ( ) . getDir ( "tests" , Context.MODE_PRIVATE ) ; mDatabaseFile = new java.io.File ( dbDir , "database_test.db" ) ; if ( mDatabaseFile.exists ( ) ) { mDatabaseFile.delete ( ) ; } mDatabase = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase ( mDatabaseFile.getPath ( ) , null ) ; assertNotNull ( mDatabase ) ; mDatabase.execSQL ( ( ( ( "CREATE TABLE " + ( android.database.cts.DatabaseUtilsTest.TABLE_NAME ) ) + " (_id INTEGER PRIMARY KEY, " ) + "name TEXT, age INTEGER, address TEXT);" ) ) ; }
Source:
public void testAesCbcHmacSha512Udp4 ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Udp4 ( ) 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 , android.net.cts.IpSecManagerTest.getKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
private int getParameterSize ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int paramSize = 0 ; if ( ! ( method.isStatic ( ) ) ) { paramSize += 1 ; } for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( ( param.getType ( ) ) == ( JPrimitiveTypeEnum.LONG.getType ( ) ) ) || ( ( param.getType ( ) ) == ( JPrimitiveTypeEnum.DOUBLE.getType ( ) ) ) ) { paramSize += 2 ; } else { paramSize += 1 ; } } return paramSize ; }

Target:
private int getParameterWordCount ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int wordCount = ( method.isStatic ( ) ) ? 0 : Type.OBJECT.getWordCount ( ) ; for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( param.getMarker ( com.android.jack.transformations.lambda.CapturedVariable.class ) ) != null ) { continue ; } wordCount += com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( param.getType ( ) , ( ( param.getMarker ( com.android.jack.transformations.lambda.ForceClosureMarker.class ) ) != null ) ) . getWordCount ( ) ; } return wordCount ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { refresh ( ) ; }

Target:
public boolean onPreferenceClick ( android.support.v7.preference.Preference preference ) { new android.app.AlertDialog.Builder ( getContext ( ) ) . setMessage ( R.string.clear_saved_traces_confirm ) . setPositiveButton ( android.R.string.yes , new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { com.android.traceur.AtraceUtils.clearSavedTraces ( ) ; } } ) . setNegativeButton ( android.R.string.no , new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { dialog.dismiss ( ) ; } } ) . create ( ) . show ( ) ; return true ; }
Source:
public java.lang.Object getSystemService ( java.lang.String name ) { if ( Context.CONNECTIVITY_SERVICE.equals ( name ) ) return mConnectivityManager ; if ( Context.WIFI_SERVICE.equals ( name ) ) return mWifiManager ; return super . getSystemService ( name ) ; }

Target:
public java.lang.Object getSystemService ( java.lang.String name ) { if ( Context.CONNECTIVITY_SERVICE.equals ( name ) ) return mConnectivityManager ; if ( Context.WIFI_SERVICE.equals ( name ) ) return mWifiManager ; if ( Context.USB_SERVICE.equals ( name ) ) return mUsbManager ; return super . getSystemService ( name ) ; }
Source:
private static com.android.dx.rop.type.Prototype putIntern ( com.android.dx.rop.type.Prototype desc ) { synchronized ( com.android.dx.rop.type.Prototype.internTable ) { java.lang.String descriptor = desc.getDescriptor ( ) ; com.android.dx.rop.type.Prototype already = com.android.dx.rop.type.Prototype.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.dx.rop.type.Prototype.internTable.put ( descriptor , desc ) ; return desc ; } }

Target:
private static com.android.dx.rop.type.Prototype putIntern ( com.android.dx.rop.type.Prototype desc ) { com.android.dx.rop.type.Prototype result = com.android.dx.rop.type.Prototype.internTable.putIfAbsent ( desc.getDescriptor ( ) , desc ) ; return result != null ? result : desc ; }
Source:
static com.android.dialer.calldetails.CallDetailsEntries toCallDetailsEntries ( android.database.Cursor cursor ) { com.android.dialer.common.Assert.isNotNull ( cursor ) ; com.android.dialer.common.Assert.checkArgument ( cursor.moveToFirst ( ) ) ; com.android.dialer.calldetails.CallDetailsEntries.Builder entries = com.android.dialer.calldetails.CallDetailsEntries.newBuilder ( ) ; do { entries.addEntries ( com.android.dialer.calldetails.CallDetailsCursorLoader.toCallDetailsEntry ( cursor ) ) ; } while ( cursor.moveToNext ( ) ) ; return entries.build ( ) ; }

Target:
static com.android.dialer.calldetails.CallDetailsEntries toCallDetailsEntries ( android.content.Context context , android.database.Cursor cursor ) { com.android.dialer.common.Assert.isNotNull ( cursor ) ; com.android.dialer.common.Assert.checkArgument ( cursor.moveToFirst ( ) ) ; com.android.dialer.calldetails.CallDetailsEntries.Builder entries = com.android.dialer.calldetails.CallDetailsEntries.newBuilder ( ) ; do { entries.addEntries ( com.android.dialer.calldetails.CallDetailsCursorLoader.toCallDetailsEntry ( context , cursor ) ) ; } while ( cursor.moveToNext ( ) ) ; return entries.build ( ) ; }
Source:
public final V put ( R rowKey , C columnKey , V value ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public com.google.common.collect.ImmutableMap < C , V > row ( R rowKey ) { com.google.common.base.Preconditions.checkNotNull ( rowKey ) ; return com.google.common.base.MoreObjects.firstNonNull ( ( ( com.google.common.collect.ImmutableMap < C , V > ) ( rowMap ( ) . get ( rowKey ) ) ) , com.google.common.collect.ImmutableMap.< C , V > of ( ) ) ; }
Source:
android.content.res.Configuration updateOrientationFromAppTokensUnchecked ( android.content.res.Configuration currentConfig , android.os.IBinder freezeThisOneIfNeeded ) { android.content.res.Configuration config ; synchronized ( mWindowMap ) { config = updateOrientationFromAppTokensLocked ( currentConfig , freezeThisOneIfNeeded ) ; if ( config != null ) { mLayoutNeeded = true ; performLayoutAndPlaceSurfacesLocked ( ) ; } } return config ; }

Target:
public void setNewConfiguration ( android.content.res.Configuration config ) { if ( ! ( checkCallingPermission ( android.Manifest.permission.MANAGE_APP_TOKENS , "setNewConfiguration()" ) ) ) { throw new java.lang.SecurityException ( "Requires MANAGE_APP_TOKENS permission" ) ; } synchronized ( mWindowMap ) { mCurConfiguration = new android.content.res.Configuration ( config ) ; mWaitingForConfig = false ; performLayoutAndPlaceSurfacesLocked ( ) ; } }
Source:
public static org.eclipse.swt.graphics.Image getImage ( org.eclipse.swt.widgets.Display display , com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage glMsg ) { if ( ! ( glMsg.hasFb ( ) ) ) { return null ; } org.eclipse.swt.graphics.ImageData imageData = com.android.ide.eclipse.gltrace.ProtoBufUtils.getImageData ( glMsg ) ; if ( imageData == null ) { return null ; } return new org.eclipse.swt.graphics.Image ( display , imageData ) ; }

Target:
public static org.eclipse.swt.graphics.Image getImage ( org.eclipse.swt.widgets.Display display , com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage glMsg ) { if ( ! ( glMsg.hasFb ( ) ) ) { return null ; } org.eclipse.swt.graphics.ImageData imageData = null ; try { imageData = com.android.ide.eclipse.gltrace.ProtoBufUtils.getImageData ( glMsg ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.gldebugger.GlTracePlugin.getDefault ( ) . logMessage ( ( "Unexpected error while retrieving framebuffer image: " + e ) ) ; return null ; } if ( imageData == null ) { return null ; } return new org.eclipse.swt.graphics.Image ( display , imageData ) ; }
Source:
public void startScan ( int appIf , boolean isServer , android.bluetooth.le.ScanSettings settings , java.util.List < android.bluetooth.le.ScanFilter > filters , java.util.List storages , java.lang.String callingPackage ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startScan ( appIf , isServer , settings , filters , storages , callingPackage ) ; }

Target:
public void startScan ( int appIf , boolean isServer , android.bluetooth.le.ScanSettings settings , java.util.List < android.bluetooth.le.ScanFilter > filters , android.os.WorkSource workSource , java.util.List storages , java.lang.String callingPackage ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startScan ( appIf , isServer , settings , filters , workSource , storages , callingPackage ) ; }
Source:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "title" , mJobTitle ) . add ( "latch" , mBooleanLatch ) . add ( "result" , mResult.get ( ) ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "title" , mJobTitle ) . add ( "task" , mTask ) . add ( "latch" , mBooleanLatch ) . add ( "result" , mResult.get ( ) ) . toString ( ) ; }
Source:
private boolean checkGoldenExecutorForSelfDivergence ( java.lang.String programName ) { java.lang.String seenOutput = null ; for ( int i = 0 ; i < 5 ; i ++ ) { goldenExecutor.reset ( ) ; goldenExecutor.execute ( programName ) ; java.lang.String output = goldenExecutor.getResult ( ) . getFlattenedOutput ( ) ; if ( seenOutput == null ) { seenOutput = output ; } else if ( ! ( seenOutput.equals ( output ) ) ) { return true ; } } return false ; }

Target:
private boolean checkGoldenExecutorForSelfDivergence ( java.lang.String programName ) { java.lang.String seenOutput = null ; for ( int i = 0 ; i < ( ( dexfuzz.Options.divergenceRetry ) + 1 ) ; i ++ ) { goldenExecutor.reset ( ) ; goldenExecutor.execute ( programName ) ; java.lang.String output = goldenExecutor.getResult ( ) . getFlattenedOutput ( ) ; if ( seenOutput == null ) { seenOutput = output ; } else if ( ! ( seenOutput.equals ( output ) ) ) { return true ; } } return false ; }
Source:
public void addGeneratedSourceFolders ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.io.File ... generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { extraGeneratedSourceFolders.add ( f ) ; javaCompileTask.source ( f ) ; } }

Target:
public void registerJavaGeneratingTask ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.util.Collection < java.io.File > generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { javaCompileTask.source ( f ) ; } addJavaSourceFoldersToModel ( generatedSourceFolders ) ; }
Source:
private android.net.ip.IpManager makeIpManager ( java.lang.String ifname ) throws java.lang.Exception { final android.net.ip.IpManager ipm = new android.net.ip.IpManager ( mContext , ifname , mCb , mNMService ) ; org.mockito.Mockito.verify ( mNMService , org.mockito.Mockito.timeout ( 100 ) . times ( 1 ) ) . disableIpv6 ( ifname ) ; org.mockito.Mockito.verify ( mNMService , org.mockito.Mockito.timeout ( 100 ) . times ( 1 ) ) . clearInterfaceAddresses ( ifname ) ; return ipm ; }

Target:
private android.net.ip.IpManager makeIpManager ( java.lang.String ifname ) throws java.lang.Exception { final android.net.ip.IpManager ipm = new android.net.ip.IpManager ( mContext , ifname , mCb , mNMService ) ; org.mockito.Mockito.verify ( mNMService , org.mockito.Mockito.timeout ( 100 ) . times ( 1 ) ) . disableIpv6 ( ifname ) ; org.mockito.Mockito.verify ( mNMService , org.mockito.Mockito.timeout ( 100 ) . times ( 1 ) ) . clearInterfaceAddresses ( ifname ) ; org.mockito.Mockito.reset ( mNMService ) ; return ipm ; }
Source:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "isIndeterminate" , args = { } ) } ) public void testSetIndeterminate ( ) { android.widget.ProgressBar progressBar = new android.widget.ProgressBar ( mContext ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( true ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( false ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar = new android.widget.ProgressBar ( mContext , null , com.android.internal.R.attr.progressBarStyleHorizontal ) ; assertFalse ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( true ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( false ) ; assertFalse ( progressBar.isIndeterminate ( ) ) ; }

Target:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "isIndeterminate" , args = { } ) } ) public void testSetIndeterminate ( ) { android.widget.ProgressBar progressBar = new android.widget.ProgressBar ( mContext ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( true ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( false ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar = new android.widget.ProgressBar ( mContext , null , android.R.attr.progressBarStyleHorizontal ) ; assertFalse ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( true ) ; assertTrue ( progressBar.isIndeterminate ( ) ) ; progressBar.setIndeterminate ( false ) ; assertFalse ( progressBar.isIndeterminate ( ) ) ; }
Source:
public void xmlParsing_missingIanaVersionAttribute ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones>\n" + ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\">\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; libcore.util.TimeZoneFinderTest.assertZonesEqual ( libcore.util.TimeZoneFinderTest.zones ( "Europe/London" ) , finder.lookupTimeZonesByCountry ( "gb" ) ) ; org.junit.Assert.assertNull ( finder.getIanaVersion ( ) ) ; }

Target:
public void xmlParsing_missingIanaVersionAttribute ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones>\n" + ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\" default=\"Europe/London\">\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; libcore.util.TimeZoneFinderTest.assertZonesEqual ( libcore.util.TimeZoneFinderTest.zones ( "Europe/London" ) , finder.lookupTimeZonesByCountry ( "gb" ) ) ; org.junit.Assert.assertNull ( finder.getIanaVersion ( ) ) ; }
Source:
public com.android.dialer.speeddial.database.SpeedDialEntry buildSpeedDialEntry ( ) { return com.android.dialer.speeddial.database.SpeedDialEntry.builder ( ) . setId ( speedDialEntryId ( ) ) . setLookupKey ( lookupKey ( ) ) . setContactId ( contactId ( ) ) . setDefaultChannel ( defaultChannel ( ) ) . build ( ) ; }

Target:
public com.android.dialer.speeddial.database.SpeedDialEntry buildSpeedDialEntry ( ) { return com.android.dialer.speeddial.database.SpeedDialEntry.builder ( ) . setId ( speedDialEntryId ( ) ) . setPinnedPosition ( pinnedPosition ( ) ) . setLookupKey ( lookupKey ( ) ) . setContactId ( contactId ( ) ) . setDefaultChannel ( defaultChannel ( ) ) . build ( ) ; }
Source:
public void addI16 ( android.support.v8.renderscript.Short4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( new android.support.v8.renderscript.Short4 ( v.x , v.y , v.z , v.w ) ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; addI16 ( v.z ) ; addI16 ( v.w ) ; }

Target:
public void addU16 ( android.support.v8.renderscript.Int4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU16 ( v ) ; return ; } addU16 ( v.x ) ; addU16 ( v.y ) ; addU16 ( v.z ) ; addU16 ( v.w ) ; }
Source:
public void testUngrant_DoubleGrantUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to grant key to other user a second time" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_DoubleUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private void onApiLevelChange ( ) { if ( ( mDisableUpdates ) > 0 ) { return ; } boolean computeOk = computeCurrentConfig ( false ) ; updateThemes ( ) ; if ( computeOk && ( ( mListener ) != null ) ) { mListener.onConfigurationChange ( ) ; } }

Target:
private void onRenderingTargetChange ( ) { if ( ( mDisableUpdates ) > 0 ) { return ; } if ( ( ( mListener ) != null ) && ( ( mRenderingTarget ) != null ) ) { mListener.onRenderingTargetPreChange ( mRenderingTarget ) ; } int index = mTargetCombo.getSelectionIndex ( ) ; mRenderingTarget = mTargetList.get ( index ) ; boolean computeOk = computeCurrentConfig ( ) ; updateThemes ( ) ; saveState ( ) ; if ( computeOk && ( ( mListener ) != null ) ) { mListener.onConfigurationChange ( ) ; } }
Source:
private static void checkTimeStyle ( int style ) { if ( ! ( ( ( ( ( style == ( java.text.DateFormat.SHORT ) ) || ( style == ( java.text.DateFormat.MEDIUM ) ) ) || ( style == ( java.text.DateFormat.LONG ) ) ) || ( style == ( java.text.DateFormat.FULL ) ) ) || ( style == ( java.text.DateFormat.DEFAULT ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Illegal time style " + style ) ) ; } }

Target:
private static void checkTimeStyle ( int style ) { if ( ! ( ( ( ( ( style == ( java.text.DateFormat.SHORT ) ) || ( style == ( java.text.DateFormat.MEDIUM ) ) ) || ( style == ( java.text.DateFormat.LONG ) ) ) || ( style == ( java.text.DateFormat.FULL ) ) ) || ( style == ( java.text.DateFormat.DEFAULT ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Illegal time style: " + style ) ) ; } }
Source:
public void testSetFeatureState ( int featureState ) { setFeatureState ( featureState ) ; }

Target:
public void testSetCapabilityConfigError ( ) throws java.lang.Exception { android.telephony.ims.feature.CapabilityChangeRequest request = new android.telephony.ims.feature.CapabilityChangeRequest ( ) ; request.addCapabilitiesToEnableForTech ( TestImsFeature.CAPABILITY_TEST_1 , ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN ) ; mTestImsFeature.setCapabilitiesResult = android.telephony.ims.feature.ImsFeature.CAPABILITY_ERROR_GENERIC ; mTestImsFeature.requestChangeEnabledCapabilities ( request , mCapabilityCallback ) ; org.mockito.Mockito.verify ( mCapabilityCallback ) . onChangeCapabilityConfigurationError ( org.mockito.Matchers.eq ( TestImsFeature.CAPABILITY_TEST_1 ) , org.mockito.Matchers.eq ( ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN ) , org.mockito.Matchers.eq ( ImsFeature.CAPABILITY_ERROR_GENERIC ) ) ; junit.framework.Assert.assertEquals ( request , mTestImsFeature.lastRequest ) ; }
Source:
public void testSystemTzDataFileMissing ( ) throws java.lang.Exception { com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro validDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 6 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistro ) ; }

Target:
public void testSystemTzDataFileMissing ( ) throws java.lang.Exception { com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; byte [ ] validDistroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 6 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistroBytes ) ; }
Source:
public void test_Constructor_Ljava_lang_String_Ljava_lang_String ( ) throws java.lang.Exception { org.apache.harmony.tests.java.io.PrintStreamTest.MockPrintStream os = new org.apache.harmony.tests.java.io.PrintStreamTest.MockPrintStream ( testFilePath , "utf-8" ) ; assertNotNull ( os ) ; os.close ( ) ; try { new java.io.PrintStream ( testFilePath , "Bogus" ) ; fail ( "Exception expected" ) ; } catch ( java.io.UnsupportedEncodingException e ) { assertNotNull ( e.getMessage ( ) ) ; } }

Target:
public void test_Constructor_Ljava_lang_String ( ) throws java.io.IOException { java.io.PrintStream os = new java.io.PrintStream ( testFilePath ) ; os.print ( org.apache.harmony.tests.java.io.PrintStreamTest.UNICODE_STRING ) ; os.close ( ) ; org.apache.harmony.tests.java.io.PrintStreamTest.assertFileContents ( org.apache.harmony.tests.java.io.PrintStreamTest.UNICODE_STRING.getBytes ( java.nio.charset.Charset.defaultCharset ( ) ) , testFile ) ; }
Source:
final void put ( int [ ] src , int srcOffset , int intCount ) { int byteCount = checkPutBounds ( SizeOf.INT , src.length , srcOffset , intCount ) ; this . block.pokeIntArray ( ( ( offset ) + ( position ) ) , src , srcOffset , intCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( int [ ] src , int srcOffset , int intCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.INT , src.length , srcOffset , intCount ) ; this . block.pokeIntArray ( ( ( offset ) + ( position ) ) , src , srcOffset , intCount , order.needsSwap ) ; position += byteCount ; }
Source:
private boolean isScoAcceptable ( ) { if ( mService.getForceScoAudio ( ) ) { return true ; } return ( mAudioRouteAllowed ) && ( ( ( mVoiceRecognitionStarted ) || ( isInCall ( ) ) ) || ( ( android.bluetooth.BluetoothHeadset.isInbandRingingSupported ( mService ) ) && ( isRinging ( ) ) ) ) ; }

Target:
private boolean isScoAcceptable ( ) { if ( mForceScoAudio ) { return true ; } if ( ! ( mService.getAudioRouteAllowed ( ) ) ) { return false ; } if ( ( isInCall ( ) ) || ( mVoiceRecognitionStarted ) ) { return true ; } if ( ( isRinging ( ) ) && ( android.bluetooth.BluetoothHeadset.isInbandRingingSupported ( mService ) ) ) { return true ; } return false ; }
Source:
private void _checkEquals ( int i , int j , java.lang.Object a , int aHash , java.lang.Object b ) { int bHash = b.hashCode ( ) ; if ( ! ( b.equals ( a ) ) ) errln ( "Equality/Symmetry" , i , j ) ; if ( aHash != bHash ) errln ( "Equality/Hash" , i , j ) ; if ( ( a != b ) && ( ! ( _hasSameBehavior ( a , b ) ) ) ) { errln ( "Equality/Equivalence" , i , j ) ; } }

Target:
private void _checkEquals ( int i , int j , T a , int aHash , T b ) { int bHash = b.hashCode ( ) ; if ( ! ( b.equals ( a ) ) ) errln ( "Equality/Symmetry" , i , j ) ; if ( aHash != bHash ) errln ( "Equality/Hash" , i , j ) ; if ( ( a != b ) && ( ! ( _hasSameBehavior ( a , b ) ) ) ) { errln ( "Equality/Equivalence" , i , j ) ; } }
Source:
protected void receiveClientKeyExchangeMessage ( java.io.ByteArrayInputStream buf ) throws java.io.IOException { this . keyExchange.processClientKeyExchange ( buf ) ; assertEmpty ( buf ) ; establishMasterSecret ( getContext ( ) , keyExchange ) ; recordStream.setPendingConnectionState ( getPeer ( ) . getCompression ( ) , getPeer ( ) . getCipher ( ) ) ; this . prepareFinishHash = recordStream.prepareToFinish ( ) ; if ( ! ( expectSessionTicket ) ) { sendChangeCipherSpecMessage ( ) ; } }

Target:
protected void receiveClientKeyExchangeMessage ( java.io.ByteArrayInputStream buf ) throws java.io.IOException { keyExchange.processClientKeyExchange ( buf ) ; assertEmpty ( buf ) ; this . prepareFinishHash = recordStream.prepareToFinish ( ) ; this . securityParameters.sessionHash = getCurrentPRFHash ( getContext ( ) , prepareFinishHash , null ) ; establishMasterSecret ( getContext ( ) , keyExchange ) ; recordStream.setPendingConnectionState ( getPeer ( ) . getCompression ( ) , getPeer ( ) . getCipher ( ) ) ; if ( ! ( expectSessionTicket ) ) { sendChangeCipherSpecMessage ( ) ; } }
Source:
public static boolean isAssignableFrom ( java.lang.reflect.Type to , java.lang.reflect.Type from ) { if ( to instanceof java.lang.Class < ? > ) { java.lang.Class < ? > toClass = ( ( java.lang.Class < ? > ) ( to ) ) ; if ( toClass.isPrimitive ( ) ) { return com.google.common.primitives.Primitives.wrap ( toClass ) . equals ( from ) ; } } return com.google.common.reflect.TypeToken.of ( to ) . isAssignableFrom ( from ) ; }

Target:
public static boolean isAssignableFrom ( java.lang.reflect.Type to , java.lang.reflect.Type from ) { if ( to instanceof java.lang.Class < ? > ) { java.lang.Class < ? > toClass = ( ( java.lang.Class < ? > ) ( to ) ) ; if ( toClass.isPrimitive ( ) ) { return com.google.common.primitives.Primitives.wrap ( toClass ) . equals ( from ) ; } } return com.google.common.reflect.TypeToken.of ( to ) . isSupertypeOf ( from ) ; }
Source:
public void TestBigPlaceholder ( ) { android.icu.impl.SimplePatternFormatter fmt = android.icu.impl.SimplePatternFormatter.compile ( "a{20}c" ) ; assertEquals ( "{20} count" , 21 , fmt.getPlaceholderCount ( ) ) ; java.lang.CharSequence [ ] values = new java.lang.CharSequence [ 21 ] ; values [ 20 ] = "b" ; assertEquals ( "{20}=b" , "abc" , fmt.format ( values ) ) ; }

Target:
public void TestBigArgument ( ) { android.icu.text.SimpleFormatter fmt = android.icu.text.SimpleFormatter.compile ( "a{20}c" ) ; assertEquals ( "{20} count" , 21 , fmt.getArgumentLimit ( ) ) ; java.lang.CharSequence [ ] values = new java.lang.CharSequence [ 21 ] ; values [ 20 ] = "b" ; assertEquals ( "{20}=b" , "abc" , fmt.format ( values ) ) ; }
Source:
public boolean disconnect ( ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , "disconnect()" ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.disconnect ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.reportError ( device , error ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
public void onResume ( ) { if ( com.android.dialer.util.PermissionsUtil.hasPermission ( mActivity , android.Manifest.permission.READ_CONTACTS ) ) { mContactInfoCache.start ( ) ; } mContactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; mIsSpamEnabled = com.android.dialer.spam.Spam.get ( mActivity ) . isSpamEnabled ( ) ; getLightbringer ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }

Target:
public void onResume ( ) { if ( com.android.dialer.util.PermissionsUtil.hasPermission ( mActivity , android.Manifest.permission.READ_CONTACTS ) ) { mContactInfoCache.start ( ) ; } mContactsPreferences.refreshValue ( ContactsPreferences.DISPLAY_ORDER_KEY ) ; mIsSpamEnabled = com.android.dialer.spam.Spam.get ( mActivity ) . isSpamEnabled ( ) ; getDuo ( ) . registerListener ( this ) ; notifyDataSetChanged ( ) ; }
Source:
public synchronized void maybeInit ( ) { if ( initialized ) { return ; } initialized = true ; if ( ( isDirectory ) || ( ( zip ) == null ) ) { return ; } try { urlHandler = new libcore.io.ClassPathURLStreamHandler ( zip.getPath ( ) ) ; } catch ( java.io.IOException ioe ) { java.lang.System.logE ( ( "Unable to open zip file: " + ( file ) ) , ioe ) ; } }

Target:
public synchronized void maybeInit ( ) { if ( initialized ) { return ; } initialized = true ; if ( ( isDirectory ) || ( ( zip ) == null ) ) { return ; } try { zipFile = new java.util.zip.ZipFile ( zip ) ; urlHandler = new dalvik.system.DexPathList.Element.ElementURLStreamHandler ( zipFile ) ; } catch ( java.io.IOException ioe ) { java.lang.System.logE ( ( "Unable to open zip file: " + ( file ) ) , ioe ) ; zipFile = null ; } }
Source:
public void onInitializeAccessibilityNodeInfo ( android.view.accessibility.AccessibilityNodeInfo info ) { super . onInitializeAccessibilityNodeInfo ( info ) ; info.setClassName ( android.widget.ListView.class . getName ( ) ) ; final int count = getCount ( ) ; final android.view.accessibility.AccessibilityNodeInfo.CollectionInfo collectionInfo = android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.obtain ( 1 , count , false ) ; info.setCollectionInfo ( collectionInfo ) ; }

Target:
public void onInitializeAccessibilityNodeInfo ( android.view.accessibility.AccessibilityNodeInfo info ) { super . onInitializeAccessibilityNodeInfo ( info ) ; info.setClassName ( android.widget.ListView.class . getName ( ) ) ; final int rowsCount = getCount ( ) ; final int selectionMode = getSelectionModeForAccessibility ( ) ; final android.view.accessibility.AccessibilityNodeInfo.CollectionInfo collectionInfo = android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.obtain ( rowsCount , 1 , false , selectionMode ) ; info.setCollectionInfo ( collectionInfo ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; write ( sb , com.android.sdklib.internal.export.ApkData.PROP_OUTPUTNAME , mOutputName ) ; write ( sb , com.android.sdklib.internal.export.ApkData.PROP_BUILDINFO , mBuildInfo ) ; sb.append ( getLogLine ( ) ) ; return sb.toString ( ) ; }

Target:
public boolean hasSameApkProperties ( com.android.sdklib.internal.export.ApkData apk ) { if ( ( ( ( mMinSdkVersion ) != ( apk.mMinSdkVersion ) ) || ( ( mSupportsScreens.equals ( apk.mSupportsScreens ) ) == false ) ) || ( ( mGlVersion ) != ( apk.mGlVersion ) ) ) { return false ; } if ( ( mAbi ) != null ) { if ( ( mAbi.equals ( apk.mAbi ) ) == false ) { return false ; } } else if ( ( apk.mAbi ) != null ) { return false ; } return true ; }
Source:
public void visitLdcInsn ( java.lang.Object cst ) { if ( cst instanceof java.lang.Integer ) { java.lang.Integer value = ( ( java.lang.Integer ) ( cst ) ) ; com.android.build.gradle.tasks.ResourceUsageAnalyzer.markReachable ( mValueToResource.get ( value ) ) ; } else if ( cst instanceof java.lang.String ) { java.lang.String string = ( ( java.lang.String ) ( cst ) ) ; referencedString ( string ) ; } }

Target:
public void visitLdcInsn ( java.lang.Object cst ) { handleCodeConstant ( cst ) ; }
Source:
private java.lang.Object getData ( @ org.jetbrains.annotations.NotNull java.lang.String dataId , final java.awt.Component focusedComponent ) { for ( java.awt.Component c = focusedComponent ; c != null ; c = c.getParent ( ) ) { final com.intellij.ide.impl.DataProvider dataProvider = com.intellij.ide.impl.DataManagerImpl.getDataProvider ( c ) ; if ( dataProvider == null ) continue ; java.lang.Object data = getDataFromProvider ( dataProvider , dataId , null ) ; if ( data != null ) return data ; } return null ; }

Target:
private java.lang.Object getData ( @ org.jetbrains.annotations.NotNull java.lang.String dataId , final java.awt.Component focusedComponent ) { for ( java.awt.Component c = focusedComponent ; c != null ; c = c.getParent ( ) ) { final com.intellij.ide.impl.DataProvider dataProvider = com.intellij.ide.impl.DataManagerImpl.getDataProviderEx ( c ) ; if ( dataProvider == null ) continue ; java.lang.Object data = getDataFromProvider ( dataProvider , dataId , null ) ; if ( data != null ) return data ; } return null ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_primitives s = new com.android.rs.unittest.ScriptC_primitives ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; } s.destroy ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_primitives s = new com.android.rs.unittest.ScriptC_primitives ( pRS ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; } s.destroy ( ) ; pRS.destroy ( ) ; }