auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; tempDir = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createUniqueDirectory ( null , "tempDir" ) ; testInstallDir = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createSubDirectory ( tempDir , "testInstall" ) ; testSystemTzDataDir = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createSubDirectory ( tempDir , "testSystemTzData" ) ; java.io.File testSystemTzDataFile = new java.io.File ( testSystemTzDataDir , "tzdata" ) ; byte [ ] systemTzDataBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTzData ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.SYSTEM_RULES_VERSION ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( testSystemTzDataFile , systemTzDataBytes ) ; installer = new libcore.tzdata.update2.TimeZoneDistroInstaller ( "TimeZoneDistroInstallerTest" , testSystemTzDataFile , testInstallDir ) ; }
Source:
protected com.intellij.updater.ValidationResult doValidate ( java.io.File toFile ) throws java.io.IOException { com.intellij.updater.ValidationResult result = doValidateAccess ( toFile , ValidationResult.Action.UPDATE ) ; if ( result != null ) return result ; return doValidateNotChanged ( toFile , ValidationResult.Kind.ERROR , ValidationResult.Action.UPDATE ) ; }

Target:
public com.intellij.updater.ValidationResult validate ( java.io.File toDir ) throws java.io.IOException { java.io.File fromFile = getSource ( toDir ) ; com.intellij.updater.ValidationResult result = doValidateAccess ( fromFile , ValidationResult.Action.UPDATE ) ; if ( result != null ) return result ; if ( ! ( mySource.isEmpty ( ) ) ) { result = doValidateAccess ( getFile ( toDir ) , ValidationResult.Action.UPDATE ) ; if ( result != null ) return result ; } return doValidateNotChanged ( fromFile , ValidationResult.Kind.ERROR , ValidationResult.Action.UPDATE ) ; }
Source:
public java.lang.String [ ] getActiveApnTypes ( ) { if ( DBG ) log ( "get all active apn types" ) ; java.util.ArrayList < java.lang.String > result = new java.util.ArrayList < java.lang.String > ( ) ; for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( apnContext.isReady ( ) ) { result.add ( apnContext.getApnType ( ) ) ; } } return result.toArray ( new java.lang.String [ 0 ] ) ; }

Target:
public java.lang.String [ ] getActiveApnTypes ( ) { if ( DBG ) log ( "get all active apn types" ) ; java.util.ArrayList < java.lang.String > result = new java.util.ArrayList < java.lang.String > ( ) ; for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( ( mAttached.get ( ) ) && ( apnContext.isReady ( ) ) ) { result.add ( apnContext.getApnType ( ) ) ; } } return result.toArray ( new java.lang.String [ 0 ] ) ; }
Source:
private void adjustTreeButtons ( org.eclipse.jface.viewers.ISelection selection ) { mRemoveButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; mUpButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; mDownButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; }

Target:
private void adjustTreeButtons ( org.eclipse.jface.viewers.ISelection selection ) { mRemoveButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; mUpButton.setEnabled ( canDoTreeUp ( selection ) ) ; mDownButton.setEnabled ( canDoTreeDown ( selection ) ) ; }
Source:
void removeUriPermissionIfNeededLocked ( com.android.server.am.UriPermission perm ) { if ( ( perm.modeFlags ) == 0 ) { final android.util.ArrayMap < com.android.server.am.ActivityManagerService.GrantUri , com.android.server.am.UriPermission > perms = mGrantedUriPermissions.get ( perm.targetUid ) ; if ( perms != null ) { if ( DEBUG_URI_PERMISSION ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG_URI_PERMISSION , ( ( ( "Removing " + ( perm.targetUid ) ) + " permission to " ) + ( perm.uri ) ) ) ; perms.remove ( perm.uri ) ; if ( perms.isEmpty ( ) ) { mGrantedUriPermissions.remove ( perm.targetUid ) ; } } } }

Target:
void removeUriPermissionIfNeededLocked ( com.android.server.am.UriPermission perm ) { if ( ( perm.modeFlags ) == 0 ) { final android.util.ArrayMap < com.android.server.am.ActivityManagerService.GrantUri , com.android.server.am.UriPermission > perms = mGrantedUriPermissions.get ( perm.targetUid ) ; if ( perms != null ) { if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_URI_PERMISSION ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG_URI_PERMISSION , ( ( ( "Removing " + ( perm.targetUid ) ) + " permission to " ) + ( perm.uri ) ) ) ; perms.remove ( perm.uri ) ; if ( perms.isEmpty ( ) ) { mGrantedUriPermissions.remove ( perm.targetUid ) ; } } } }
Source:
private void verifyCallAction ( android.content.Intent intent ) { if ( getClass ( ) . getName ( ) . equals ( intent.getComponent ( ) . getClassName ( ) ) ) { if ( ! ( Intent.ACTION_CALL.equals ( intent.getAction ( ) ) ) ) { com.android.server.telecom.Log.w ( this , "Attempt to deliver non-CALL action; forcing to CALL" ) ; intent.setAction ( Intent.ACTION_CALL ) ; } } }

Target:
private void verifyCallAction ( android.content.Intent intent ) { if ( getClass ( ) . getName ( ) . equals ( intent.getComponent ( ) . getClassName ( ) ) ) { if ( ! ( Intent.ACTION_CALL.equals ( intent.getAction ( ) ) ) ) { android.telecom.Log.w ( this , "Attempt to deliver non-CALL action; forcing to CALL" ) ; intent.setAction ( Intent.ACTION_CALL ) ; } } }
Source:
public void testGatewayInfo ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } if ( ( mCall.getDetails ( ) . getGatewayInfo ( ) ) != null ) { org.junit.Assert.assertThat ( mCall.getDetails ( ) . getGatewayInfo ( ) , org.hamcrest.CoreMatchers.is ( android.telecom.GatewayInfo.class ) ) ; } }

Target:
public void testGatewayInfo ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } if ( ( mCall.getDetails ( ) . getGatewayInfo ( ) ) != null ) { org.junit.Assert.assertThat ( mCall.getDetails ( ) . getGatewayInfo ( ) , org.hamcrest.CoreMatchers.instanceOf ( android.telecom.GatewayInfo.class ) ) ; } }
Source:
public void checkMemberAccess ( java.lang.Class < ? > clazz , int which ) { }

Target:
public void checkMemberAccess ( java.lang.Class < ? > clazz , int which ) { if ( ( ( which == ( java.lang.reflect.Member.DECLARED ) ) && ( isRelevant ( ) ) ) && ( "com.android.ide.common.rendering.RenderSecurityManager" . equals ( clazz.getName ( ) ) ) ) { throw com.android.ide.common.rendering.RenderSecurityException.create ( "Reflection" , clazz.getName ( ) ) ; } }
Source:
public void testForName_DuplicateWithBuiltInCharset ( ) throws java.lang.Exception { assertFalse ( ( ( java.nio.charset.Charset.forName ( "us-ascii" ) ) instanceof org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ) ) ; assertFalse ( ( ( java.nio.charset.Charset.availableCharsets ( ) . get ( "us-ascii" ) ) instanceof org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ) ) ; }

Target:
public void testForName_DuplicateWithBuiltInCharset ( ) throws java.lang.Exception { libcore.java.nio.charset.SettableCharsetProvider.setDelegate ( new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharsetProviderASCII ( ) ) ; try { assertFalse ( ( ( java.nio.charset.Charset.forName ( "us-ascii" ) ) instanceof org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ) ) ; assertFalse ( ( ( java.nio.charset.Charset.availableCharsets ( ) . get ( "us-ascii" ) ) instanceof org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ) ) ; } finally { libcore.java.nio.charset.SettableCharsetProvider.clearDelegate ( ) ; } }
Source:
public void invalidateCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Invalidating view" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.invalidateView ( selectedNode.viewNode ) ; } } ) ; } }

Target:
public void invokeMethodOnSelectedView ( final java.lang.String method , final java.util.List < java.lang.Object > args ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Invoke View Method" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.invokeViewMethod ( selectedNode.viewNode.window , selectedNode.viewNode , method , args ) ; } } ) ; } }
Source:
public void testDensityOnlyWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 160 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testDensityOnlyWithUniversalMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 3 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 1 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }
Source:
private int convertId ( @ com.android.annotations.Nullable java.lang.String value ) { if ( ( value != null ) && ( ( value.length ( ) ) > 0 ) ) { if ( com.android.sdklib.local.LocalAddonPkgInfo.PATTERN_USB_IDS.matcher ( value ) . matches ( ) ) { java.lang.String v = value.substring ( 2 ) ; try { return java.lang.Integer.parseInt ( v , 16 ) ; } catch ( java.lang.NumberFormatException e ) { } } } return com.android.sdklib.IAndroidTarget.NO_USB_ID ; }

Target:
private int convertId ( @ com.android.annotations.Nullable java.lang.String value ) { if ( ( value != null ) && ( ! ( value.isEmpty ( ) ) ) ) { if ( com.android.sdklib.local.LocalAddonPkgInfo.PATTERN_USB_IDS.matcher ( value ) . matches ( ) ) { java.lang.String v = value.substring ( 2 ) ; try { return java.lang.Integer.parseInt ( v , 16 ) ; } catch ( java.lang.NumberFormatException e ) { } } } return com.android.sdklib.IAndroidTarget.NO_USB_ID ; }
Source:
public boolean supportsFeature ( @ com.android.annotations.NonNull com.android.ddmlib.HardwareFeature feature ) { if ( ( mHardwareCharacteristics ) == null ) { try { java.lang.String characteristics = getPropertyCacheOrSync ( com.android.ddmlib.PROP_BUILD_CHARACTERISTICS ) ; mHardwareCharacteristics = com.google.common.collect.Sets.newHashSet ( com.google.common.base.Splitter.on ( ',' ) . split ( characteristics ) ) ; } catch ( java.lang.Exception e ) { mHardwareCharacteristics = java.util.Collections.emptySet ( ) ; } } return mHardwareCharacteristics.contains ( feature.getCharacteristic ( ) ) ; }

Target:
public boolean supportsFeature ( @ com.android.annotations.NonNull com.android.ddmlib.HardwareFeature feature ) { if ( ( mHardwareCharacteristics ) == null ) { try { java.lang.String characteristics = getSystemProperty ( com.android.ddmlib.PROP_BUILD_CHARACTERISTICS ) . get ( ) ; mHardwareCharacteristics = com.google.common.collect.Sets.newHashSet ( com.google.common.base.Splitter.on ( ',' ) . split ( characteristics ) ) ; } catch ( java.lang.Exception e ) { mHardwareCharacteristics = java.util.Collections.emptySet ( ) ; } } return mHardwareCharacteristics.contains ( feature.getCharacteristic ( ) ) ; }
Source:
private com.android.jack.dx.rop.code.InsnList createInsnList ( @ javax.annotation.Nonnull java.util.List < com.android.jack.dx.rop.code.Insn > instructions , @ javax.annotation.Nonnegative int extraSize ) { com.android.jack.dx.rop.code.InsnList il = new com.android.jack.dx.rop.code.InsnList ( ( ( instructions.size ( ) ) + extraSize ) ) ; int indexInstruction = 0 ; for ( com.android.jack.dx.rop.code.Insn instruction : instructions ) { il.set ( ( indexInstruction ++ ) , instruction ) ; } return il ; }

Target:
private java.util.List < com.android.jack.dx.ssa.SsaInsn > createInsnList ( @ javax.annotation.Nonnull java.util.List < com.android.jack.dx.ssa.SsaInsn > instructions , @ javax.annotation.Nonnegative int extraSize ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > il = com.google.common.collect.Lists.newArrayListWithCapacity ( ( ( instructions.size ( ) ) + extraSize ) ) ; for ( com.android.jack.dx.ssa.SsaInsn instruction : instructions ) { il.add ( instruction ) ; } return il ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.gatt.ScanManager.TAG , ( "awakened up at time " + ( android.os.SystemClock.elapsedRealtime ( ) ) ) ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( com.android.bluetooth.gatt.ScanManager.ACTION_REFRESH_BATCHED_SCAN ) ) { if ( mBatchClients.isEmpty ( ) ) { return ; } flushBatchScanResults ( mBatchClients.iterator ( ) . next ( ) ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.gatt.ScanManager.TAG , ( "awakened up at time " + ( android.os.SystemClock.elapsedRealtime ( ) ) ) ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( com.android.bluetooth.gatt.ScanManager.ACTION_REFRESH_BATCHED_SCAN ) ) { if ( mBatchClients.isEmpty ( ) ) { return ; } if ( mBatchClients.iterator ( ) . hasNext ( ) ) { flushBatchScanResults ( mBatchClients.iterator ( ) . next ( ) ) ; } } }
Source:
public void encode ( org.bouncycastle.crypto.tls.TlsContext context , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.tls.TlsUtils.writeUint8 ( type , output ) ; org.bouncycastle.crypto.tls.TlsUtils.checkUint16 ( payload.length ) ; org.bouncycastle.crypto.tls.TlsUtils.writeUint16 ( payload.length , output ) ; output.write ( payload ) ; byte [ ] padding = new byte [ paddingLength ] ; context.getSecureRandom ( ) . nextBytes ( padding ) ; output.write ( padding ) ; }

Target:
public void encode ( org.bouncycastle.crypto.tls.TlsContext context , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.tls.TlsUtils.writeUint8 ( type , output ) ; org.bouncycastle.crypto.tls.TlsUtils.checkUint16 ( payload.length ) ; org.bouncycastle.crypto.tls.TlsUtils.writeUint16 ( payload.length , output ) ; output.write ( payload ) ; byte [ ] padding = new byte [ paddingLength ] ; context.getNonceRandomGenerator ( ) . nextBytes ( padding ) ; output.write ( padding ) ; }
Source:
public boolean zoomIn ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomIn ( ) ; } } ) ; return ret ; } return mAwContents.zoomIn ( ) ; }

Target:
public boolean zoomBy ( float factor ) { mFactory.startYourEngines ( true ) ; checkThread ( ) ; return mAwContents.zoomBy ( factor ) ; }
Source:
private com.android.jack.dx.rop.annotation.Annotation createAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotation ) throws com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { com.android.jack.dx.rop.annotation.Annotation ropAnnotation = new com.android.jack.dx.rop.annotation.Annotation ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( annotation.getType ( ) ) , com.android.jack.backend.dex.AnnotationBuilder.getVisibility ( annotation.getRetentionPolicy ( ) ) ) ; constantBuilder.createAnnotationPairs ( annotation , ropAnnotation ) ; ropAnnotation.setImmutable ( ) ; return ropAnnotation ; }

Target:
private com.android.jack.dx.rop.annotation.Annotation createAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotation ) throws com.android.jack.backend.dex.AnnotationBuilder.BuildAnnotationException , com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { com.android.jack.dx.rop.annotation.Annotation ropAnnotation = new com.android.jack.dx.rop.annotation.Annotation ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( annotation.getType ( ) ) , getVisibility ( annotation.getRetentionPolicy ( ) ) ) ; constantBuilder.createAnnotationPairs ( annotation , ropAnnotation ) ; ropAnnotation.setImmutable ( ) ; return ropAnnotation ; }
Source:
public void testAesCbcHmacSha256Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.getKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha256Tcp4 ( ) 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_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public static java.net.NetworkInterface getByName ( java.lang.String name ) throws java.net.SocketException { if ( name == null ) throw new java.lang.NullPointerException ( ) ; return java.net.NetworkInterface.getByName0 ( name ) ; }

Target:
public static java.net.NetworkInterface getByName ( java.lang.String name ) throws java.net.SocketException { if ( name == null ) throw new java.lang.NullPointerException ( ) ; java.net.NetworkInterface [ ] nis = java.net.NetworkInterface.getAll ( ) ; for ( java.net.NetworkInterface ni : nis ) { if ( ni.getName ( ) . equals ( name ) ) { return ni ; } } return null ; }
Source:
public android.telecom.PhoneAccount getPhoneAccount ( android.telecom.PhoneAccountHandle accountHandle ) { synchronized ( mLock ) { final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.telecom.Log.startSession ( "TSI.gPA" ) ; return mPhoneAccountRegistrar.getPhoneAccount ( accountHandle , callingUserHandle , true ) ; } catch ( java.lang.Exception e ) { com.android.server.telecom.Log.e ( this , e , "getPhoneAccount %s" , accountHandle ) ; throw e ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public android.telecom.PhoneAccount getPhoneAccount ( android.telecom.PhoneAccountHandle accountHandle ) { synchronized ( mLock ) { final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { android.telecom.Log.startSession ( "TSI.gPA" ) ; return mPhoneAccountRegistrar.getPhoneAccount ( accountHandle , callingUserHandle , true ) ; } catch ( java.lang.Exception e ) { android.telecom.Log.e ( this , e , "getPhoneAccount %s" , accountHandle ) ; throw e ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } } }
Source:
public static java.util.List < java.lang.String > readLines ( java.nio.file.Path path ) throws java.io.IOException { java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; try ( java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.FileReader ( path.toFile ( ) ) ) ) { java.lang.String line ; while ( ( line = reader.readLine ( ) ) != null ) { result.add ( line ) ; } } return result ; }

Target:
public static libcore.Lines readLines ( java.io.Reader reader ) throws java.io.IOException { java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; java.io.BufferedReader br = ( reader instanceof java.io.BufferedReader ) ? ( ( java.io.BufferedReader ) ( reader ) ) : new java.io.BufferedReader ( reader ) ; java.lang.String line ; while ( ( line = br.readLine ( ) ) != null ) { result.add ( line ) ; } return new libcore.Lines ( result ) ; }
Source:
public void testMissingMetadataFileThrowsRuntimeException ( ) { com.google.i18n.phonenumbers.SingleFileMetadataSourceImpl singleFileMetadataSource = new com.google.i18n.phonenumbers.SingleFileMetadataSourceImpl ( "no/such/file" , PhoneNumberUtil.DEFAULT_METADATA_LOADER ) ; try { singleFileMetadataSource.loadMetadataFromFile ( ) ; fail ( "expected exception" ) ; } catch ( java.lang.RuntimeException e ) { assertTrue ( ( "Unexpected error: " + e ) , e.getMessage ( ) . contains ( "no/such/file" ) ) ; } }

Target:
public void testGeoPhoneNumberMetadataLoadFromMissingFileThrowsException ( ) throws java.lang.Exception { try { com.google.i18n.phonenumbers.SingleFileMetadataSourceImplTest.MISSING_FILE_SOURCE.getMetadataForRegion ( "AE" ) ; fail ( "expected exception" ) ; } catch ( java.lang.RuntimeException e ) { assertTrue ( ( "Unexpected error: " + e ) , e.getMessage ( ) . contains ( "no/such/file" ) ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > a = java.lang.Class.forName ( "A" ) ; } catch ( java.lang.VerifyError e ) { java.lang.System.out.println ( "passed" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > a = java.lang.Class.forName ( "A" ) ; } catch ( java.lang.VerifyError e ) { java.lang.System.out.println ( "passed A" ) ; } try { java.lang.Class < ? > a = java.lang.Class.forName ( "B" ) ; } catch ( java.lang.VerifyError e ) { java.lang.System.out.println ( "passed B" ) ; } }
Source:
public static java.lang.String pii ( java.lang.Object pii ) { if ( ( pii == null ) || ( android.telecom.Log.VERBOSE ) ) { return java.lang.String.valueOf ( pii ) ; } return ( "[" + ( android.telecom.Log.secureHash ( java.lang.String.valueOf ( pii ) . getBytes ( ) ) ) ) + "]" ; }

Target:
public static java.lang.String pii ( java.lang.Object pii ) { if ( ( pii == null ) || ( android.telecom.Log.VERBOSE ) ) { return java.lang.String.valueOf ( pii ) ; } return "***" ; }
Source:
public void TestArabicLongStyle ( ) { com.ibm.icu.text.NumberFormat cdf = com.ibm.icu.text.CompactDecimalFormat.getInstance ( com.ibm.icu.util.ULocale.forLanguageTag ( "ar" ) , CompactStyle.LONG ) ; assertEquals ( "Arabic Long" , "‏-٥٫٣ ألف" , cdf.format ( ( - 5300 ) ) ) ; }

Target:
public void TestArabicLongStyle ( ) { if ( logKnownIssue ( "12181" , "No support for negative numbers in CDF" ) ) { return ; } com.ibm.icu.text.NumberFormat cdf = com.ibm.icu.text.CompactDecimalFormat.getInstance ( com.ibm.icu.util.ULocale.forLanguageTag ( "ar" ) , CompactStyle.LONG ) ; assertEquals ( "Arabic Long" , "‏-٥٫٣ ألف" , cdf.format ( ( - 5300 ) ) ) ; }
Source:
private void createState ( ) { int mode ; try { mode = mResources.getInteger ( R.integer.nexus_mode ) ; } catch ( android.content.res.Resources exc ) { mode = 0 ; } mScript.set_gIsPreview ( ( isPreview ( ) ? 1 : 0 ) ) ; mScript.set_gMode ( mode ) ; mScript.set_gXOffset ( 0.0F ) ; }

Target:
private void createState ( ) { int mode ; try { mode = mResources.getInteger ( R.integer.nexus_mode ) ; } catch ( android.content.res.Resources exc ) { mode = 0 ; } mScript.set_gIsPreview ( ( isPreview ( ) ? 1 : 0 ) ) ; mScript.set_gMode ( mode ) ; mScript.set_gXOffset ( 0.0F ) ; mScript.set_gWorldScaleX ( mWorldScaleX ) ; mScript.set_gWorldScaleY ( mWorldScaleY ) ; }
Source:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method loadLibrary = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; loadLibrary.invoke ( intHolder , Main.nativeLibraryName ) ; return new java.lang.ref.WeakReference ( loader ) ; }

Target:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method loadLibrary = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; loadLibrary.invoke ( intHolder , Main.nativeLibraryName ) ; Main.waitForCompilation ( intHolder ) ; return new java.lang.ref.WeakReference ( loader ) ; }
Source:
public java.util.List < java.lang.String [ ] > getNavbarLinks ( javax.servlet.http.HttpServletRequest request ) { java.util.List < java.lang.String [ ] > links = new java.util.ArrayList < > ( ) ; com.android.vts.servlet.Page root = Page.HOME ; java.lang.String [ ] rootEntry = new java.lang.String [ ] { CURRENT_PAGE , root.getName ( ) } ; links.add ( rootEntry ) ; return links ; }

Target:
public java.util.List < java.lang.String [ ] > getNavbarLinks ( javax.servlet.http.HttpServletRequest request ) { java.util.List < java.lang.String [ ] > links = new java.util.ArrayList < > ( ) ; com.android.vts.servlet.Page root = Page.HOME ; java.lang.String [ ] rootEntry = new java.lang.String [ ] { root.getUrl ( ) , root.getName ( ) } ; links.add ( rootEntry ) ; return links ; }
Source:
private static void assertStatsEntry ( android.net.NetworkStats stats , java.lang.String iface , int uid , int set , int tag , long rxBytes , long txBytes ) { final int i = stats.findIndex ( iface , uid , set , tag , android.net.NetworkStats.ROAMING_NO ) ; final android.net.NetworkStats.Entry entry = stats.getValues ( i , null ) ; assertEquals ( "unexpected rxBytes" , rxBytes , entry.rxBytes ) ; assertEquals ( "unexpected txBytes" , txBytes , entry.txBytes ) ; }

Target:
private static void assertStatsEntry ( android.net.NetworkStats stats , java.lang.String iface , int uid , int set , int tag , long rxBytes , long txBytes ) { final int i = stats.findIndex ( iface , uid , set , tag , android.net.NetworkStats.METERED_NO , android.net.NetworkStats.ROAMING_NO ) ; final android.net.NetworkStats.Entry entry = stats.getValues ( i , null ) ; assertEquals ( "unexpected rxBytes" , rxBytes , entry.rxBytes ) ; assertEquals ( "unexpected txBytes" , txBytes , entry.txBytes ) ; }
Source:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "--- Last failed" ) ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }
Source:
public void testAppInstallAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "HelloCompute.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( com.android.devtools.systemimage.uitest.smoke.AppTest.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "RsHelloCompute" , null ) ; }

Target:
public void installAppAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "HelloCompute.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( com.android.devtools.systemimage.uitest.smoke.AppTest.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.uninstallApp ( instrumentation , "RsHelloCompute" , null ) ; }
Source:
public void setSkins ( @ com.android.annotations.NonNull java.io.File [ ] skins , @ com.android.annotations.NonNull java.io.File defaultSkin ) { mDefaultSkin = defaultSkin ; java.util.HashSet < java.io.File > skinSet = new java.util.HashSet < java.io.File > ( ) ; skinSet.addAll ( java.util.Arrays.asList ( skins ) ) ; skinSet.addAll ( java.util.Arrays.asList ( mBasePlatform.getSkins ( ) ) ) ; mSkins = skinSet.toArray ( new java.io.File [ skinSet.size ( ) ] ) ; }

Target:
public void setSkins ( @ com.android.annotations.NonNull java.io.File [ ] skins , @ com.android.annotations.NonNull java.io.File defaultSkin ) { mDefaultSkin = defaultSkin ; java.util.HashSet < java.io.File > skinSet = new java.util.HashSet < java.io.File > ( ) ; skinSet.addAll ( java.util.Arrays.asList ( skins ) ) ; skinSet.addAll ( java.util.Arrays.asList ( mBasePlatform.getSkins ( ) ) ) ; mSkins = skinSet.toArray ( new java.io.File [ skinSet.size ( ) ] ) ; java.util.Arrays.sort ( mSkins ) ; }
Source:
public void test_init_limitting_to_1method_and_run_for_SuiteTest_should_throw_exception ( ) { java.lang.Class < ? > target = vogar.target.junit3.SuiteTest.class ; try { runner.init ( monitor , "" , "testSimple" , target , skipPastReference , testEnvironment , 0 , false ) ; runner.run ( "" , null , null ) ; fail ( "should throw ClassCastException." ) ; } catch ( java.lang.ClassCastException e ) { } }

Target:
public void test_limiting_to_1method_and_run_for_SuiteTest_should_throw_exception ( ) { java.lang.Class < ? > target = vogar.target.junit3.SuiteTest.class ; try { vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , "" , "testSimple" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , null ) ; fail ( "should throw ClassCastException." ) ; } catch ( java.lang.ClassCastException e ) { } }
Source:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }

Target:
public java.lang.String getTestedApplicationId ( ) { if ( mType.isForTesting ( ) ) { com.google.common.base.Preconditions.checkState ( ( ( mTestedConfig ) != null ) ) ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }
Source:
private void addDexFolder ( @ com.android.annotations.NonNull java.io.File dexFolder ) throws com.android.builder.packaging.DuplicateFileException , com.android.builder.packaging.PackagerException , com.android.builder.packaging.SealedPackageException { java.io.File [ ] files = dexFolder.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File file , java.lang.String name ) { return name.endsWith ( SdkConstants.DOT_DEX ) ; } } ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { addFile ( file , file.getName ( ) ) ; } } }

Target:
private void addDexFolder ( @ com.android.annotations.NonNull java.io.File dexFolder ) throws com.android.builder.packaging.DuplicateFileException , com.android.builder.packaging.PackagerException , com.android.builder.packaging.SealedPackageException { java.io.File [ ] files = dexFolder.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File file , java.lang.String name ) { return name.endsWith ( SdkConstants.DOT_DEX ) ; } } ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { addDexFile ( file ) ; } } }
Source:
synchronized void recordImplicitRejection ( @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull com.android.manifmerger.XmlElement implicitAttributeOwner ) { java.util.List < com.android.manifmerger.ActionRecorder.AttributeRecord > attributeRecords = getAttributeRecords ( attribute ) ; com.android.manifmerger.ActionRecorder.AttributeRecord attributeRecord = new com.android.manifmerger.ActionRecorder.AttributeRecord ( com.android.manifmerger.ActionRecorder.ActionType.REJECTED , new com.android.manifmerger.ActionRecorder.ActionLocation ( implicitAttributeOwner.getDocument ( ) . getSourceLocation ( ) , implicitAttributeOwner.getPosition ( ) ) , AttributeOperationType.REPLACE ) ; attributeRecords.add ( attributeRecord ) ; }

Target:
synchronized void recordImplicitRejection ( @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull com.android.manifmerger.XmlElement implicitAttributeOwner ) { java.util.List < com.android.manifmerger.Actions.AttributeRecord > attributeRecords = getAttributeRecords ( attribute ) ; com.android.manifmerger.Actions.AttributeRecord attributeRecord = new com.android.manifmerger.Actions.AttributeRecord ( Actions.ActionType.REJECTED , new com.android.manifmerger.Actions.ActionLocation ( implicitAttributeOwner.getDocument ( ) . getSourceLocation ( ) , implicitAttributeOwner.getPosition ( ) ) , attribute.getId ( ) , AttributeOperationType.REPLACE ) ; attributeRecords.add ( attributeRecord ) ; }
Source:
public void setStrength ( int value ) { if ( value == ( java.text.Collator.IDENTICAL ) ) { value = java.text.com.ibm.icu.text.Collator ; } icuColl.setStrength ( value ) ; }

Target:
private int strength_ICU_Java ( int value ) { int javaValue = value ; switch ( value ) { case libcore.icu.RuleBasedCollatorICU.VALUE_PRIMARY : javaValue = java.text.Collator.PRIMARY ; break ; case libcore.icu.RuleBasedCollatorICU.VALUE_SECONDARY : javaValue = java.text.Collator.SECONDARY ; break ; case libcore.icu.RuleBasedCollatorICU.VALUE_TERTIARY : javaValue = java.text.Collator.TERTIARY ; break ; case libcore.icu.RuleBasedCollatorICU.VALUE_IDENTICAL : javaValue = java.text.Collator.IDENTICAL ; break ; } return javaValue ; }
Source:
public static void setThreadPoolSize ( org.gradle.api.Project project ) { if ( ! ( project.hasProperty ( com.android.build.gradle.internal.ExecutionConfigurationUtil.THREAD_POOL_SIZE_PROPERTY ) ) ) { return ; } java.lang.String threadPoolSizeProperty = project.property ( com.android.build.gradle.internal.ExecutionConfigurationUtil.THREAD_POOL_SIZE_PROPERTY ) . toString ( ) ; try { com.android.ide.common.internal.ExecutorSingleton.setThreadPoolSize ( java.lang.Integer.parseInt ( threadPoolSizeProperty ) ) ; } catch ( java.lang.NumberFormatException e ) { project.getLogger ( ) . error ( "com.android.threadPoolSize should be an integer." ) ; } }

Target:
public static void setThreadPoolSize ( org.gradle.api.Project project ) { java.lang.Integer size = com.android.build.gradle.AndroidGradleOptions.getThreadPoolSize ( project ) ; if ( size == null ) { return ; } com.android.ide.common.internal.ExecutorSingleton.setThreadPoolSize ( size ) ; }
Source:
public java.net.Socket createSocket ( java.net.Socket k , java.lang.String host , int port , boolean close ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( k , host , port , close ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }

Target:
public java.net.Socket createSocket ( java.net.Socket k , java.lang.String host , int port , boolean close ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( k , host , port , close ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }
Source:
public static void loop6 ( boolean incoming ) { while ( true ) { java.lang.System.out.println ( incoming ) ; while ( ( java.lang.Runtime.getRuntime ( ) ) != null ) { } } }

Target:
public static void loop6 ( boolean incoming ) { for ( long i = java.lang.System.nanoTime ( ) ; i < 42 ; ++ i ) { java.lang.System.out.println ( incoming ) ; for ( long j = java.lang.System.currentTimeMillis ( ) ; j != 42 ; ++ j ) { } } }
Source:
public void clear ( ) { for ( int i = 0 ; i < ( segments.length ) ; ++ i ) segments [ i ] . clear ( ) ; }

Target:
public void clear ( ) { final java.util.concurrent.ConcurrentHashMap.Segment < K , V > [ ] segments = this . segments ; for ( int j = 0 ; j < ( segments.length ) ; ++ j ) { java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = java.util.concurrent.ConcurrentHashMap.segmentAt ( segments , j ) ; if ( s != null ) s.clear ( ) ; } }
Source:
private synchronized void onApplicationStateChanged ( byte [ ] address , boolean registered ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onApplicationStateChanged(): registered=" + registered ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_APPLICATION_STATE_CHANGED ) ; msg.obj = address ; msg.arg1 = ( registered ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onApplicationStateChangedFromNative ( android.bluetooth.BluetoothDevice device , boolean registered ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onApplicationStateChanged(): registered=" + registered ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_APPLICATION_STATE_CHANGED ) ; msg.obj = device ; msg.arg1 = ( registered ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; }
Source:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mSwitchPerspective ) ) { mWhichPerspective.setEnabled ( mSwitchPerspective.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } }

Target:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mSwitchPerspective ) ) { mWhichPerspective.setEnabled ( mSwitchPerspective.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } else if ( event.getSource ( ) . equals ( mAutoMonitorLogcat ) ) { mAutoMonitorLogcatLevel.setEnabled ( mAutoMonitorLogcat.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } }
Source:
void foo4 ( int [ ] array , int end , boolean expectInterpreter ) { for ( int i = end ; i > 0 ; i -- ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ ( i - 1 ) ] = 1 ; sum += array [ ( i - 1 ) ] ; } }

Target:
void foo4 ( int [ ] array , int end , boolean expectInterpreter ) { if ( end < 0 ) throw new java.lang.Error ( "" ) ; for ( int i = end ; i > 0 ; i -- ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ ( i - 1 ) ] = 1 ; sum += array [ ( i - 1 ) ] ; } }
Source:
public void onStart ( ) { super . onStart ( ) ; com.android.dialer.oem.CequintCallerIdManager cequintCallerIdManager = null ; if ( com.android.dialer.oem.CequintCallerIdManager.isCequintCallerIdEnabled ( getContext ( ) ) ) { cequintCallerIdManager = com.android.dialer.oem.CequintCallerIdManager.createInstanceForCallLog ( ) ; } mContactInfoCache.setCequintCallerIdManager ( cequintCallerIdManager ) ; }

Target:
public void onStart ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onStart" ) ; super . onStart ( ) ; com.android.dialer.oem.CequintCallerIdManager cequintCallerIdManager = null ; if ( com.android.dialer.oem.CequintCallerIdManager.isCequintCallerIdEnabled ( getContext ( ) ) ) { cequintCallerIdManager = com.android.dialer.oem.CequintCallerIdManager.createInstanceForCallLog ( ) ; } mContactInfoCache.setCequintCallerIdManager ( cequintCallerIdManager ) ; }
Source:
public void reset ( ) throws java.io.IOException { }

Target:
public void reset ( ) throws java.io.IOException { if ( ( skippingCipher ) == null ) { throw new java.io.IOException ( "cipher must implement SkippingCipher to be used with reset()" ) ; } in.reset ( ) ; skippingCipher.seekTo ( markPosition ) ; if ( ( markBuf ) != null ) { buf = markBuf ; } bufOff = markBufOff ; }
Source:
protected void fillPathBuilder ( java.lang.StringBuilder pathBuilder , boolean escapePath ) { if ( isRoot ) { return ; } if ( ( parent ) != null ) { parent.fillPathBuilder ( pathBuilder , escapePath ) ; } pathBuilder.append ( com.android.ddmlib.FileListingService.FILE_SEPARATOR ) ; pathBuilder.append ( ( escapePath ? escape ( name ) : name ) ) ; }

Target:
protected void fillPathBuilder ( java.lang.StringBuilder pathBuilder , boolean escapePath ) { if ( isRoot ) { return ; } if ( ( parent ) != null ) { parent.fillPathBuilder ( pathBuilder , escapePath ) ; } pathBuilder.append ( com.android.ddmlib.FileListingService.FILE_SEPARATOR ) ; pathBuilder.append ( ( escapePath ? com.android.ddmlib.FileListingService.FileEntry.escape ( name ) : name ) ) ; }
Source:
public void test_firstElement ( ) { assertEquals ( "Returned incorrect firstElement" , "Test 0" , tVector.firstElement ( ) ) ; tVector.insertElementAt ( null , 0 ) ; assertNull ( "Returned incorrect firstElement--wanted null" , tVector.firstElement ( ) ) ; tVector = new java.util.Vector ( 10 ) ; try { tVector.firstElement ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_firstElement ( ) { assertEquals ( "Returned incorrect firstElement" , "Test 0" , tVector.firstElement ( ) ) ; tVector.insertElementAt ( null , 0 ) ; assertNull ( "Returned incorrect firstElement--wanted null" , tVector.firstElement ( ) ) ; java.util.Vector v = new java.util.Vector ( 10 ) ; try { v.firstElement ( ) ; fail ( "Should throw NoSuchElementException" ) ; } catch ( java.util.NoSuchElementException e ) { } }
Source:
private void verifyConnectionStateIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , int newState , int prevState ) { android.content.Intent intent = waitForIntent ( timeoutMs , mConnectionStateChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( newState , intent.getIntExtra ( BluetoothProfile.EXTRA_STATE , ( - 1 ) ) ) ; org.junit.Assert.assertEquals ( prevState , intent.getIntExtra ( BluetoothProfile.EXTRA_PREVIOUS_STATE , ( - 1 ) ) ) ; }

Target:
private void verifyConnectionStateIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , int newState , int prevState ) { android.content.Intent intent = com.android.bluetooth.TestUtils.waitForIntent ( timeoutMs , mConnectionStateChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( newState , intent.getIntExtra ( BluetoothProfile.EXTRA_STATE , ( - 1 ) ) ) ; org.junit.Assert.assertEquals ( prevState , intent.getIntExtra ( BluetoothProfile.EXTRA_PREVIOUS_STATE , ( - 1 ) ) ) ; }
Source:
public java.util.Map < java.lang.String , com.android.build.gradle.integration.common.fixture.GradleTestProject.SubProjectData > executeAndReturnMultiModel ( java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return buildMultiModel ( connection ) ; } finally { connection.close ( ) ; } }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; } finally { connection.close ( ) ; } }
Source:
public void testEnablingAndDisablingSecurityLogging ( ) { mDevicePolicyManager.setSecurityLoggingEnabled ( getWho ( ) , true ) ; assertTrue ( mDevicePolicyManager.isSecurityLoggingEnabled ( getWho ( ) ) ) ; mDevicePolicyManager.setSecurityLoggingEnabled ( getWho ( ) , false ) ; assertFalse ( mDevicePolicyManager.isSecurityLoggingEnabled ( getWho ( ) ) ) ; }

Target:
public void testDisablingSecurityLogging ( ) { mDevicePolicyManager.setSecurityLoggingEnabled ( getWho ( ) , false ) ; assertFalse ( mDevicePolicyManager.isSecurityLoggingEnabled ( getWho ( ) ) ) ; }