auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.android.bluetooth.pbap.BluetoothPbapService getService ( java.lang.String perm ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { mService.enforceCallingOrSelfPermission ( perm , ( ( "Need " + perm ) + " permission" ) ) ; return mService ; } return null ; }

Target:
private com.android.bluetooth.pbap.BluetoothPbapService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }
Source:
private int getParameterSize ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int paramSize = 0 ; if ( ! ( method.isStatic ( ) ) ) { paramSize += 1 ; } for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( param.getType ( ) . isSameType ( JPrimitiveTypeEnum.LONG.getType ( ) ) ) || ( param.getType ( ) . isSameType ( JPrimitiveTypeEnum.DOUBLE.getType ( ) ) ) ) { paramSize += 2 ; } else { paramSize += 1 ; } } return paramSize ; }

Target:
private int getParameterSize ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { int paramSize = 0 ; if ( ! ( method.isStatic ( ) ) ) { paramSize += 1 ; } for ( com.android.jack.ir.ast.JParameter param : method.getParams ( ) ) { if ( ( ( param.getType ( ) ) == ( JPrimitiveTypeEnum.LONG.getType ( ) ) ) || ( ( param.getType ( ) ) == ( JPrimitiveTypeEnum.DOUBLE.getType ( ) ) ) ) { paramSize += 2 ; } else { paramSize += 1 ; } } return paramSize ; }
Source:
public final java.nio.ByteBuffer putChar ( char x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putChar ( ix ( nextPutIndex ( SizeOf.CHAR ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putChar ( char x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putChar ( ix ( nextPutIndex ( SizeOf.CHAR ) ) , x ) ; return this ; }
Source:
public void test_read$BII3 ( ) throws java.io.IOException { java.io.File resources = tests.support.resource.Support_Resources.createTempFolder ( ) ; tests.support.resource.Support_Resources.copyFile ( resources , null , "Broken_manifest.jar" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( new java.io.File ( resources , "Broken_manifest.jar" ) ) ; java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( fis ) ; byte [ ] outBuf = new byte [ 530 ] ; try { iis.read ( ) ; fail ( "IOException expected." ) ; } catch ( java.io.IOException ee ) { } }

Target:
public void test_read$BII3 ( ) throws java.io.IOException { java.io.File resources = tests.support.resource.Support_Resources.createTempFolder ( ) ; tests.support.resource.Support_Resources.copyFile ( resources , null , "Broken_manifest.jar" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( new java.io.File ( resources , "Broken_manifest.jar" ) ) ; try ( java.util.zip.InflaterInputStream iis = new java.util.zip.InflaterInputStream ( fis ) ) { try { iis.read ( ) ; fail ( "IOException expected." ) ; } catch ( java.io.IOException ee ) { } } }
Source:
public static com.android.builder.model.ApiVersion create ( @ com.android.annotations.NonNull java.lang.Object value ) { if ( value instanceof java.lang.Integer ) { return new com.android.builder.core.DefaultApiVersion ( ( ( java.lang.Integer ) ( value ) ) , null ) ; } else if ( value instanceof java.lang.String ) { return new com.android.builder.core.DefaultApiVersion ( 1 , ( ( java.lang.String ) ( value ) ) ) ; } return null ; }

Target:
public static com.android.builder.model.ApiVersion create ( @ com.android.annotations.NonNull java.lang.Object value ) { if ( value instanceof java.lang.Integer ) { return new com.android.builder.core.DefaultApiVersion ( ( ( java.lang.Integer ) ( value ) ) , null ) ; } else if ( value instanceof java.lang.String ) { return new com.android.builder.core.DefaultApiVersion ( 1 , ( ( java.lang.String ) ( value ) ) ) ; } return new com.android.builder.core.DefaultApiVersion ( 1 , null ) ; }
Source:
public int hashCode ( ) { int result ; result = ( ( myPropertyName ) != null ) ? myPropertyName.hashCode ( ) : 0 ; result = ( 29 * result ) + ( ( myPropertyType ) != null ? myPropertyType.hashCode ( ) : 0 ) ; return result ; }

Target:
public int hashCode ( ) { return ( myPropertyName ) != null ? myPropertyName.hashCode ( ) : 0 ; }
Source:
public void onItemClick ( android.widget.AdapterView < ? > parent , android.view.View view , int position , long id ) { if ( ( mRecipientsEditor.getRecipientCount ( ) ) == 1 ) { final android.view.inputmethod.InputMethodManager inputManager = ( ( android.view.inputmethod.InputMethodManager ) ( getSystemService ( Context.INPUT_METHOD_SERVICE ) ) ) ; if ( ( inputManager == null ) || ( ! ( inputManager.isFullscreenMode ( ) ) ) ) { mTextEditor.requestFocus ( ) ; } } }

Target:
public void run ( ) { if ( ( mRecipientsEditor.getRecipientCount ( ) ) == 1 ) { final android.view.inputmethod.InputMethodManager inputManager = ( ( android.view.inputmethod.InputMethodManager ) ( getSystemService ( Context.INPUT_METHOD_SERVICE ) ) ) ; if ( ( inputManager == null ) || ( ! ( inputManager.isFullscreenMode ( ) ) ) ) { mTextEditor.requestFocus ( ) ; } } }
Source:
public static java.util.Locale getDefault ( java.util.Locale.Category category ) { switch ( category ) { case DISPLAY : if ( ( java.util.Locale.defaultDisplayLocale ) == null ) { java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultDisplayLocale ; case FORMAT : if ( ( java.util.Locale.defaultFormatLocale ) == null ) { java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultFormatLocale ; default : assert false : "Unknown Category" ; } return java.util.Locale.getDefault ( ) ; }

Target:
public static java.util.Locale getDefault ( java.util.Locale.Category category ) { switch ( category ) { case DISPLAY : if ( ( java.util.Locale.defaultDisplayLocale ) == null ) { java.util.Locale.defaultDisplayLocale = java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultDisplayLocale ; case FORMAT : if ( ( java.util.Locale.defaultFormatLocale ) == null ) { java.util.Locale.defaultFormatLocale = java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultFormatLocale ; default : assert false : "Unknown Category" ; } return java.util.Locale.getDefault ( ) ; }
Source:
public android.content.ClipDescription getPrimaryClipDescription ( java.lang.String callingPackage ) { synchronized ( this ) { if ( ( ! ( clipboardAccessAllowed ( AppOpsManager.OP_READ_CLIPBOARD , callingPackage , android.os.Binder.getCallingUid ( ) ) ) ) || ( isDeviceLocked ( ) ) ) { return null ; } com.android.server.clipboard.ClipboardService.PerUserClipboard clipboard = getClipboard ( ) ; return ( clipboard.primaryClip ) != null ? clipboard.primaryClip.getDescription ( ) : null ; } }

Target:
public android.content.ClipDescription getPrimaryClipDescription ( java.lang.String callingPackage ) { synchronized ( this ) { if ( ! ( clipboardAccessAllowed ( AppOpsManager.OP_READ_CLIPBOARD , callingPackage , android.os.Binder.getCallingUid ( ) ) ) ) { return null ; } com.android.server.clipboard.ClipboardService.PerUserClipboard clipboard = getClipboard ( ) ; return ( clipboard.primaryClip ) != null ? clipboard.primaryClip.getDescription ( ) : null ; } }
Source:
public static void initDebugBridge ( java.lang.String adbLocation ) { if ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) { com.android.ddmlib.AndroidDebugBridge.init ( false ) ; } if ( ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) || ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge.isConnected ( ) ) ) ) { com.android.hierarchyviewerlib.device.DeviceBridge.sBridge = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbLocation , true ) ; } }

Target:
public static void initDebugBridge ( java.lang.String adbLocation ) { if ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) { com.android.ddmlib.AndroidDebugBridge.init ( true ) ; } if ( ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) || ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge.isConnected ( ) ) ) ) { com.android.hierarchyviewerlib.device.DeviceBridge.sBridge = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbLocation , true ) ; } }
Source:
public void deviceRemoved ( com.android.server.midi.MidiService.Device device ) { if ( ! ( device.isUidAllowed ( mUid ) ) ) return ; android.media.midi.MidiDeviceInfo deviceInfo = device.getDeviceInfo ( ) ; try { for ( android.media.midi.IMidiDeviceListener listener : mListeners ) { listener.onDeviceRemoved ( deviceInfo ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.midi.MidiService.TAG , "remote exception" , e ) ; } }

Target:
public void deviceRemoved ( com.android.server.midi.MidiService.Device device ) { if ( ! ( device.isUidAllowed ( mUid ) ) ) return ; android.media.midi.MidiDeviceInfo deviceInfo = device.getDeviceInfo ( ) ; try { for ( android.media.midi.IMidiDeviceListener listener : mListeners.values ( ) ) { listener.onDeviceRemoved ( deviceInfo ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.midi.MidiService.TAG , "remote exception" , e ) ; } }
Source:
public void testProcessChldTypeReleaseHeldRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . rejectCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.eq ( false ) , org.mockito.ArgumentMatchers.nullable ( java.lang.String.class ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldTypeReleaseHeldRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . rejectCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.eq ( false ) , org.mockito.ArgumentMatchers.nullable ( java.lang.String.class ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public void pnoRetryForLowRssiNetwork ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; int lowRssiNetworkRetryDelayStartValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; int lowRssiNetworkRetryDelayAfterPnoValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; assertEquals ( ( lowRssiNetworkRetryDelayStartValue * 2 ) , lowRssiNetworkRetryDelayAfterPnoValue ) ; }

Target:
public void pnoRetryForLowRssiNetwork ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; int lowRssiNetworkRetryDelayStartValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; int lowRssiNetworkRetryDelayAfterPnoValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; assertEquals ( ( lowRssiNetworkRetryDelayStartValue * 2 ) , lowRssiNetworkRetryDelayAfterPnoValue ) ; }
Source:
private void testExplicitPositionMatchParentNoLimits ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = WindowManager.LayoutParams.MATCH_PARENT ; params.height = WindowManager.LayoutParams.MATCH_PARENT ; params.gravity = ( android.view.Gravity.LEFT ) | ( android.view.Gravity.TOP ) ; params.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS ; } ) ; }

Target:
private void testExplicitPositionMatchParentNoLimits ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = WindowManager.LayoutParams.MATCH_PARENT ; params.height = WindowManager.LayoutParams.MATCH_PARENT ; params.gravity = ( android.view.Gravity.LEFT ) | ( android.view.Gravity.TOP ) ; params.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS ; params.x = 100 ; params.y = 100 ; } ) ; }
Source:
public java.lang.String getTrimmedSSID ( ) { for ( int n = 0 ; n < ( mSSID.length ( ) ) ; n ++ ) { if ( ( mSSID.charAt ( n ) ) != 0 ) { return mSSID ; } } return "" ; }

Target:
public java.lang.String getTrimmedSSID ( ) { if ( ( mSSID ) != null ) { for ( int n = 0 ; n < ( mSSID.length ( ) ) ; n ++ ) { if ( ( mSSID.charAt ( n ) ) != 0 ) { return mSSID ; } } } return "" ; }
Source:
public void testAlgorithmParameters ( ) { java.security.AlgorithmParameters algorithmParameters = null ; try { algorithmParameters = java.security.AlgorithmParameters.getInstance ( algorithmName ) ; } catch ( java.security.NoSuchAlgorithmException e ) { fail ( e.getMessage ( ) ) ; } try { algorithmParameters.init ( parameterData ) ; } catch ( java.security.spec.InvalidParameterSpecException e ) { fail ( e.getMessage ( ) ) ; } helper.test ( algorithmParameters ) ; }

Target:
public void testAlgorithmParameters ( ) throws java.lang.Exception { java.security.AlgorithmParameters algorithmParameters = java.security.AlgorithmParameters.getInstance ( algorithmName ) ; algorithmParameters.init ( parameterData ) ; helper.test ( algorithmParameters ) ; }
Source:
public int compare ( java.lang.Class < ? > o1 , java.lang.Class < ? > o2 ) { com.google.common.base.Preconditions.checkArgument ( o1.isInterface ( ) ) ; com.google.common.base.Preconditions.checkArgument ( o2.isInterface ( ) ) ; if ( o1 == o2 ) { return 0 ; } if ( o1.isAssignableFrom ( o2 ) ) { return 1 ; } if ( o2.isAssignableFrom ( o1 ) ) { return - 1 ; } return o1.getName ( ) . compareTo ( o2.getName ( ) ) ; }

Target:
public int compare ( java.lang.Class < ? > o1 , java.lang.Class < ? > o2 ) { if ( o1 == o2 ) { return 0 ; } if ( o1.isAssignableFrom ( o2 ) ) { return 1 ; } if ( o2.isAssignableFrom ( o1 ) ) { return - 1 ; } return o1.getName ( ) . compareTo ( o2.getName ( ) ) ; }
Source:
public void setAppGroupId ( android.os.IBinder token , int groupId ) { if ( ! ( checkCallingPermission ( android.Manifest.permission.MANAGE_APP_TOKENS , "setAppStartingIcon()" ) ) ) { throw new java.lang.SecurityException ( "Requires MANAGE_APP_TOKENS permission" ) ; } synchronized ( mWindowMap ) { com.android.server.WindowManagerService.AppWindowToken wtoken = findAppWindowToken ( token ) ; if ( wtoken == null ) { android.util.Log.w ( com.android.server.WindowManagerService.TAG , ( "Attempted to set group id of non-existing app token: " + token ) ) ; return ; } wtoken.groupId = groupId ; } }

Target:
public void setAppGroupId ( android.os.IBinder token , int groupId ) { if ( ! ( checkCallingPermission ( android.Manifest.permission.MANAGE_APP_TOKENS , "setAppStartingIcon()" ) ) ) { throw new java.lang.SecurityException ( "Requires MANAGE_APP_TOKENS permission" ) ; } synchronized ( mWindowMap ) { com.android.server.WindowManagerService.AppWindowToken wtoken = findAppWindowToken ( token ) ; if ( wtoken == null ) { android.util.Slog.w ( com.android.server.WindowManagerService.TAG , ( "Attempted to set group id of non-existing app token: " + token ) ) ; return ; } wtoken.groupId = groupId ; } }
Source:
public com.android.server.wifi.WifiNative.TdlsStatus getTdlsStatus ( java.lang.String macAdd ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getTdlsStatus ( macAdd ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } legacyHalWarning ( ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index , macAdd ) ; } else { return null ; } } }

Target:
public com.android.server.wifi.WifiNative.TdlsStatus getTdlsStatus ( java.lang.String macAdd ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index , macAdd ) ; } else { return null ; } } }
Source:
public static final java.lang.String concatGroups ( java.util.regex.Matcher matcher ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; final int numGroups = matcher.groupCount ( ) ; for ( int i = 1 ; i <= numGroups ; i ++ ) { java.lang.String s = matcher.group ( i ) ; java.lang.System.err.println ( ( ( ( "Group(" + i ) + ") : " ) + s ) ) ; if ( s != null ) { b.append ( s ) ; } } return b.toString ( ) ; }

Target:
public static final java.lang.String concatGroups ( java.util.regex.Matcher matcher ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; final int numGroups = matcher.groupCount ( ) ; for ( int i = 1 ; i <= numGroups ; i ++ ) { java.lang.String s = matcher.group ( i ) ; if ( s != null ) { b.append ( s ) ; } } return b.toString ( ) ; }
Source:
public boolean enterIfInterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; boolean satisfied = false ; try { satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } return satisfied ; }

Target:
public boolean enterIfInterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
protected boolean start ( ) { android.util.Log.e ( com.android.bluetooth.mapclient.MapClientService.TAG , "start()" ) ; com.android.bluetooth.mapclient.MapClientService.setService ( this ) ; if ( ( mMnsServer ) == null ) { mMnsServer = com.android.bluetooth.mapclient.MapUtils.newMnsServiceInstance ( this ) ; } mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; mStartError = false ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_SDP_RECORD ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; registerReceiver ( mMapReceiver , filter ) ; removeUncleanAccounts ( ) ; return ! ( mStartError ) ; }

Target:
protected boolean start ( ) { android.util.Log.e ( com.android.bluetooth.mapclient.MapClientService.TAG , "start()" ) ; com.android.bluetooth.mapclient.MapClientService.setService ( this ) ; if ( ( mMnsServer ) == null ) { mMnsServer = com.android.bluetooth.mapclient.MapUtils.newMnsServiceInstance ( this ) ; } mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_SDP_RECORD ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; registerReceiver ( mMapReceiver , filter ) ; removeUncleanAccounts ( ) ; return true ; }
Source:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT , "test" ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }
Source:
public void export ( @ com.android.annotations.NonNull java.io.File output ) { if ( itemMap.isEmpty ( ) ) { if ( output.exists ( ) ) { output.delete ( ) ; } } else if ( writeOutputFile ( output ) ) { writeStats ( ) ; com.android.build.gradle.tasks.annotations.Extractor.display ( ( "Annotations written to " + output ) ) ; } }

Target:
public void export ( @ com.android.annotations.NonNull java.io.File output ) { if ( itemMap.isEmpty ( ) ) { if ( output.exists ( ) ) { output.delete ( ) ; } } else if ( writeOutputFile ( output ) ) { writeStats ( ) ; info ( ( "Annotations written to " + output ) ) ; } }
Source:
private boolean toProperty ( org.eclipse.wb.internal.core.model.property.Property property ) throws java.lang.Exception { java.lang.String text = m_textControl.getText ( ) ; if ( ! ( m_currentText.equals ( text ) ) ) { m_ignoreFocusLost = true ; try { boolean success = setEditorText ( property , text ) ; if ( ! success ) { return false ; } } finally { m_ignoreFocusLost = false ; } m_currentText = text ; } return true ; }

Target:
private boolean toProperty ( org.eclipse.wb.internal.core.model.property.Property property ) throws java.lang.Exception { if ( ( m_textControl ) == null ) { return false ; } java.lang.String text = m_textControl.getText ( ) ; if ( ! ( m_currentText.equals ( text ) ) ) { m_ignoreFocusLost = true ; try { boolean success = setEditorText ( property , text ) ; if ( ! success ) { return false ; } } finally { m_ignoreFocusLost = false ; } m_currentText = text ; } return true ; }
Source:
public void testRefactor7 ( ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT ) ; org.eclipse.core.resources.IFile file = project.getFile ( "res/layout/activity_main.xml" ) ; renameResource ( project , file , true , "newlayout" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename \'testRefactor7/res/layout/activity_main.xml\' to \'newlayout.xml\'\n" ) + "\n" ) + "* Rename \'testRefactor7/res/layout-land/activity_main.xml\' to \'newlayout.xml\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor7/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -13 +13\n" ) + " - setContentView(R.layout.activity_main);\n" ) + " + setContentView(R.layout.newlayout);\n" ) + "\n" ) + "\n" ) + "* R.java - /testRefactor7/gen/com/example/refactoringtest/R.java\n" ) + " @@ -23 +23\n" ) + " - public static final int activity_main=0x7f030000;\n" ) + " + public static final int newlayout=0x7f030000;" ) ) ) ; }

Target:
public void testRefactor7 ( ) throws java.lang.Exception { org.eclipse.core.resources.IProject project = createProject ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT ) ; org.eclipse.core.resources.IFile file = project.getFile ( "res/layout/activity_main.xml" ) ; renameResource ( project , file , true , "newlayout" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* MainActivity.java - /testRefactor7/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -13 +13\n" ) + " - setContentView(R.layout.activity_main);\n" ) + " + setContentView(R.layout.newlayout);\n" ) + "\n" ) + "\n" ) + "* R.java - /testRefactor7/gen/com/example/refactoringtest/R.java\n" ) + " @@ -23 +23\n" ) + " - public static final int activity_main=0x7f030000;\n" ) + " + public static final int newlayout=0x7f030000;\n" ) + "\n" ) + "\n" ) + "* Rename \'testRefactor7/res/layout-land/activity_main.xml\' to \'newlayout.xml\'\n" ) + "\n" ) + "* Rename 'testRefactor7/res/layout/activity_main.xml' to 'newlayout.xml'" ) ) ) ; }
Source:
public static synchronized int insertProviderAt ( java.security.Provider provider , int position ) { java.lang.String providerName = provider.getName ( ) ; java.security.Security.check ( ( "insertProvider." + providerName ) ) ; sun.security.jca.ProviderList list = sun.security.jca.Providers.getFullProviderList ( ) ; sun.security.jca.ProviderList newList = sun.security.jca.ProviderList.insertAt ( list , provider , ( position - 1 ) ) ; if ( list == newList ) { return - 1 ; } java.security.Security.increaseVersion ( ) ; sun.security.jca.Providers.setProviderList ( newList ) ; return ( newList.getIndex ( providerName ) ) + 1 ; }

Target:
public static synchronized int insertProviderAt ( java.security.Provider provider , int position ) { java.lang.String providerName = provider.getName ( ) ; sun.security.jca.ProviderList list = sun.security.jca.Providers.getFullProviderList ( ) ; sun.security.jca.ProviderList newList = sun.security.jca.ProviderList.insertAt ( list , provider , ( position - 1 ) ) ; if ( list == newList ) { return - 1 ; } java.security.Security.increaseVersion ( ) ; sun.security.jca.Providers.setProviderList ( newList ) ; return ( newList.getIndex ( providerName ) ) + 1 ; }
Source:
private vogar.tasks.Task newCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex ) { vogar.tasks.Task dex ; if ( run.useJack ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , null , localDex ) ; } else { dex = new vogar.android.DexTask ( run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } return dex ; }

Target:
private vogar.tasks.Task newCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex ) { vogar.tasks.Task dex ; if ( run.useJack ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } else { dex = new vogar.android.DexTask ( run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } return dex ; }
Source:
static android.support.v8.renderscript.Element createUser ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element.DataType dt ) { if ( rs.isNative ) { android.support.v8.renderscript.RenderScriptThunker rst = ( ( android.support.v8.renderscript.RenderScriptThunker ) ( rs ) ) ; return android.support.v8.renderscript.ElementThunker.create ( rst , dt ) ; } android.support.v8.renderscript.Element.DataKind dk = android.support.v8.renderscript.Element.DataKind.USER ; boolean norm = false ; int vecSize = 1 ; int id = rs.nElementCreate ( dt.mID , dk.mID , norm , vecSize ) ; return new android.support.v8.renderscript.Element ( id , rs , dt , dk , norm , vecSize ) ; }

Target:
static android.support.v8.renderscript.Element createUser ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element.DataType dt ) { android.support.v8.renderscript.Element.DataKind dk = android.support.v8.renderscript.Element.DataKind.USER ; boolean norm = false ; int vecSize = 1 ; int id = rs.nElementCreate ( dt.mID , dk.mID , norm , vecSize ) ; return new android.support.v8.renderscript.Element ( id , rs , dt , dk , norm , vecSize ) ; }
Source:
public void addI16 ( android.support.v8.renderscript.Short2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( new android.support.v8.renderscript.Short2 ( v.x , v.y ) ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; }

Target:
public void addI16 ( android.support.v8.renderscript.Short2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( v ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; }
Source:
static int builderDeadLoop ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { int d = b.toString ( ) . indexOf ( "x" , 1 ) ; } return b.length ( ) ; }

Target:
static int builderDeadLoop ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; java.lang.String x = "x" ; for ( int i = 0 ; i < 10 ; i ++ ) { int d = b.toString ( ) . indexOf ( x , 1 ) ; } return b.length ( ) ; }
Source:
java.util.Map < R , java.util.Map < C , V2 > > createRowMap ( ) { com.google.common.base.Function < java.util.Map < C , V1 > , java.util.Map < C , V2 > > rowFunction = new com.google.common.base.Function < java.util.Map < C , V1 > , java.util.Map < C , V2 > > ( ) { @ java.lang.Override public java.util.Map < C , V2 > apply ( java.util.Map < C , V1 > row ) { return com.google.common.collect.Maps.transformValues ( row , function ) ; } } ; return com.google.common.collect.Maps.transformValues ( fromTable.rowMap ( ) , rowFunction ) ; }

Target:
public java.util.Map < R , java.util.Map < C , V2 > > rowMap ( ) { com.google.common.base.Function < java.util.Map < C , V1 > , java.util.Map < C , V2 > > rowFunction = new com.google.common.base.Function < java.util.Map < C , V1 > , java.util.Map < C , V2 > > ( ) { @ java.lang.Override public java.util.Map < C , V2 > apply ( java.util.Map < C , V1 > row ) { return com.google.common.collect.Maps.transformValues ( row , function ) ; } } ; return com.google.common.collect.Maps.transformValues ( fromTable.rowMap ( ) , rowFunction ) ; }
Source:
public final java.nio.ByteBuffer putFloat ( int i , float x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putFloat ( ix ( checkIndex ( i , SizeOf.FLOAT ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putFloat ( int i , float x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putFloat ( ix ( checkIndex ( i , SizeOf.FLOAT ) ) , x ) ; return this ; }
Source:
void readLidState ( ) { try { int sw = mWindowManager.getSwitchState ( com.android.internal.policy.impl.PhoneWindowManager.SW_LID ) ; if ( sw > 0 ) { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_OPEN ; } else if ( sw == 0 ) { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_CLOSED ; } else { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_ABSENT ; } } catch ( android.os.RemoteException e ) { } }

Target:
void readLidState ( ) { try { int sw = mWindowManager.getSwitchState ( com.android.internal.policy.impl.PhoneWindowManager.SW_LID ) ; if ( sw > 0 ) { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_CLOSED ; } else if ( sw == 0 ) { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_OPEN ; } else { mLidOpen = com.android.internal.policy.impl.PhoneWindowManager.LID_ABSENT ; } } catch ( android.os.RemoteException e ) { } }
Source:
public void testAddAll4 ( ) { try { java.util.concurrent.ArrayBlockingQueue q = new java.util.concurrent.ArrayBlockingQueue ( 1 ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; for ( int i = 0 ; i < ( SIZE ) ; ++ i ) ints [ i ] = new java.lang.Integer ( i ) ; q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalStateException success ) { } }

Target:
public void testAddAll4 ( ) { java.util.concurrent.ArrayBlockingQueue q = new java.util.concurrent.ArrayBlockingQueue ( 1 ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; for ( int i = 0 ; i < ( SIZE ) ; ++ i ) ints [ i ] = new java.lang.Integer ( i ) ; try { q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.IllegalStateException success ) { } }
Source:
private java.lang.String getRootId ( ) { org.w3c.dom.Element primaryNode = getPrimaryNode ( ) ; if ( primaryNode != null ) { java.lang.String oldId = primaryNode.getAttributeNS ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( ( oldId.length ( ) ) > 0 ) { return oldId ; } } return null ; }

Target:
private java.lang.String getRootId ( ) { org.w3c.dom.Element primaryNode = getPrimaryNode ( ) ; if ( primaryNode != null ) { java.lang.String oldId = primaryNode.getAttributeNS ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( ( oldId != null ) && ( ( oldId.length ( ) ) > 0 ) ) { return oldId ; } } return null ; }
Source:
private static void addZipEntry ( java.util.zip.ZipOutputStream zipOutputStream , java.lang.String name ) throws java.io.IOException { java.util.zip.ZipEntry zipEntry = new java.util.zip.ZipEntry ( name ) ; zipOutputStream.putNextEntry ( zipEntry ) ; if ( ! ( zipEntry.isDirectory ( ) ) ) { zipOutputStream.write ( 'a' ) ; } }

Target:
private static void addZipEntry ( java.util.zip.ZipOutputStream zipOutputStream , java.lang.String name , byte [ ] content ) throws java.io.IOException { java.util.zip.ZipEntry zipEntry = new java.util.zip.ZipEntry ( name ) ; zipOutputStream.putNextEntry ( zipEntry ) ; if ( ! ( zipEntry.isDirectory ( ) ) ) { zipOutputStream.write ( content ) ; } }
Source:
public com.ibm.icu.util.ByteArrayWrapper ensureCapacity ( int capacity ) { if ( ( ( bytes ) == null ) || ( ( bytes.length ) < capacity ) ) { byte [ ] newbytes = new byte [ capacity ] ; com.ibm.icu.util.ByteArrayWrapper.copyBytes ( bytes , 0 , newbytes , 0 , size ) ; bytes = newbytes ; } return this ; }

Target:
public com.ibm.icu.util.ByteArrayWrapper ensureCapacity ( int capacity ) { if ( ( ( bytes ) == null ) || ( ( bytes.length ) < capacity ) ) { byte [ ] newbytes = new byte [ capacity ] ; if ( ( bytes ) != null ) { com.ibm.icu.util.ByteArrayWrapper.copyBytes ( bytes , 0 , newbytes , 0 , size ) ; } bytes = newbytes ; } return this ; }
Source:
private void copyResourceToZip ( java.io.InputStream is , java.util.zip.ZipOutputStream zipOutputStream , java.lang.String name ) { try { java.util.zip.ZipEntry zipEntry = new java.util.zip.ZipEntry ( name ) ; zipOutputStream.putNextEntry ( zipEntry ) ; copyResource ( is , zipOutputStream , name ) ; } catch ( java.lang.Exception e ) { throw new com.android.jill.JillException ( ( "Error writing resource " + name ) , e ) ; } }

Target:
private void copyResourceToZip ( java.io.InputStream is , java.util.zip.ZipOutputStream zipOutputStream , java.lang.String name ) { try { java.util.zip.ZipEntry zipEntry = new java.util.zip.ZipEntry ( name ) ; zipOutputStream.putNextEntry ( zipEntry ) ; copyResource ( is , zipOutputStream ) ; } catch ( java.lang.Exception e ) { throw new com.android.jill.JillException ( ( "Error writing resource " + name ) , e ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.String toString = mSourceLocation.print ( true ) ; if ( ( mPosition ) != null ) { toString += ( ( ":" + ( mPosition.getLine ( ) ) ) + ":" ) + ( mPosition.getColumn ( ) ) ; } return toString ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( mSourceLocation.print ( true ) ) + ":" ) + ( mPosition.getLine ( ) ) ) + ":" ) + ( mPosition.getColumn ( ) ) ; }
Source:
public void test_close ( ) throws java.lang.Exception { try { zos.close ( ) ; fail ( "Close on empty stream failed to throw exception" ) ; } catch ( java.util.zip.ZipException e ) { } zos = new java.util.zip.ZipOutputStream ( bos ) ; zos.putNextEntry ( new java.util.zip.ZipEntry ( "XX" ) ) ; zos.closeEntry ( ) ; zos.close ( ) ; java.util.zip.ZipOutputStream zos = new java.util.zip.ZipOutputStream ( new java.io.ByteArrayOutputStream ( ) ) ; zos.putNextEntry ( new java.util.zip.ZipEntry ( "myFile" ) ) ; zos.close ( ) ; zos.close ( ) ; }

Target:
public void test_close ( ) throws java.lang.Exception { zos = new java.util.zip.ZipOutputStream ( bos ) ; zos.putNextEntry ( new java.util.zip.ZipEntry ( "XX" ) ) ; zos.closeEntry ( ) ; zos.close ( ) ; java.util.zip.ZipOutputStream zos = new java.util.zip.ZipOutputStream ( new java.io.ByteArrayOutputStream ( ) ) ; zos.putNextEntry ( new java.util.zip.ZipEntry ( "myFile" ) ) ; zos.close ( ) ; zos.close ( ) ; }
Source:
protected com.android.jack.ir.ast.JMethod findMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface enclosingType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType ) { for ( com.android.jack.ir.ast.JMethod m : methodId.getMethods ( ) ) { if ( ( ( m.getEnclosingType ( ) ) == enclosingType ) && ( ( m.getType ( ) ) == returnType ) ) { return m ; } } return null ; }

Target:
private com.android.jack.ir.ast.JMethod findMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface enclosingType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType ) { for ( com.android.jack.ir.ast.JMethod m : methodId.getMethods ( ) ) { if ( ( ( m.getEnclosingType ( ) ) == enclosingType ) && ( ( m.getType ( ) ) == returnType ) ) { return m ; } } return null ; }
Source:
public void test_setIZ ( ) { eightbs.set ( 5 , false ) ; assertTrue ( "Should have set bit 5 to true" , ( ! ( eightbs.get ( 5 ) ) ) ) ; eightbs.set ( 5 , true ) ; assertTrue ( "Should have set bit 5 to false" , eightbs.get ( 5 ) ) ; try { eightbs.set ( ( - 5 ) , false ) ; fail ( ) ; } catch ( java.lang.IndexOutOfBoundsException expected ) { } }

Target:
public void test_setIZ ( ) { eightbs.set ( 5 , false ) ; assertFalse ( "Should have set bit 5 to true" , eightbs.get ( 5 ) ) ; eightbs.set ( 5 , true ) ; assertTrue ( "Should have set bit 5 to false" , eightbs.get ( 5 ) ) ; try { eightbs.set ( ( - 5 ) , false ) ; fail ( ) ; } catch ( java.lang.IndexOutOfBoundsException expected ) { } }
Source:
public void entering ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object param1 ) { if ( ( java.util.logging.Level.FINER.intValue ( ) ) < ( levelValue ) ) { return ; } java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "ENTRY {0}" , params ) ; }

Target:
public void entering ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object param1 ) { logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "ENTRY {0}" , param1 ) ; }
Source:
private boolean isSplitPackage ( com.android.build.gradle.tasks.File file , com.android.build.gradle.tasks.File resBaseName ) { if ( file.getName ( ) . startsWith ( resBaseName.getName ( ) ) ) { for ( java.lang.String split : splits ) { if ( file.getName ( ) . contains ( split ) ) { return true ; } } } return false ; }

Target:
private boolean isSplitPackage ( java.io.File file , java.io.File resBaseName ) { if ( file.getName ( ) . startsWith ( resBaseName.getName ( ) ) ) { for ( java.lang.String split : splits ) { if ( file.getName ( ) . contains ( split ) ) { return true ; } } } return false ; }
Source:
public void stop ( org.osgi.framework.BundleContext context ) throws java.lang.Exception { super . stop ( context ) ; stopEditors ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.stop ( ) ; org.eclipse.wb.internal.core.DesignerPlugin.dispose ( ) ; mRed.dispose ( ) ; synchronized ( com.android.ide.eclipse.adt.AdtPlugin.class ) { com.android.ide.eclipse.adt.AdtPlugin.sPlugin = null ; } }

Target:
public void stop ( org.osgi.framework.BundleContext context ) throws java.lang.Exception { super . stop ( context ) ; stopEditors ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.IncludeFinder.stop ( ) ; org.eclipse.wb.internal.core.DesignerPlugin.dispose ( ) ; if ( ( mRed ) != null ) { mRed.dispose ( ) ; mRed = null ; } synchronized ( com.android.ide.eclipse.adt.AdtPlugin.class ) { com.android.ide.eclipse.adt.AdtPlugin.sPlugin = null ; } }
Source:
public android.view.Window destroyActivity ( java.lang.String id , boolean finish ) { android.app.LocalActivityManager.LocalActivityRecord r = mActivities.get ( id ) ; android.view.Window win = null ; if ( r != null ) { win = performDestroy ( r , finish ) ; if ( finish ) { mActivities.remove ( r ) ; } } return win ; }

Target:
public android.view.Window destroyActivity ( java.lang.String id , boolean finish ) { android.app.LocalActivityManager.LocalActivityRecord r = mActivities.get ( id ) ; android.view.Window win = null ; if ( r != null ) { win = performDestroy ( r , finish ) ; if ( finish ) { mActivities.remove ( id ) ; } } return win ; }
Source:
public static boolean isVisualVoicemailEnabled ( android.telephony.TelephonyManager telephonyManager , android.telecom.PhoneAccountHandle handle ) { if ( ( android.os.Build.VERSION.SDK_INT ) < ( android.os.Build.VERSION_CODES.N_MR1 ) ) { com.android.dialer.common.Assert.fail ( "isVisualVoicemailEnabled called on pre-NMR1" ) ; } try { return ( ( boolean ) ( android.telephony.TelephonyManager.class . getMethod ( "isVisualVoicemailEnabled" , android.telecom.PhoneAccountHandle.class ) . invoke ( telephonyManager , handle ) ) ) ; } catch ( java.lang.NoSuchMethodException | java.lang.IllegalAccessException | java.lang.reflect.InvocationTargetException e ) { com.android.dialer.common.LogUtil.e ( "TelephonyManagerCompat.setVisualVoicemailEnabled" , "failed" , e ) ; } return false ; }

Target:
public static boolean isVisualVoicemailEnabled ( android.telephony.TelephonyManager telephonyManager , android.telecom.PhoneAccountHandle handle ) { try { return ( ( boolean ) ( android.telephony.TelephonyManager.class . getMethod ( "isVisualVoicemailEnabled" , android.telecom.PhoneAccountHandle.class ) . invoke ( telephonyManager , handle ) ) ) ; } catch ( java.lang.NoSuchMethodException | java.lang.IllegalAccessException | java.lang.reflect.InvocationTargetException e ) { com.android.dialer.common.LogUtil.e ( "TelephonyManagerCompat.setVisualVoicemailEnabled" , "failed" , e ) ; } return false ; }
Source:
public int getVersionCode ( ) { int versionCode = mMergedFlavor.getVersionCode ( ) ; if ( ( versionCode == ( - 1 ) ) && ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }

Target:
public int getVersionCode ( ) { int versionCode = ( ( mMergedFlavor.getVersionCode ( ) ) != null ) ? mMergedFlavor.getVersionCode ( ) : 1 ; if ( ( versionCode == ( - 1 ) ) && ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }
Source:
public static int getInt ( java.lang.String key , int def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; return android.os.SystemProperties.native_get_int ( key , def ) ; }

Target:
public static int getInt ( java.lang.String key , int def ) { if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; return android.os.SystemProperties.native_get_int ( key , def ) ; }
Source:
private static void assertSslSocket ( libcore.java.net.URLConnectionTest.TlsFallbackDisabledScsvSSLSocket socket , boolean expectedWasFallbackScsvSet , java.lang.String ... expectedEnabledProtocols ) { java.util.Set < java.lang.String > enabledProtocols = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( socket.getEnabledProtocols ( ) ) ) ; java.util.Set < java.lang.String > expectedProtocolsSet = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( expectedEnabledProtocols ) ) ; assertEquals ( expectedProtocolsSet , enabledProtocols ) ; assertEquals ( expectedWasFallbackScsvSet , socket.wasTlsFallbackScsvSet ( ) ) ; }

Target:
private static void assertSslSocket ( libcore.java.net.URLConnectionTest.TlsFallbackDisabledScsvSSLSocket socket , boolean expectedWasFallbackScsvSet , java.lang.String ... expectedEnabledProtocols ) { java.util.Set < java.lang.String > enabledProtocols = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( socket.getEnabledProtocols ( ) ) ) ; java.util.Set < java.lang.String > expectedProtocolsSet = new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( expectedEnabledProtocols ) ) ; org.junit.Assert.assertEquals ( expectedProtocolsSet , enabledProtocols ) ; org.junit.Assert.assertEquals ( expectedWasFallbackScsvSet , socket.wasTlsFallbackScsvSet ( ) ) ; }
Source:
public void test_getComment_unset ( ) throws java.lang.Exception { java.io.File file = libcore.java.util.zip.AbstractZipFileTest.createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = createZipOutputStream ( file ) ; java.util.zip.ZipEntry ze = new java.util.zip.ZipEntry ( "test entry" ) ; ze.setComment ( "per-entry comment" ) ; out.putNextEntry ( ze ) ; out.close ( ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( file ) ; assertEquals ( null , zipFile.getComment ( ) ) ; }

Target:
public void test_getComment_unset ( ) throws java.lang.Exception { java.io.File file = libcore.java.util.zip.AbstractZipFileTest.createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = createZipOutputStream ( file ) ; java.util.zip.ZipEntry ze = new java.util.zip.ZipEntry ( "test entry" ) ; ze.setComment ( "per-entry comment" ) ; out.putNextEntry ( ze ) ; out.close ( ) ; try ( java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( file ) ) { assertEquals ( null , zipFile.getComment ( ) ) ; } }
Source:
public int hashCode ( ) { int lockWord = shadow$_monitor_ ; final int lockWordStateMask = - 1073741824 ; final int lockWordStateHash = - 2147483648 ; final int lockWordHashMask = 268435455 ; if ( ( lockWord & lockWordStateMask ) == lockWordStateHash ) { return lockWord & lockWordHashMask ; } return java.lang.System.identityHashCode ( this ) ; }

Target:
public int hashCode ( ) { return java.lang.Object.identityHashCode ( this ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_single_source_script s = new com.android.rs.test.ScriptC_single_source_script ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_entrypoint ( testAllocation1 , testAllocation2 ) ; s.forEach_oldFoo ( testAllocation2 , testAllocation2 ) ; s.forEach_oldGoo ( testAllocation2 , testAllocation2 ) ; s.invoke_validate ( testAllocation2 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_single_source_script s = new com.android.rs.test.ScriptC_single_source_script ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_entrypoint ( testAllocation1 , testAllocation2 ) ; s.forEach_oldFoo ( testAllocation2 , testAllocation2 ) ; s.forEach_oldGoo ( testAllocation2 , testAllocation2 ) ; s.invoke_validate ( testAllocation2 ) ; pRS.finish ( ) ; waitForMessage ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public < T extends com.android.sched.marker.Marker > T getMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { if ( ( markers ) == null ) { return null ; } } return ( ( T ) ( markers.get ( cls ) ) ) ; }

Target:
public < T extends com.android.sched.marker.Marker > T getMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { if ( ( markers ) == null ) { return null ; } return ( ( T ) ( markers.get ( cls ) ) ) ; } }