auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeParcelable ( uri , flags ) ; dest.writeByteArray ( callSpecificAppData.toByteArray ( ) ) ; dest.writeParcelable ( phoneAccountHandle , flags ) ; dest.writeInt ( ( isVideoCall ? 1 : 0 ) ) ; dest.writeString ( callSubject ) ; dest.writeInt ( ( allowAssistedDial ? 1 : 0 ) ) ; dest.writeBundle ( inCallUiIntentExtras ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeParcelable ( uri , flags ) ; dest.writeByteArray ( callSpecificAppData.toByteArray ( ) ) ; dest.writeParcelable ( phoneAccountHandle , flags ) ; dest.writeInt ( ( isVideoCall ? 1 : 0 ) ) ; dest.writeInt ( ( isDuoCall ? 1 : 0 ) ) ; dest.writeString ( callSubject ) ; dest.writeInt ( ( allowAssistedDial ? 1 : 0 ) ) ; dest.writeBundle ( inCallUiIntentExtras ) ; }
Source:
public void testSetLinkPropertiesEmptyDns ( ) throws java.lang.Exception { android.telephony.data.DataCallResponse response = new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , java.util.Arrays.asList ( new android.telephony.data.InterfaceAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS , 0 ) ) , null , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.SUCCESS , setLinkProperties ( response , linkProperties ) ) ; }

Target:
public void testSetLinkPropertiesEmptyDns ( ) throws java.lang.Exception { android.telephony.data.DataCallResponse response = new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , java.util.Arrays.asList ( new android.net.LinkAddress ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS ) , 0 ) ) , null , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.SUCCESS , setLinkProperties ( response , linkProperties ) ) ; }
Source:
public void test_SSL_CTX_new ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != ( org.conscrypt.NativeCryptoTest.NULL ) ) ) ; long c2 = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != c2 ) ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c2 ) ; }

Target:
public void test_SSL_CTX_new ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; org.junit.Assert.assertTrue ( ( c != ( org.conscrypt.NativeCryptoTest.NULL ) ) ) ; long c2 = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; org.junit.Assert.assertTrue ( ( c != c2 ) ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c2 ) ; }
Source:
public byte [ ] getEncoded ( ) { try { if ( ( info ) != null ) { return info.getEncoded ( ASN1Encoding.DER ) ; } org.bouncycastle.asn1.pkcs.PrivateKeyInfo info = new org.bouncycastle.asn1.pkcs.PrivateKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.dhKeyAgreement , new org.bouncycastle.asn1.pkcs.DHParameter ( dhSpec.getP ( ) , dhSpec.getG ( ) , dhSpec.getL ( ) ) ) , new org.bouncycastle.asn1.DERInteger ( getX ( ) ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
public byte [ ] getEncoded ( ) { try { if ( ( info ) != null ) { return info.getEncoded ( ASN1Encoding.DER ) ; } org.bouncycastle.asn1.pkcs.PrivateKeyInfo info = new org.bouncycastle.asn1.pkcs.PrivateKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.dhKeyAgreement , new org.bouncycastle.asn1.pkcs.DHParameter ( dhSpec.getP ( ) , dhSpec.getG ( ) , dhSpec.getL ( ) ) ) , new org.bouncycastle.asn1.ASN1Integer ( getX ( ) ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }
Source:
private void notifyFocusChanged ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.models.DeviceSelectionModel.WindowChangeListener [ ] listeners = getWindowChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . focusChanged ( device ) ; } } }

Target:
private void notifyFocusChanged ( com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.models.DeviceSelectionModel.IWindowChangeListener [ ] listeners = getWindowChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . focusChanged ( device ) ; } } }
Source:
public void interfaceRemoved ( java.lang.String iface ) { super . interfaceRemoved ( iface ) ; if ( mClatInterfaceName.equals ( iface ) ) { mCallback.setNeighborDiscoveryOffload ( true ) ; } }

Target:
public void interfaceRemoved ( java.lang.String iface ) { super . interfaceRemoved ( iface ) ; if ( mClatInterfaceName.equals ( iface ) ) { mCallback.setNeighborDiscoveryOffload ( true ) ; } else if ( ! ( mInterfaceName.equals ( iface ) ) ) { return ; } final java.lang.String msg = ( "interfaceRemoved(" + iface ) + ")" ; logMsg ( msg ) ; }
Source:
public void addHeaderView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { final android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mHeaderViewInfos.add ( info ) ; if ( ( mAdapter ) != null ) { if ( ! ( ( mAdapter ) instanceof android.widget.HeaderViewListAdapter ) ) { mAdapter = new android.widget.HeaderViewListAdapter ( mHeaderViewInfos , mFooterViewInfos , mAdapter ) ; } if ( ( mDataSetObserver ) != null ) { mDataSetObserver.onChanged ( ) ; } } }

Target:
public void addHeaderView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { final android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mHeaderViewInfos.add ( info ) ; mAreAllItemsSelectable &= isSelectable ; if ( ( mAdapter ) != null ) { if ( ! ( ( mAdapter ) instanceof android.widget.HeaderViewListAdapter ) ) { mAdapter = new android.widget.HeaderViewListAdapter ( mHeaderViewInfos , mFooterViewInfos , mAdapter ) ; } if ( ( mDataSetObserver ) != null ) { mDataSetObserver.onChanged ( ) ; } } }
Source:
public static long AddNegs3 ( long arg1 , long arg2 ) { long res = 0 ; long n_arg1 = - arg1 ; long n_arg2 = - arg2 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( n_arg1 + n_arg2 ) + i ; } return res ; }

Target:
public static long $noinline$AddNegs3 ( long arg1 , long arg2 ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long res = 0 ; long n_arg1 = - arg1 ; long n_arg2 = - arg2 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( n_arg1 + n_arg2 ) + i ; } return res ; }
Source:
private boolean isMarkupElement ( org.w3c.dom.Element element ) { return ( ( mStyle ) == ( XmlFormatStyle.RESOURCE ) ) && ( ( element.getTagName ( ) . length ( ) ) == 1 ) ; }

Target:
private boolean isMarkupElement ( org.w3c.dom.Element element ) { if ( ( mStyle ) != ( XmlFormatStyle.RESOURCE ) ) { return false ; } org.w3c.dom.Node curr = element.getParentNode ( ) ; while ( curr != null ) { if ( com.android.ide.eclipse.adt.internal.editors.values.descriptors.ValuesDescriptors.STRING_ELEMENT.equals ( curr.getNodeName ( ) ) ) { return true ; } curr = curr.getParentNode ( ) ; } return false ; }
Source:
public java.lang.String [ ] saw ( java.lang.String prefix ) { try { return mBinder.saw ( prefix , ( - 1 ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return null ; } }

Target:
public boolean contains ( java.lang.String key , int uid ) { try { return ( mBinder.exist ( key , uid ) ) == ( 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:
public org.objectweb.asm.MethodVisitor visitMethod ( final int access , final java.lang.String name , final java.lang.String desc , final java.lang.String signature , final java.lang.String [ ] exceptions ) { return new org.objectweb.asm.MethodVisitor ( Opcodes.ASM4 , cv.visitMethod ( access , name , desc , signature , exceptions ) ) { @ java.lang.Override public org.objectweb.asm.AnnotationVisitor visitAnnotationDefault ( ) { return null ; } @ java.lang.Override public org.objectweb.asm.AnnotationVisitor visitAnnotation ( java.lang.String desc , boolean visible ) { return null ; } @ java.lang.Override public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation ( int parameter , java.lang.String desc , boolean visible ) { return null ; } } ; }

Target:
public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation ( int typeRef , org.objectweb.asm.TypePath typePath , java.lang.String desc , boolean visible ) { return null ; }
Source:
protected void resetResolvedDrawables ( ) { resetResolvedDrawablesInternal ( ) ; }

Target:
public void invalidateDrawable ( @ android.annotation.NonNull android.graphics.drawable.Drawable drawable ) { if ( verifyDrawable ( drawable ) ) { final android.graphics.Rect dirty = drawable.getDirtyBounds ( ) ; final int scrollX = mScrollX ; final int scrollY = mScrollY ; invalidate ( ( ( dirty.left ) + scrollX ) , ( ( dirty.top ) + scrollY ) , ( ( dirty.right ) + scrollX ) , ( ( dirty.bottom ) + scrollY ) ) ; mPrivateFlags3 |= android.view.View.PFLAG3_OUTLINE_INVALID ; } }
Source:
private java.lang.String normalizeWord ( java.lang.String word ) { switch ( this ) { case LOWER_HYPHEN : return com.google.common.base.Ascii.toLowerCase ( word ) ; case LOWER_UNDERSCORE : return com.google.common.base.Ascii.toLowerCase ( word ) ; case LOWER_CAMEL : return com.google.common.base.CaseFormat.firstCharOnlyToUpper ( word ) ; case UPPER_CAMEL : return com.google.common.base.CaseFormat.firstCharOnlyToUpper ( word ) ; case UPPER_UNDERSCORE : return com.google.common.base.Ascii.toUpperCase ( word ) ; } throw new java.lang.RuntimeException ( ( "unknown case: " + ( this ) ) ) ; }

Target:
java.lang.String convert ( com.google.common.base.CaseFormat format , java.lang.String s ) { if ( format == ( com.google.common.base.CaseFormat.LOWER_HYPHEN ) ) { return com.google.common.base.Ascii.toLowerCase ( s.replace ( '_' , '-' ) ) ; } if ( format == ( com.google.common.base.CaseFormat.LOWER_UNDERSCORE ) ) { return com.google.common.base.Ascii.toLowerCase ( s ) ; } return super . convert ( format , s ) ; }
Source:
private final java.lang.StringBuffer fallbackFormat ( android.icu.util.Calendar fromCalendar , android.icu.util.Calendar toCalendar , java.lang.StringBuffer appendTo , java.text.FieldPosition pos , java.lang.String fullPattern ) { java.lang.String originalPattern = fDateFormat.toPattern ( ) ; fDateFormat.applyPattern ( fullPattern ) ; fallbackFormat ( fromCalendar , toCalendar , appendTo , pos ) ; fDateFormat.applyPattern ( originalPattern ) ; return appendTo ; }

Target:
private final java.lang.StringBuffer fallbackFormat ( android.icu.util.Calendar fromCalendar , android.icu.util.Calendar toCalendar , boolean fromToOnSameDay , java.lang.StringBuffer appendTo , java.text.FieldPosition pos , java.lang.String fullPattern ) { java.lang.String originalPattern = fDateFormat.toPattern ( ) ; fDateFormat.applyPattern ( fullPattern ) ; fallbackFormat ( fromCalendar , toCalendar , fromToOnSameDay , appendTo , pos ) ; fDateFormat.applyPattern ( originalPattern ) ; return appendTo ; }
Source:
protected void setValue ( java.lang.String verb , java.lang.String directObject , java.lang.String longFlagName , java.lang.Object value ) { java.lang.String key = ( ( ( verb + "/" ) + directObject ) + "/" ) + longFlagName ; com.android.sdkmanager.CommandLineProcessor.Arg arg = mArguments.get ( key ) ; arg.setCurrentValue ( value ) ; }

Target:
protected void setValue ( java.lang.String verb , java.lang.String directObject , java.lang.String longFlagName , java.lang.Object value ) { java.lang.String key = ( ( ( verb + '/' ) + directObject ) + '/' ) + longFlagName ; com.android.sdkmanager.CommandLineProcessor.Arg arg = mArguments.get ( key ) ; arg.setCurrentValue ( value ) ; }
Source:
public void destroy ( ) { validate ( ) ; nContextDeinitToClient ( mContext ) ; mMessageThread.mRun = false ; try { mMessageThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { } nContextDestroy ( ) ; mContext = 0 ; nDeviceDestroy ( mDev ) ; mDev = 0 ; }

Target:
synchronized void nContextDestroy ( ) { validate ( ) ; java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock wlock = mRWLock.writeLock ( ) ; wlock.lock ( ) ; long curCon = mContext ; mContext = 0 ; wlock.unlock ( ) ; rsnContextDestroy ( curCon ) ; }
Source:
public void exit ( ) { mRun = false ; synchronized ( this ) { notifyAll ( ) ; } try { this . join ( ) ; } catch ( java.lang.InterruptedException e ) { } mInPixelsAllocation.destroy ( ) ; mInPixelsAllocation2.destroy ( ) ; mOutPixelsAllocation.destroy ( ) ; mRS.destroy ( ) ; mInPixelsAllocation = null ; mInPixelsAllocation2 = null ; mOutPixelsAllocation = null ; mRS = null ; }

Target:
public void exit ( ) { mRun = false ; synchronized ( this ) { notifyAll ( ) ; } try { this . join ( ) ; } catch ( java.lang.InterruptedException e ) { } mInPixelsAllocation.destroy ( ) ; mInPixelsAllocation2.destroy ( ) ; if ( ( mOutPixelsAllocation ) != ( mOutDisplayAllocation ) ) { mOutPixelsAllocation.destroy ( ) ; } mOutDisplayAllocation.destroy ( ) ; mRS.destroy ( ) ; mInPixelsAllocation = null ; mInPixelsAllocation2 = null ; mOutPixelsAllocation = null ; mOutDisplayAllocation = null ; mRS = null ; }
Source:
private int getExpectedInstallLocation ( int userSetting ) { int iloc = PackageInfo.INSTALL_LOCATION_UNSPECIFIED ; boolean enable = getUserSettingSetInstallLocation ( ) ; if ( enable ) { if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_AUTO ) ) { iloc = PackageInfo.INSTALL_LOCATION_AUTO ; } else if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_EXTERNAL ) ) { iloc = PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL ; } else if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_INTERNAL ) ) { iloc = PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ; } } return iloc ; }

Target:
private int getExpectedInstallLocation ( int userSetting ) { int iloc = android.content.pm.PackageInfo.INSTALL_LOCATION_UNSPECIFIED ; boolean enable = getUserSettingSetInstallLocation ( ) ; if ( enable ) { if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_AUTO ) ) { iloc = android.content.pm.PackageInfo.INSTALL_LOCATION_AUTO ; } else if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_EXTERNAL ) ) { iloc = android.content.pm.PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL ; } else if ( userSetting == ( com.android.internal.content.PackageHelper.APP_INSTALL_INTERNAL ) ) { iloc = android.content.pm.PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ; } } return iloc ; }
Source:
public void enter ( ) { log ( ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; broadcastAudioState ( mCurrentDevice , BluetoothA2dpSink.STATE_NOT_PLAYING , BluetoothA2dpSink.STATE_PLAYING ) ; synchronized ( this ) { if ( ( mStreaming ) == null ) { if ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.DBG ) { log ( "Creating New A2dpSinkStreamHandler" ) ; } mStreaming = new com.android.bluetooth.a2dpsink.A2dpSinkStreamHandler ( this , mContext ) ; } } informAudioFocusStateNative ( 0 ) ; }

Target:
public void enter ( ) { log ( ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; broadcastAudioState ( mCurrentDevice , BluetoothA2dpSink.STATE_NOT_PLAYING , BluetoothA2dpSink.STATE_PLAYING ) ; synchronized ( this ) { if ( ( mStreaming ) == null ) { if ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.DBG ) { log ( "Creating New A2dpSinkStreamHandler" ) ; } mStreaming = new com.android.bluetooth.a2dpsink.A2dpSinkStreamHandler ( this , mContext ) ; } } if ( ( mStreaming.getAudioFocus ( ) ) == ( android.media.AudioManager.AUDIOFOCUS_NONE ) ) { informAudioFocusStateNative ( 0 ) ; } }
Source:
private void showAvdManagerWindow ( ) { try { com.android.sdkuilib.internal.widgets.MessageBoxLog errorLogger = new com.android.sdkuilib.internal.widgets.MessageBoxLog ( "AVD Manager" , org.eclipse.swt.widgets.Display.getCurrent ( ) , true ) ; com.android.sdkuilib.internal.repository.AvdManagerWindowImpl1 window = new com.android.sdkuilib.internal.repository.AvdManagerWindowImpl1 ( null , errorLogger , mOsSdkFolder , AvdManagerWindowImpl1.AvdInvocationContext.STANDALONE ) ; window.registerPage ( com.android.sdkmanager.internal.repository.SettingsPage.class , UpdaterPage.Purpose.SETTINGS ) ; window.registerPage ( com.android.sdkmanager.internal.repository.AboutPage.class , UpdaterPage.Purpose.ABOUT_BOX ) ; window.open ( ) ; errorLogger.displayResult ( true ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
private void showAvdManagerWindow ( ) { try { com.android.sdkuilib.internal.widgets.MessageBoxLog errorLogger = new com.android.sdkuilib.internal.widgets.MessageBoxLog ( "AVD Manager" , org.eclipse.swt.widgets.Display.getCurrent ( ) , true ) ; com.android.sdkuilib.repository.AvdManagerWindow window = new com.android.sdkuilib.repository.AvdManagerWindow ( null , errorLogger , mOsSdkFolder , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.STANDALONE ) ; window.registerPage ( com.android.sdkmanager.internal.repository.SettingsPage.class , UpdaterPage.Purpose.SETTINGS ) ; window.registerPage ( com.android.sdkmanager.internal.repository.AboutPage.class , UpdaterPage.Purpose.ABOUT_BOX ) ; window.open ( ) ; errorLogger.displayResult ( true ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState " + ( mState ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getState(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }

Target:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; return service.getState ( ) ; }
Source:
public void reloadSdk ( ) { mSdkManager.reloadSdk ( mSdkLog ) ; if ( ( mAvdManager ) != null ) { try { mAvdManager.reloadAvds ( mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { } } mLocalSdkParser.clearPackages ( ) ; notifyListeners ( false ) ; }

Target:
public void reloadSdk ( ) { mSdkManager.reloadSdk ( mSdkLog ) ; if ( ( mAvdManager ) != null ) { try { mAvdManager.reloadAvds ( mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { } } mLocalSdkParser.clearPackages ( ) ; broadcastOnSdkReload ( ) ; }
Source:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { java.util.regex.Matcher matcher = com.android.manifmerger.AttributeModel.Hexadecimal32Bits.PATTERN.matcher ( value ) ; boolean valid = ( matcher.matches ( ) ) && ( ( matcher.group ( 1 ) . length ( ) ) <= 8 ) ; if ( ! valid ) { mergingReport.addError ( java.lang.String.format ( ( "Attribute %1$s at %2$s is not a valid hexadecimal 32 bit value," + " found %3$s" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return valid ; }

Target:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { java.util.regex.Matcher matcher = com.android.manifmerger.AttributeModel.Hexadecimal32Bits.PATTERN.matcher ( value ) ; boolean valid = ( matcher.matches ( ) ) && ( ( matcher.group ( 1 ) . length ( ) ) <= 8 ) ; if ( ! valid ) { attribute.addMessage ( mergingReport , MergingReport.Record.Severity.ERROR , java.lang.String.format ( ( "Attribute %1$s at %2$s is not a valid hexadecimal 32 bit value," + " found %3$s" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return valid ; }
Source:
protected java.lang.String comparisonKey ( ) { java.lang.String s = super . comparisonKey ( ) ; int pos = s.indexOf ( "|r:" ) ; assert pos > 0 ; s = ( ( ( s.substring ( 0 , pos ) ) + "|abi:" ) + ( getAbiDisplayName ( ) ) ) + ( s.substring ( pos ) ) ; return s ; }

Target:
protected java.lang.String comparisonKey ( ) { java.lang.String s = super . comparisonKey ( ) ; int pos = s.indexOf ( "|r:" ) ; assert pos > 0 ; s = ( ( ( ( ( s.substring ( 0 , pos ) ) + "|tag:" ) + ( getTag ( ) . getId ( ) ) ) + "|abi:" ) + ( getAbiDisplayName ( ) ) ) + ( s.substring ( pos ) ) ; return s ; }
Source:
public static boolean requiresClat ( com.android.server.connectivity.NetworkAgentInfo nai ) { final int netType = nai.networkInfo.getType ( ) ; final boolean connected = nai.networkInfo.isConnected ( ) ; final boolean hasIPv4Address = ( ( nai.linkProperties ) != null ) ? nai.linkProperties.hasIPv4Address ( ) : false ; return ( connected && ( ! hasIPv4Address ) ) && ( com.android.internal.util.ArrayUtils.contains ( com.android.server.connectivity.Nat464Xlat.NETWORK_TYPES , netType ) ) ; }

Target:
public static boolean requiresClat ( com.android.server.connectivity.NetworkAgentInfo nai ) { final int netType = nai.networkInfo.getType ( ) ; final boolean supported = com.android.internal.util.ArrayUtils.contains ( com.android.server.connectivity.Nat464Xlat.NETWORK_TYPES , nai.networkInfo.getType ( ) ) ; final boolean connected = nai.networkInfo.isConnected ( ) ; final boolean hasIPv4Address = ( ( nai.linkProperties ) != null ) && ( nai.linkProperties.hasIPv4Address ( ) ) ; return ( supported && connected ) && ( ! hasIPv4Address ) ; }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "ToastTest.java:31: Warning: Toast created but not shown: did you forget to call show() ?\n" + ( ( "ToastTest.java:32: Warning: Expected duration Toast.LENGTH_SHORT or Toast.LENGTH_LONG, a custom duration value is not supported\n" + "ToastTest.java:32: Warning: Toast created but not shown: did you forget to call show() ?\n" ) + "ToastTest.java:38: Warning: Toast created but not shown: did you forget to call show() ?" ) ) , lintProject ( "src/test/pkg/ToastTest.java.txt=>src/test/pkg/ToastTest.java" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/ToastTest.java:31: Warning: Toast created but not shown: did you forget to call show() ? [ShowToast]\n" + ( ( ( ( ( ( ( ( ( ( ( ( " Toast.makeText(context, \"foo\", Toast.LENGTH_LONG);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/ToastTest.java:32: Warning: Expected duration Toast.LENGTH_SHORT or Toast.LENGTH_LONG, a custom duration value is not supported [ShowToast]\n" ) + " Toast toast = Toast.makeText(context, R.string.app_name, 5000);\n" ) + " ~~~~\n" ) + "src/test/pkg/ToastTest.java:32: Warning: Toast created but not shown: did you forget to call show() ? [ShowToast]\n" ) + " Toast toast = Toast.makeText(context, R.string.app_name, 5000);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/ToastTest.java:38: Warning: Toast created but not shown: did you forget to call show() ? [ShowToast]\n" ) + " Toast.makeText(context, \"foo\", Toast.LENGTH_LONG);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 4 warnings\n" ) + "" ) ) , lintProject ( "src/test/pkg/ToastTest.java.txt=>src/test/pkg/ToastTest.java" ) ) ; }
Source:
public boolean needsPreprocessing ( java.io.File resourceFile ) { return ( ( ( resourceFile.getPath ( ) . endsWith ( ".xml" ) ) && ( isInDrawable ( resourceFile ) ) ) && ( ( getEffectiveVersion ( resourceFile ) ) < ( com.android.builder.png.VectorDrawableRenderer.MIN_SDK_WITH_VECTOR_SUPPORT ) ) ) && ( isRootVector ( resourceFile ) ) ; }

Target:
public boolean needsPreprocessing ( java.io.File resourceFile ) { return ( ( ( isXml ( resourceFile ) ) && ( isInDrawable ( resourceFile ) ) ) && ( ( getEffectiveVersion ( resourceFile ) ) < ( com.android.builder.png.VectorDrawableRenderer.MIN_SDK_WITH_VECTOR_SUPPORT ) ) ) && ( isRootVector ( resourceFile ) ) ; }
Source:
public android.icu.impl.SimplePatternFormatter getByVariant ( java.lang.CharSequence variant ) { assert isValid ( ) ; int idx = android.icu.text.QuantityFormatter.getPluralIndex ( variant ) ; android.icu.impl.SimplePatternFormatter template = templates [ ( idx < 0 ? 0 : idx ) ] ; return template == null ? templates [ 0 ] : template ; }

Target:
public java.lang.String format ( double number , android.icu.text.NumberFormat numberFormat , android.icu.text.PluralRules pluralRules ) { java.lang.String formatStr = numberFormat.format ( number ) ; android.icu.impl.StandardPlural p = android.icu.text.QuantityFormatter.selectPlural ( number , numberFormat , pluralRules ) ; android.icu.impl.SimplePatternFormatter formatter = templates [ p.ordinal ( ) ] ; if ( formatter == null ) { formatter = templates [ android.icu.impl.StandardPlural.OTHER_INDEX ] ; assert formatter != null ; } return formatter.format ( formatStr ) ; }
Source:
private synchronized void expectVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { mWaitingForVoiceRecognition = true ; android.os.Message m = obtainMessage ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT ) ; m.obj = getMatchingDevice ( device ) ; sendMessageDelayed ( m , com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_MILLIS ) ; if ( ! ( mSystemInterface.getVoiceRecognitionWakeLock ( ) . isHeld ( ) ) ) { mSystemInterface.getVoiceRecognitionWakeLock ( ) . acquire ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_MILLIS ) ; } }

Target:
void setForceScoAudio ( boolean forced ) { mForceScoAudio = forced ; }
Source:
private void addNewConfiguration ( com.google.gct.testing.CloudTestConfigurationImpl newConfiguration ) { newConfiguration.setIcon ( CloudTestConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }

Target:
public boolean isEnabled ( com.intellij.openapi.actionSystem.AnActionEvent e ) { return ( ( ( selectedConfiguration ) != null ) && ( selectedConfiguration.isEditable ( ) ) ) && ( ( editableConfigurations.indexOf ( selectedConfiguration ) ) < ( ( editableConfigurations.size ( ) ) - 1 ) ) ; }
Source:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; return null ; }

Target:
protected void onPreExecute ( ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; mFile = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , mFile ) ; }
Source:
public static void insertCommentText ( org.eclipse.jface.text.Document document , org.eclipse.jdt.core.dom.BodyDeclaration bodyDeclaration , java.lang.String text ) { org.eclipse.jdt.core.dom.Javadoc comment = bodyDeclaration.getJavadoc ( ) ; if ( comment == null ) { try { document.replace ( bodyDeclaration.getStartPosition ( ) , 0 , ( ( "/** " + text ) + " */\n" ) ) ; } catch ( org.eclipse.jface.text.BadLocationException e ) { throw new java.lang.AssertionError ( e ) ; } } else { com.google.currysrc.api.transform.JavadocUtils.insertCommentText ( document , comment , text ) ; } }

Target:
public static void addJavadocTag ( org.eclipse.jdt.core.dom.rewrite.ASTRewrite rewrite , org.eclipse.jdt.core.dom.BodyDeclaration node , java.lang.String tagText ) { org.eclipse.jdt.core.dom.Javadoc javadoc = node.getJavadoc ( ) ; if ( javadoc == null ) { org.eclipse.jdt.core.dom.AST ast = node.getAST ( ) ; javadoc = ( ( org.eclipse.jdt.core.dom.Javadoc ) ( ast.createInstance ( org.eclipse.jdt.core.dom.Javadoc.class ) ) ) ; rewrite.set ( node , node.getJavadocProperty ( ) , javadoc , null ) ; } com.google.currysrc.api.transform.JavadocUtils.addJavadocTag ( rewrite , javadoc , tagText ) ; }
Source:
public void testDeserializeWasSerializableClass ( ) throws java.lang.Exception { final java.lang.String s = "aced0005737200316c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6" + ( "e546573742457617353657269616c697a61626c65000000000000000002000149000169787000000" + "000" ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeWasSerializableClass ( ) throws java.lang.Exception { final java.lang.String s = "aced0005737200316c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6" + ( "e546573742457617353657269616c697a61626c65000000000000000002000149000169787000000" + "000" ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }
Source:
private void checkWorldReadAccess ( java.lang.String path ) throws java.io.FileNotFoundException { try { android.system.StructStat stat = android.system.Os.stat ( path ) ; int accessBits = android.system.OsConstants.S_IROTH ; if ( ( android.system.OsConstants.S_ISREG ( stat.st_mode ) ) && ( ( ( stat.st_mode ) & accessBits ) == accessBits ) ) { checkLeadingPathComponentsWorldExecutable ( path ) ; return ; } } catch ( android.system.ErrnoException e ) { } throw new java.io.FileNotFoundException ( ( "Can't access " + path ) ) ; }

Target:
private boolean isSecondaryExternalPath ( java.lang.String path ) { for ( int i = 1 ; i < ( mExternalStoragePaths.length ) ; i ++ ) { if ( path.startsWith ( mExternalStoragePaths [ i ] ) ) { return true ; } } return false ; }
Source:
public void unholdCall ( java.lang.String callId ) { try { com.android.server.telecom.Log.startSession ( "ICA.uC" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { mCallsManager.unholdCall ( call ) ; } else { com.android.server.telecom.Log.w ( this , "unholdCall, unknown call id: %s" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void unholdCall ( java.lang.String callId ) { try { android.telecom.Log.startSession ( "ICA.uC" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { mCallsManager.unholdCall ( call ) ; } else { android.telecom.Log.w ( this , "unholdCall, unknown call id: %s" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void run ( org.eclipse.jface.action.IAction action ) { final com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( sdk != null ) { com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . refreshSdk ( ) ; com.android.sdkuilib.repository.AvdManagerWindow window = new com.android.sdkuilib.repository.AvdManagerWindow ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , new com.android.ide.eclipse.adt.internal.sdk.AdtConsoleSdkLog ( ) , sdk.getSdkLocation ( ) , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.IDE ) ; window.open ( ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android SDK" , "Location of the Android SDK has not been setup in the preferences." ) ; } }

Target:
public void run ( org.eclipse.jface.action.IAction action ) { final com.android.ide.eclipse.adt.internal.sdk.Sdk sdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( sdk != null ) { com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . refreshSdk ( ) ; com.android.sdkuilib.repository.AvdManagerWindow window = new com.android.sdkuilib.repository.AvdManagerWindow ( com.android.ide.eclipse.adt.AdtPlugin.getShell ( ) , new com.android.ide.eclipse.adt.internal.sdk.AdtConsoleSdkLog ( ) , sdk.getSdkLocation ( ) , com.android.sdkuilib.repository.AvdManagerWindow.AvdInvocationContext.IDE ) ; window.open ( ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android SDK" , "Location of the Android SDK has not been setup in the preferences." ) ; } }
Source:
private android.telephony.ims.feature.ImsFeature makeImsFeature ( int slotId , int feature ) { switch ( feature ) { case android.telephony.ims.feature.ImsFeature.EMERGENCY_MMTEL : { return onCreateEmergencyMMTelImsFeature ( slotId ) ; } case android.telephony.ims.feature.ImsFeature.MMTEL : { return onCreateMMTelImsFeature ( slotId ) ; } case android.telephony.ims.feature.ImsFeature.RCS : { return onCreateRcsFeature ( slotId ) ; } } return null ; }

Target:
private com.android.ims.internal.IImsMMTelFeature createEmergencyMMTelFeatureInternal ( int slotId , com.android.ims.internal.IImsFeatureStatusCallback c ) { android.telephony.ims.feature.MMTelFeature f = onCreateEmergencyMMTelImsFeature ( slotId ) ; if ( f != null ) { setupFeature ( f , slotId , ImsFeature.EMERGENCY_MMTEL , c ) ; return f.getBinder ( ) ; } else { return null ; } }
Source:
private void loadFromStoreAndMigrateAfterUserSwitch ( int userId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Loading from store after user switch/unlock for " + userId ) ) ; } mWifiConfigStore.switchUserStore ( mWifiConfigStore.createUserFile ( userId ) ) ; if ( loadFromStore ( ) ) { saveToStore ( true ) ; mPendingUnlockStoreRead = false ; } }

Target:
private void handleUserUnlockOrSwitch ( int userId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Loading from store after user switch/unlock for " + userId ) ) ; } if ( loadFromUserStoreAfterUnlockOrSwitch ( userId ) ) { saveToStore ( true ) ; mPendingUnlockStoreRead = false ; } }
Source:
private java.lang.String getNewClassName ( java.lang.String className ) { int lastDot = className.lastIndexOf ( "." ) ; if ( lastDot < 0 ) { return mNewName ; } java.lang.String name = className.substring ( lastDot , className.length ( ) ) ; java.lang.String newClassName = ( mNewName ) + name ; return newClassName ; }

Target:
private java.lang.String getNewClassName ( java.lang.String fqcn ) { assert isInRenamedPackage ( fqcn ) : fqcn ; int lastDot = fqcn.lastIndexOf ( '.' ) ; if ( lastDot < 0 ) { return mNewPackage ; } java.lang.String name = fqcn.substring ( lastDot , fqcn.length ( ) ) ; java.lang.String newClassName = ( mNewPackage ) + name ; return newClassName ; }
Source:
private static byte [ ] loadImageByteArray ( java.lang.String file_path ) { android.graphics.Bitmap bitmap = android.graphics.BitmapFactory.decodeFile ( file_path ) ; java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream ( ) ; bitmap.compress ( Bitmap.CompressFormat.PNG , 100 , stream ) ; return stream.toByteArray ( ) ; }

Target:
private static double luma ( int pixel ) { final int R = android.graphics.Color.red ( pixel ) ; final int G = android.graphics.Color.green ( pixel ) ; final int B = android.graphics.Color.blue ( pixel ) ; return ( ( 0.299 * R ) + ( 0.587 * G ) ) + ( 0.114 * B ) ; }
Source:
void resetProperties ( ) { if ( ( mCurrentAppType ) == ( UiccController.APP_FAM_3GPP ) ) { log ( ( "update icc_operator_numeric=" + "" ) ) ; mTelephonyManager.setSimOperatorNumericForPhone ( mPhoneId , "" ) ; mTelephonyManager.setSimCountryIsoForPhone ( mPhoneId , "" ) ; mTelephonyManager.setSimOperatorNameForPhone ( mPhoneId , "" ) ; } }

Target:
void resetProperties ( ) { if ( ( mCurrentAppType ) == ( UiccController.APP_FAM_3GPP ) ) { com.android.internal.telephony.uicc.UiccProfile.log ( ( "update icc_operator_numeric=" + "" ) ) ; mTelephonyManager.setSimOperatorNumericForPhone ( mPhoneId , "" ) ; mTelephonyManager.setSimCountryIsoForPhone ( mPhoneId , "" ) ; mTelephonyManager.setSimOperatorNameForPhone ( mPhoneId , "" ) ; } }
Source:
public void dumpShowsLastFailureTraceAndCurrentConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #1" ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #2" ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_SUCCEEDED ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #1" ) ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #2" ) ) ; }

Target:
public void dumpShowsLastFailureTraceAndPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #1" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect try #2" ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #1" ) ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect try #2" ) ) ; }
Source:
public android.net.wifi.aware.ConfigRequest createFromParcel ( android.os.Parcel in ) { boolean support5gBand = ( in.readInt ( ) ) != 0 ; int masterPreference = in.readInt ( ) ; int clusterLow = in.readInt ( ) ; int clusterHigh = in.readInt ( ) ; return new android.net.wifi.aware.ConfigRequest ( support5gBand , masterPreference , clusterLow , clusterHigh ) ; }

Target:
public android.net.wifi.aware.ConfigRequest createFromParcel ( android.os.Parcel in ) { boolean support5gBand = ( in.readInt ( ) ) != 0 ; int masterPreference = in.readInt ( ) ; int clusterLow = in.readInt ( ) ; int clusterHigh = in.readInt ( ) ; int [ ] discoveryWindowInterval = in.createIntArray ( ) ; return new android.net.wifi.aware.ConfigRequest ( support5gBand , masterPreference , clusterLow , clusterHigh , discoveryWindowInterval ) ; }
Source:
private void fillUi ( ) { if ( ( ( com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ) != null ) && ( mProject.isOpen ( ) ) ) { com.android.ide.eclipse.adt.internal.project.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( mProject ) ; mPropertiesWorkingCopy = state.getProperties ( ) . makeWorkingCopy ( ) ; com.android.sdklib.IAndroidTarget target = state.getTarget ( ) ; if ( target != null ) { mSelector.setSelection ( target ) ; } mIsLibrary.setSelection ( state.isLibrary ( ) ) ; mLibraryDependencies.setContent ( state , mPropertiesWorkingCopy ) ; } }

Target:
private void fillUi ( ) { if ( ( ( com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ) != null ) && ( mProject.isOpen ( ) ) ) { com.android.ide.eclipse.adt.internal.sdk.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( mProject ) ; mPropertiesWorkingCopy = state.getProperties ( ) . makeWorkingCopy ( ) ; com.android.sdklib.IAndroidTarget target = state.getTarget ( ) ; if ( target != null ) { mSelector.setSelection ( target ) ; } mIsLibrary.setSelection ( state.isLibrary ( ) ) ; mLibraryDependencies.setContent ( state , mPropertiesWorkingCopy ) ; } }
Source:
public java.lang.String getSubscriptionCarrierName ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return null ; }

Target:
public java.lang.CharSequence getAndroidCarrierNameForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return null ; }
Source:
public void testSetValues014_ThreadAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value actualValue = getStaticFieldValue ( classID , "THREAD_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "THREAD_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.THREAD_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , actualValue , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues009_Object ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointObject" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , oldValue , newValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public android.telephony.ServiceState getServiceStateForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getServiceStateForSubscriber" ) ) ) { return null ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone == null ) { return null ; } return phone.getServiceState ( ) ; }

Target:
public java.lang.String getDeviceId ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getDeviceId" ) ) ) { return null ; } final com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( 0 ) ; if ( phone != null ) { return phone.getDeviceId ( ) ; } else { return null ; } }
Source:
private void doExtractZipFails ( java.io.ByteArrayOutputStream baos ) { java.io.File dir = createTempDir ( ) ; java.io.File targetDir = new java.io.File ( dir , "target" ) ; libcore.tzdata.update2.TimeZoneDistroTest.TestInputStream inputStream = new libcore.tzdata.update2.TimeZoneDistroTest.TestInputStream ( new java.io.ByteArrayInputStream ( baos.toByteArray ( ) ) ) ; try { libcore.tzdata.update2.TimeZoneDistro.extractZipSafely ( inputStream , targetDir , true ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } inputStream.assertClosed ( ) ; }

Target:
private void doExtractZipFails ( java.io.ByteArrayOutputStream baos ) { java.io.File dir = createTempDir ( ) ; java.io.File targetDir = new java.io.File ( dir , "target" ) ; libcore.tzdata.shared2.TimeZoneDistroTest.TestInputStream inputStream = new libcore.tzdata.shared2.TimeZoneDistroTest.TestInputStream ( new java.io.ByteArrayInputStream ( baos.toByteArray ( ) ) ) ; try { libcore.tzdata.shared2.TimeZoneDistro.extractZipSafely ( inputStream , targetDir , true ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } inputStream.assertClosed ( ) ; }
Source:
protected void collect ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JType type ) { if ( type instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( type ) ) . addMarker ( MainDexMarker.INSTANCE ) ; } }

Target:
protected void collect ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JType type ) { if ( type instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { com.android.jack.ir.ast.JDefinedClassOrInterface jDefinedClassOrInterface = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( type ) ) ; synchronized ( jDefinedClassOrInterface ) { if ( ! ( jDefinedClassOrInterface.containsMarker ( com.android.jack.backend.dex.MainDexMarker.class ) ) ) { jDefinedClassOrInterface.addMarker ( MainDexMarker.INSTANCE ) ; } } } }