auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void appendHex ( java.lang.StringBuilder builder , java.lang.String s , java.nio.charset.Charset charset ) { for ( byte b : s.getBytes ( charset ) ) { libcore.net.UriCodec.appendHex ( builder , b ) ; } }

Target:
public static java.lang.String decode ( java.lang.String s , boolean convertPlus , java.nio.charset.Charset charset , boolean throwOnFailure ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( s.length ( ) ) ; libcore.net.UriCodec.appendDecoded ( builder , s , convertPlus , charset , throwOnFailure ) ; return builder.toString ( ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : { debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( java.lang.String ) ( msg.obj ) ) , msg.arg1 ) ; } break ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { synchronized ( this ) { mPendingAlarm = null ; alarmFiredNative ( ) ; } }
Source:
public void testSetupDriverForClientModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForClientMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupDriverForClientMode ( ) ; org.junit.Assert.assertEquals ( null , returnedClientInterface ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForClientMode ( ) ; }

Target:
public void testSetupDriverForClientModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForClientMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupForClientMode ( ) ; org.junit.Assert.assertEquals ( null , returnedClientInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( true ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForClientMode ( ) ; }
Source:
public void TestNameMap ( ) { android.icu.text.Transliterator uni2name = android.icu.text.Transliterator.getInstance ( "Any-Name[^abc]" ) ; android.icu.text.Transliterator name2uni = android.icu.text.Transliterator.getInstance ( "Name-Any" ) ; expect ( uni2name , " abc丁µઁ�\t￿" , "\\N{NO-BREAK SPACE}abc\\N{CJK UNIFIED IDEOGRAPH-4E01}\\N{MICRO SIGN}\\N{GUJARATI SIGN CANDRABINDU}\\N{REPLACEMENT CHARACTER}\\N{<control-0004>}\\N{<control-0009>}\\N{<control-0081>}\\N{<noncharacter-FFFF>}" ) ; expect ( name2uni , "{\\N { NO-BREAK SPACE}abc\\N{ CJK UNIFIED IDEOGRAPH-4E01 }\\N{x\\N{MICRO SIGN}\\N{GUJARATI SIGN CANDRABINDU}\\N{REPLACEMENT CHARACTER}\\N{<control-0004>}\\N{<control-0009>}\\N{<control-0081>}\\N{<noncharacter-FFFF>}\\N{<control-0004>}\\N{" , "{ abc丁\\N{xµઁ�\t￿\\N{" ) ; android.icu.text.Transliterator t = android.icu.text.Transliterator.getInstance ( "Any-Name;Name-Any" ) ; java.lang.String s = "{ abc丁\\N{xµઁ�\t￿\\N{" ; expect ( t , s , s ) ; }

Target:
public void TestNameMap ( ) { android.icu.text.Transliterator uni2name = android.icu.text.Transliterator.getInstance ( "Any-Name[^abc]" ) ; android.icu.text.Transliterator name2uni = android.icu.text.Transliterator.getInstance ( "Name-Any" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( uni2name , " abc丁µઁ�\t￿" , "\\N{NO-BREAK SPACE}abc\\N{CJK UNIFIED IDEOGRAPH-4E01}\\N{MICRO SIGN}\\N{GUJARATI SIGN CANDRABINDU}\\N{REPLACEMENT CHARACTER}\\N{<control-0004>}\\N{<control-0009>}\\N{<control-0081>}\\N{<noncharacter-FFFF>}" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( name2uni , "{\\N { NO-BREAK SPACE}abc\\N{ CJK UNIFIED IDEOGRAPH-4E01 }\\N{x\\N{MICRO SIGN}\\N{GUJARATI SIGN CANDRABINDU}\\N{REPLACEMENT CHARACTER}\\N{<control-0004>}\\N{<control-0009>}\\N{<control-0081>}\\N{<noncharacter-FFFF>}\\N{<control-0004>}\\N{" , "{ abc丁\\N{xµઁ�\t￿\\N{" ) ; android.icu.text.Transliterator t = android.icu.text.Transliterator.getInstance ( "Any-Name;Name-Any" ) ; java.lang.String s = "{ abc丁\\N{xµઁ�\t￿\\N{" ; android.icu.dev.test.translit.TransliteratorTest.expect ( t , s , s ) ; }
Source:
public int hashCode ( ) { int primeNum = 31 ; return ( ( ( ( ( mCdmaDbm ) * primeNum ) + ( ( mCdmaEcio ) * primeNum ) ) + ( ( mEvdoDbm ) * primeNum ) ) + ( ( mEvdoEcio ) * primeNum ) ) + ( ( mEvdoSnr ) * primeNum ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( mCdmaDbm , mCdmaEcio , mEvdoDbm , mEvdoEcio , mEvdoSnr ) ; }
Source:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : stopObexServerSession ( ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.CREATE_NOTIFICATION : createPbapNotification ( ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REMOVE_NOTIFICATION : android.content.Intent i = new android.content.Intent ( BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION ) ; mService.sendBroadcast ( i ) ; notifyAuthCancelled ( ) ; removePbapNotification ( com.android.bluetooth.pbap.PbapStateMachine.NOTIFICATION_ID_AUTH ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.AUTH_KEY_INPUT : java.lang.String key = ( ( java.lang.String ) ( message.obj ) ) ; notifyAuthKeyInput ( key ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.AUTH_CANCELLED : notifyAuthCancelled ( ) ; break ; } return HANDLED ; }

Target:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.pbap.PbapStateMachine.DISCONNECT : stopObexServerSession ( ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.CREATE_NOTIFICATION : createPbapNotification ( ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.REMOVE_NOTIFICATION : android.content.Intent i = new android.content.Intent ( BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION ) ; mService.sendBroadcast ( i ) ; notifyAuthCancelled ( ) ; removePbapNotification ( mNotificationId ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.AUTH_KEY_INPUT : java.lang.String key = ( ( java.lang.String ) ( message.obj ) ) ; notifyAuthKeyInput ( key ) ; break ; case com.android.bluetooth.pbap.PbapStateMachine.AUTH_CANCELLED : notifyAuthCancelled ( ) ; break ; } return HANDLED ; }
Source:
private static com.android.apksig.internal.jar.ManifestParser.Attribute parseAttr ( java.lang.String attr ) { int delimiterIndex = attr.indexOf ( ':' ) ; if ( delimiterIndex == ( - 1 ) ) { return new com.android.apksig.internal.jar.ManifestParser.Attribute ( attr.trim ( ) , "" ) ; } else { return new com.android.apksig.internal.jar.ManifestParser.Attribute ( attr.substring ( 0 , delimiterIndex ) . trim ( ) , attr.substring ( ( delimiterIndex + 1 ) ) . trim ( ) ) ; } }

Target:
private static com.android.apksig.internal.jar.ManifestParser.Attribute parseAttr ( java.lang.String attr ) { int delimiterIndex = attr.indexOf ( ": " ) ; if ( delimiterIndex == ( - 1 ) ) { return new com.android.apksig.internal.jar.ManifestParser.Attribute ( attr , "" ) ; } else { return new com.android.apksig.internal.jar.ManifestParser.Attribute ( attr.substring ( 0 , delimiterIndex ) , attr.substring ( ( delimiterIndex + ( ": " . length ( ) ) ) ) ) ; } }
Source:
private com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { com.android.jack.dx.rop.code.RegisterSpec regSpec ; if ( expr instanceof com.android.jack.ir.ast.JVariableRef ) { regSpec = ropReg.getRegisterSpec ( ( ( com.android.jack.ir.ast.JVariableRef ) ( expr ) ) ) ; } else { assert expr instanceof com.android.jack.ir.ast.JValueLiteral ; regSpec = ropReg.getOrCreateTmpRegister ( expr.getType ( ) , false ) ; buildConstant ( regSpec , ( ( com.android.jack.ir.ast.JValueLiteral ) ( expr ) ) ) ; } return regSpec ; }

Target:
private com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { com.android.jack.dx.rop.code.RegisterSpec regSpec ; if ( expr instanceof com.android.jack.ir.ast.JVariableRef ) { regSpec = ropReg.getRegisterSpec ( ( ( com.android.jack.ir.ast.JVariableRef ) ( expr ) ) ) ; } else { assert expr instanceof com.android.jack.ir.ast.JValueLiteral ; regSpec = ropReg.getOrCreateTmpRegister ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDxWithoutClosure ( expr.getType ( ) ) ) ; buildConstant ( regSpec , ( ( com.android.jack.ir.ast.JValueLiteral ) ( expr ) ) ) ; } return regSpec ; }
Source:
public static com.android.server.NsdService create ( android.content.Context context ) throws java.lang.InterruptedException { com.android.server.NsdService.NsdSettings settings = com.android.server.NsdService.NsdSettings.makeDefault ( context ) ; android.os.HandlerThread thread = new android.os.HandlerThread ( com.android.server.NsdService.TAG ) ; thread.start ( ) ; android.os.Handler handler = new android.os.Handler ( thread.getLooper ( ) ) ; com.android.server.NsdService service = new com.android.server.NsdService ( context , settings , handler ) ; service.mNativeDaemonConnected.await ( ) ; return service ; }

Target:
public static com.android.server.NsdService create ( android.content.Context context ) throws java.lang.InterruptedException { com.android.server.NsdService.NsdSettings settings = com.android.server.NsdService.NsdSettings.makeDefault ( context ) ; android.os.HandlerThread thread = new android.os.HandlerThread ( com.android.server.NsdService.TAG ) ; thread.start ( ) ; android.os.Handler handler = new android.os.Handler ( thread.getLooper ( ) ) ; com.android.server.NsdService service = new com.android.server.NsdService ( context , settings , handler , com.android.server.NsdService.DaemonConnection :: new ) ; service.mDaemonCallback.awaitConnection ( ) ; return service ; }
Source:
public void unregisterMediaButtonEventReceiver ( android.content.ComponentName eventReceiver ) { if ( eventReceiver == null ) { return ; } android.content.Intent mediaButtonIntent = new android.content.Intent ( android.content.Intent.ACTION_MEDIA_BUTTON ) ; mediaButtonIntent.setComponent ( eventReceiver ) ; android.app.PendingIntent pi = android.app.PendingIntent.getBroadcast ( mApplicationContext , 0 , mediaButtonIntent , 0 ) ; unregisterMediaButtonIntent ( pi ) ; }

Target:
public void unregisterMediaButtonEventReceiver ( android.content.ComponentName eventReceiver ) { if ( eventReceiver == null ) { return ; } android.content.Intent mediaButtonIntent = new android.content.Intent ( android.content.Intent.ACTION_MEDIA_BUTTON ) ; mediaButtonIntent.setComponent ( eventReceiver ) ; android.app.PendingIntent pi = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mediaButtonIntent , 0 ) ; unregisterMediaButtonIntent ( pi ) ; }
Source:
public void adjustMasterVolume ( int steps , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.adjustMasterVolume ( steps , flags , getContext ( ) . getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustMasterVolume" , e ) ; } }

Target:
public void adjustMasterVolume ( int steps , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.adjustMasterVolume ( steps , flags , mApplicationContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustMasterVolume" , e ) ; } }
Source:
public org.bouncycastle.math.ec.ECPoint normalize ( ) { if ( this . isInfinity ( ) ) { return this ; } switch ( this . getCurveCoordinateSystem ( ) ) { case ECCurve.COORD_AFFINE : case ECCurve.COORD_LAMBDA_AFFINE : { return this ; } default : { org.bouncycastle.math.ec.ECFieldElement Z1 = getZCoord ( 0 ) ; if ( ( Z1.bitLength ( ) ) == 1 ) { return this ; } return normalize ( Z1.invert ( ) ) ; } } }

Target:
public org.bouncycastle.math.ec.ECPoint normalize ( ) { if ( this . isInfinity ( ) ) { return this ; } switch ( this . getCurveCoordinateSystem ( ) ) { case ECCurve.COORD_AFFINE : case ECCurve.COORD_LAMBDA_AFFINE : { return this ; } default : { org.bouncycastle.math.ec.ECFieldElement Z1 = getZCoord ( 0 ) ; if ( Z1.isOne ( ) ) { return this ; } return normalize ( Z1.invert ( ) ) ; } } }
Source:
private static java.lang.String getMajorVersionAsString ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return com.android.jack.library.JackLibraryFactory.getVersionString ( java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Failed to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + vdir ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( vdir.getLocation ( ) ) ; } }

Target:
private static java.lang.String getMajorVersionAsString ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return com.android.jack.library.JackLibraryFactory.getVersionString ( java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.sched.util.location.Location location = vdir.getLocation ( ) ; com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Failed to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + ( location.getDescription ( ) ) ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( location ) ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mHasFeature = ( mHasFeature ) && ( ( getMaxNumberOfUsersSupported ( ) ) > 1 ) ; if ( mHasFeature ) { removeTestUsers ( ) ; installTestApps ( ) ; mProfileUserId = createManagedProfile ( ) ; installApp ( com.android.cts.devicepolicy.MANAGED_PROFILE_APK ) ; setProfileOwner ( ( ( ( MANAGED_PROFILE_PKG ) + "/" ) + ( ADMIN_RECEIVER_TEST_CLASS ) ) , mProfileUserId ) ; mProfileSerialNumber = getUserSerialNumber ( mProfileUserId ) ; mMainUserSerialNumber = getUserSerialNumber ( 0 ) ; startUser ( mProfileUserId ) ; } }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mHasFeature = ( mHasFeature ) && ( hasDeviceFeature ( "android.software.managed_users" ) ) ; if ( mHasFeature ) { removeTestUsers ( ) ; installTestApps ( ) ; mProfileUserId = createManagedProfile ( ) ; installApp ( com.android.cts.devicepolicy.MANAGED_PROFILE_APK ) ; setProfileOwner ( ( ( ( MANAGED_PROFILE_PKG ) + "/" ) + ( ADMIN_RECEIVER_TEST_CLASS ) ) , mProfileUserId ) ; mProfileSerialNumber = getUserSerialNumber ( mProfileUserId ) ; mMainUserSerialNumber = getUserSerialNumber ( 0 ) ; startUser ( mProfileUserId ) ; } }
Source:
private void connectToPlayer ( ) { if ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.TAG , "connectToPlayer" ) ; mMediaBrowser.connect ( ) ; }

Target:
public void setBrowsed ( java.lang.String packageName , java.lang.String cls ) { mPackageName = packageName ; mClassName = cls ; mFolderItems = null ; mMediaId = null ; mRootFolderUid = null ; mPathStack = new java.util.Stack < java.lang.String > ( ) ; mMediaBrowser = new android.media.browse.MediaBrowser ( mContext , new android.content.ComponentName ( mPackageName , mClassName ) , browseMediaConnectionCallback , null ) ; mMediaBrowser.connect ( ) ; }
Source:
public java.util.Iterator < com.android.jack.ir.ast.JDefinedClassOrInterface > adapt ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws java.lang.Exception { return com.google.common.collect.Iterators.filter ( new java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > ( session.getTypesToEmit ( ) ) . iterator ( ) , new com.google.common.base.Predicate < com.android.jack.ir.ast.JDefinedClassOrInterface > ( ) { @ java.lang.Override public boolean apply ( com.android.jack.ir.ast.JDefinedClassOrInterface clOrI ) { return ! ( clOrI.isLoadedFromJackFile ( ) ) ; } } ) ; }

Target:
public java.util.Iterator < com.android.jack.ir.ast.JDefinedClassOrInterface > adapt ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws java.lang.Exception { return com.google.common.collect.Iterators.filter ( new java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > ( session.getTypesToEmit ( ) ) . iterator ( ) , new com.google.common.base.Predicate < com.android.jack.ir.ast.JDefinedClassOrInterface > ( ) { @ java.lang.Override public boolean apply ( com.android.jack.ir.ast.JDefinedClassOrInterface clOrI ) { return ! ( ( clOrI.getLocation ( ) ) instanceof com.android.jack.library.TypeInInputLibraryLocation ) ; } } ) ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { startUpSync.countDown ( ) ; for ( int i = 0 ; i < ( NUM_STRESS_ITERATIONS ) ; i ++ ) { libcore.javax.net.ssl.SSLEngineTest.assertSendsCorrectly ( "This is the server. Hi!" . getBytes ( ) , pair.server , pair.client , false ) ; } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { startUpSync.countDown ( ) ; for ( int i = 0 ; i < ( NUM_STRESS_ITERATIONS ) ; i ++ ) { libcore.javax.net.ssl.SSLEngineTest.assertSendsCorrectly ( "This is the server. Hi!" . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) , pair.server , pair.client , false ) ; } return null ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; if ( ( com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.sProject ) == null ) { org.eclipse.core.resources.IProject project = null ; java.lang.String projectName = "testproject-" + ( java.lang.System.currentTimeMillis ( ) ) ; project = createProject ( projectName ) ; assertNotNull ( project ) ; com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.sProject = project ; } }

Target:
protected org.eclipse.core.resources.IFile getValueFile ( org.eclipse.core.resources.IProject project , java.lang.String name ) throws java.lang.Exception { return getTestDataFile ( project , name , ( ( ( ( ( com.android.sdklib.SdkConstants.FD_RES ) + "/" ) + ( com.android.AndroidConstants.FD_RES_VALUES ) ) + "/" ) + name ) ) ; }
Source:
public char [ ] readPassword ( ) { synchronized ( java.io.Console.CONSOLE_LOCK ) { int previousState = java.io.Console.setEcho ( false , 0 ) ; try { java.lang.String password = readLine ( ) ; writer.println ( ) ; return password == null ? null : password.toCharArray ( ) ; } finally { java.io.Console.setEcho ( true , previousState ) ; } } }

Target:
public char [ ] readPassword ( ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }

Target:
public void testShowWhenLockedActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; pressHomeButton ( ) ; unlockDevice ( ) ; }
Source:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { java.security.Provider.Service service = messageDigestCodec.checkString ( context , "SHA" ) ; return new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change ) , 1 , 2 , new com.android.sched.util.config.MessageDigestFactory ( service ) , false ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.VFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { java.security.Provider.Service service = messageDigestCodec.checkString ( context , "SHA" ) ; return new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change , com.android.sched.util.file.OutputZipFile.Compression.COMPRESSED ) , 1 , 2 , new com.android.sched.util.config.MessageDigestFactory ( service ) , false ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public byte [ ] [ ] saw ( byte [ ] prefix ) { java.util.ArrayList < byte [ ] > values = execute ( 's' , prefix ) ; return values == null ? null : values.toArray ( new byte [ values.size ( ) ] [ ] ) ; }

Target:
public boolean reset ( ) { try { return ( mBinder.reset ( ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
private void checkOutputDir ( ) throws com.android.jill.IllegalOptionsException { assert ( output ) != null ; if ( ! ( output.exists ( ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( output.getName ( ) ) + " does not exist." ) ) ; } if ( ( ! ( output.canRead ( ) ) ) || ( ! ( output.canWrite ( ) ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( "The specified output folder '" + ( output.getAbsolutePath ( ) ) ) + "' for jack files cannot be written to or read from." ) ) ; } }

Target:
private void checkOutputDir ( ) throws com.android.jill.IllegalOptionsException { assert ( output ) != null ; java.io.File output = getOutput ( ) ; if ( ! ( output.exists ( ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( output.getName ( ) ) + " does not exist." ) ) ; } if ( ( ! ( output.canRead ( ) ) ) || ( ! ( output.canWrite ( ) ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( "The specified output folder '" + ( output.getAbsolutePath ( ) ) ) + "' for jack files cannot be written to or read from." ) ) ; } }
Source:
public int hashCode ( ) { int hashCode = 1 ; for ( java.lang.Object x : getArray ( ) ) hashCode = ( 31 * hashCode ) + ( x == null ? 0 : x.hashCode ( ) ) ; return hashCode ; }

Target:
public boolean retainAll ( java.util.Collection < ? > collection ) { synchronized ( this ) { slice.checkConcurrentModification ( elements ) ; int removed = removeOrRetain ( collection , true , slice.from , slice.to ) ; slice = new java.util.concurrent.CopyOnWriteArrayList.Slice ( elements , slice.from , ( ( slice.to ) - removed ) ) ; return removed != 0 ; } }
Source:
private void updateBrandingText ( com.android.dialer.voicemail.model.VoicemailEntry voicemailEntry ) { if ( ( ( voicemailEntry.transcriptionState ( ) ) == ( com.android.dialer.compat.android.provider.VoicemailCompat.TRANSCRIPTION_AVAILABLE ) ) && ( ! ( android.text.TextUtils.isEmpty ( voicemailEntry.transcription ( ) ) ) ) ) { transcriptionBrandingTextView.setVisibility ( android.view.View.VISIBLE ) ; } else { transcriptionBrandingTextView.setVisibility ( android.view.View.GONE ) ; } }

Target:
private void updateBrandingText ( com.android.dialer.voicemail.model.VoicemailEntry voicemailEntry ) { if ( ( ( voicemailEntry.getTranscriptionState ( ) ) == ( com.android.dialer.compat.android.provider.VoicemailCompat.TRANSCRIPTION_AVAILABLE ) ) && ( ! ( android.text.TextUtils.isEmpty ( voicemailEntry.getTranscription ( ) ) ) ) ) { transcriptionBrandingTextView.setVisibility ( android.view.View.VISIBLE ) ; } else { transcriptionBrandingTextView.setVisibility ( android.view.View.GONE ) ; } }
Source:
public static com.intellij.psi.search.GlobalSearchScope addNonClasspathScope ( com.intellij.openapi.project.Project project , com.intellij.psi.search.GlobalSearchScope base ) { com.intellij.psi.search.GlobalSearchScope scope = base ; for ( com.intellij.psi.PsiElementFinder finder : com.intellij.openapi.extensions.Extensions.getExtensions ( com.intellij.psi.EP_NAME , project ) ) { if ( finder instanceof com.intellij.psi.NonClasspathClassFinder ) { scope = scope.uniteWith ( com.intellij.psi.search.NonClasspathDirectoryScope.compose ( ( ( com.intellij.psi.NonClasspathClassFinder ) ( finder ) ) . getClassRoots ( ) ) ) ; } } return scope ; }

Target:
public static com.intellij.psi.search.GlobalSearchScope addNonClasspathScope ( com.intellij.openapi.project.Project project , com.intellij.psi.search.GlobalSearchScope base ) { com.intellij.psi.search.GlobalSearchScope scope = base ; for ( com.intellij.psi.PsiElementFinder finder : com.intellij.openapi.extensions.Extensions.getExtensions ( com.intellij.psi.EP_NAME , project ) ) { if ( finder instanceof com.intellij.psi.NonClasspathClassFinder ) { scope = scope.uniteWith ( com.intellij.psi.search.NonClasspathDirectoriesScope.compose ( ( ( com.intellij.psi.NonClasspathClassFinder ) ( finder ) ) . getClassRoots ( ) ) ) ; } } return scope ; }
Source:
public float getXDpi ( ) { if ( ( mState.device ) != null ) { float dpi = mState.device.getXDpi ( ) ; if ( ( java.lang.Float.isNaN ( dpi ) ) == false ) { return dpi ; } } return getDensity ( ) . getDpiValue ( ) ; }

Target:
public float getYDpi ( ) { if ( ( mState.device ) != null ) { com.android.sdklib.devices.State currState = mState.device.getState ( mState.stateName ) ; if ( currState == null ) { currState = mState.device.getDefaultState ( ) ; } float dpi = ( ( float ) ( currState.getHardware ( ) . getScreen ( ) . getYdpi ( ) ) ) ; if ( ( java.lang.Float.isNaN ( dpi ) ) == false ) { return dpi ; } } return getDensity ( ) . getDpiValue ( ) ; }
Source:
public boolean equals ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object instanceof com.google.common.collect.Multimap ) { com.google.common.collect.Multimap < ? , ? > that = ( ( com.google.common.collect.Multimap < ? , ? > ) ( object ) ) ; return this . map.equals ( that.asMap ( ) ) ; } return false ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object object ) { return multimap.containsValue ( object ) ; }
Source:
public void testGroupingSizeZero ( ) { java.util.Locale localeWithoutGrouping = new java.util.Locale ( "hy" ) ; java.text.DecimalFormat decimalFormat = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( localeWithoutGrouping ) ) ) ; assertEquals ( 0 , decimalFormat.getGroupingSize ( ) ) ; assertFalse ( decimalFormat.isGroupingUsed ( ) ) ; java.text.DecimalFormatSymbols symbols = decimalFormat.getDecimalFormatSymbols ( ) ; assertTrue ( ( ( symbols.getGroupingSeparator ( ) ) != '' ) ) ; java.util.Formatter formatter = new java.util.Formatter ( localeWithoutGrouping ) ; formatter.format ( "%,d" , 123456789 ) ; }

Target:
public void testGroupingSizeZero ( ) { java.util.Locale localeWithoutGrouping = new java.util.Locale ( "en" , "US" , "POSIX" ) ; java.text.DecimalFormat decimalFormat = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( localeWithoutGrouping ) ) ) ; assertEquals ( 0 , decimalFormat.getGroupingSize ( ) ) ; assertFalse ( decimalFormat.isGroupingUsed ( ) ) ; java.text.DecimalFormatSymbols symbols = decimalFormat.getDecimalFormatSymbols ( ) ; assertTrue ( ( ( symbols.getGroupingSeparator ( ) ) != '' ) ) ; java.util.Formatter formatter = new java.util.Formatter ( localeWithoutGrouping ) ; formatter.format ( "%,d" , 123456789 ) ; }
Source:
final void putUnchecked ( int pos , long [ ] src , int srcOffset , int length ) { libcore.io.Memory.pokeLongArray ( ix ( pos ) , src , srcOffset , length , ( ! ( nativeByteOrder ) ) ) ; }

Target:
final void putUnchecked ( int pos , long [ ] src , int srcOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.pokeLongArray ( ix ( pos ) , src , srcOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
public void onLoadFinished ( android.support.v4.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailFragment.onCreateLoader" , "cursor size is %d" , data.getCount ( ) ) ; recyclerView.setLayoutManager ( new android.support.v7.widget.LinearLayoutManager ( getContext ( ) ) ) ; recyclerView.setAdapter ( new com.android.dialer.voicemail.listui.NewVoicemailAdapter ( data ) ) ; }

Target:
public void onLoadFinished ( android.support.v4.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailFragment.onCreateLoader" , "cursor size is %d" , data.getCount ( ) ) ; recyclerView.setLayoutManager ( new android.support.v7.widget.LinearLayoutManager ( getContext ( ) ) ) ; recyclerView.setAdapter ( new com.android.dialer.voicemail.listui.NewVoicemailAdapter ( data , java.lang.System :: currentTimeMillis ) ) ; }
Source:
public java.util.Set < java.lang.String > getDensityFilters ( ) { com.android.resources.Density [ ] values = com.android.resources.Density.values ( ) ; java.util.Set < java.lang.String > fullList = com.google.common.collect.Sets.newHashSetWithExpectedSize ( ( ( values.length ) - 1 ) ) ; for ( com.android.resources.Density value : values ) { if ( value != ( com.android.resources.Density.NODPI ) ) { fullList.add ( value.getResourceValue ( ) ) ; } } return density.getApplicableFilters ( fullList ) ; }

Target:
public java.util.Set < java.lang.String > getDensityFilters ( ) { com.android.resources.Density [ ] values = com.android.resources.Density.values ( ) ; java.util.Set < java.lang.String > fullList = com.google.common.collect.Sets.newHashSetWithExpectedSize ( ( ( values.length ) - 1 ) ) ; for ( com.android.resources.Density value : values ) { if ( ( value != ( com.android.resources.Density.NODPI ) ) && ( value.isRecommended ( ) ) ) { fullList.add ( value.getResourceValue ( ) ) ; } } return density.getApplicableFilters ( fullList ) ; }
Source:
public java.lang.String getToolTipText ( java.awt.event.MouseEvent event ) { if ( ( ( mTraceData ) == null ) || ( ( mCallHierarchyRenderer ) == null ) ) { return null ; } mTmpPoint.setLocation ( event.getPoint ( ) ) ; mViewPortInverseTransform.transform ( mTmpPoint , mTmpPoint ) ; return mCallHierarchyRenderer.getToolTipFor ( mTmpPoint.x , mTmpPoint.y ) ; }

Target:
public java.lang.String getToolTipText ( java.awt.event.MouseEvent event ) { if ( ( ( mTraceData ) == null ) || ( ( mCallHierarchyRenderer ) == null ) ) { return null ; } mTmpPoint.setLocation ( event.getPoint ( ) ) ; mViewPortInverseTransform.transform ( mTmpPoint , mTmpPoint ) ; return mCallHierarchyRenderer.getToolTipFor ( mTmpPoint.getX ( ) , mTmpPoint.getY ( ) ) ; }
Source:
public static void print ( java.lang.String [ ] stack ) { java.lang.System.out.println ( "---------" ) ; for ( int i = 0 ; i < ( stack.length ) ; i += 2 ) { java.lang.System.out.print ( ' ' ) ; java.lang.System.out.print ( stack [ i ] ) ; java.lang.System.out.print ( ' ' ) ; java.lang.System.out.println ( stack [ ( i + 1 ) ] ) ; } }

Target:
public static void print ( java.lang.String [ ] [ ] stack ) { java.lang.System.out.println ( "---------" ) ; for ( java.lang.String [ ] stackElement : stack ) { for ( java.lang.String part : stackElement ) { java.lang.System.out.print ( ' ' ) ; java.lang.System.out.print ( part ) ; } java.lang.System.out.println ( ) ; } }
Source:
public void onNewPicture ( android.graphics.Picture picture ) { if ( ( mPictureListener ) == null ) return ; org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onNewPicture" ) ; mPictureListener.onNewPicture ( mWebView , picture ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onNewPicture ( android.graphics.Picture picture ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onNewPicture" ) ; if ( ( mPictureListener ) == null ) return ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onNewPicture" ) ; mPictureListener.onNewPicture ( mWebView , picture ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onNewPicture" ) ; } }
Source:
public void testEnsureFileDoesNotExist_noPermission ( ) throws java.lang.Exception { java.io.File dir = createTempDir ( ) ; java.io.File protectedDir = createDir ( dir , "protected" ) ; java.io.File undeletable = createRegularFile ( protectedDir , "undeletable" ) ; assertTrue ( protectedDir.setWritable ( false ) ) ; assertTrue ( undeletable.exists ( ) ) ; try { libcore.tzdata.update2.FileUtils.ensureFileDoesNotExist ( undeletable ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } finally { assertTrue ( protectedDir.setWritable ( true ) ) ; } assertTrue ( undeletable.exists ( ) ) ; }

Target:
public void testEnsureFileDoesNotExist_noPermission ( ) throws java.lang.Exception { java.io.File dir = createTempDir ( ) ; java.io.File protectedDir = createDir ( dir , "protected" ) ; java.io.File undeletable = createRegularFile ( protectedDir , "undeletable" ) ; assertTrue ( protectedDir.setWritable ( false ) ) ; assertTrue ( undeletable.exists ( ) ) ; try { libcore.tzdata.shared2.FileUtils.ensureFileDoesNotExist ( undeletable ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } finally { assertTrue ( protectedDir.setWritable ( true ) ) ; } assertTrue ( undeletable.exists ( ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "{ audioQuality=" + ( mAudioQuality ) ) + ", audioDirection=" ) + ( mAudioDirection ) ) + ", videoQuality=" ) + ( mVideoQuality ) ) + ", videoDirection=" ) + ( mVideoDirection ) ) + " }" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "{ audioQuality=" + ( mAudioQuality ) ) + ", audioDirection=" ) + ( mAudioDirection ) ) + ", videoQuality=" ) + ( mVideoQuality ) ) + ", videoDirection=" ) + ( mVideoDirection ) ) + ", rttMode=" ) + ( mRttMode ) ) + " }" ; }
Source:
public void testRewriteGradleMessages ( ) { java.lang.String original = "error example\ntwo line error\nnext line\nsomething else" ; java.lang.String rewriten = mGradleMessageRewriter.rewriteMessages ( original ) ; java.lang.String expected = "{\"kind\":\"ERROR\",\"text\":\"errorText\",\"sourcePath\":\"error/source\"," + ( ( ( ( ( ( "\"position\":{\"startLine\":1,\"startColumn\":2,\"startOffset\":3," + "\"endLine\":4,\"endColumn\":5,\"endOffset\":6},\"original\":\"\"}\n" ) + "{\"kind\":\"WARNING\",\"text\":" ) + "\"two line warning\",\"sourcePath\":\"sourcePath\"," ) + "\"position\":{\"startLine\":1,\"startColumn\":2},\"original\":\"\"}\n" ) + "{\"kind\":\"SIMPLE\"," ) + "\"text\":\"something else\",\"position\":{},\"original\":\"something else\"}" ) ; assertEquals ( expected.trim ( ) , rewriten.trim ( ) ) ; }

Target:
public void testRewriteGradleMessages ( ) { java.lang.String original = "error example\ntwo line error\nnext line\nsomething else" ; java.lang.String rewriten = mGradleMessageRewriter.rewriteMessages ( original ) ; java.lang.String expected = "Android Gradle Plugin - Build Issue: " + ( ( ( ( ( ( ( "{\"kind\":\"ERROR\",\"text\":\"errorText\",\"sourcePath\":\"error/source\"," + "\"position\":{\"startLine\":1,\"startColumn\":2,\"startOffset\":3," ) + "\"endLine\":4,\"endColumn\":5,\"endOffset\":6},\"original\":\"\"}\n" ) + "Android Gradle Plugin - Build Issue: {\"kind\":\"WARNING\",\"text\":" ) + "\"two line warning\",\"sourcePath\":\"sourcePath\"," ) + "\"position\":{\"startLine\":1,\"startColumn\":2},\"original\":\"\"}\n" ) + "Android Gradle Plugin - Build Issue: {\"kind\":\"SIMPLE\"," ) + "\"text\":\"something else\",\"position\":{},\"original\":\"something else\"}" ) ; assertEquals ( expected.trim ( ) , rewriten.trim ( ) ) ; }
Source:
protected void onOrientationChange ( ) { int index = mOrientation.getSelectionIndex ( ) ; if ( index != ( - 1 ) ) { mSelectedConfiguration.setScreenOrientationQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.ScreenOrientationQualifier ( com.android.resources.ScreenOrientation.getByIndex ( index ) ) ) ; } else { mSelectedConfiguration.setScreenOrientationQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.ScreenOrientationQualifier ( ) ) ; } onChange ( true ) ; }

Target:
protected void onOrientationChange ( ) { int index = mOrientation.getSelectionIndex ( ) ; if ( index != ( - 1 ) ) { mSelectedConfiguration.setScreenOrientationQualifier ( new com.android.ide.common.resources.configuration.ScreenOrientationQualifier ( com.android.resources.ScreenOrientation.getByIndex ( index ) ) ) ; } else { mSelectedConfiguration.setScreenOrientationQualifier ( new com.android.ide.common.resources.configuration.ScreenOrientationQualifier ( ) ) ; } onChange ( true ) ; }
Source:
private synchronized void initGenericTypes ( ) { if ( ! ( genericTypesAreInitialized ) ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; org.apache.harmony.luni.lang.reflect.GenericSignatureParser parser = new org.apache.harmony.luni.lang.reflect.GenericSignatureParser ( declaringClass.getClassLoader ( ) ) ; parser.parseForConstructor ( this , signatureAttribute , exceptionTypes ) ; formalTypeParameters = parser.formalTypeParameters ; genericParameterTypes = parser.parameterTypes ; genericExceptionTypes = parser.exceptionTypes ; genericTypesAreInitialized = true ; } }

Target:
private synchronized void initGenericTypes ( ) { if ( ! ( genericTypesAreInitialized ) ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( declaringClass.getClassLoader ( ) ) ; parser.parseForConstructor ( this , signatureAttribute , exceptionTypes ) ; formalTypeParameters = parser.formalTypeParameters ; genericParameterTypes = parser.parameterTypes ; genericExceptionTypes = parser.exceptionTypes ; genericTypesAreInitialized = true ; } }
Source:
private android.hardware.cts.helpers.sensorverification.MeanVerification getVerification ( float [ ] expected , float [ ] threshold , float [ ] ... values ) { android.hardware.cts.helpers.sensorverification.MeanVerification verification = new android.hardware.cts.helpers.sensorverification.MeanVerification ( expected , threshold ) ; for ( float [ ] value : values ) { verification.addSensorEvent ( new android.hardware.cts.helpers.TestSensorEvent ( null , 0 , 0 , value ) ) ; } return verification ; }

Target:
private static android.hardware.cts.helpers.sensorverification.MeanVerification getVerification ( float [ ] expected , float [ ] threshold , float [ ] ... values ) { java.util.Collection < android.hardware.cts.helpers.TestSensorEvent > events = new java.util.ArrayList < > ( values.length ) ; for ( float [ ] value : values ) { events.add ( new android.hardware.cts.helpers.TestSensorEvent ( null , 0 , 0 , value ) ) ; } android.hardware.cts.helpers.sensorverification.MeanVerification verification = new android.hardware.cts.helpers.sensorverification.MeanVerification ( expected , threshold ) ; verification.addSensorEvents ( events ) ; return verification ; }
Source:
public boolean hasIccCard ( ) { return hasIccCardUsingSlotId ( mSubscriptionController.getSlotId ( getDefaultSubscription ( ) ) ) ; }

Target:
public boolean hasIccCardUsingSlotIndex ( int slotIndex ) { int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( ( subId != null ) && ( phone != null ) ) { return phone.getIccCard ( ) . hasIccCard ( ) ; } else { return false ; } }
Source:
private static void maybeReportIssue ( int flagValue , com.android.tools.lint.detector.api.JavaContext context , lombok.ast.MethodInvocation node ) { if ( ( flagValue & ( com.android.tools.lint.checks.GetSignaturesDetector.GET_SIGNATURES_FLAG ) ) != 0 ) { context.report ( com.android.tools.lint.checks.GetSignaturesDetector.ISSUE , node , context.getLocation ( node.astArguments ( ) . last ( ) ) , ( "Reading app signatures from getPackageInfo: The app signatures " + ( "could be exploited if not validated properly; " + "see issue explanation for details." ) ) ) ; } }

Target:
private static void maybeReportIssue ( int flagValue , com.android.tools.lint.detector.api.JavaContext context , com.intellij.psi.PsiMethodCallExpression node , com.intellij.psi.PsiExpression last ) { if ( ( flagValue & ( com.android.tools.lint.checks.GetSignaturesDetector.GET_SIGNATURES_FLAG ) ) != 0 ) { context.report ( com.android.tools.lint.checks.GetSignaturesDetector.ISSUE , node , context.getLocation ( last ) , ( "Reading app signatures from getPackageInfo: The app signatures " + ( "could be exploited if not validated properly; " + "see issue explanation for details." ) ) ) ; } }
Source:
protected java.io.FileDescriptor createSocket ( ) { java.io.FileDescriptor s = null ; try { s = android.system.Os.socket ( android.net.util.AF_INET6 , android.net.util.SOCK_DGRAM , android.net.util.IPPROTO_UDP ) ; android.system.Os.bind ( s , android.net.util.BlockingSocketReaderTest.LOOPBACK6 , 0 ) ; mLocalSockName = ( ( java.net.InetSocketAddress ) ( android.system.Os.getsockname ( s ) ) ) ; android.system.Os.setsockoptTimeval ( s , android.net.util.SOL_SOCKET , android.net.util.SO_SNDTIMEO , android.net.util.BlockingSocketReaderTest.TIMEO ) ; } catch ( android.system.ErrnoException | java.net.SocketException e ) { closeSocket ( s ) ; fail ( ) ; return null ; } mLocalSocket = s ; return s ; }

Target:
protected java.io.FileDescriptor createFd ( ) { java.io.FileDescriptor s = null ; try { s = android.system.Os.socket ( android.net.util.AF_INET6 , android.net.util.SOCK_DGRAM , android.net.util.IPPROTO_UDP ) ; android.system.Os.bind ( s , android.net.util.BlockingSocketReaderTest.LOOPBACK6 , 0 ) ; mLocalSockName = ( ( java.net.InetSocketAddress ) ( android.system.Os.getsockname ( s ) ) ) ; android.system.Os.setsockoptTimeval ( s , android.net.util.SOL_SOCKET , android.net.util.SO_SNDTIMEO , android.net.util.BlockingSocketReaderTest.TIMEO ) ; } catch ( android.system.ErrnoException | java.net.SocketException e ) { closeFd ( s ) ; fail ( ) ; return null ; } mLocalSocket = s ; return s ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { mContext = context ; if ( CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED.equals ( intent.getAction ( ) ) ) { if ( com.android.phone.otasp.OtaspSimStateReceiver.DBG ) com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "Received intent: " + ( intent.getAction ( ) ) ) ) ; final android.telephony.TelephonyManager telephonyManager = ( ( android.telephony.TelephonyManager ) ( context.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; telephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_OTASP_CHANGED ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { mContext = context ; if ( CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED.equals ( intent.getAction ( ) ) ) { if ( com.android.phone.otasp.OtaspSimStateReceiver.DBG ) com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "Received intent: " + ( intent.getAction ( ) ) ) ) ; if ( ( com.android.phone.PhoneGlobals.getPhone ( ) . getIccRecordsLoaded ( ) ) && ( com.android.phone.otasp.OtaspSimStateReceiver.isCarrierSupported ( ) ) ) { final android.telephony.TelephonyManager telephonyManager = android.telephony.TelephonyManager.from ( context ) ; telephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_OTASP_CHANGED ) ; } } }
Source:
private com.android.jack.ir.ast.JMethod createStaticInitializer ( com.android.jack.ir.sourceinfo.SourceInfo info , com.android.jack.ir.ast.JDefinedClassOrInterface enclosingType ) { int modifier = ( com.android.jack.ir.ast.JModifier.STATIC ) | ( com.android.jack.ir.ast.JModifier.STATIC_INIT ) ; com.android.jack.ir.ast.JMethod method = new com.android.jack.ir.ast.JMethod ( info , new com.android.jack.ir.ast.JMethodId ( com.android.jack.util.NamingTools.STATIC_INIT_NAME , com.android.jack.ir.ast.MethodKind.STATIC ) , enclosingType , JPrimitiveTypeEnum.VOID.getType ( ) , modifier ) ; method.setBody ( new com.android.jack.ir.ast.JMethodBody ( info , new com.android.jack.ir.ast.JBlock ( info ) ) ) ; enclosingType.addMethod ( method ) ; method.updateParents ( enclosingType ) ; return method ; }

Target:
private com.android.jack.ir.ast.JMethod createStaticInitializer ( com.android.jack.ir.sourceinfo.SourceInfo info , com.android.jack.ir.ast.JDefinedClassOrInterface enclosingType ) { int modifier = ( com.android.jack.ir.ast.JModifier.STATIC ) | ( com.android.jack.ir.ast.JModifier.STATIC_INIT ) ; com.android.jack.ir.ast.JMethod method = new com.android.jack.ir.ast.JMethod ( info , new com.android.jack.ir.ast.JMethodId ( new com.android.jack.ir.ast.JMethodIdWide ( com.android.jack.util.NamingTools.STATIC_INIT_NAME , com.android.jack.ir.ast.MethodKind.STATIC ) , JPrimitiveTypeEnum.VOID.getType ( ) ) , enclosingType , modifier ) ; method.setBody ( new com.android.jack.ir.ast.JMethodBody ( info , new com.android.jack.ir.ast.JBlock ( info ) ) ) ; enclosingType.addMethod ( method ) ; method.updateParents ( enclosingType ) ; return method ; }
Source:
public com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput getTagletOutput ( com.sun.javadoc.Doc holder , com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter writer ) throws java.lang.IllegalArgumentException { com.sun.tools.doclets.internal.toolkit.taglets.TagletOutput out = writer.getTagletOutputInstance ( ) ; com.sun.javadoc.Tag [ ] tags = holder.tags ( getName ( ) ) ; if ( ( tags.length ) == 0 ) { return null ; } out.setOutput ( toString ( tags [ 0 ] ) ) ; return out ; }

Target:
public com.sun.tools.doclets.internal.toolkit.Content getTagletOutput ( com.sun.javadoc.Doc holder , com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter writer ) throws java.lang.IllegalArgumentException { com.sun.tools.doclets.internal.toolkit.Content out = writer.getOutputInstance ( ) ; com.sun.javadoc.Tag [ ] tags = holder.tags ( getName ( ) ) ; if ( ( tags.length ) == 0 ) { return null ; } java.lang.String encodedText = toString ( tags [ 0 ] ) ; if ( encodedText == null ) return null ; out.addContent ( new com.sun.tools.doclets.formats.html.markup.RawHtml ( encodedText ) ) ; return out ; }