auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void copyFromUnchecked ( float [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } }

Target:
private void copyFromUnchecked ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , array , dt , arrayLen ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , array , dt , arrayLen ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , array , dt , arrayLen ) ; } }
Source:
public java.lang.String toString ( ) { if ( mSourcePosition.equals ( SourcePosition.UNKNOWN ) ) { return mSourceFile.toString ( ) ; } else { return ( ( mSourceFile.toString ( ) ) + ':' ) + ( mSourcePosition.toString ( ) ) ; } }

Target:
public java.lang.String print ( boolean shortFormat ) { if ( mSourcePosition.equals ( SourcePosition.UNKNOWN ) ) { return mSourceFile.print ( shortFormat ) ; } else { return ( ( mSourceFile.print ( shortFormat ) ) + ':' ) + ( mSourcePosition.toString ( ) ) ; } }
Source:
public android.util.Pair < byte [ ] , byte [ ] > readOutOfBandData ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return null ; return null ; }

Target:
public boolean isLeEnabled ( ) { final int state = getLeState ( ) ; if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , ( "isLeEnabled(): " + ( android.bluetooth.BluetoothAdapter.nameForState ( state ) ) ) ) ; return ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) || ( state == ( android.bluetooth.BluetoothAdapter.STATE_BLE_ON ) ) ; }
Source:
public com.android.build.gradle.tasks.ZipAlign createZipAlignTask ( @ com.android.annotations.NonNull java.lang.String taskName , @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outputFile ) { if ( ( zipAlignTask ) != null ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "ZipAlign task for variant '%s' already exists." , variantData.getName ( ) ) ) ; } zipAlignTask = variantData.basePlugin.getTaskManager ( ) . createZipAlignTask ( taskName , inputFile , outputFile ) ; assembleTask.dependsOn ( zipAlignTask ) ; return zipAlignTask ; }

Target:
public com.android.build.gradle.tasks.ZipAlign createZipAlignTask ( @ com.android.annotations.NonNull java.lang.String taskName , @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outputFile ) { if ( ( zipAlignTask ) != null ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "ZipAlign task for variant '%s' already exists." , variantData.getName ( ) ) ) ; } zipAlignTask = taskManager.createZipAlignTask ( taskName , inputFile , outputFile ) ; assembleTask.dependsOn ( zipAlignTask ) ; return zipAlignTask ; }
Source:
public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; }

Target:
public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringCharsetValue = getStaticFieldValue ( debuggeeClassId , "STRING_CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; constructorArguments.add ( stringCharsetValue ) ; }
Source:
public void testStageInstallWithErrorCode_withBadlyFormedDistroVersion ( ) throws java.lang.Exception { libcore.tzdata.shared2.DistroVersion validDistroVersion = new libcore.tzdata.shared2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidFormatVersionBytes = validDistroVersion.toBytes ( ) ; invalidFormatVersionBytes [ 0 ] = 'A' ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidFormatVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedDistroVersion ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidFormatVersionBytes = validDistroVersion.toBytes ( ) ; invalidFormatVersionBytes [ 0 ] = 'A' ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidFormatVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
private void shrink ( ) throws java.io.IOException { if ( configuration.verbose ) { java.lang.System.out.println ( "Shrinking..." ) ; if ( ( configuration.whyAreYouKeeping ) != null ) { java.lang.System.out.println ( "Explaining why classes and class members are being kept..." ) ; } if ( ( configuration.printUsage ) != null ) { java.lang.System.out.println ( ( ( "Printing usage to [" + ( fileName ( configuration.printUsage ) ) ) + "]..." ) ) ; } } programClassPool = new proguard.shrink.Shrinker ( configuration ) . execute ( programClassPool , libraryClassPool ) ; }

Target:
private boolean optimize ( ) throws java.io.IOException { if ( configuration.verbose ) { java.lang.System.out.println ( "Optimizing..." ) ; } return new proguard.optimize.Optimizer ( configuration ) . execute ( programClassPool , libraryClassPool ) ; }
Source:
public float getTextRunAdvances ( int start , int end , int contextStart , int contextEnd , int flags , float [ ] advances , int advancesIndex , android.graphics.Paint p ) { int count = end - start ; int contextCount = contextEnd - contextStart ; return p.getTextRunAdvances ( mChars , ( start + ( mStart ) ) , count , ( contextStart + ( mStart ) ) , contextCount , flags , advances , advancesIndex ) ; }

Target:
public float getTextRunAdvances ( int start , int end , int contextStart , int contextEnd , boolean isRtl , float [ ] advances , int advancesIndex , android.graphics.Paint p ) { int count = end - start ; int contextCount = contextEnd - contextStart ; return p.getTextRunAdvances ( mChars , ( start + ( mStart ) ) , count , ( contextStart + ( mStart ) ) , contextCount , isRtl , advances , advancesIndex ) ; }
Source:
public static java.util.List < com.google.gct.idea.appengine.wizard.AppEngineTemplates.TemplateInfo > getCachedTemplates ( ) { com.google.gct.idea.appengine.wizard.AppEngineTemplates.LOG.info ( "Populating cached App Engine templates..." ) ; java.io.File root = new java.io.File ( com.google.gct.idea.appengine.wizard.AppEngineTemplates.ANDROID_REPO_PATH , com.google.gct.idea.appengine.wizard.AppEngineTemplates.TEMPLATES_DIR ) ; if ( ! ( root.exists ( ) ) ) { com.google.gct.idea.appengine.wizard.AppEngineTemplates.LOG.error ( "Failed to find cached templates directory, using built-in templates" ) ; return com.google.gct.idea.appengine.wizard.AppEngineTemplates.getLocalTemplates ( ) ; } return com.google.gct.idea.appengine.wizard.AppEngineTemplates.populateTemplates ( root ) ; }

Target:
public static java.util.List < com.google.gct.idea.appengine.wizard.AppEngineTemplates.TemplateInfo > getCachedTemplates ( ) { com.google.gct.idea.appengine.wizard.AppEngineTemplates.LOG.info ( "Populating cached App Engine templates..." ) ; java.io.File root = new java.io.File ( com.google.gct.idea.appengine.wizard.AppEngineTemplates.ANDROID_REPO_PATH , com.google.gct.idea.appengine.wizard.AppEngineTemplates.TEMPLATES_DIR ) ; if ( ! ( root.exists ( ) ) ) { com.google.gct.idea.appengine.wizard.AppEngineTemplates.LOG.error ( "Failed to find cached templates directory, using built-in templates" ) ; return com.google.gct.idea.appengine.wizard.AppEngineTemplates.getLocalTemplates ( ) ; } return com.google.gct.idea.appengine.wizard.AppEngineTemplates.populateAppEngineTemplates ( root , com.google.gct.idea.appengine.wizard.AppEngineTemplates.LOCAL_TEMPLATES ) ; }
Source:
protected void finalize ( ) { if ( com.android.settingslib.bluetooth.HidProfile.V ) android.util.Log.d ( com.android.settingslib.bluetooth.HidProfile.TAG , "finalize()" ) ; if ( ( mService ) != null ) { try { android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . closeProfileProxy ( BluetoothProfile.INPUT_DEVICE , mService ) ; mService = null ; } catch ( java.lang.Throwable t ) { android.util.Log.w ( com.android.settingslib.bluetooth.HidProfile.TAG , "Error cleaning up HID proxy" , t ) ; } } }

Target:
protected void finalize ( ) { if ( com.android.settingslib.bluetooth.HidProfile.V ) android.util.Log.d ( com.android.settingslib.bluetooth.HidProfile.TAG , "finalize()" ) ; if ( ( mService ) != null ) { try { android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . closeProfileProxy ( BluetoothProfile.HID_HOST , mService ) ; mService = null ; } catch ( java.lang.Throwable t ) { android.util.Log.w ( com.android.settingslib.bluetooth.HidProfile.TAG , "Error cleaning up HID proxy" , t ) ; } } }
Source:
public void dumpShowsPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void dumpShowsPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "No last mile log for \"Last failed" ) ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "--- Latest" ) ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }
Source:
public void testRenameCoreLibrary ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , null , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "java/time/X" ) ) . isEqualTo ( "j$/time/X" ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "com/google/X" ) ) . isEqualTo ( "com/google/X" ) ; }

Target:
public void testRenameCoreLibrary ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.io.CoreLibraryRewriter ( "" ) , null , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "java/time/X" ) ) . isEqualTo ( "j$/time/X" ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "com/google/X" ) ) . isEqualTo ( "com/google/X" ) ; }
Source:
private boolean visitLocalOrParameter ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { confirmBlockElement ( expr ) ; confirmParentForPrimitive ( expr ) ; com.android.jack.ir.ast.JNode parent = expr.getParent ( ) ; if ( parent instanceof com.android.jack.ir.ast.JAsgOperation ) { if ( ( ( ( com.android.jack.ir.ast.JAsgOperation ) ( parent ) ) . getLhs ( ) ) == expr ) { confirmParent ( parent , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class ) ; } } return true ; }

Target:
private boolean visitLocalOrParameter ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { confirmBlockElement ( expr ) ; confirmParentForTrivia ( expr ) ; com.android.jack.ir.ast.JNode parent = expr.getParent ( ) ; if ( parent instanceof com.android.jack.ir.ast.JAsgOperation ) { if ( ( ( ( com.android.jack.ir.ast.JAsgOperation ) ( parent ) ) . getLhs ( ) ) == expr ) { confirmParent ( parent , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class ) ; } } return true ; }
Source:
public final int verification_error_type ( ) throws org.jf.smali.RecognitionException { int verificationError = 0 ; org.antlr.runtime.tree.CommonTree VERIFICATION_ERROR_TYPE105 = null ; try { { VERIFICATION_ERROR_TYPE105 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.VERIFICATION_ERROR_TYPE , org.jf.smali.smaliTreeWalker.FOLLOW_VERIFICATION_ERROR_TYPE_in_verification_error_type1835 ) ) ) ; verificationError = org.jf.smali.VerificationError.getVerificationError ( ( VERIFICATION_ERROR_TYPE105 != null ? VERIFICATION_ERROR_TYPE105.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return verificationError ; }

Target:
public final int verification_error_type ( ) throws org.jf.smali.RecognitionException { int verificationError = 0 ; org.antlr.runtime.tree.CommonTree VERIFICATION_ERROR_TYPE103 = null ; try { { VERIFICATION_ERROR_TYPE103 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.VERIFICATION_ERROR_TYPE , org.jf.smali.smaliTreeWalker.FOLLOW_VERIFICATION_ERROR_TYPE_in_verification_error_type1792 ) ) ) ; verificationError = org.jf.smali.VerificationError.getVerificationError ( ( VERIFICATION_ERROR_TYPE103 != null ? VERIFICATION_ERROR_TYPE103.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return verificationError ; }
Source:
public static android.renderscript.AllocationAdapter create1D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.AllocationAdapter aa = new android.renderscript.AllocationAdapter ( 0 , rs , a ) ; aa.mConstrainedLOD = true ; aa.mConstrainedFace = true ; aa.mConstrainedY = true ; aa.mConstrainedZ = true ; aa.initLOD ( 0 ) ; return aa ; }

Target:
public static android.renderscript.AllocationAdapter create2D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.Type t = android.renderscript.Type.createXY ( rs , a.getElement ( ) , a.getType ( ) . getX ( ) , a.getType ( ) . getY ( ) ) ; return android.renderscript.AllocationAdapter.createTyped ( rs , a , t ) ; }
Source:
public static < V , X extends java.lang.Exception > com.google.common.util.concurrent.CheckedFuture < V , X > immediateFailedCheckedFuture ( final X exception ) { com.google.common.base.Preconditions.checkNotNull ( exception ) ; return com.google.common.util.concurrent.Futures.makeChecked ( com.google.common.util.concurrent.Futures.< V > immediateFailedFuture ( exception ) , new com.google.common.base.Function < java.lang.Exception , X > ( ) { @ java.lang.Override public X apply ( java.lang.Exception e ) { return exception ; } } ) ; }

Target:
public void onSuccess ( V value ) { set ( value ) ; }
Source:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine.ClientRulesEngineImpl ( targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }

Target:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.ClientRulesEngine ( this , targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }
Source:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params , boolean mUseInc ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , mUseInc ) ; } else { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , params , mUseInc ) ; } }
Source:
public void createOatDir ( java.lang.String oatDir , java.lang.String dexInstructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createOatDir ( oatDir , dexInstructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void linkFile ( java.lang.String relativePath , java.lang.String fromBase , java.lang.String toBase ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.linkFile ( relativePath , fromBase , toBase ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void testCreateInvalidConfigAeadWithAuthAndCrypt ( ) throws java.lang.Exception { android.net.IpSecConfig ipSecConfig = new android.net.IpSecConfig ( ) ; addDefaultSpisAndRemoteAddrToIpSecConfig ( ipSecConfig ) ; for ( int direction : com.android.server.IpSecServiceParameterizedTest.DIRECTIONS ) { ipSecConfig.setAuthentication ( direction , com.android.server.IpSecServiceParameterizedTest.AUTH_ALGO ) ; ipSecConfig.setEncryption ( direction , com.android.server.IpSecServiceParameterizedTest.CRYPT_ALGO ) ; ipSecConfig.setAuthenticatedEncryption ( direction , com.android.server.IpSecServiceParameterizedTest.AEAD_ALGO ) ; } try { mIpSecService.createTransportModeTransform ( ipSecConfig , new android.os.Binder ( ) ) ; org.junit.Assert.fail ( ( "IpSecService should have thrown an error on authentication and encryption being" + " enabled with authenticated encryption" ) ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void testRemoveTransportModeTransform ( ) throws java.lang.Exception { android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.fromSocket ( new java.net.Socket ( ) ) ; mIpSecService.removeTransportModeTransforms ( pfd ) ; org.mockito.Mockito.verify ( mMockNetd ) . ipSecRemoveTransportModeTransform ( pfd.getFileDescriptor ( ) ) ; }
Source:
void getTotalNumOfItems ( byte [ ] bdaddr , @ android.annotation.Nullable com.android.bluetooth.avrcp.MediaController mediaController ) { java.util.List < android.media.session.MediaSession.QueueItem > items = getNowPlayingList ( mediaController ) ; if ( com.android.bluetooth.avrcp.AddressedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , ( ( "getTotalNumOfItems: " + ( items.size ( ) ) ) + " items." ) ) ; mMediaInterface.getTotalNumOfItemsRsp ( bdaddr , AvrcpConstants.RSP_NO_ERROR , 0 , items.size ( ) ) ; }

Target:
void getTotalNumOfItems ( byte [ ] bdaddr , @ android.annotation.Nullable com.android.bluetooth.avrcp.MediaController mediaController ) { java.util.List < android.media.session.MediaSession.QueueItem > items = updateNowPlayingList ( mediaController ) ; if ( com.android.bluetooth.avrcp.AddressedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , ( ( "getTotalNumOfItems: " + ( items.size ( ) ) ) + " items." ) ) ; mMediaInterface.getTotalNumOfItemsRsp ( bdaddr , AvrcpConstants.RSP_NO_ERROR , 0 , items.size ( ) ) ; }
Source:
protected void activityCleanUp ( ) { mScreenManipulator.turnScreenOn ( ) ; try { playSound ( ) ; } catch ( java.lang.InterruptedException e ) { } android.support.v4.content.LocalBroadcastManager.getInstance ( this ) . unregisterReceiver ( myBroadCastReceiver ) ; }

Target:
protected void activityCleanUp ( ) { mScreenManipulator.turnScreenOn ( ) ; try { playSound ( ) ; } catch ( java.lang.InterruptedException e ) { } android.support.v4.content.LocalBroadcastManager.getInstance ( this ) . unregisterReceiver ( myBroadCastReceiver ) ; if ( ( ( mDeviceSuspendLock ) != null ) && ( mDeviceSuspendLock.isHeld ( ) ) ) { mDeviceSuspendLock.release ( ) ; } }
Source:
public void testStrategyExtraParams ( ) throws java.lang.Exception { final android.support.v4.content.FileProvider.SimplePathStrategy strat = new android.support.v4.content.FileProvider.SimplePathStrategy ( "authority" ) ; strat.addRoot ( "tag" , mContext.getFilesDir ( ) ) ; java.io.File file = android.support.v4.content.FileProviderTest.buildPath ( mContext.getFilesDir ( ) , "file.txt" ) ; assertEquals ( file.getPath ( ) , strat.getFileForUri ( android.net.Uri.parse ( "content://authority/tag/file.txt?extra=foo" ) ) . getPath ( ) ) ; }

Target:
public void testStrategyExtraParams ( ) throws java.lang.Exception { final android.support.v4.content.FileProvider.SimplePathStrategy strat = new android.support.v4.content.FileProvider.SimplePathStrategy ( "authority" ) ; strat.addRoot ( "tag" , mContext.getFilesDir ( ) ) ; java.io.File expectedRoot = mContext.getFilesDir ( ) . getCanonicalFile ( ) ; java.io.File file = android.support.v4.content.FileProviderTest.buildPath ( expectedRoot , "file.txt" ) ; assertEquals ( file.getPath ( ) , strat.getFileForUri ( android.net.Uri.parse ( "content://authority/tag/file.txt?extra=foo" ) ) . getPath ( ) ) ; }
Source:
private void verifyOpenSSL ( org.conscrypt.OpenSSLKey pkey ) throws java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , java.security.SignatureException , java.security.cert.CertificateException { try { org.conscrypt.NativeCrypto.X509_verify ( mContext , pkey.getPkeyContext ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new java.security.cert.CertificateException ( e ) ; } catch ( javax.crypto.BadPaddingException e ) { throw new java.security.SignatureException ( ) ; } }

Target:
private void verifyOpenSSL ( org.conscrypt.OpenSSLKey pkey ) throws java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , java.security.SignatureException , java.security.cert.CertificateException { try { org.conscrypt.NativeCrypto.X509_verify ( mContext , pkey.getNativeRef ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new java.security.cert.CertificateException ( e ) ; } catch ( javax.crypto.BadPaddingException e ) { throw new java.security.SignatureException ( ) ; } }
Source:
private long getLastExtractedPositionUs ( ) { long lastExtractedPositionUs = java.lang.Long.MAX_VALUE ; for ( long value : mLastExtractedPositionUsMap.values ( ) ) { lastExtractedPositionUs = java.lang.Math.min ( lastExtractedPositionUs , value ) ; } if ( lastExtractedPositionUs == ( java.lang.Long.MAX_VALUE ) ) { lastExtractedPositionUs = com.google.android.exoplayer.C.UNKNOWN_TIME_US ; } return lastExtractedPositionUs ; }

Target:
private long getLastExtractedPositionUs ( ) { long lastExtractedPositionUs = java.lang.Long.MIN_VALUE ; for ( java.util.Map.Entry < java.lang.Integer , java.lang.Long > entry : mLastExtractedPositionUsMap.entrySet ( ) ) { if ( ( mVideoTrackIndex ) != ( entry.getKey ( ) ) ) { lastExtractedPositionUs = java.lang.Math.max ( lastExtractedPositionUs , entry.getValue ( ) ) ; } } if ( lastExtractedPositionUs == ( java.lang.Long.MIN_VALUE ) ) { lastExtractedPositionUs = com.google.android.exoplayer2.C.UNKNOWN_TIME_US ; } return lastExtractedPositionUs ; }
Source:
public static void main ( java.lang.String [ ] args ) { try { Indirect.main ( ) ; java.lang.System.out.println ( "Succeeded unexpectedly" ) ; } catch ( java.lang.IncompatibleClassChangeError icce ) { java.lang.System.out.println ( "Got expected ICCE" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { try { Base base = new Base ( ) ; java.lang.System.out.println ( "Succeeded unexpectedly" ) ; } catch ( java.lang.IncompatibleClassChangeError icce ) { java.lang.System.out.println ( "Got expected ICCE" ) ; } try { ExtendsFinal ef = new ExtendsFinal ( ) ; java.lang.System.out.println ( "Succeeded unexpectedly" ) ; } catch ( java.lang.VerifyError ve ) { java.lang.System.out.println ( "Got expected VerifyError" ) ; } }
Source:
public void onGetDataCallListComplete ( @ android.telephony.data.DataServiceCallback.Result int result , java.util.List < android.telephony.data.DataCallResponse > dataCallList ) { android.telephony.data.IDataServiceCallback callback = mCallback.get ( ) ; if ( callback != null ) { try { callback.onGetDataCallListComplete ( result , dataCallList ) ; } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.data.DataServiceCallback.mTag , "Failed to onGetDataCallListComplete on the remote" ) ; } } }

Target:
public void onGetDataCallListComplete ( @ android.telephony.data.DataServiceCallback.Result int result , java.util.List < android.telephony.data.DataCallResponse > dataCallList ) { android.telephony.data.IDataServiceCallback callback = mCallback.get ( ) ; if ( callback != null ) { try { callback.onGetDataCallListComplete ( result , dataCallList ) ; } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.data.DataServiceCallback.TAG , "Failed to onGetDataCallListComplete on the remote" ) ; } } }
Source:
private boolean isCurrentProfile ( int userId ) { int currentUser = android.app.ActivityManager.getCurrentUser ( ) ; if ( userId == currentUser ) { return true ; } java.util.List < android.content.pm.UserInfo > profiles = mUserManager.getProfiles ( currentUser ) ; for ( android.content.pm.UserInfo user : profiles ) { if ( userId == ( user.id ) ) { return true ; } } return false ; }

Target:
public boolean addPasspointConfiguration ( android.net.wifi.hotspot2.PasspointConfiguration config ) { return true ; }
Source:
public void testNewSmsFromBlockedNumber_noBroadcastsSent ( ) { java.lang.String blockedNumber = "1234567890" ; doReturn ( blockedNumber ) . when ( mInboundSmsTracker ) . getDisplayAddress ( ) ; mFakeBlockedNumberContentProvider.mBlockedNumbers.add ( blockedNumber ) ; transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verify ( mContext , never ( ) ) . sendBroadcast ( any ( android.content.Intent.class ) ) ; assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void testNewSmsFromBlockedNumber_noBroadcastsSent ( ) { java.lang.String blockedNumber = "1234567890" ; org.mockito.Mockito.doReturn ( blockedNumber ) . when ( mInboundSmsTracker ) . getDisplayAddress ( ) ; mFakeBlockedNumberContentProvider.mBlockedNumbers.add ( blockedNumber ) ; transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Matchers.any ( android.content.Intent.class ) ) ; org.junit.Assert.assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStack ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) , null ) ; return tmpVariable ; }

Target:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStack ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) , null ) ; tmpVariable.setSynthetic ( ) ; return tmpVariable ; }
Source:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { ( ( com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ( getActivity ( ) ) ) . enableFloatingButton ( ( ( ( mModalAlertManager ) == null ) || ( mModalAlertManager.isEmpty ( ) ) ) ) ; } }

Target:
public boolean isModalAlertVisible ( ) { return ( ( mModalAlertManager ) != null ) && ( ! ( mModalAlertManager.isEmpty ( ) ) ) ; }
Source:
public java.lang.Integer get ( int index ) { com.android.jack.dx.io.DexBuffer.checkBounds ( index , tableOfContents.typeIds.size ) ; return java.lang.Integer.valueOf ( open ( ( ( tableOfContents.typeIds.off ) + ( index * ( com.android.jack.dx.dex.SizeOf.TYPE_ID_ITEM ) ) ) ) . readInt ( ) ) ; }

Target:
private java.util.List < java.lang.String > readTypeNames ( java.util.List < java.lang.String > strings , java.util.List < java.lang.Integer > typeIds ) { java.lang.String [ ] result = new java.lang.String [ tableOfContents.typeIds.size ] ; for ( int i = 0 ; i < ( tableOfContents.typeIds.size ) ; ++ i ) { result [ i ] = strings.get ( typeIds.get ( i ) . intValue ( ) ) ; } return java.util.Arrays.asList ( result ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof com.ibm.icu.impl.ICUResourceBundleReader.ReaderInfo ) ) { return false ; } com.ibm.icu.impl.ICUResourceBundleReader.ReaderInfo info = ( ( com.ibm.icu.impl.ICUResourceBundleReader.ReaderInfo ) ( obj ) ) ; return ( ( this . baseName.equals ( info.baseName ) ) && ( this . localeID.equals ( info.localeID ) ) ) && ( this . loader.equals ( info.loader ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof com.ibm.icu.impl.ICUResourceBundleReader.ReaderCacheKey ) ) { return false ; } com.ibm.icu.impl.ICUResourceBundleReader.ReaderCacheKey info = ( ( com.ibm.icu.impl.ICUResourceBundleReader.ReaderCacheKey ) ( obj ) ) ; return ( this . baseName.equals ( info.baseName ) ) && ( this . localeID.equals ( info.localeID ) ) ; }
Source:
public static void run ( ) throws java.lang.Exception { art.Test913.doTest ( ) ; final java.util.concurrent.CountDownLatch cdl1 = new java.util.concurrent.CountDownLatch ( 1 ) ; java.lang.Thread t = new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { art.Test913.runFollowReferences ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } cdl1.countDown ( ) ; } } ; t.start ( ) ; cdl1.await ( ) ; }

Target:
public static void run ( ) throws java.lang.Exception { art.Test913.doTest ( ) ; final java.util.concurrent.CountDownLatch cdl1 = new java.util.concurrent.CountDownLatch ( 1 ) ; java.lang.Thread t = new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { art.Test913.runFollowReferences ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } cdl1.countDown ( ) ; } } ; t.start ( ) ; cdl1.await ( ) ; art.Test913.doExtensionTests ( ) ; }
Source:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothHeadsetPriorityKey ( device.getAddress ( ) ) , priority ) ; com.android.bluetooth.hfp.HeadsetService.logD ( ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; return true ; }

Target:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothHeadsetPriorityKey ( device.getAddress ( ) ) , priority ) ; if ( com.android.bluetooth.hfp.HeadsetService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; } return true ; }
Source:
public void testReceive_UnboundBufFull ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ONE ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( dst.position ( ) , dst.limit ( ) ) ; assertNull ( dc.receive ( dst ) ) ; }

Target:
public void testReceive_UnboundBufFull ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ONE ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( dst.position ( ) , dst.limit ( ) ) ; assertNull ( dc.receive ( dst ) ) ; dc.close ( ) ; }
Source:
public void queryTTYMode ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_QUERY_TTY_MODE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
void riljLoge ( java.lang.String msg , java.lang.Exception e ) { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , ( msg + ( ( mPhoneId ) != null ? ( " [SUB" + ( mPhoneId ) ) + "]" : "" ) ) , e ) ; }
Source:
public java.lang.Class findClass ( java.lang.String name ) { for ( dalvik.system.DexPathList.Element element : dexElements ) { dalvik.system.DexFile dex = element.dexFile ; if ( dex != null ) { java.lang.Class clazz = dex.loadClassBinaryName ( name , definingContext ) ; if ( clazz != null ) { return clazz ; } } } return null ; }

Target:
public java.lang.Class findClass ( java.lang.String name , java.util.List < java.lang.Throwable > suppressed ) { for ( dalvik.system.DexPathList.Element element : dexElements ) { dalvik.system.DexFile dex = element.dexFile ; if ( dex != null ) { java.lang.Class clazz = dex.loadClassBinaryName ( name , definingContext , suppressed ) ; if ( clazz != null ) { return clazz ; } } } if ( ( dexElementsSuppressedExceptions ) != null ) { suppressed.addAll ( java.util.Arrays.asList ( dexElementsSuppressedExceptions ) ) ; } return null ; }
Source:
public void testNotifyChange2 ( ) { android.content.cts.ContentResolverTest.MockContentObserver mco = new android.content.cts.ContentResolverTest.MockContentObserver ( ) ; mContentResolver.registerContentObserver ( android.content.cts.ContentResolverTest.TABLE1_URI , true , mco ) ; assertFalse ( mco.hadOnChanged ( ) ) ; mContentResolver.notifyChange ( android.content.cts.ContentResolverTest.TABLE1_URI , mco , false ) ; assertTrue ( mco.hadOnChanged ( ) ) ; mContentResolver.unregisterContentObserver ( mco ) ; }

Target:
protected boolean check ( ) { return mco.hadOnChanged ( ) ; }
Source:
HEAD ( ) { com.android.compatibility.common.util.bcf7 Merge ; }

Target:
private static java.io.File storeMergedConfigFile ( java.util.Map < java.lang.String , java.util.List < java.lang.String > > configMap , java.lang.String moduleName ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { java.io.File mergedConfigFile = com.android.tradefed.util.FileUtil.createTempFile ( moduleName , com.android.compatibility.common.util.DynamicConfigHandler.FILE_EXT ) ; java.io.OutputStream stream = new java.io.FileOutputStream ( mergedConfigFile ) ; org.xmlpull.v1.XmlSerializer serializer = org.xmlpull.v1.XmlPullParserFactory.newInstance ( ) . newSerializer ( ) ; serializer.setOutput ( stream , com.android.compatibility.common.util.DynamicConfigHandler.ENCODING ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startDocument ( com.android.compatibility.common.util.DynamicConfigHandler.ENCODING , false ) ; serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.CONFIG_TAG ) ; for ( java.lang.String key : configMap.keySet ( ) ) { serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.ENTRY_TAG ) ; serializer.attribute ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.KEY_ATTR , key ) ; for ( java.lang.String value : configMap.get ( key ) ) { serializer.startTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.VALUE_TAG ) ; serializer.text ( value ) ; serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.VALUE_TAG ) ; } serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.ENTRY_TAG ) ; } serializer.endTag ( com.android.compatibility.common.util.DynamicConfigHandler.NS , DynamicConfig.CONFIG_TAG ) ; serializer.endDocument ( ) ; return mergedConfigFile ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { if ( DUMPSYS_IN_TEARDOWN ) { dumpsys ( "tearDown" ) ; } getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER1_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER2_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER3_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER1_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER2_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER3_PKG ) ; super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( DUMPSYS_IN_TEARDOWN ) { dumpsys ( "tearDown" ) ; } if ( mSupportsBackup ) { getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER1_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER2_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER3_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER1_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER2_PKG ) ; getDevice ( ) . uninstallPackage ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER3_PKG ) ; } super . tearDown ( ) ; }
Source:
public boolean canSupportCarrierVideoCall ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getCanSupportCarrierVideoCall ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return false ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public boolean canSupportCarrierVideoCall ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getCanSupportCarrierVideoCall ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return false ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
public void testReadWithNoStoreFile ( ) throws java.lang.Exception { assertFalse ( mWifiConfigStore.areStoresPresent ( ) ) ; com.android.server.wifi.WifiConfigStoreData readData = mWifiConfigStore.read ( ) ; com.android.server.wifi.WifiConfigStoreDataTest.assertConfigStoreDataEqual ( getEmptyStoreData ( ) , readData ) ; }

Target:
public void testReadUserStoreContainedUnknownData ( ) throws java.lang.Exception { java.lang.String storeFileData = "<?xml version=\'1.0\' encoding=\'utf-8\' standalone=\'yes\' ?>\n" + ( ( ( ( "<WifiConfigStoreData>\n" + "<int name=\"Version\" value=\"1\" />\n" ) + "<UnknownTag>\n" ) + "</UnknownTag>\n" ) + "</WifiConfigStoreData>\n" ) ; mUserStore.storeRawDataToWrite ( storeFileData.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; }
Source:
public void disableService ( ) { if ( ! ( android.autofillservice.cts.Helper.hasAutofillFeature ( ) ) ) return ; if ( ! ( android.autofillservice.cts.AutoFillServiceTestCase.isServiceEnabled ( ) ) ) return ; final android.autofillservice.cts.OneTimeSettingsListener observer = new android.autofillservice.cts.OneTimeSettingsListener ( android.autofillservice.cts.AutoFillServiceTestCase.getContext ( ) , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; android.autofillservice.cts.Helper.runShellCommand ( "settings delete secure %s" , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; observer.assertCalled ( ) ; android.autofillservice.cts.AutoFillServiceTestCase.assertServiceDisabled ( ) ; android.autofillservice.cts.InstrumentedAutoFillService.setIgnoreUnexpectedRequests ( false ) ; }

Target:
public void assertNothingIsPending ( ) throws java.lang.Exception { final android.autofillservice.cts.MultipleExceptionsCatcher catcher = new android.autofillservice.cts.MultipleExceptionsCatcher ( ) . run ( ( ) -> android.autofillservice.cts.AutoFillServiceTestCase.sReplier.assertNumberUnhandledFillRequests ( 0 ) ) . run ( ( ) -> android.autofillservice.cts.AutoFillServiceTestCase.sReplier.assertNumberUnhandledSaveRequests ( 0 ) ) ; final java.util.List < java.lang.Exception > replierExceptions = android.autofillservice.cts.AutoFillServiceTestCase.sReplier.getExceptions ( ) ; if ( replierExceptions != null ) { for ( java.lang.Exception e : replierExceptions ) { catcher.add ( e ) ; } } catcher.throwIfAny ( ) ; }
Source:
protected void mergeDex ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , com.android.sched.vfs.InputVFile inputDex ) throws com.android.jack.JackIOException , com.android.jack.tools.merger.MergeOverflow { try { merger.addDexFile ( new com.android.jack.dx.io.DexBuffer ( inputDex.openRead ( ) ) ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.JackIOException ( ( "Could not read Dex from " + inputDex ) , e ) ; } }

Target:
protected void mergeDex ( @ javax.annotation.Nonnull com.android.jack.tools.merger.JackMerger merger , com.android.sched.vfs.InputVFile inputDex ) throws com.android.jack.backend.dex.DexWritingException , com.android.jack.tools.merger.MergingOverflowException { try { merger.addDexFile ( new com.android.jack.dx.io.DexBuffer ( inputDex.openRead ( ) ) ) ; } catch ( java.io.IOException e ) { throw new com.android.jack.backend.dex.DexWritingException ( new com.android.sched.util.file.CannotReadException ( inputDex.getLocation ( ) , e ) ) ; } }
Source:
public static com.android.internal.telephony.gsm.SmsMessage newFromCDS ( java.lang.String line ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( line ) ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "CDS SMS PDU parsing failed: " , ex ) ; return null ; } }

Target:
public static com.android.internal.telephony.gsm.SmsMessage newFromCDS ( byte [ ] pdu ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "CDS SMS PDU parsing failed: " , ex ) ; return null ; } }
Source:
public static java.lang.String stringAddrFromByteAddr ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { return null ; } java.util.StringJoiner j = new java.util.StringJoiner ( ":" ) ; for ( byte b : addr ) { j.add ( java.lang.Integer.toHexString ( com.android.internal.util.BitUtils.uint8 ( b ) ) ) ; } return j.toString ( ) ; }

Target:
public static java.lang.String stringAddrFromByteAddr ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { return null ; } return java.lang.String.format ( "%02x:%02x:%02x:%02x:%02x:%02x" , addr [ 0 ] , addr [ 1 ] , addr [ 2 ] , addr [ 3 ] , addr [ 4 ] , addr [ 5 ] ) ; }