auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static com.android.sdklib.xml.AndroidManifestParser.ManifestData parse ( com.android.sdklib.io.IAbstractFile manifestFile , boolean gatherData , com.android.sdklib.xml.AndroidManifestParser.ManifestErrorHandler errorHandler ) throws com.android.sdklib.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( manifestFile != null ) { javax.xml.parsers.SAXParser parser = com.android.sdklib.xml.AndroidManifestParser.sParserFactory.newSAXParser ( ) ; com.android.sdklib.xml.AndroidManifestParser.ManifestData data = null ; if ( gatherData ) { data = new com.android.sdklib.xml.AndroidManifestParser.ManifestData ( ) ; } com.android.sdklib.xml.AndroidManifestParser.ManifestHandler manifestHandler = new com.android.sdklib.xml.AndroidManifestParser.ManifestHandler ( manifestFile , data , errorHandler ) ; parser.parse ( new org.xml.sax.InputSource ( manifestFile.getContents ( ) ) , manifestHandler ) ; return data ; } return null ; }

Target:
public static com.android.sdklib.xml.ManifestData parse ( com.android.sdklib.io.IAbstractFile manifestFile , boolean gatherData , com.android.sdklib.xml.AndroidManifestParser.ManifestErrorHandler errorHandler ) throws com.android.sdklib.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( manifestFile != null ) { javax.xml.parsers.SAXParser parser = com.android.sdklib.xml.AndroidManifestParser.sParserFactory.newSAXParser ( ) ; com.android.sdklib.xml.ManifestData data = null ; if ( gatherData ) { data = new com.android.sdklib.xml.ManifestData ( ) ; } com.android.sdklib.xml.AndroidManifestParser.ManifestHandler manifestHandler = new com.android.sdklib.xml.AndroidManifestParser.ManifestHandler ( manifestFile , data , errorHandler ) ; parser.parse ( new org.xml.sax.InputSource ( manifestFile.getContents ( ) ) , manifestHandler ) ; return data ; } return null ; }
Source:
public android.bluetooth.BluetoothSocket createScoSocket ( ) throws java.io.IOException { if ( ( isBluetoothEnabled ( ) ) == false ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_SCO , ( - 1 ) , true , true , this , ( - 1 ) , null ) ; }

Target:
public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord ( java.util.UUID uuid ) throws java.io.IOException { if ( ! ( isBluetoothEnabled ( ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_RFCOMM , ( - 1 ) , true , true , this , ( - 1 ) , new android.os.ParcelUuid ( uuid ) ) ; }
Source:
private boolean mode_array ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final byte [ ] inputArray = createInputArrayByte ( size [ 0 ] , seed ) ; final com.android.rs.test.Int2 javaRslt = mode ( RS , inputArray ) ; final com.android.rs.test.Int2 rsRslt = s.reduce_mode ( inputArray ) . get ( ) ; return result ( "mode" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaRslt , rsRslt ) ; }

Target:
private boolean mode_array ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final byte [ ] inputArray = createInputArrayByte ( size [ 0 ] , seed ) ; final com.android.rs.test.Int2 javaResult = mode ( RS , inputArray ) ; final com.android.rs.test.Int2 rsResult = s.reduce_mode ( inputArray ) . get ( ) ; return result ( "mode" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaResult , rsResult ) ; }
Source:
public java.nio.charset.Charset charsetForName ( java.lang.String charsetName ) { if ( ( ( "MockCharset00" . equalsIgnoreCase ( charsetName ) ) || ( "MockCharset01" . equalsIgnoreCase ( charsetName ) ) ) || ( "MockCharset02" . equalsIgnoreCase ( charsetName ) ) ) { return new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockCharset00" , new java.lang.String [ ] { "mockCharset01" , "mockCharset02" } ) ; } return null ; }

Target:
public java.nio.charset.Charset charsetForName ( java.lang.String charsetName ) { if ( ( "US-ASCII" . equalsIgnoreCase ( charsetName ) ) || ( "ASCII" . equalsIgnoreCase ( charsetName ) ) ) { return new tests.api.java.nio.charset.CharsetTest.MockCharset ( "US-ASCII" , new java.lang.String [ ] { "ASCII" } ) ; } return null ; }
Source:
public void testMethodClassConstructor ( ) throws java.lang.Exception { java.lang.Class < ? > clazz = getMethodClassWith1ImplicitParameterConstructor ( ) ; java.lang.reflect.Constructor < ? > constructor = clazz.getDeclaredConstructor ( libcore.java.lang.reflect.ParameterTest.class ) ; libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( "[libcore.java.lang.reflect.ParameterTest arg0]" ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( libcore.java.lang.reflect.ParameterTest.class ) . checkGetParameterizedType ( "class libcore.java.lang.reflect.ParameterTest" ) ; }

Target:
public void testLambdaClassConstructor ( ) throws java.lang.Exception { java.lang.Class < ? > outerClass = libcore.java.lang.reflect.ParameterTest.class ; java.lang.Class < ? > innerClass = getLambdaClassWith1ParameterConstructor ( ) ; java.lang.reflect.Constructor < ? > constructor = innerClass.getDeclaredConstructor ( outerClass ) ; checkLambdaClassConstructor ( outerClass , constructor ) ; }
Source:
public void registerForImsiReady ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mImsiReadyRegistrants.add ( r ) ; if ( ( mImsi ) != null ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }

Target:
public void registerForImsiReady ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mImsiReadyRegistrants.add ( r ) ; if ( ( getIMSI ( ) ) != null ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull final com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; return vfs.getRootInputOutputVDir ( ) . createOutputVFile ( fileType.buildFileVPath ( typePath ) ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull final com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; return vfs.getRootInputOutputVDir ( ) . createOutputVFile ( fileType.buildFileVPath ( typePath ) ) ; }
Source:
private boolean mergeManifest ( org.w3c.dom.Document currentManifest , org.w3c.dom.Document fragment ) { com.android.manifmerger.ManifestMerger merger = new com.android.manifmerger.ManifestMerger ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ; return ( ( currentManifest != null ) && ( fragment != null ) ) && ( merger.process ( currentManifest , fragment ) ) ; }

Target:
private boolean mergeManifest ( org.w3c.dom.Document currentManifest , org.w3c.dom.Document fragment ) { com.android.manifmerger.ManifestMerger merger = new com.android.manifmerger.ManifestMerger ( com.android.manifmerger.MergerLog.wrapSdkLog ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) ) ; return ( ( currentManifest != null ) && ( fragment != null ) ) && ( merger.process ( currentManifest , fragment ) ) ; }
Source:
private void loadInternalDataFromUserStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from user store " + ( configuration.configKey ( ) ) ) ) ; } mConfiguredNetworks.put ( configuration ) ; } for ( java.lang.String ssid : deletedEphemeralSSIDs ) { mDeletedEphemeralSSIDs.add ( ssid ) ; } }

Target:
private void loadInternalDataFromUserStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from user store " + ( configuration.configKey ( ) ) ) ) ; } addMissingPskPassphraseQuotes ( configuration ) ; mConfiguredNetworks.put ( configuration ) ; } for ( java.lang.String ssid : deletedEphemeralSSIDs ) { mDeletedEphemeralSSIDs.add ( ssid ) ; } }
Source:
public void updateAggregateData ( long contactId ) { if ( ! ( mEnabled ) ) { return ; } final android.database.sqlite.SQLiteDatabase db = mDbHelper.getWritableDatabase ( ) ; computeAggregateData ( db , contactId , mContactUpdate ) ; mContactUpdate.bindLong ( com.android.providers.contacts.ContactAggregator.ContactReplaceSqlStatement.CONTACT_ID , contactId ) ; mContactUpdate.execute ( ) ; mDbHelper.updateContactVisible ( contactId ) ; updateAggregatedPresence ( contactId ) ; }

Target:
public long onRawContactInsert ( com.android.providers.contacts.TransactionContext txContext , android.database.sqlite.SQLiteDatabase db , long rawContactId ) { long contactId = insertContact ( db , rawContactId ) ; setContactId ( rawContactId , contactId ) ; mDbHelper.updateContactVisible ( txContext , contactId ) ; return contactId ; }
Source:
public boolean setNetworkSelectionModeManual ( int subId , com.android.internal.telephony.OperatorInfo operator , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setNetworkSelectionModeManual ( subId , operator , persistSelection ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , ex ) ; } return false ; }

Target:
public android.telephony.ims.aidl.IImsRcsFeature getImsRcsFeatureAndListen ( int slotIndex , com.android.ims.internal.IImsServiceFeatureCallback callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getRcsFeatureAndListen ( slotIndex , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsRcsFeatureAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( android.bluetooth.BluetoothPbap.VDBG ) android.bluetooth.BluetoothPbap.log ( "getClient()" ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service != null ) { try { return service.getClient ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothPbap.DBG ) android.bluetooth.BluetoothPbap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.bluetooth.BluetoothPbap.log ( ( "getConnectionState: device=" + device ) ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; return BluetoothProfile.STATE_DISCONNECTED ; } try { return service.getConnectionState ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } return BluetoothProfile.STATE_DISCONNECTED ; }
Source:
public abstract java.lang.Iterable < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( ) ;

Target:
public java.lang.String getPackageName ( ) { java.lang.String name = getName ( ) ; java.lang.String simpleName = getSimpleName ( ) ; if ( ( name.length ( ) ) > ( ( simpleName.length ( ) ) + 1 ) ) { return name.substring ( 0 , ( ( ( name.length ( ) ) - ( simpleName.length ( ) ) ) - 1 ) ) ; } return name ; }
Source:
public static com.android.volley.RequestQueue newRequestQueue ( android.content.Context context ) { return com.android.volley.toolbox.Volley.newRequestQueue ( context , null ) ; }

Target:
public static com.android.volley.RequestQueue newRequestQueue ( android.content.Context context , com.android.volley.toolbox.HttpStack stack ) { if ( stack == null ) { return com.android.volley.toolbox.Volley.newRequestQueue ( context , ( ( com.android.volley.toolbox.BaseHttpStack ) ( null ) ) ) ; } return com.android.volley.toolbox.Volley.newRequestQueue ( context , new com.android.volley.toolbox.BasicNetwork ( stack ) ) ; }
Source:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { synchronized ( this ) { if ( ( ( ( getCurrentState ( ) ) == ( mAudioOn ) ) && ( mCurrentDevice.equals ( device ) ) ) && ( ( mAudioState ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ) ) { return true ; } } return false ; }

Target:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { synchronized ( this ) { if ( ( ( ( mActiveScoDevice ) != null ) && ( mActiveScoDevice.equals ( device ) ) ) && ( ( mAudioState ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ) ) { return true ; } } return false ; }
Source:
public boolean visitComment ( lombok.ast.Comment node ) { java.lang.String contents = node.astContent ( ) ; com.android.tools.lint.checks.CommentDetector.checkComment ( mContext , node , contents , node.getPosition ( ) . getStart ( ) , 0 , contents.length ( ) ) ; return super . visitComment ( node ) ; }

Target:
public void visitComment ( com.intellij.psi.PsiComment comment ) { java.lang.String contents = comment.getText ( ) ; com.android.tools.lint.checks.CommentDetector.checkComment ( mContext , comment , contents , comment.getTextRange ( ) . getStartOffset ( ) , 0 , contents.length ( ) ) ; }
Source:
public void test6_anyInRange ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 50 ; i += 7 ) { assertTrue ( com.android.dx.util._tests.BitsTest.label ( i ) , com.android.dx.util.Bits.anyInRange ( bits , i , ( 100 - i ) ) ) ; } }

Target:
public void test6_anyInRange ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 50 ; i += 7 ) { assertTrue ( com.android.dx.util.BitsTest.label ( i ) , com.android.dx.util.Bits.anyInRange ( bits , i , ( 100 - i ) ) ) ; } }
Source:
private static com.google.common.collect.ImmutableList < java.lang.String > getExpansionIfKnown ( java.lang.reflect.Field optionField , com.google.devtools.common.options.Option annotation , @ javax.annotation.Nullable com.google.devtools.common.options.OptionsData optionsData ) { if ( optionsData != null ) { return optionsData.getEvaluatedExpansion ( optionField ) ; } else { if ( com.google.devtools.common.options.OptionsData.usesExpansionFunction ( annotation ) ) { return null ; } else { return com.google.common.collect.ImmutableList.copyOf ( annotation.expansion ( ) ) ; } } }

Target:
private static com.google.common.collect.ImmutableList < java.lang.String > getExpansionIfKnown ( java.lang.reflect.Field optionField , com.google.devtools.common.options.Option annotation , @ javax.annotation.Nullable com.google.devtools.common.options.OptionsData optionsData ) { if ( optionsData != null ) { try { return optionsData.getEvaluatedExpansion ( optionField , null ) ; } catch ( com.google.devtools.common.options.ExpansionNeedsValueException e ) { return null ; } catch ( com.google.devtools.common.options.OptionsParsingException e ) { throw new java.lang.IllegalStateException ( "Error expanding void expansion function: " , e ) ; } } else { if ( com.google.devtools.common.options.OptionsData.usesExpansionFunction ( annotation ) ) { return null ; } else { return com.google.common.collect.ImmutableList.copyOf ( annotation.expansion ( ) ) ; } } }
Source:
void parseOptFormalTypeParameters ( ) { org.apache.harmony.luni.lang.reflect.ListOfVariables typeParams = new org.apache.harmony.luni.lang.reflect.ListOfVariables ( ) ; if ( ( symbol ) == '<' ) { scanSymbol ( ) ; typeParams.add ( parseFormalTypeParameter ( ) ) ; while ( ( ( symbol ) != '>' ) && ( ( symbol ) > 0 ) ) { typeParams.add ( parseFormalTypeParameter ( ) ) ; } expect ( '>' ) ; } this . formalTypeParameters = typeParams.getArray ( ) ; }

Target:
void parseOptFormalTypeParameters ( ) { libcore.reflect.ListOfVariables typeParams = new libcore.reflect.ListOfVariables ( ) ; if ( ( symbol ) == '<' ) { scanSymbol ( ) ; typeParams.add ( parseFormalTypeParameter ( ) ) ; while ( ( ( symbol ) != '>' ) && ( ( symbol ) > 0 ) ) { typeParams.add ( parseFormalTypeParameter ( ) ) ; } expect ( '>' ) ; } this . formalTypeParameters = typeParams.getArray ( ) ; }
Source:
public void addHeaderView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { if ( ( mAdapter ) != null ) { throw new java.lang.IllegalStateException ( "Cannot add header view to list -- setAdapter has already been called." ) ; } android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mHeaderViewInfos.add ( info ) ; }

Target:
public void addHeaderView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { if ( ( ( mAdapter ) != null ) && ( ! ( ( mAdapter ) instanceof android.widget.HeaderViewListAdapter ) ) ) { throw new java.lang.IllegalStateException ( "Cannot add header view to list -- setAdapter has already been called." ) ; } 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 ) && ( ( mDataSetObserver ) != null ) ) { mDataSetObserver.onChanged ( ) ; } }
Source:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.unplug ( ) ) ; }

Target:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.unplug ( ) ) ; }
Source:
private void copyFileToZip ( @ javax.annotation.Nonnull java.io.File fileToCopy , @ javax.annotation.Nonnull java.lang.String entryName , @ javax.annotation.Nonnull java.util.zip.ZipOutputStream zos ) throws java.io.IOException { java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( fileToCopy ) ; java.util.zip.ZipEntry sourceEntry = new java.util.zip.ZipEntry ( entryName ) ; zos.putNextEntry ( sourceEntry ) ; com.android.jack.util.BytesStreamSucker sucker = new com.android.jack.util.BytesStreamSucker ( fis , zos ) ; sucker.suck ( ) ; } finally { if ( fis != null ) { fis.close ( ) ; } } }

Target:
private void copyFileToZip ( @ javax.annotation.Nonnull java.io.File fileToCopy , @ javax.annotation.Nonnull java.lang.String entryName , @ javax.annotation.Nonnull java.util.zip.ZipOutputStream zos ) throws java.io.IOException { java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( fileToCopy ) ; java.util.zip.ZipEntry sourceEntry = new java.util.zip.ZipEntry ( entryName ) ; zos.putNextEntry ( sourceEntry ) ; com.android.sched.util.stream.ByteStreamSucker sucker = new com.android.sched.util.stream.ByteStreamSucker ( fis , zos ) ; sucker.suck ( ) ; } finally { if ( fis != null ) { fis.close ( ) ; } } }
Source:
public int compareTo ( android.icu.text.DateTimePatternGenerator.DateTimeMatcher that ) { for ( int i = 0 ; i < ( original.length ) ; ++ i ) { int comp = original [ i ] . compareTo ( that.original [ i ] ) ; if ( comp != 0 ) return - comp ; } return 0 ; }

Target:
public int compareTo ( android.icu.text.DateTimePatternGenerator.SkeletonFields other ) { for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { int charDiff = ( chars [ i ] ) - ( other.chars [ i ] ) ; if ( charDiff != 0 ) { return charDiff ; } int lengthDiff = ( lengths [ i ] ) - ( other.lengths [ i ] ) ; if ( lengthDiff != 0 ) { return lengthDiff ; } } return 0 ; }
Source:
public boolean handlePinMmi ( java.lang.String dialString , java.lang.String callingPackage ) { try { com.android.server.telecom.Log.startSession ( "TSI.hPM" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; boolean retval = false ; try { retval = getTelephonyManager ( ) . handlePinMmi ( dialString ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } return retval ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public boolean handlePinMmi ( java.lang.String dialString , java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.hPM" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; boolean retval = false ; try { retval = getTelephonyManager ( ) . handlePinMmi ( dialString ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } return retval ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private void writeHistoryStatsFLOCK ( android.util.AtomicFile historyFile ) { java.io.FileOutputStream fos = null ; try { fos = historyFile.startWrite ( ) ; org.xmlpull.v1.XmlSerializer out = new com.android.internal.util.FastXmlSerializer ( ) ; out.setOutput ( fos , "utf-8" ) ; out.startDocument ( null , true ) ; out.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; out.startTag ( null , "usage-history" ) ; synchronized ( mStatsLock ) { for ( int i = 0 ; i < ( mLastResumeTimes.size ( ) ) ; i ++ ) { out.startTag ( null , "pkg" ) ; out.attribute ( null , "name" , mLastResumeTimes.keyAt ( i ) ) ; android.util.ArrayMap < java.lang.String , java.lang.Long > comp = mLastResumeTimes.valueAt ( i ) ; for ( int j = 0 ; j < ( comp.size ( ) ) ; j ++ ) { out.startTag ( null , "comp" ) ; out.attribute ( null , "name" , comp.keyAt ( j ) ) ; out.attribute ( null , "lrt" , comp.valueAt ( j ) . toString ( ) ) ; out.endTag ( null , "comp" ) ; } out.endTag ( null , "pkg" ) ; } } out.endTag ( null , "usage-history" ) ; out.endDocument ( ) ; historyFile.finishWrite ( fos ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( com.android.server.am.UsageStatsService.TAG , ( "Error writing history stats" + e ) ) ; if ( fos != null ) { historyFile.failWrite ( fos ) ; } } }

Target:
private void writeHistoryStatsFLOCK ( ) { java.io.FileOutputStream fos = null ; try { fos = mHistoryFile.startWrite ( ) ; org.xmlpull.v1.XmlSerializer out = new com.android.internal.util.FastXmlSerializer ( ) ; out.setOutput ( fos , "utf-8" ) ; out.startDocument ( null , true ) ; out.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; out.startTag ( null , "usage-history" ) ; synchronized ( mStatsLock ) { for ( int i = 0 ; i < ( mLastResumeTimes.size ( ) ) ; i ++ ) { out.startTag ( null , "pkg" ) ; out.attribute ( null , "name" , mLastResumeTimes.keyAt ( i ) ) ; android.util.ArrayMap < java.lang.String , java.lang.Long > comp = mLastResumeTimes.valueAt ( i ) ; for ( int j = 0 ; j < ( comp.size ( ) ) ; j ++ ) { out.startTag ( null , "comp" ) ; out.attribute ( null , "name" , comp.keyAt ( j ) ) ; out.attribute ( null , "lrt" , comp.valueAt ( j ) . toString ( ) ) ; out.endTag ( null , "comp" ) ; } out.endTag ( null , "pkg" ) ; } } out.endTag ( null , "usage-history" ) ; out.endDocument ( ) ; mHistoryFile.finishWrite ( fos ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( com.android.server.am.UsageStatsService.TAG , ( "Error writing history stats" + e ) ) ; if ( fos != null ) { mHistoryFile.failWrite ( fos ) ; } } }
Source:
void onUssdFinished ( java.lang.String ussdMessage , boolean isUssdRequest ) { if ( ( mState ) == ( State.PENDING ) ) { if ( ussdMessage == null ) { mMessage = mContext.getText ( com.android.internal.R.string.mmiComplete ) ; } else { mMessage = ussdMessage ; } mIsUssdRequest = isUssdRequest ; if ( ! isUssdRequest ) { mState = State.COMPLETE ; } mPhone.onMMIDone ( this ) ; } }

Target:
void onUssdFinished ( java.lang.String ussdMessage , boolean isUssdRequest ) { if ( ( mState ) == ( State.PENDING ) ) { if ( android.text.TextUtils.isEmpty ( ussdMessage ) ) { mMessage = mContext.getText ( com.android.internal.R.string.mmiComplete ) ; android.telephony.Rlog.v ( com.android.internal.telephony.imsphone.ImsPhoneMmiCode.LOG_TAG , ( "onUssdFinished: no message; using: " + ( mMessage ) ) ) ; } else { android.telephony.Rlog.v ( com.android.internal.telephony.imsphone.ImsPhoneMmiCode.LOG_TAG , ( "onUssdFinished: message: " + ussdMessage ) ) ; mMessage = ussdMessage ; } mIsUssdRequest = isUssdRequest ; if ( ! isUssdRequest ) { mState = State.COMPLETE ; } mPhone.onMMIDone ( this ) ; } }
Source:
public void testAesCbcHmacMd5Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesGcm96Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }
Source:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.descriptor ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }

Target:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }
Source:
private java.lang.StringBuffer subformat ( java.lang.String pluralCount , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr ) { if ( ( style ) == ( NumberFormat.PLURALCURRENCYSTYLE ) ) { java.lang.String currencyPluralPattern = currencyPluralInfo.getCurrencyPluralPattern ( pluralCount ) ; if ( ( formatPattern.equals ( currencyPluralPattern ) ) == false ) { applyPatternWithoutExpandAffix ( currencyPluralPattern , false ) ; } } expandAffixAdjustWidth ( pluralCount ) ; return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr ) ; }

Target:
private java.lang.StringBuffer subformat ( java.lang.String pluralCount , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr , int maxIntDig ) { if ( ( style ) == ( NumberFormat.PLURALCURRENCYSTYLE ) ) { java.lang.String currencyPluralPattern = currencyPluralInfo.getCurrencyPluralPattern ( pluralCount ) ; if ( ( formatPattern.equals ( currencyPluralPattern ) ) == false ) { applyPatternWithoutExpandAffix ( currencyPluralPattern , false ) ; } } expandAffixAdjustWidth ( pluralCount ) ; return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr , maxIntDig ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math_agree s = new com.android.rs.test.ScriptC_math_agree ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeValues ( s ) ; s.invoke_math_agree_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math_agree s = new com.android.rs.test.ScriptC_math_agree ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeValues ( s ) ; s.invoke_math_agree_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
private java.io.File createTextFile ( java.lang.String contents ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( getClass ( ) . getSimpleName ( ) , ".txt" ) ; try ( java.io.FileOutputStream fos = new java.io.FileOutputStream ( file ) ) { java.io.BufferedWriter writer = new java.io.BufferedWriter ( new java.io.OutputStreamWriter ( fos , java.nio.charset.StandardCharsets.UTF_8 ) ) ; writer.write ( contents ) ; writer.close ( ) ; } return file ; }

Target:
private java.io.File createFile ( byte [ ] contents ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( getClass ( ) . getSimpleName ( ) , ".txt" ) ; try ( java.io.FileOutputStream fos = new java.io.FileOutputStream ( file ) ) { fos.write ( contents ) ; } return file ; }
Source:
public boolean isPeripheralModeSupported ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return false ; try { return mService.isPeripheralModeSupported ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "failed to get peripheral mode capability: " , e ) ; } return false ; }

Target:
public boolean enable ( ) { if ( isEnabled ( ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enable(): BT already enabled!" ) ; return true ; } try { return mManagerService.enable ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
private void selectTrack ( int type , android.media.tv.TvTrackInfo track ) { mTvView.selectTrack ( type , ( track == null ? null : track.getId ( ) ) ) ; if ( type == ( android.media.tv.TvTrackInfo.TYPE_AUDIO ) ) { mTvOptionsManager.onMultiAudioChanged ( ( track == null ? null : com.android.tv.util.Utils.getMultiAudioString ( this , track , false ) ) ) ; } else if ( type == ( android.media.tv.TvTrackInfo.TYPE_SUBTITLE ) ) { mTvOptionsManager.onClosedCaptionsChanged ( track ) ; } }

Target:
private void selectTrack ( int type , android.media.tv.TvTrackInfo track , int trackIndex ) { mTvView.selectTrack ( type , ( track == null ? null : track.getId ( ) ) ) ; if ( type == ( android.media.tv.TvTrackInfo.TYPE_AUDIO ) ) { mTvOptionsManager.onMultiAudioChanged ( ( track == null ? null : com.android.tv.util.Utils.getMultiAudioString ( this , track , false ) ) ) ; } else if ( type == ( android.media.tv.TvTrackInfo.TYPE_SUBTITLE ) ) { mTvOptionsManager.onClosedCaptionsChanged ( track , trackIndex ) ; } }
Source:
public java.util.List < com.google.currysrc.api.transform.TransformRule > getTransformRules ( java.io.File file ) { com.google.currysrc.api.transform.TransformRule [ ] repackageRules = com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.getRepackagingRules ( ) ; com.google.currysrc.api.transform.TransformRule [ ] apiDocsRules = new com.google.currysrc.api.transform.TransformRule [ ] { createHidePublicClassesRule ( ) , createHideOriginalDeprecatedClassesRule ( ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.HideDraftProvisionalInternal ( ) ) , createFixupBidiClassDocRule ( ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.RemoveJavaDocTags ( "@stable" , "@draft" , "@provisional" , "@internal" ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.ReplaceIcuTags ( ) ) , createTranslateJciteInclusionRule ( ) } ; java.util.List < com.google.currysrc.api.transform.TransformRule > rulesList = com.google.common.collect.Lists.newArrayList ( repackageRules ) ; rulesList.addAll ( java.util.Arrays.asList ( apiDocsRules ) ) ; rulesList.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.HidePublicClasses ( java.util.Collections.< com.google.currysrc.api.transform.ast.TypeLocater > emptyList ( ) , "All android.icu classes are currently hidden" ) ) ) ; return rulesList ; }

Target:
public java.util.List < com.google.currysrc.api.transform.TransformRule > getTransformRules ( java.io.File ignored ) { return transformRules ; }
Source:
public void indicateRingbackTone ( int indicationType , boolean var2 ) { }

Target:
public void pcoData ( int indicationType , android.hardware.radio.V1_0.PcoDataInfo pco ) { mRil.processIndication ( indicationType ) ; android.telephony.PcoData response = new android.telephony.PcoData ( pco.cid , pco.bearerProto , pco.pcoId , com.android.internal.telephony.RIL.arrayListToPrimitiveArray ( pco.contents ) ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_PCO_DATA , response ) ; mRil.mPcoDataRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public int hashCode ( ) { int result = mBuildConfigLines.hashCode ( ) ; result = ( 31 * result ) + ( mProguardFiles.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { int result = mBuildConfigLines.hashCode ( ) ; result = ( 31 * result ) + ( mProguardFiles.hashCode ( ) ) ; result = ( 31 * result ) + ( mConsumerProguardFiles.hashCode ( ) ) ; return result ; }
Source:
private void loadViewRecursive ( com.android.hierarchyviewerlib.device.ViewNode viewNode ) { org.eclipse.swt.graphics.Image image = com.android.hierarchyviewerlib.device.DeviceBridge.loadCapture ( viewNode.window , viewNode ) ; if ( image == null ) { return ; } viewNode.image = image ; final int N = viewNode.children.size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { loadViewRecursive ( viewNode.children.get ( i ) ) ; } }

Target:
private void loadViewRecursive ( com.android.hierarchyviewerlib.models.ViewNode viewNode ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( viewNode.window.getDevice ( ) ) ; org.eclipse.swt.graphics.Image image = hvDevice.loadCapture ( viewNode.window , viewNode ) ; if ( image == null ) { return ; } viewNode.image = image ; final int N = viewNode.children.size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { loadViewRecursive ( viewNode.children.get ( i ) ) ; } }
Source:
public < T extends com.android.sched.marker.Marker > T getMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { 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 ) ) ) ; } }
Source:
private int findNextUnreservedRopReg ( int startReg , int width ) { int reg ; reg = reservedRopRegs.nextClearBit ( startReg ) ; while ( true ) { int i = 1 ; while ( ( i < width ) && ( ! ( reservedRopRegs.get ( ( reg + i ) ) ) ) ) { i ++ ; } if ( i == width ) { return reg ; } reg = reservedRopRegs.nextClearBit ( ( reg + i ) ) ; } }

Target:
private int findRopRegForLocal ( int startReg , int category ) { com.android.dx.ssa.back.FirstFitLocalCombiningAllocator.Alignment alignment = getAlignment ( category ) ; int reg = alignment.nextClearBit ( usedRopRegs , startReg ) ; while ( true ) { int i = 1 ; while ( ( i < category ) && ( ! ( usedRopRegs.get ( ( reg + i ) ) ) ) ) { i ++ ; } if ( i == category ) { return reg ; } reg = alignment.nextClearBit ( usedRopRegs , ( reg + i ) ) ; } }
Source:
public void testIsReadOnly ( ) { assertFalse ( mDatabase.isReadOnly ( ) ) ; mDatabase = android.database.sqlite.SQLiteDatabase.openDatabase ( mDatabaseFilePath , null , SQLiteDatabase.OPEN_READONLY ) ; assertTrue ( mDatabase.isReadOnly ( ) ) ; }

Target:
public void testIsReadOnly ( ) { assertFalse ( mDatabase.isReadOnly ( ) ) ; android.database.sqlite.SQLiteDatabase database = null ; try { database = android.database.sqlite.SQLiteDatabase.openDatabase ( mDatabaseFilePath , null , SQLiteDatabase.OPEN_READONLY ) ; assertTrue ( database.isReadOnly ( ) ) ; } finally { if ( database != null ) { database.close ( ) ; } } }
Source:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return mHidDeviceNativeInterface.sendReport ( id , data ) ; }

Target:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.sendReport ( id , data ) ) ; }
Source:
public int prefixLength ( ) { return mImsi.length ( ) ; }

Target:
public boolean matchesMccMnc ( java.lang.String mccMnc ) { if ( mccMnc == null ) { return false ; } if ( ( mccMnc.length ( ) ) != ( com.android.server.wifi.IMSIParameter.MCC_MNC_LENGTH ) ) { return false ; } int checkLength = com.android.server.wifi.IMSIParameter.MCC_MNC_LENGTH ; if ( ( mPrefix ) && ( ( mImsi.length ( ) ) < ( com.android.server.wifi.IMSIParameter.MCC_MNC_LENGTH ) ) ) { checkLength = mImsi.length ( ) ; } return mImsi.regionMatches ( false , 0 , mccMnc , 0 , checkLength ) ; }
Source:
public boolean resetRoamingConfiguration ( ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "resetRoamingConfiguration " ) ; try { if ( ( mWifiVendorHal ) != null ) { com.android.server.wifi.WifiNative.RoamingConfig config = new com.android.server.wifi.WifiNative.RoamingConfig ( ) ; return mWifiVendorHal.configureRoaming ( config ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return false ; }

Target:
public boolean getTxPktFates ( com.android.server.wifi.WifiNative.TxFateReport [ ] reportBufs ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getTxPktFates ( reportBufs ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int res = com.android.server.wifi.WifiNative.getTxPktFatesNative ( com.android.server.wifi.WifiNative.sWlan0Index , reportBufs ) ; if ( res != ( com.android.server.wifi.WifiNative.WIFI_SUCCESS ) ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "getTxPktFatesNative returned " + res ) ) ; return false ; } else { return true ; } } else { return false ; } } } }
Source:
public boolean isSimPinEnabled ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.isSimPinEnabled ( getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isSimPinEnabled" , e ) ; } return false ; }

Target:
public boolean iccCloseLogicalChannel ( int subId , int channel ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccCloseLogicalChannel ( subId , channel ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return false ; }
Source:
public java.util.Iterator < com.android.sched.vfs.InputVFile > getJayceIterator ( ) { com.android.jack.library.InputJackLibrary compilerStateLib = new com.android.jack.library.InputJackLibraryCodec ( ) . parseString ( new com.android.sched.util.codec.CodecContext ( ) , compilerStateFolder.getPath ( ) ) ; return compilerStateLib.iterator ( FileType.JAYCE ) ; }

Target:
public int getJayceCount ( ) throws com.android.jack.library.LibraryIOException { int size = 0 ; com.android.jack.library.InputJackLibrary compilerStateLib = null ; try { compilerStateLib = com.android.jack.test.toolchain.AbstractTestTools.getInputJackLibraryFromDir ( compilerStateFolder ) ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = compilerStateLib.iterator ( FileType.JAYCE ) ; while ( jayceIter.hasNext ( ) ) { size ++ ; jayceIter.next ( ) ; } } finally { if ( compilerStateLib != null ) { compilerStateLib.close ( ) ; } } return size ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String iccTransmitApduBasicChannel ( int subId , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccTransmitApduBasicChannel ( subId , getOpPackageName ( ) , cla , instruction , p1 , p2 , p3 , data ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }
Source:
public void testRegisterAndUnregisterNeverIdling ( ) throws java.lang.Exception { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; java.util.concurrent.FutureTask < java.lang.Boolean > resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; assertFalse ( resourcesIdle.get ( ) ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; assertTrue ( resourcesIdle.get ( ) ) ; }

Target:
public void registerAndUnregisterNeverIdling ( ) throws java.lang.Exception { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; java.util.concurrent.FutureTask < java.lang.Boolean > resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; org.junit.Assert.assertFalse ( resourcesIdle.get ( ) ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; junit.framework.Assert.assertTrue ( resourcesIdle.get ( ) ) ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public android.telephony.UiccSlotInfo [ ] getUiccSlotsInfo ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) { return null ; } return telephony.getUiccSlotsInfo ( ) ; } catch ( android.os.RemoteException e ) { return null ; } }
Source:
public com.android.sdklib.BuildToolInfo getBuildTool ( @ com.android.annotations.Nullable com.android.sdklib.repository.FullRevision revision ) { com.android.sdklib.repository.local.LocalPkgInfo pkg = getPkgInfo ( com.android.sdklib.repository.local.LocalSdk.PKG_BUILD_TOOLS , revision ) ; if ( pkg instanceof com.android.sdklib.repository.local.LocalBuildToolPkgInfo ) { return ( ( com.android.sdklib.repository.local.LocalBuildToolPkgInfo ) ( pkg ) ) . getBuildToolInfo ( ) ; } return null ; }

Target:
public com.android.sdklib.repository.local.LocalPkgInfo getPkgInfo ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.PkgType filter , @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version ) { assert ( ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_PLATFORMS ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_SAMPLES ) ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_SOURCES ) ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : getPkgsInfos ( filter ) ) { com.android.sdklib.repository.descriptors.IPkgDesc d = pkg.getDesc ( ) ; if ( ( d.hasAndroidVersion ( ) ) && ( d.getAndroidVersion ( ) . equals ( version ) ) ) { return pkg ; } } return null ; }
Source:
public void onLoadResource ( java.lang.String url ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onLoadResource=" + url ) ) ; mWebViewClient.onLoadResource ( mWebView , url ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onLoadResource ( java.lang.String url ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onLoadResource" ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onLoadResource=" + url ) ) ; mWebViewClient.onLoadResource ( mWebView , url ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onLoadResource" ) ; } }