auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.io.File getTestedApk ( int density , @ com.android.annotations.NonNull java.util.List < java.lang.String > abis ) { com.android.build.gradle.internal.variant.TestedVariantData testedVariantData = testVariantData.getTestedVariantData ( ) ; com.android.build.gradle.internal.variant.BaseVariantData < ? > testedVariantData2 = ( ( com.android.build.gradle.internal.variant.BaseVariantData ) ( testedVariantData ) ) ; com.android.build.SplitOutput output = com.android.ide.common.build.SplitOutputMatcher.computeBestOutput ( testedVariantData2.getOutputs ( ) , density , abis ) ; if ( output != null ) { return output.getOutputFile ( ) ; } return null ; }

Target:
public java.io.File getTestedApk ( int density , @ com.android.annotations.NonNull java.util.List < java.lang.String > abis ) { com.android.build.gradle.internal.variant.TestedVariantData testedVariantData = testVariantData.getTestedVariantData ( ) ; com.android.build.gradle.internal.variant.BaseVariantData < ? > testedVariantData2 = ( ( com.android.build.gradle.internal.variant.BaseVariantData ) ( testedVariantData ) ) ; com.android.build.SplitOutput output = com.android.ide.common.build.SplitOutputMatcher.computeBestOutput ( testedVariantData2.getOutputs ( ) , testedVariantData2.getVariantConfiguration ( ) . getSupportedAbis ( ) , density , abis ) ; if ( output != null ) { return output.getOutputFile ( ) ; } return null ; }
Source:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getConnectionState(): device=" + ( device.getAddress ( ) ) ) ) ; return STATE_DISCONNECTED ; }

Target:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "disconnect(): device=" + device ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.disconnect ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
private libcore.util.ZoneInfo createZoneInfo ( int [ ] [ ] transitionTimes , int [ ] [ ] transitionTypes , long currentTimeMillis ) throws java.lang.Exception { return createZoneInfo ( getName ( ) , transitionTimes , transitionTypes , currentTimeMillis ) ; }

Target:
public void testReadTimeZone_NegativeTransitions ( ) throws java.lang.Exception { libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.initializeToValid ( ) ; builder.setTransitionCountOverride ( ( - 1 ) ) ; byte [ ] bytes = builder.build ( ) ; try { createZoneInfo ( getName ( ) , java.lang.System.currentTimeMillis ( ) , bytes ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } }
Source:
public static void setupDefaultConfig ( @ com.android.annotations.NonNull org.gradle.api.Project project , @ com.android.annotations.NonNull org.gradle.api.artifacts.Configuration configuration ) { org.gradle.api.artifacts.Configuration defaultConfig = project.configurations [ "default" ] ; defaultConfig.setExtendsFrom ( com.android.build.gradle.internal.variant.Collections.singleton ( configuration ) ) ; com.android.build.gradle.internal.variant.Set < org.gradle.api.artifacts.Configuration > flattenedConfigs = com.android.build.gradle.internal.variant.VariantHelper.flattenConfigurations ( configuration ) ; project.plugins.withType ( org.gradle.api.plugins.MavenPlugin ) ; }

Target:
public void execute ( org.gradle.api.tasks.Upload upload ) { upload.getRepositories ( ) . withType ( org.gradle.api.artifacts.maven.MavenDeployer.class , new org.gradle.api.Action < org.gradle.api.artifacts.maven.MavenDeployer > ( ) { @ java.lang.Override public void execute ( org.gradle.api.artifacts.maven.MavenDeployer mavenDeployer ) { for ( org.gradle.api.artifacts.Configuration config : flattenedConfigs ) { mavenDeployer.getPom ( ) . getScopeMappings ( ) . addMapping ( 300 , project.getConfigurations ( ) . getByName ( config.getName ( ) ) , "compile" ) ; } } } ) ; }
Source:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view , clock ) ; return newVoicemailViewHolder ; }

Target:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view , clock , this ) ; newVoicemailViewHolderSet.add ( newVoicemailViewHolder ) ; return newVoicemailViewHolder ; }
Source:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 5 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) + 1.0 ) ) ) ) ) ) ) ; }

Target:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.asinh ( args.in ) , 4 , 128 ) ; }
Source:
private void writeValue ( java.io.OutputStreamWriter writer , java.lang.String key , java.lang.String value , boolean addComment ) throws java.io.IOException { if ( addComment ) { java.lang.String comment = com.android.sdklib.internal.project.ProjectPropertiesWorkingCopy.COMMENT_MAP.get ( key ) ; if ( comment != null ) { writer.write ( comment ) ; } } value = value.replaceAll ( "\\\\" , "\\\\\\\\" ) ; writer.write ( java.lang.String.format ( "%s=%s\n" , key , value ) ) ; }

Target:
private void writeValue ( java.io.OutputStreamWriter writer , java.lang.String key , java.lang.String value , boolean addComment ) throws java.io.IOException { if ( addComment ) { java.lang.String comment = com.android.sdklib.internal.project.ProjectPropertiesWorkingCopy.COMMENT_MAP.get ( key ) ; if ( comment != null ) { writer.write ( comment ) ; } } writer.write ( java.lang.String.format ( "%s=%s\n" , key , escape ( value ) ) ) ; }
Source:
public void testAesCbcHmacMd5Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha1Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public void setFieldValue ( java.lang.String key , java.lang.String value ) { if ( android.text.TextUtils.isEmpty ( value ) ) { mFields.put ( key , android.net.wifi.WifiEnterpriseConfig.EMPTY_VALUE ) ; } else { mFields.put ( key , convertToQuotedString ( value ) ) ; } }

Target:
private void setFieldValue ( java.lang.String key , java.lang.String value , java.lang.String prefix ) { if ( android.text.TextUtils.isEmpty ( value ) ) { mFields.put ( key , android.net.wifi.WifiEnterpriseConfig.EMPTY_VALUE ) ; } else { java.lang.String valueToSet ; if ( ! ( android.net.wifi.WifiEnterpriseConfig.UNQUOTED_KEYS.contains ( key ) ) ) { valueToSet = convertToQuotedString ( ( prefix + value ) ) ; } else { valueToSet = prefix + value ; } mFields.put ( key , valueToSet ) ; } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JDefinedClass thisClass = ( ( com.android.jack.ir.ast.JDefinedClass ) ( type ) ) ; com.android.jack.ir.ast.JClass superClass = thisClass.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JDefinedClass ) { if ( com.android.jack.optimizations.common.TypeToBeEmittedMarker.isToBeEmitted ( superClass ) ) { com.android.jack.optimizations.common.DirectlyDerivedClassesMarker.markDirectlyDerivedClass ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) , thisClass ) ; } } } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JDefinedClass thisClass = ( ( com.android.jack.ir.ast.JDefinedClass ) ( type ) ) ; com.android.jack.ir.ast.JClass superClass = thisClass.getSuperClass ( ) ; if ( superClass instanceof com.android.jack.ir.ast.JDefinedClass ) { if ( superClass.isToEmit ( ) ) { com.android.jack.optimizations.common.DirectlyDerivedClassesMarker.markDirectlyDerivedClass ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) , thisClass ) ; } } } }
Source:
public android.net.LinkProperties toLinkProperties ( java.lang.String iface ) { android.net.LinkProperties lp = new android.net.LinkProperties ( ) ; lp.setInterfaceName ( iface ) ; if ( ( ipAddress ) != null ) { lp.addLinkAddress ( ipAddress ) ; } for ( android.net.RouteInfo route : getRoutes ( iface ) ) { lp.addRoute ( route ) ; } for ( java.net.InetAddress dns : dnsServers ) { lp.addDnsServer ( dns ) ; } return lp ; }

Target:
public android.net.LinkProperties toLinkProperties ( java.lang.String iface ) { android.net.LinkProperties lp = new android.net.LinkProperties ( ) ; lp.setInterfaceName ( iface ) ; if ( ( ipAddress ) != null ) { lp.addLinkAddress ( ipAddress ) ; } for ( android.net.RouteInfo route : getRoutes ( iface ) ) { lp.addRoute ( route ) ; } for ( java.net.InetAddress dns : dnsServers ) { lp.addDnsServer ( dns ) ; } lp.setDomains ( domains ) ; return lp ; }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; final boolean succeded ; synchronized ( mInstallLock ) { succeded = deleteApplicationCacheFilesLI ( packageName , userId ) ; } clearExternalStorageDataSync ( packageName , userId , false ) ; if ( observer != null ) { try { observer.onRemoveCompleted ( packageName , succeded ) ; } catch ( android.os.RemoteException e ) { android.util.Log.i ( com.android.server.pm.PackageManagerService.TAG , "Observer no longer exists." ) ; } } }

Target:
public void flushPackageRestrictionsAsUser ( int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) { return ; } enforceCrossUserPermission ( android.os.Binder.getCallingUid ( ) , userId , false , false , "flushPackageRestrictions" ) ; synchronized ( mPackages ) { mSettings.writePackageRestrictionsLPr ( userId ) ; mDirtyUsers.remove ( userId ) ; if ( mDirtyUsers.isEmpty ( ) ) { mHandler.removeMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ; } } }
Source:
public boolean ungrant ( java.lang.String key , int uid ) { return ungrant ( android.security.KeyStore.getKeyBytes ( key ) , android.security.KeyStore.getUidBytes ( uid ) ) ; }

Target:
public boolean grant ( java.lang.String key , int uid ) { try { return ( mBinder.grant ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void test_getMax ( ) { for ( int i = 0 ; i < 4000 ; i += 59 ) { int expect = i > > 5 ; if ( ( expect * 32 ) < i ) { expect ++ ; } assertEquals ( com.android.dx.util._tests.BitsTest.label ( i ) , ( expect * 32 ) , com.android.dx.util.Bits.getMax ( new int [ expect ] ) ) ; } }

Target:
public void test_getMax ( ) { for ( int i = 0 ; i < 4000 ; i += 59 ) { int expect = i > > 5 ; if ( ( expect * 32 ) < i ) { expect ++ ; } assertEquals ( com.android.dx.util.BitsTest.label ( i ) , ( expect * 32 ) , com.android.dx.util.Bits.getMax ( new int [ expect ] ) ) ; } }
Source:
public com.android.sched.vfs.InputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { com.android.sched.vfs.VFS vfs = new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.READ , change ) , com.android.sched.util.file.FileOrDirectory.Permission.READ ) ; return new com.android.sched.vfs.GenericInputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.InputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { com.android.sched.vfs.VFS vfs = new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.READ , change ) , com.android.sched.util.file.FileOrDirectory.Permission.READ ) ; return new com.android.sched.vfs.GenericInputVFS ( vfs ) ; } catch ( com.android.sched.util.file.CannotChangePermissionException | com.android.sched.util.file.NotDirectoryException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.FileAlreadyExistsException | com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi, drawable-xxhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
public java.io.File getToolsApiJarFile ( ) { final java.lang.String path = com.intellij.openapi.util.io.FileUtil.toSystemDependentName ( ( ( mySdkPath ) + ( com.google.gct.idea.appengine.sdk.AppEngineSdk.TOOLS_API_JAR_PATH ) ) ) ; java.io.File toolsJar = new java.io.File ( path ) ; if ( toolsJar.exists ( ) ) { return toolsJar ; } return null ; }

Target:
public java.io.File getToolsApiJarFile ( ) { final java.io.File sdkDir = new java.io.File ( mySdkPath ) ; java.io.File toolsJar = new java.io.File ( sdkDir , com.google.gct.idea.appengine.sdk.AppEngineSdk.TOOLS_API_JAR_PATH ) ; if ( toolsJar.exists ( ) ) { return toolsJar ; } return null ; }
Source:
public void copyFrom ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; copyFromUnchecked ( array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public void dispose ( ) { if ( DBG ) log ( ( "Disposing RuimRecords " + ( this ) ) ) ; mParentApp.unregisterForReady ( this ) ; resetRecords ( ) ; super . dispose ( ) ; }

Target:
public void dispose ( ) { if ( DBG ) log ( ( "Disposing RuimRecords " + ( this ) ) ) ; mParentApp.unregisterForReady ( this ) ; mParentApp.unregisterForLocked ( this ) ; mParentApp.unregisterForNetworkLocked ( this ) ; resetRecords ( ) ; super . dispose ( ) ; }
Source:
public boolean accept ( com.android.ide.common.resources.configuration.ResourceQualifier qualifier ) { if ( ( ( ( ( qualifier instanceof com.android.ide.common.resources.configuration.LanguageQualifier ) || ( qualifier instanceof com.android.ide.common.resources.configuration.RegionQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.DockModeQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.NightModeQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.VersionQualifier ) ) { return false ; } return true ; }

Target:
public boolean accept ( com.android.ide.common.resources.configuration.ResourceQualifier qualifier ) { if ( ( ( ( ( qualifier instanceof com.android.ide.common.resources.configuration.LanguageQualifier ) || ( qualifier instanceof com.android.ide.common.resources.configuration.RegionQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.UiModeQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.NightModeQualifier ) ) || ( qualifier instanceof com.android.ide.common.resources.configuration.VersionQualifier ) ) { return false ; } return true ; }
Source:
public static com.android.sdklib.internal.project.ProjectProperties load ( com.android.sdklib.io.IAbstractFolder projectFolder , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { if ( projectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = projectFolder.getFile ( type.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile ( propFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolder , map , type ) ; } } } return null ; }

Target:
public static com.android.sdklib.internal.project.ProjectProperties load ( com.android.io.IAbstractFolder projectFolder , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { if ( projectFolder.exists ( ) ) { com.android.io.IAbstractFile propFile = projectFolder.getFile ( type.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile ( propFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolder , map , type ) ; } } } return null ; }
Source:
static boolean containsValueImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object value ) { for ( java.util.Map.Entry < ? , ? > entry : map.entrySet ( ) ) { if ( com.google.common.base.Objects.equal ( entry.getValue ( ) , value ) ) { return true ; } } return false ; }

Target:
static boolean safeContainsKey ( java.util.Map < ? , ? > map , java.lang.Object key ) { com.google.common.base.Preconditions.checkNotNull ( map ) ; try { return map.containsKey ( key ) ; } catch ( java.lang.ClassCastException e ) { return false ; } catch ( java.lang.NullPointerException e ) { return false ; } }
Source:
private void gatherJavaFiles ( @ com.android.annotations.NonNull java.io.File dir , @ com.android.annotations.NonNull java.util.List < java.io.File > result ) { java.io.File [ ] files = dir.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { if ( ( file.isFile ( ) ) && ( file.getName ( ) . endsWith ( ".java" ) ) ) { result.add ( file ) ; } else if ( file.isDirectory ( ) ) { gatherJavaFiles ( file , result ) ; } } } }

Target:
private static void gatherJavaFiles ( @ com.android.annotations.NonNull java.io.File dir , @ com.android.annotations.NonNull java.util.List < java.io.File > result ) { java.io.File [ ] files = dir.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { if ( ( file.isFile ( ) ) && ( file.getName ( ) . endsWith ( ".java" ) ) ) { result.add ( file ) ; } else if ( file.isDirectory ( ) ) { com.android.tools.lint.client.api.LintDriver.gatherJavaFiles ( file , result ) ; } } } }
Source:
public static com.android.internal.telephony.cat.AppInterface getInstance ( ) { int slotId = com.android.internal.telephony.PhoneConstants.DEFAULT_CARD_INDEX ; com.android.internal.telephony.SubscriptionController sControl = com.android.internal.telephony.SubscriptionController.getInstance ( ) ; if ( sControl != null ) { slotId = sControl.getSlotId ( sControl.getDefaultSubId ( ) ) ; } return com.android.internal.telephony.cat.CatService.getInstance ( null , null , null , slotId ) ; }

Target:
public static com.android.internal.telephony.cat.AppInterface getInstance ( ) { int slotId = com.android.internal.telephony.PhoneConstants.DEFAULT_CARD_INDEX ; com.android.internal.telephony.SubscriptionController sControl = com.android.internal.telephony.SubscriptionController.getInstance ( ) ; if ( sControl != null ) { slotId = sControl.getSlotIndex ( sControl.getDefaultSubId ( ) ) ; } return com.android.internal.telephony.cat.CatService.getInstance ( null , null , null , slotId ) ; }
Source:
public void writeHashes ( com.android.dx.io.DexBuffer dex ) throws java.io.IOException { byte [ ] signature = computeSignature ( dex ) ; dex.open ( com.android.dx.io.DexHasher.SIGNATURE_OFFSET ) . write ( signature ) ; int checksum = computeChecksum ( dex ) ; dex.open ( com.android.dx.io.DexHasher.CHECKSUM_OFFSET ) . writeInt ( checksum ) ; }

Target:
public void writeHashes ( com.android.dex.Dex dex ) throws java.io.IOException { byte [ ] signature = computeSignature ( dex ) ; dex.open ( com.android.dx.io.DexHasher.SIGNATURE_OFFSET ) . write ( signature ) ; int checksum = computeChecksum ( dex ) ; dex.open ( com.android.dx.io.DexHasher.CHECKSUM_OFFSET ) . writeInt ( checksum ) ; }
Source:
private java.io.File getListingOfDex ( java.io.File out ) throws java.io.FileNotFoundException , java.io.IOException { com.android.jack.util.ExecuteFile exec = new com.android.jack.util.ExecuteFile ( new java.lang.String [ ] { "bash" , "-c" , ( "dexdump " + ( out.getAbsolutePath ( ) ) ) + " | grep \" Class descriptor : \" | cut -d\\\' -f2 | sed -e \'s/$/:/\'" } ) ; java.io.File outList = com.android.jack.TestTools.createTempFile ( "types" , ".txt" ) ; exec.setOut ( outList ) ; junit.framework.Assert.assertTrue ( exec.run ( ) ) ; return outList ; }

Target:
private java.io.File getListingOfDex ( @ javax.annotation.Nonnull java.io.File dex ) throws java.io.FileNotFoundException , java.io.IOException { assert dex.isFile ( ) ; com.android.jack.util.ExecuteFile exec = new com.android.jack.util.ExecuteFile ( new java.lang.String [ ] { "bash" , "-c" , ( "dexdump " + ( dex.getAbsolutePath ( ) ) ) + " | grep \" Class descriptor : \" | cut -d\\\' -f2 | sed -e \'s/$/:/\'" } ) ; java.io.File outList = com.android.jack.TestTools.createTempFile ( "types" , ".txt" ) ; exec.setOut ( outList ) ; junit.framework.Assert.assertTrue ( exec.run ( ) ) ; return outList ; }
Source:
synchronized void nAllocationRead3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nAllocationRead3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public static void stopStreaming ( com.android.phone.testapps.embmsmw.FrontendAppIdentifier appIdentifier , java.lang.String serviceId ) { android.util.Log.i ( com.android.phone.testapps.embmsmw.StreamStateTracker.LOG_TAG , ( "Stopping stream " + serviceId ) ) ; com.android.phone.testapps.embmsmw.AppActiveStreams appStreams = com.android.phone.testapps.embmsmw.StreamStateTracker.sPerAppStreamStates.get ( appIdentifier ) ; if ( appStreams == null ) { return ; } appStreams.stopStreaming ( serviceId ) ; }

Target:
public static void stopStreaming ( com.android.phone.testapps.embmsmw.FrontendAppIdentifier appIdentifier , java.lang.String serviceId , int reason ) { android.util.Log.i ( com.android.phone.testapps.embmsmw.StreamStateTracker.LOG_TAG , ( "Stopping stream " + serviceId ) ) ; com.android.phone.testapps.embmsmw.AppActiveStreams appStreams = com.android.phone.testapps.embmsmw.StreamStateTracker.sPerAppStreamStates.get ( appIdentifier ) ; if ( appStreams == null ) { return ; } appStreams.stopStreaming ( serviceId , reason ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { android.jvmti.cts.JniBindings.bindAgentJNI ( "android/jvmti/cts/JvmtiRedefineClassesTest" , getClass ( ) . getClassLoader ( ) ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setTransformationEvent ( false ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setPopTransformations ( true ) ; android.jvmti.cts.JvmtiRedefineClassesTest.clearTransformations ( ) ; android.jvmti.cts.JvmtiRedefineClassesTest.checkRedefinition ( android.jvmti.cts.JvmtiRedefineClassesTest.INITIAL_TRANSFORM ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { art.Main.bindAgentJNI ( "android/jvmti/cts/JvmtiRedefineClassesTest" , getClass ( ) . getClassLoader ( ) ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setTransformationEvent ( false ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setPopTransformations ( true ) ; android.jvmti.cts.JvmtiRedefineClassesTest.clearTransformations ( ) ; android.jvmti.cts.JvmtiRedefineClassesTest.checkRedefinition ( android.jvmti.cts.JvmtiRedefineClassesTest.INITIAL_TRANSFORM ) ; }
Source:
public int read ( ) throws java.io.IOException { synchronized ( lock ) { checkNotClosed ( ) ; if ( ( ( pos ) < ( end ) ) || ( ( fillBuf ( ) ) != ( - 1 ) ) ) { return buf [ ( ( pos ) ++ ) ] ; } return - 1 ; } }

Target:
private int readChar ( ) throws java.io.IOException { if ( ( ( pos ) < ( end ) ) || ( ( fillBuf ( ) ) != ( - 1 ) ) ) { return buf [ ( ( pos ) ++ ) ] ; } return - 1 ; }
Source:
public void testSetWifiEnabledSuccess ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ) ; verify ( mWifiController ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiEnabledFromSettingsWhenApEnabled ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_ENABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.SETTINGS_PACKAGE_NAME , true ) ) ; verify ( mWifiController ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
private static long getFormatter ( java.lang.String localeName , int style , int capitalizationContext ) { java.lang.String key = ( ( ( localeName + "\t" ) + style ) + "\t" ) + capitalizationContext ; java.lang.Long formatter = libcore.icu.RelativeDateTimeFormatter.CACHED_FORMATTERS.get ( key ) ; if ( formatter == null ) { formatter = libcore.icu.RelativeDateTimeFormatter.createRelativeDateTimeFormatter ( localeName , style , capitalizationContext ) ; libcore.icu.RelativeDateTimeFormatter.CACHED_FORMATTERS.put ( key , formatter ) ; } return formatter ; }

Target:
private static com.ibm.icu.text.RelativeDateTimeFormatter getFormatter ( java.lang.String localeName , libcore.icu.RelativeDateTimeFormatter.Style style , com.ibm.icu.text.DisplayContext capitalizationContext ) { java.lang.String key = ( ( ( localeName + "\t" ) + style ) + "\t" ) + capitalizationContext ; libcore.icu.RelativeDateTimeFormatter formatter = libcore.icu.RelativeDateTimeFormatter.CACHED_FORMATTERS.get ( key ) ; if ( formatter == null ) { formatter = libcore.icu.com.ibm.icu.text.RelativeDateTimeFormatter.getInstance ( new com.ibm.icu.util.ULocale ( localeName ) , null , style , capitalizationContext ) ; libcore.icu.RelativeDateTimeFormatter.CACHED_FORMATTERS.put ( key , formatter ) ; } return formatter ; }
Source:
private void unregisterUiccCardEvents ( ) { if ( ( mUiccSlot ) != null ) mUiccSlot.unregisterForAbsent ( this ) ; if ( ( mUiccCard ) != null ) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded ( this ) ; if ( ( mUiccApplication ) != null ) { mUiccApplication.unregisterForReady ( this ) ; mUiccApplication.unregisterForNetworkLocked ( this ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.unregisterForImsiReady ( this ) ; mIccRecords.unregisterForRecordsLoaded ( this ) ; mIccRecords.unregisterForLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForRecordsEvents ( this ) ; } }

Target:
private void unregisterUiccCardEvents ( ) { if ( ( mUiccSlot ) != null ) mUiccSlot.unregisterForAbsent ( this ) ; if ( ( mUiccCard ) != null ) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded ( this ) ; if ( ( mUiccApplication ) != null ) { mUiccApplication.unregisterForReady ( this ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.unregisterForImsiReady ( this ) ; mIccRecords.unregisterForRecordsLoaded ( this ) ; mIccRecords.unregisterForLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForNetworkLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForRecordsEvents ( this ) ; } }
Source:
boolean setPairingConfirmation ( android.bluetooth.BluetoothDevice device , boolean accept ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; com.android.bluetooth.btservice.RemoteDevices.DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties ( device ) ; if ( ( deviceProp == null ) || ( ( deviceProp.getBondState ( ) ) != ( android.bluetooth.BluetoothDevice.BOND_BONDING ) ) ) { return false ; } byte [ ] addr = com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ; return sspReplyNative ( addr , AbstractionLayer.BT_SSP_VARIANT_PASSKEY_CONFIRMATION , accept , 0 ) ; }

Target:
boolean setPairingConfirmation ( android.bluetooth.BluetoothDevice device , boolean accept ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PRIVILEGED , "Need BLUETOOTH PRIVILEGED permission" ) ; com.android.bluetooth.btservice.RemoteDevices.DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties ( device ) ; if ( ( deviceProp == null ) || ( ( deviceProp.getBondState ( ) ) != ( android.bluetooth.BluetoothDevice.BOND_BONDING ) ) ) { return false ; } byte [ ] addr = com.android.bluetooth.Utils.getBytesFromAddress ( device.getAddress ( ) ) ; return sspReplyNative ( addr , AbstractionLayer.BT_SSP_VARIANT_PASSKEY_CONFIRMATION , accept , 0 ) ; }
Source:
public void run ( ) { onConfigurationChange ( ) ; }

Target:
public void createConfigFile ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mConfigChooser.getShell ( ) , mEditedFile.getName ( ) , mConfigChooser.getConfiguration ( ) . getFullConfig ( ) ) ; if ( ( dialog.open ( ) ) != ( org.eclipse.jface.window.Window.OK ) ) { return ; } com.android.ide.common.resources.configuration.FolderConfiguration config = new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob job = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CreateNewConfigJob ( this , mEditedFile , config ) ; job.schedule ( ) ; }
Source:
void setExtensionsTable ( org.apache.xalan.templates.StylesheetRoot sroot ) throws javax.xml.transform.TransformerException { try { if ( ( sroot.getExtensions ( ) ) != null ) m_extensionsTable = new org.apache.xalan.extensions.ExtensionsTable ( sroot ) ; } catch ( javax.xml.transform.TransformerException te ) { te.printStackTrace ( ) ; } }

Target:
void setExtensionsTable ( org.apache.xalan.templates.StylesheetRoot sroot ) throws javax.xml.transform.TransformerException { try { if ( ( sroot.getExtensions ( ) ) != null ) if ( ! ( sroot.isSecureProcessing ( ) ) ) m_extensionsTable = new org.apache.xalan.extensions.ExtensionsTable ( sroot ) ; } catch ( javax.xml.transform.TransformerException te ) { te.printStackTrace ( ) ; } }
Source:
public static int getAxisCount ( int sensorType ) { switch ( sensorType ) { case android.hardware.Sensor.TYPE_ACCELEROMETER : return 3 ; case android.hardware.Sensor.TYPE_MAGNETIC_FIELD : return 3 ; case android.hardware.Sensor.TYPE_GYROSCOPE : return 3 ; case android.hardware.Sensor.TYPE_GRAVITY : return 3 ; case android.hardware.Sensor.TYPE_LINEAR_ACCELERATION : return 3 ; default : throw new java.security.InvalidParameterException ( java.lang.String.format ( "Invalid sensorType:%d. Unable to find axis count." , sensorType ) ) ; } }

Target:
public static android.hardware.cts.helpers.SensorTestInformation.SensorReportingMode getReportingMode ( int sensorType ) { switch ( sensorType ) { case android.hardware.Sensor.TYPE_ACCELEROMETER : case android.hardware.Sensor.TYPE_MAGNETIC_FIELD : case android.hardware.Sensor.TYPE_ORIENTATION : case android.hardware.Sensor.TYPE_GYROSCOPE : case android.hardware.Sensor.TYPE_PRESSURE : case android.hardware.Sensor.TYPE_GRAVITY : case android.hardware.Sensor.TYPE_LINEAR_ACCELERATION : case android.hardware.Sensor.TYPE_ROTATION_VECTOR : case android.hardware.Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED : case android.hardware.Sensor.TYPE_GAME_ROTATION_VECTOR : case android.hardware.Sensor.TYPE_GYROSCOPE_UNCALIBRATED : case android.hardware.Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR : return android.hardware.cts.helpers.SensorTestInformation.SensorReportingMode.CONTINUOUS ; case android.hardware.Sensor.TYPE_LIGHT : case android.hardware.Sensor.TYPE_TEMPERATURE : case android.hardware.Sensor.TYPE_PROXIMITY : case android.hardware.Sensor.TYPE_RELATIVE_HUMIDITY : case android.hardware.Sensor.TYPE_AMBIENT_TEMPERATURE : case android.hardware.Sensor.TYPE_STEP_DETECTOR : case android.hardware.Sensor.TYPE_STEP_COUNTER : return android.hardware.cts.helpers.SensorTestInformation.SensorReportingMode.ON_CHANGE ; case android.hardware.Sensor.TYPE_SIGNIFICANT_MOTION : return android.hardware.cts.helpers.SensorTestInformation.SensorReportingMode.ONE_SHOT ; default : return null ; } }
Source:
private boolean handlePreload ( ) { try { if ( isPreloadComplete ( ) ) { mSocketOutStream.writeInt ( 1 ) ; } else { preload ( ) ; mSocketOutStream.writeInt ( 0 ) ; } return false ; } catch ( java.io.IOException ioe ) { android.util.Log.e ( com.android.internal.os.ZygoteConnection.TAG , "Error writing to command socket" , ioe ) ; return true ; } }

Target:
private void handlePreload ( ) { try { if ( isPreloadComplete ( ) ) { mSocketOutStream.writeInt ( 1 ) ; } else { preload ( ) ; mSocketOutStream.writeInt ( 0 ) ; } } catch ( java.io.IOException ioe ) { throw new java.lang.IllegalStateException ( "Error writing to command socket" , ioe ) ; } }
Source:
static boolean usesExpansionFunction ( com.google.devtools.common.options.Option annotation ) { return ( annotation.expansionFunction ( ) ) != ( com.google.devtools.common.options.ExpansionFunction.class ) ; }

Target:
private static com.google.common.collect.ImmutableList < com.google.devtools.common.options.OptionDefinition > getAllOptionDefinitionsSorted ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { return java.util.Arrays.stream ( optionsClass.getFields ( ) ) . map ( ( field ) -> { try { return com.google.devtools.common.options.OptionDefinition.extractOptionDefinition ( field ) ; } catch ( com.google.devtools.common.options.OptionsParser.ConstructionException e ) { return null ; } } ) . filter ( java.util.Objects :: nonNull ) . sorted ( OptionDefinition.BY_OPTION_NAME ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { BadFinalizer bf = new BadFinalizer ( ) ; java.lang.System.out.println ( "Constructed object." ) ; bf = null ; java.lang.System.out.println ( "Nulled. Requestion gc." ) ; java.lang.System.gc ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { BadFinalizer.snooze ( 5000 ) ; java.lang.System.out.println ( "Requesting another GC." ) ; java.lang.System.gc ( ) ; } java.lang.System.out.println ( "Done waiting." ) ; java.lang.System.exit ( 0 ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { BadFinalizer bf = new BadFinalizer ( ) ; java.lang.System.out.println ( "Constructed object." ) ; bf = null ; java.lang.System.out.println ( "Nulled. Requestion gc." ) ; java.lang.System.gc ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { BadFinalizer.snooze ( 4000 ) ; java.lang.System.out.println ( "Requesting another GC." ) ; java.lang.System.gc ( ) ; } java.lang.System.out.println ( "Done waiting." ) ; java.lang.System.exit ( 0 ) ; }
Source:
public java.lang.Number parse ( java.lang.String text , java.text.ParsePosition parsePosition ) { return ( ( java.lang.Number ) ( parse ( text , parsePosition , null ) ) ) ; }

Target:
public java.lang.Number parse ( java.lang.String text , java.text.ParsePosition parsePosition ) { android.icu.impl.number.Properties pprops = android.icu.text.DecimalFormat.threadLocalProperties.get ( ) ; synchronized ( this ) { pprops.copyFrom ( properties ) ; } java.lang.Number result = android.icu.impl.number.Parse.parse ( text , parsePosition , pprops , symbols ) ; if ( result instanceof java.math.BigDecimal ) { result = safeConvertBigDecimal ( ( ( java.math.BigDecimal ) ( result ) ) ) ; } return result ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( ConnectivityManager.CONNECTIVITY_ACTION.equals ( action ) ) { if ( com.android.server.NetworkTimeUpdateService.DBG ) android.util.Log.d ( com.android.server.NetworkTimeUpdateService.TAG , "Received CONNECTIVITY_ACTION " ) ; android.os.Message message = mHandler.obtainMessage ( com.android.server.NetworkTimeUpdateService.EVENT_NETWORK_CHANGED ) ; mHandler.sendMessageDelayed ( message , com.android.server.NetworkTimeUpdateService.NETWORK_CHANGE_EVENT_DELAY_MS ) ; } }

Target:
public void onAvailable ( android.net.Network network ) { android.util.Log.d ( com.android.server.NetworkTimeUpdateService.TAG , java.lang.String.format ( "New default network %s; checking time." , network ) ) ; mDefaultNetwork = network ; onPollNetworkTime ( com.android.server.NetworkTimeUpdateService.EVENT_NETWORK_CHANGED ) ; }
Source:
public void waitForIdle ( int timeoutMsAsInt ) { long timeoutMs = timeoutMsAsInt ; com.android.internal.util.TestUtils.waitForIdleHandler ( mService.mHandlerThread , timeoutMs ) ; waitForIdle ( mCellNetworkAgent , timeoutMs ) ; waitForIdle ( mWiFiNetworkAgent , timeoutMs ) ; waitForIdle ( mEthernetNetworkAgent , timeoutMs ) ; com.android.internal.util.TestUtils.waitForIdleHandler ( mService.mHandlerThread , timeoutMs ) ; }

Target:
public void waitForIdle ( int timeoutMsAsInt ) { long timeoutMs = timeoutMsAsInt ; com.android.internal.util.TestUtils.waitForIdleHandler ( mService.mHandlerThread , timeoutMs ) ; waitForIdle ( mCellNetworkAgent , timeoutMs ) ; waitForIdle ( mWiFiNetworkAgent , timeoutMs ) ; waitForIdle ( mEthernetNetworkAgent , timeoutMs ) ; com.android.internal.util.TestUtils.waitForIdleHandler ( mService.mHandlerThread , timeoutMs ) ; com.android.internal.util.TestUtils.waitForIdleLooper ( android.net.ConnectivityThread.getInstanceLooper ( ) , timeoutMs ) ; }
Source:
public void setMultiDexKind ( @ javax.annotation.Nonnull com.android.jack.api.v01.MultiDexKind arg0 ) throws com.android.jack.api.v01.ConfigurationException { }

Target:
public void setMultiDexKind ( @ javax.annotation.Nonnull com.android.jack.api.v01.MultiDexKind multiDexKind ) throws com.android.jack.api.v01.ConfigurationException { switch ( multiDexKind ) { case LEGACY : { options.setMultiDexKind ( com.android.jack.Options.MultiDexKind.LEGACY ) ; break ; } case NATIVE : { options.setMultiDexKind ( com.android.jack.Options.MultiDexKind.NATIVE ) ; break ; } case NONE : { options.setMultiDexKind ( com.android.jack.Options.MultiDexKind.NONE ) ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Multi dex kind '" + multiDexKind ) + "' is unsupported" ) ) ; } } }
Source:
private void responseVoid ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.lang.Object ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseVoid ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.lang.Object ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
static < K , V > java.util.Iterator < V > valueIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return new com.google.common.collect.TransformedIterator < java.util.Map.Entry < K , V > , V > ( entryIterator ) { @ java.lang.Override V transform ( java.util.Map.Entry < K , V > entry ) { return entry.getValue ( ) ; } } ; }

Target:
static < K , V > java.util.Iterator < K > keyIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return com.google.common.collect.Iterators.transform ( entryIterator , com.google.common.collect.Maps.< K > keyFunction ( ) ) ; }
Source:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; libcore.tzdata.shared2.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }
Source:
public void registerForRecordsLoaded ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mRecordsLoadedRegistrants.add ( r ) ; if ( ( ( mRecordsToLoad ) == 0 ) && ( ( mRecordsRequested ) == true ) ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }

Target:
protected boolean getLockedRecordsLoaded ( ) { return ( ( mRecordsToLoad ) == 0 ) && ( mLockedRecordsRequested ) ; }
Source:
public void run ( ) { mNM.notify ( 1 , notificationWithNumbers ( 1 ) ) ; mNM.cancel ( 1 ) ; }

Target:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "me me me me" , java.lang.System.currentTimeMillis ( ) ) ; n.contentView = new android.widget.RemoteViews ( getPackageName ( ) , R.layout.chrono_notification ) ; mChronometerBase = android.os.SystemClock.elapsedRealtime ( ) ; n.contentView.setChronometer ( R.id.time , mChronometerBase , "Yay! (%s)" , true ) ; n.flags |= android.app.Notification.FLAG_ONGOING_EVENT ; n.contentIntent = makeIntent ( ) ; mNM.notify ( 2 , n ) ; }