auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addChildNode ( com.intellij.ui.CheckedTreeNode parentNode , com.google.gct.testing.dimension.GoogleCloudTestingType type , com.google.gct.testing.dimension.GoogleCloudTestingDimension dimension ) { com.intellij.ui.CheckedTreeNode newNode = new com.intellij.ui.CheckedTreeNode ( type ) ; parentNode.add ( newNode ) ; newNode.setChecked ( dimension.getEnabledTypes ( ) . contains ( type ) ) ; newNode.setEnabled ( dimension.isEditable ( ) ) ; }

Target:
private void addChildNode ( com.intellij.ui.CheckedTreeNode parentNode , com.google.gct.testing.dimension.CloudTestingType type , com.google.gct.testing.dimension.GoogleCloudTestingDimension dimension ) { com.intellij.ui.CheckedTreeNode newNode = new com.intellij.ui.CheckedTreeNode ( type ) ; parentNode.add ( newNode ) ; newNode.setChecked ( dimension.getEnabledTypes ( ) . contains ( type ) ) ; newNode.setEnabled ( dimension.isEditable ( ) ) ; }
Source:
public boolean isDirEmpty ( java.lang.String path , java.lang.String message ) { java.io.File pathFile = new java.io.File ( ( ( ( mOutDir ) + ( java.io.File.separator ) ) + path ) ) ; java.lang.String [ ] pathListing = pathFile.list ( ) ; if ( ( pathListing != null ) && ( ( pathListing.length ) > 0 ) ) { println ( "WARNING: There are already some %1$s files present. None will be created!" , message ) ; return false ; } return true ; }

Target:
public boolean isDirEmpty ( java.lang.String path , java.lang.String message , java.lang.String outDir ) { java.io.File pathFile = new java.io.File ( ( ( outDir + ( java.io.File.separator ) ) + path ) ) ; java.lang.String [ ] pathListing = pathFile.list ( ) ; if ( ( pathListing != null ) && ( ( pathListing.length ) > 0 ) ) { println ( "WARNING: There are already some %1$s files present. None will be created!" , message ) ; return false ; } return true ; }
Source:
public void writeOnImsCommand ( int phoneId , com.android.ims.internal.ImsCallSession session , int command ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( command ) ) ; } }

Target:
public void writeOnImsCommand ( int phoneId , android.telephony.ims.ImsCallSession session , int command ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( command ) ) ; } }
Source:
public void testSaveProperties ( ) { java.util.Properties props = createProps ( ) ; com.android.sdklib.internal.repository.packages.MockExtraPackage p = new com.android.sdklib.internal.repository.packages.MockExtraPackage ( null , props , "vendor" , "the_path" , ( - 1 ) , null , null , null , com.android.sdklib.internal.repository.archives.Archive.Os.ANY , com.android.sdklib.internal.repository.archives.Archive.Arch.ANY , LOCAL_ARCHIVE_PATH ) ; java.util.Properties props2 = new java.util.Properties ( ) ; p.saveProperties ( props2 ) ; assertEquals ( props2 , props ) ; }

Target:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.MockExtraPackage p = new com.android.sdklib.internal.repository.packages.MockExtraPackage ( null , expected , "vendor" , "the_path" , ( - 1 ) , null , null , null , com.android.sdklib.internal.repository.archives.Archive.Os.ANY , com.android.sdklib.internal.repository.archives.Archive.Arch.ANY , LOCAL_ARCHIVE_PATH ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }
Source:
private java.lang.String getBackendUrl ( ) { if ( useProd.isSelected ( ) ) { return prodUrlField.getText ( ) ; } if ( useStaging.isSelected ( ) ) { return stagingUrlField.getText ( ) ; } if ( useTest.isSelected ( ) ) { return testUrlField.getText ( ) ; } if ( useCustom.isSelected ( ) ) { return customUrlField.getText ( ) ; } throw new java.lang.RuntimeException ( "No URL option is selected!" ) ; }

Target:
private com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption getBackendOption ( ) { if ( useProd.isSelected ( ) ) { return com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption.PROD ; } if ( useStaging.isSelected ( ) ) { return com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption.STAGING ; } if ( useTest.isSelected ( ) ) { return com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption.TEST ; } if ( useCustom.isSelected ( ) ) { return com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption.CUSTOM ; } throw new java.lang.RuntimeException ( "No URL option is selected!" ) ; }
Source:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( "onStartCommand " + intent ) ) ; if ( intent.getBooleanExtra ( HeadsetClientService.HFP_CLIENT_STOP_TAG , false ) ) { stopSelf ( ) ; return 0 ; } else { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED ) ; filter.addAction ( BluetoothHeadsetClient.ACTION_CALL_CHANGED ) ; registerReceiver ( mBroadcastReceiver , filter ) ; return START_STICKY ; } }

Target:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , ( "onStartCommand " + intent ) ) ; } if ( intent.getBooleanExtra ( HeadsetClientService.HFP_CLIENT_STOP_TAG , false ) ) { stopSelf ( ) ; return 0 ; } else { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED ) ; filter.addAction ( BluetoothHeadsetClient.ACTION_CALL_CHANGED ) ; registerReceiver ( mBroadcastReceiver , filter ) ; return START_STICKY ; } }
Source:
public static int fromKeymaster ( int digest ) { switch ( digest ) { case android.security.keymaster.KeymasterDefs.KM_DIGEST_NONE : return android.security.KeyStoreKeyConstraints.Digest.NONE ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA_2_256 : return android.security.KeyStoreKeyConstraints.Digest.SHA256 ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown digest: " + digest ) ) ; } }

Target:
public static int fromKeymaster ( int digest ) { switch ( digest ) { case android.security.keymaster.KeymasterDefs.KM_DIGEST_NONE : return android.security.KeyStoreKeyConstraints.Digest.NONE ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_MD5 : return android.security.KeyStoreKeyConstraints.Digest.MD5 ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA1 : return android.security.KeyStoreKeyConstraints.Digest.SHA1 ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA_2_224 : return android.security.KeyStoreKeyConstraints.Digest.SHA224 ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA_2_256 : return android.security.KeyStoreKeyConstraints.Digest.SHA256 ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA_2_384 : return android.security.KeyStoreKeyConstraints.Digest.SHA384 ; case android.security.keymaster.KeymasterDefs.KM_DIGEST_SHA_2_512 : return android.security.KeyStoreKeyConstraints.Digest.SHA512 ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown digest: " + digest ) ) ; } }
Source:
private boolean equals ( @ javax.annotation.Nonnull long [ ] bitmap ) { assert ( this . bitmap.length ) == ( bitmap.length ) ; for ( int i = 0 ; i < ( this . bitmap.length ) ; i ++ ) { if ( ( this . bitmap [ i ] ) != ( bitmap [ i ] ) ) { return false ; } } return true ; }

Target:
private boolean bitmapEquals ( @ javax.annotation.Nonnull long [ ] bitmap ) { assert ( this . bitmap.length ) == ( bitmap.length ) ; for ( int i = 0 ; i < ( this . bitmap.length ) ; i ++ ) { if ( ( this . bitmap [ i ] ) != ( bitmap [ i ] ) ) { return false ; } } return true ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( patch , com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
public void setDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setDataEnabled" , e ) ; } }

Target:
public void setDataEnabled ( int subId , boolean enable ) { setUserMobileDataEnabled ( subId , enable ) ; }
Source:
public void run ( com.android.jack.ir.ast.cfg.JControlFlowGraph t ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock bb : t.getAllBlocksUnordered ( ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlockElement e : bb.getElements ( true ) ) { if ( e instanceof com.android.jack.ir.ast.cfg.JPhiBlockElement ) { com.android.jack.ir.ast.cfg.JPhiBlockElement phi = ( ( com.android.jack.ir.ast.cfg.JPhiBlockElement ) ( e ) ) ; if ( phi.getLhs ( ) . getUses ( ) . isEmpty ( ) ) { ( ( com.android.jack.ir.ast.cfg.JRegularBasicBlock ) ( bb ) ) . removeElement ( e ) ; continue ; } pruneUnreachableDef ( phi ) ; } } } }

Target:
public void run ( com.android.jack.ir.ast.cfg.JControlFlowGraph t ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock bb : t.getAllBlocksUnordered ( ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlockElement e : com.google.common.collect.Lists.newArrayList ( bb.getElements ( true ) ) ) { if ( e instanceof com.android.jack.ir.ast.cfg.JPhiBlockElement ) { com.android.jack.ir.ast.cfg.JPhiBlockElement phi = ( ( com.android.jack.ir.ast.cfg.JPhiBlockElement ) ( e ) ) ; if ( phi.getLhs ( ) . getUses ( ) . isEmpty ( ) ) { ( ( com.android.jack.ir.ast.cfg.JRegularBasicBlock ) ( bb ) ) . removeElement ( e ) ; continue ; } pruneUnreachableDef ( phi ) ; } } } }
Source:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; return com.google.common.collect.Iterables.concat ( java.util.Arrays.asList ( a , b ) ) ; }

Target:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c ) { return com.google.common.collect.Iterables.concat ( com.google.common.collect.ImmutableList.of ( a , b , c ) ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , float [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_16 , data.length ) ; }
Source:
protected void replaceImpl ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode newNode ) throws java.lang.UnsupportedOperationException { if ( ( lhs ) == existingNode ) { lhs = ( ( com.android.jack.ir.ast.JSsaVariableDefRef ) ( newNode ) ) ; return ; } for ( com.android.jack.ir.ast.cfg.JBasicBlock pred : rhs.keySet ( ) ) { if ( ( rhs.get ( pred ) ) == existingNode ) { rhs.put ( pred , ( ( com.android.jack.ir.ast.JSsaVariableUseRef ) ( newNode ) ) ) ; return ; } } super . replaceImpl ( existingNode , newNode ) ; }

Target:
protected void replaceImpl ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode newNode ) throws java.lang.UnsupportedOperationException { if ( ( lhs ) == existingNode ) { lhs = ( ( com.android.jack.ir.ast.JSsaVariableDefRef ) ( newNode ) ) ; return ; } for ( java.util.Map.Entry < com.android.jack.ir.ast.cfg.JBasicBlock , com.android.jack.ir.ast.JSsaVariableUseRef > pred : rhs.entrySet ( ) ) { if ( ( pred.getValue ( ) ) == existingNode ) { rhs.put ( pred.getKey ( ) , ( ( com.android.jack.ir.ast.JSsaVariableUseRef ) ( newNode ) ) ) ; return ; } } super . replaceImpl ( existingNode , newNode ) ; }
Source:
com.android.build.gradle.tasks.List < com.android.build.gradle.tasks.File > getInputFiles ( ) { com.google.common.collect.ImmutableList.Builder < com.android.build.gradle.tasks.File > builder = com.google.common.collect.ImmutableList.builder ( ) ; com.android.build.gradle.tasks.forEachInputFile split ; com.android.build.gradle.tasks.forEachInputFile file ; builder.add ( file ) ; return builder.build ( ) ; }

Target:
public java.util.List < java.io.File > getInputFiles ( ) { final com.google.common.collect.ImmutableList.Builder < java.io.File > builder = com.google.common.collect.ImmutableList.builder ( ) ; forEachInputFile ( new com.android.build.gradle.tasks.PackageSplitRes.SplitFileHandler ( ) { @ java.lang.Override public void execute ( java.lang.String split , java.io.File file ) { builder.add ( file ) ; } } ) ; return builder.build ( ) ; }
Source:
private void handleSimAbsent ( int slotId ) { if ( ( ( com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] ) != null ) && ( ! ( com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] . equals ( com.android.internal.telephony.SubscriptionInfoUpdater.ICCID_STRING_FOR_NO_SIM ) ) ) ) { logd ( ( ( "SIM" + ( slotId + 1 ) ) + " hot plug out" ) ) ; } com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] = com.android.internal.telephony.SubscriptionInfoUpdater.ICCID_STRING_FOR_NO_SIM ; if ( isAllIccIdQueryDone ( ) ) { updateSubscriptionInfoByIccId ( ) ; } updateCarrierServices ( slotId , IccCardConstants.INTENT_VALUE_ICC_ABSENT ) ; }

Target:
private void handleSimAbsent ( int slotId ) { if ( ( ( com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] ) != null ) && ( ! ( com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] . equals ( com.android.internal.telephony.SubscriptionInfoUpdater.ICCID_STRING_FOR_NO_SIM ) ) ) ) { logd ( ( ( "SIM" + ( slotId + 1 ) ) + " hot plug out" ) ) ; } com.android.internal.telephony.SubscriptionInfoUpdater.mIccId [ slotId ] = com.android.internal.telephony.SubscriptionInfoUpdater.ICCID_STRING_FOR_NO_SIM ; if ( isAllIccIdQueryDone ( ) ) { updateSubscriptionInfoByIccId ( ) ; } updateCarrierServices ( slotId , IccCardConstants.INTENT_VALUE_ICC_ABSENT ) ; broadcastSimStateChanged ( slotId , IccCardConstants.INTENT_VALUE_ICC_ABSENT , null ) ; }
Source:
public void test_SSL_check_private_key_key_then_cert ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_check_private_key_cert_then_key ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getNativeRef ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
public void setAdditionalInputMethodSubtypes ( java.lang.String imiId , android.view.inputmethod.InputMethodSubtype [ ] subtypes ) { synchronized ( mH ) { try { mService.setAdditionalInputMethodSubtypes ( imiId , subtypes ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; } } }

Target:
public void setAdditionalInputMethodSubtypes ( java.lang.String imiId , android.view.inputmethod.InputMethodSubtype [ ] subtypes ) { synchronized ( mH ) { try { mService.setAdditionalInputMethodSubtypes ( imiId , subtypes ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public int getNodeStartOffset ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { return pos.getOffset ( ) ; } return - 1 ; }

Target:
public int getNodeStartOffset ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( mParser.getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { return pos.getOffset ( ) ; } return - 1 ; }
Source:
public int getPort ( ) { java.net.SocketAddress remote = sc.remoteAddress ( ) ; if ( remote == null ) { return 0 ; } else { return ( ( java.net.InetSocketAddress ) ( remote ) ) . getPort ( ) ; } }

Target:
public int getPort ( ) { if ( ! ( isConnected ( ) ) ) { return 0 ; } java.net.SocketAddress remote = sc.remoteAddress ( ) ; if ( remote == null ) { return 0 ; } else { return ( ( java.net.InetSocketAddress ) ( remote ) ) . getPort ( ) ; } }
Source:
private void print ( java.lang.String s ) throws java.io.IOException { if ( ( ( precision ) != ( - 1 ) ) && ( ( precision ) < ( s.length ( ) ) ) ) s = s.substring ( 0 , precision ) ; if ( f.contains ( java.util.Formatter.Flags.UPPERCASE ) ) s = s.toUpperCase ( ) ; a.append ( justify ( s ) ) ; }

Target:
private void print ( java.lang.String s ) throws java.io.IOException { if ( ( ( precision ) != ( - 1 ) ) && ( ( precision ) < ( s.length ( ) ) ) ) s = s.substring ( 0 , precision ) ; if ( f.contains ( java.util.Formatter.Flags.UPPERCASE ) ) { s = s.toUpperCase ( ( ( l ) != null ? l : java.util.Locale.getDefault ( ) ) ) ; } a.append ( justify ( s ) ) ; }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "dexopt" ) ; builder.append ( ' ' ) ; builder.append ( apkPath ) ; builder.append ( ' ' ) ; builder.append ( uid ) ; builder.append ( ( isPublic ? " 1" : " 0" ) ) ; builder.append ( " *" ) ; return execute ( builder.toString ( ) ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "dexopt" ) ; builder.append ( ' ' ) ; builder.append ( apkPath ) ; builder.append ( ' ' ) ; builder.append ( uid ) ; builder.append ( ( isPublic ? " 1" : " 0" ) ) ; builder.append ( " *" ) ; builder.append ( ' ' ) ; builder.append ( instructionSet ) ; return execute ( builder.toString ( ) ) ; }
Source:
public android.app.ContextImpl getSystemContext ( ) { synchronized ( this ) { if ( ( android.app.ActivityThread.mSystemContext ) == null ) { android.app.ContextImpl context = android.app.ContextImpl.createSystemContext ( this ) ; android.app.LoadedApk info = new android.app.LoadedApk ( this , "android" , context , null , android.content.res.CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO ) ; context.init ( info , null , this ) ; context.getResources ( ) . updateConfiguration ( mResourcesManager.getConfiguration ( ) , mResourcesManager.getDisplayMetricsLocked ( Display.DEFAULT_DISPLAY ) ) ; android.app.ActivityThread.mSystemContext = context ; } } return android.app.ActivityThread.mSystemContext ; }

Target:
public android.app.ContextImpl getSystemContext ( ) { synchronized ( this ) { if ( ( mSystemContext ) == null ) { mSystemContext = android.app.ContextImpl.createSystemContext ( this ) ; } return mSystemContext ; } }
Source:
public static libcore.Repository openJdk9 ( java.nio.file.Path upstreamRoot , java.lang.String upstreamName ) { java.util.List < java.lang.String > sourceDirs = java.util.Arrays.asList ( "jdk/src/java.base/share/classes" , "jdk/src/java.logging/share/classes" , "jdk/src/java.prefs/share/classes" , "jdk/src/java.sql/share/classes" , "jdk/src/java.desktop/share/classes" , "jdk/src/java.base/solaris/classes" , "jdk/src/java.base/unix/classes" , "jdk/src/java.prefs/unix/classes" , "jdk/src/jdk.unsupported/share/classes" , "jdk/src/jdk.net/share/classes" , "jdk/src/java.base/linux/classes" , "build/linux-x86_64-normal-server-release/support/gensrc/java.base" , "jdk/src/java.base/unix/native/libjava" , "jdk/src/java.base/share/native/libjava" ) ; return new libcore.Repository.OpenJdkRepository ( upstreamRoot , upstreamName , sourceDirs ) ; }

Target:
public static libcore.Repository openJdk9 ( java.nio.file.Path upstreamRoot , java.lang.String upstreamName ) { java.util.List < java.lang.String > sourceDirs = java.util.Arrays.asList ( "jdk/src/java.base/share/classes" , "jdk/src/java.logging/share/classes" , "jdk/src/java.prefs/share/classes" , "jdk/src/java.sql/share/classes" , "jdk/src/java.desktop/share/classes" , "jdk/src/java.base/solaris/classes" , "jdk/src/java.base/unix/classes" , "jdk/src/java.prefs/unix/classes" , "jdk/src/jdk.unsupported/share/classes" , "jdk/src/jdk.net/share/classes" , "jdk/src/java.base/linux/classes" , "build/linux-x86_64-normal-server-release/support/gensrc/java.base" , "jdk/src/java.base/unix/native/libjava" , "jdk/src/java.base/share/native/libjava" , "jdk/src/java.base/unix/native/libnio" , "jdk/src/java.base/unix/native/libnio/ch" , "jdk/src/java.base/unix/native/libnio/fs" , "jdk/src/java.base/unix/native/libnet" ) ; return new libcore.Repository.OpenJdkRepository ( upstreamRoot , upstreamName , sourceDirs ) ; }
Source:
public void verifyCallbackVideoAvailable ( ) { android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; assertNotNull ( session ) ; session.notifyVideoAvailable ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { return ( mCallback.mVideoAvailableCount ) > 0 ; } } . run ( ) ; }

Target:
public void verifyCallbackVideoAvailable ( ) { resetCounts ( ) ; android.media.tv.cts.TvInputServiceTest.CountingTvInputService.CountingSession session = android.media.tv.cts.TvInputServiceTest.CountingTvInputService.sSession ; assertNotNull ( session ) ; session.notifyVideoAvailable ( ) ; new android.cts.util.PollingCheck ( android.media.tv.cts.TvInputServiceTest.TIME_OUT ) { @ java.lang.Override protected boolean check ( ) { return ( mCallback.mVideoAvailableCount ) > 0 ; } } . run ( ) ; }
Source:
public void testNoLintWarningOnGetPackageInfoOnNonPackageManagerClass ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( ( "src/test/pkg/GetSignaturesNotPackageManagerTest.java.txt" + "=>src/test/pkg/GetSignaturesNotPackageManagerTest.java" ) ) ) ; }

Target:
public void testNoLintWarningOnGetPackageInfoOnNonPackageManagerClass ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( java ( "src/test/pkg/GetSignaturesNotPackageManagerTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "import android.content.pm.PackageInfo;\n" ) + "\n" ) + "public class GetSignaturesNotPackageManagerTest extends Activity {\n" ) + " public void passLintCheck(Mock mock) throws Exception {\n" ) + " mock.getPackageInfo(\"some.pkg\", PackageManager.GET_SIGNATURES);\n" ) + " }\n" ) + " public interface Mock {\n" ) + " PackageInfo getPackageInfo(String pkg, int flags);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( other == null ) { return false ; } else if ( ( this ) == other ) { return true ; } else if ( other instanceof android.icu.impl.ICUResource.Key ) { android.icu.impl.ICUResource.Key otherKey = ( ( android.icu.impl.ICUResource.Key ) ( other ) ) ; return ( ( length ) == ( otherKey.length ) ) && ( contentEquals ( otherKey.bytes , otherKey.offset , length ) ) ; } else { return false ; } }

Target:
public boolean equals ( java.lang.Object other ) { if ( other == null ) { return false ; } else if ( ( this ) == other ) { return true ; } else if ( other instanceof android.icu.impl.ICUResource.Key ) { android.icu.impl.ICUResource.Key otherKey = ( ( android.icu.impl.ICUResource.Key ) ( other ) ) ; return ( ( length ) == ( otherKey.length ) ) && ( regionMatches ( otherKey.bytes , otherKey.offset , length ) ) ; } else { return false ; } }
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState orientation = com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState.getEnum ( value ) ; if ( orientation != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ( ) ; qualifier.mValue = orientation ; config.setKeyboardStateQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.sdklib.resources.KeyboardState orientation = com.android.sdklib.resources.KeyboardState.getEnum ( value ) ; if ( orientation != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ( ) ; qualifier.mValue = orientation ; config.setKeyboardStateQualifier ( qualifier ) ; return true ; } return false ; }
Source:
public void testCorruptOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeCorruptFile ( ) , libcore.util.ZoneInfoDBTest.TZDATA_IN_DATA , libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; assertEquals ( libcore.util.ZoneInfoDBTest.CURRENT_VERSION , data.getVersion ( ) ) ; assertEquals ( java.util.TimeZone.getAvailableIDs ( ) . length , data.getAvailableIDs ( ) . length ) ; }

Target:
public void testEmptyOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; libcore.util.ZoneInfoDB.TzData dataWithEmptyOverride = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeEmptyFile ( ) , libcore.util.ZoneInfoDBTest.TZDATA_IN_ROOT ) ; assertEquals ( data.getVersion ( ) , dataWithEmptyOverride.getVersion ( ) ) ; assertEquals ( data.getAvailableIDs ( ) . length , dataWithEmptyOverride.getAvailableIDs ( ) . length ) ; }
Source:
public static void startMethodTracing ( java.lang.String traceFileName , java.io.FileDescriptor fd , int bufferSize , int flags ) { if ( fd == null ) { throw new java.lang.NullPointerException ( "fd == null" ) ; } dalvik.system.VMDebug.startMethodTracingFd ( traceFileName , fd , dalvik.system.VMDebug.checkBufferSize ( bufferSize ) , flags ) ; }

Target:
public static void startMethodTracing ( java.lang.String traceFileName , java.io.FileDescriptor fd , int bufferSize , int flags , boolean samplingEnabled , int intervalUs ) { if ( fd == null ) { throw new java.lang.NullPointerException ( "fd == null" ) ; } dalvik.system.VMDebug.startMethodTracingFd ( traceFileName , fd , dalvik.system.VMDebug.checkBufferSize ( bufferSize ) , flags , samplingEnabled , intervalUs ) ; }
Source:
public static void handleTrustStorageUpdate ( ) { try { javax.net.ssl.X509TrustManager x509TrustManager = org.apache.harmony.xnet.provider.jsse.SSLParametersImpl.getDefaultTrustManager ( ) ; if ( x509TrustManager instanceof org.apache.harmony.xnet.provider.jsse.TrustManagerImpl ) { org.apache.harmony.xnet.provider.jsse.TrustManagerImpl trustManager = ( ( org.apache.harmony.xnet.provider.jsse.TrustManagerImpl ) ( x509TrustManager ) ) ; trustManager.handleTrustStorageUpdate ( ) ; } } catch ( java.security.KeyManagementException ignored ) { } }

Target:
public static void handleTrustStorageUpdate ( ) { try { javax.net.ssl.X509TrustManager x509TrustManager = com.android.org.conscrypt.SSLParametersImpl.getDefaultTrustManager ( ) ; if ( x509TrustManager instanceof com.android.org.conscrypt.TrustManagerImpl ) { com.android.org.conscrypt.TrustManagerImpl trustManager = ( ( com.android.org.conscrypt.TrustManagerImpl ) ( x509TrustManager ) ) ; trustManager.handleTrustStorageUpdate ( ) ; } } catch ( java.security.KeyManagementException ignored ) { } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mGLSurfaceView = new android.opengl.GLSurfaceView ( this ) ; mGLSurfaceView.setRenderer ( new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ) ; setContentView ( mGLSurfaceView ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mGLSurfaceView = new android.opengl.GLSurfaceView ( this ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ; mListener = renderer ; mGLSurfaceView.setRenderer ( renderer ) ; setContentView ( mGLSurfaceView ) ; }
Source:
public void fetchCalls ( ) { callLogQueryHandler.fetchCalls ( callTypeFilter , dateLimit ) ; if ( ! ( isCallLogActivity ) ) { com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener.class ) . updateTabUnreadCounts ( ) ; } }

Target:
public void fetchCalls ( ) { callLogQueryHandler.fetchCalls ( callTypeFilter , dateLimit ) ; if ( ( ( ! ( isCallLogActivity ) ) && ( ( getActivity ( ) ) != null ) ) && ( ! ( getActivity ( ) . isFinishing ( ) ) ) ) { com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener.class ) . updateTabUnreadCounts ( ) ; } }
Source:
public static java.lang.String toString ( int state ) { switch ( state ) { case com.android.ims.internal.ImsCallSession.State.IDLE : return "IDLE" ; case com.android.ims.internal.ImsCallSession.State.INITIATED : return "INITIATED" ; case com.android.ims.internal.ImsCallSession.State.NEGOTIATING : return "NEGOTIATING" ; case com.android.ims.internal.ImsCallSession.State.ESTABLISHING : return "ESTABLISHING" ; case com.android.ims.internal.ImsCallSession.State.ESTABLISHED : return "ESTABLISHED" ; case com.android.ims.internal.ImsCallSession.State.RENEGOTIATING : return "RENEGOTIATING" ; case com.android.ims.internal.ImsCallSession.State.REESTABLISHING : return "REESTABLISHING" ; case com.android.ims.internal.ImsCallSession.State.TERMINATING : return "TERMINATING" ; case com.android.ims.internal.ImsCallSession.State.TERMINATED : return "TERMINATED" ; default : return "UNKNOWN" ; } }

Target:
public static java.lang.String toString ( int state ) { switch ( state ) { case android.telephony.ims.ImsCallSession.State.IDLE : return "IDLE" ; case android.telephony.ims.ImsCallSession.State.INITIATED : return "INITIATED" ; case android.telephony.ims.ImsCallSession.State.NEGOTIATING : return "NEGOTIATING" ; case android.telephony.ims.ImsCallSession.State.ESTABLISHING : return "ESTABLISHING" ; case android.telephony.ims.ImsCallSession.State.ESTABLISHED : return "ESTABLISHED" ; case android.telephony.ims.ImsCallSession.State.RENEGOTIATING : return "RENEGOTIATING" ; case android.telephony.ims.ImsCallSession.State.REESTABLISHING : return "REESTABLISHING" ; case android.telephony.ims.ImsCallSession.State.TERMINATING : return "TERMINATING" ; case android.telephony.ims.ImsCallSession.State.TERMINATED : return "TERMINATED" ; default : return "UNKNOWN" ; } }
Source:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierActionAgentTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mFakeContentResolver = new com.android.internal.telephony.CarrierActionAgentTest.FakeContentResolver ( ) ; mFakeContentProvider = new com.android.internal.telephony.CarrierActionAgentTest.FakeContentProvider ( ) ; mFakeContentResolver.addProvider ( Settings.AUTHORITY , mFakeContentProvider ) ; org.mockito.Mockito.doReturn ( mFakeContentResolver ) . when ( mContext ) . getContentResolver ( ) ; new com.android.internal.telephony.CarrierActionAgentTest.CarrierActionAgentHandler ( getClass ( ) . getSimpleName ( ) ) . start ( ) ; waitUntilReady ( ) ; logd ( "CarrierActionAgentTest -Setup!" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierActionAgentTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mFakeContentResolver = new com.android.internal.telephony.CarrierActionAgentTest.FakeContentResolver ( ) ; mFakeContentProvider = new com.android.internal.telephony.CarrierActionAgentTest.FakeContentProvider ( ) ; mFakeContentResolver.addProvider ( Settings.AUTHORITY , mFakeContentProvider ) ; org.mockito.Mockito.doReturn ( mFakeContentResolver ) . when ( mContext ) . getContentResolver ( ) ; mCarrierActionAgentHandler = new com.android.internal.telephony.CarrierActionAgentTest.CarrierActionAgentHandler ( getClass ( ) . getSimpleName ( ) ) ; mCarrierActionAgentHandler.start ( ) ; waitUntilReady ( ) ; logd ( "CarrierActionAgentTest -Setup!" ) ; }
Source:
android.telecom.cts.MockConference verifyConferenceForOutgoingCall ( ) { try { if ( ! ( connectionService.lock.tryAcquire ( TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ) { fail ( "No outgoing conference requested by Telecom" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TAG , "Test interrupted!" ) ; } android.telecom.cts.MockConference conference = connectionService.conferences.get ( 0 ) ; setAndVerifyConferenceForOutgoingCall ( conference ) ; return conference ; }

Target:
android.telecom.cts.MockConference verifyConferenceForOutgoingCall ( ) { try { if ( ! ( connectionService.lock.tryAcquire ( TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ) { fail ( "No outgoing conference requested by Telecom" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TestUtils.TAG , "Test interrupted!" ) ; } android.telecom.cts.MockConference conference = connectionService.conferences.get ( 0 ) ; setAndVerifyConferenceForOutgoingCall ( conference ) ; return conference ; }
Source:
public void onPageScrolled ( int position , float positionOffset , int positionOffsetPixels ) { mTabIndex = mAdapter.getRtlPosition ( position ) ; final int count = mOnPageChangeListeners.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { mOnPageChangeListeners.get ( i ) . onPageScrolled ( position , positionOffset , positionOffsetPixels ) ; } }

Target:
public void onPageScrolled ( int position , float positionOffset , int positionOffsetPixels ) { if ( positionOffsetPixels != 0 ) { onPageScrolledBeforeScrollStateSettling = true ; } mTabIndex = mAdapter.getRtlPosition ( position ) ; final int count = mOnPageChangeListeners.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { mOnPageChangeListeners.get ( i ) . onPageScrolled ( position , positionOffset , positionOffsetPixels ) ; } }
Source:
public void testPackageSubstitution_withDot ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( ".ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , new com.android.manifmerger.AttributeModel ( "ActivityOne" , true , null , null ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . setValue ( "com.foo.bar.ActivityOne" ) ; }

Target:
public void testPackageSubstitution_withDot ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( ".ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , com.android.manifmerger.AttributeModel.newModel ( "ActivityOne" ) . setIsPackageDependent ( ) . build ( ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . setValue ( "com.foo.bar.ActivityOne" ) ; }
Source:
public void setOutgoingCallerIdDisplay ( int commandInterfaceCLIRMode , android.os.Message onComplete ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( ( imsPhone != null ) && ( ( imsPhone.getServiceState ( ) . getState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) ) { imsPhone.setOutgoingCallerIdDisplay ( commandInterfaceCLIRMode , onComplete ) ; return ; } mCi.setCLIR ( commandInterfaceCLIRMode , obtainMessage ( com.android.internal.telephony.EVENT_SET_CLIR_COMPLETE , commandInterfaceCLIRMode , 0 , onComplete ) ) ; } else { loge ( "setOutgoingCallerIdDisplay: not possible in CDMA" ) ; } }

Target:
public void setOutgoingCallerIdDisplay ( int commandInterfaceCLIRMode , android.os.Message onComplete ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.Phone imsPhone = mImsPhone ; if ( ( imsPhone != null ) && ( ( ( imsPhone.getServiceState ( ) . getState ( ) ) == ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) || ( imsPhone.isUtEnabled ( ) ) ) ) { imsPhone.setOutgoingCallerIdDisplay ( commandInterfaceCLIRMode , onComplete ) ; return ; } mCi.setCLIR ( commandInterfaceCLIRMode , obtainMessage ( com.android.internal.telephony.EVENT_SET_CLIR_COMPLETE , commandInterfaceCLIRMode , 0 , onComplete ) ) ; } else { loge ( "setOutgoingCallerIdDisplay: not possible in CDMA" ) ; } }
Source:
public void init ( org.bouncycastle.crypto.CipherParameters params ) { if ( params instanceof org.bouncycastle.crypto.params.KeyParameter ) { cipher.init ( true , params ) ; L = new byte [ ZEROES.length ] ; cipher.processBlock ( ZEROES , 0 , L , 0 ) ; Lu = org.bouncycastle.crypto.macs.CMac.doubleLu ( L ) ; Lu2 = org.bouncycastle.crypto.macs.CMac.doubleLu ( Lu ) ; } else if ( params != null ) { throw new java.lang.IllegalArgumentException ( "CMac mode only permits key to be set." ) ; } reset ( ) ; }

Target:
void validate ( org.bouncycastle.crypto.CipherParameters params ) { if ( params != null ) { if ( ! ( params instanceof org.bouncycastle.crypto.params.KeyParameter ) ) { throw new java.lang.IllegalArgumentException ( "CMac mode only permits key to be set." ) ; } } }
Source:
public boolean addLinkAddress ( android.net.LinkAddress address ) { if ( ( address != null ) && ( ! ( mLinkAddresses.contains ( address ) ) ) ) { mLinkAddresses.add ( address ) ; return true ; } return false ; }

Target:
private int findLinkAddressIndex ( android.net.LinkAddress address ) { for ( int i = 0 ; i < ( mLinkAddresses.size ( ) ) ; i ++ ) { if ( mLinkAddresses.get ( i ) . isSameAddressAs ( address ) ) { return i ; } } return - 1 ; }
Source:
public final float getFloat ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }

Target:
final void get ( long [ ] dst , int dstOffset , int longCount ) { int byteCount = checkGetBounds ( SizeOf.LONG , dst.length , dstOffset , longCount ) ; this . block.peekLongArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , longCount , order.needsSwap ) ; position += byteCount ; }
Source:
public boolean shouldRollBack ( double number ) { return ( ( ( ( ( sub1 ) != null ) && ( sub1.isModulusSubstitution ( ) ) ) || ( ( ( sub2 ) != null ) && ( sub2.isModulusSubstitution ( ) ) ) ) && ( ( number % ( java.lang.Math.pow ( radix , exponent ) ) ) == 0 ) ) && ( ( ( baseValue ) % ( java.lang.Math.pow ( radix , exponent ) ) ) != 0 ) ; }

Target:
public boolean shouldRollBack ( long number ) { if ( ! ( ( ( ( sub1 ) != null ) && ( sub1.isModulusSubstitution ( ) ) ) || ( ( ( sub2 ) != null ) && ( sub2.isModulusSubstitution ( ) ) ) ) ) { return false ; } long divisor = com.ibm.icu.text.NFRule.power ( radix , exponent ) ; return ( ( number % divisor ) == 0 ) && ( ( ( baseValue ) % divisor ) != 0 ) ; }
Source:
public void testRootnF32_4 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_4 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandom ( 4400074 , 32 , 1 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n4 ( nAlloc ) ; doF32_4 ( 11145969 , 16 ) ; }

Target:
public void testRootnF32_4 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_4 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 4 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 4400074 , 32 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n4 ( nAlloc ) ; doF32_4 ( 11145969 , 16 ) ; }
Source:
public void checkClientTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = sslSocket.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } parameters = sslSocket.getSSLParameters ( ) ; } checkTrusted ( chain , authType , session , parameters , true ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , javax.net.ssl.SSLSession session ) throws java.security.cert.CertificateException { return checkTrusted ( chain , authType , session.getPeerHost ( ) , false ) ; }
Source:
public void setHs20 ( boolean hs20 ) { if ( hs20 ) { doBooleanCommand ( "SET HS20 1" ) ; } else { doBooleanCommand ( "SET HS20 0" ) ; } }

Target:
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 ; }
Source:
public void testGetDeviceId ( ) { if ( ! ( mHasTelephony ) ) { return ; } try { java.lang.String id = mTelephonyManager.getDeviceId ( ) ; fail ( ( "Got device ID: " + id ) ) ; } catch ( java.lang.SecurityException e ) { } try { java.lang.String id = mTelephonyManager.getDeviceId ( 0 ) ; fail ( ( "Got device ID: " + id ) ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testGetDeviceId ( ) { if ( ! ( mHasTelephony ) ) { return ; } try { java.lang.String id = mTelephonyManager.getDeviceId ( ) ; org.junit.Assert.fail ( ( "Got device ID: " + id ) ) ; } catch ( java.lang.SecurityException e ) { } try { java.lang.String id = mTelephonyManager.getDeviceId ( 0 ) ; org.junit.Assert.fail ( ( "Got device ID: " + id ) ) ; } catch ( java.lang.SecurityException e ) { } }
Source:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object o ) { if ( o instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) ; java.util.Collection < V > collection = multimap ( ) . asMap ( ) . get ( entry.getElement ( ) ) ; return ( collection != null ) && ( ( collection.size ( ) ) == ( entry.getCount ( ) ) ) ; } return false ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object o ) { if ( o instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) ; java.util.Collection < V > collection = multimap.asMap ( ) . get ( entry.getElement ( ) ) ; return ( collection != null ) && ( ( collection.size ( ) ) == ( entry.getCount ( ) ) ) ; } return false ; }
Source:
private static void testUnloadClass ( java.lang.reflect.Constructor < ? > constructor ) throws java.lang.Exception { java.lang.ref.WeakReference < java.lang.Class > klass = Main.setUpUnloadClassWeak ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.ref.WeakReference < java.lang.Class > klass2 = Main.setUpUnloadClassWeak ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.out.println ( klass.get ( ) ) ; java.lang.System.out.println ( klass2.get ( ) ) ; }

Target:
private static void testUnloadClass ( java.lang.reflect.Constructor < ? > constructor ) throws java.lang.Exception { java.lang.ref.WeakReference < java.lang.Class > klass = Main.setUpUnloadClassWeak ( constructor ) ; Main.doUnloading ( ) ; java.lang.ref.WeakReference < java.lang.Class > klass2 = Main.setUpUnloadClassWeak ( constructor ) ; Main.doUnloading ( ) ; java.lang.System.out.println ( klass.get ( ) ) ; java.lang.System.out.println ( klass2.get ( ) ) ; }