auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.nio.ByteBuffer duplicate ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return new java.nio.DirectByteBuffer ( memoryRef , this . markValue ( ) , this . position ( ) , this . limit ( ) , this . capacity ( ) , offset , isReadOnly ) ; }

Target:
public final java.nio.ByteBuffer duplicate ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return new java.nio.DirectByteBuffer ( memoryRef , this . markValue ( ) , this . position ( ) , this . limit ( ) , this . capacity ( ) , offset , isReadOnly ) ; }
Source:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; if ( ! ( mNoDexOpt ) ) { return false ; } android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( ( p == null ) || ( p.mDidDexOpt ) ) { return false ; } } synchronized ( mInstallLock ) { return ( performDexOptLI ( p , false , false ) ) == ( com.android.server.pm.PackageManagerService.DEX_OPT_PERFORMED ) ; } }

Target:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; if ( ! ( mNoDexOpt ) ) { return false ; } android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( ( p == null ) || ( p.mDidDexOpt ) ) { return false ; } } synchronized ( mInstallLock ) { return ( performDexOptLI ( p , false , false , true ) ) == ( com.android.server.pm.PackageManagerService.DEX_OPT_PERFORMED ) ; } }
Source:
public boolean startLoggingRingBuffer ( int verboseLevel , int flags , int maxInterval , int minDataSize , java.lang.String ringName ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.startLoggingRingBuffer ( verboseLevel , flags , maxInterval , minDataSize , ringName ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.startLoggingRingBufferNative ( com.android.server.wifi.WifiNative.sWlan0Index , verboseLevel , flags , maxInterval , minDataSize , ringName ) ; } else { return false ; } } } }

Target:
public boolean startLoggingRingBuffer ( int verboseLevel , int flags , int maxInterval , int minDataSize , java.lang.String ringName ) { return mWifiVendorHal.startLoggingRingBuffer ( verboseLevel , flags , maxInterval , minDataSize , ringName ) ; }
Source:
public boolean hasIccCard ( ) { synchronized ( mLock ) { if ( ( ( mUiccCard ) != null ) && ( ( mUiccCard.getCardState ( ) ) != ( com.android.internal.telephony.uicc.IccCardStatus.CardState.CARDSTATE_ABSENT ) ) ) { return true ; } loge ( ( "hasIccCard: UiccProfile is not null but UiccCard is null or card state is " + "ABSENT" ) ) ; return false ; } }

Target:
public boolean hasIccCard ( ) { if ( ( mUiccCard.getCardState ( ) ) != ( com.android.internal.telephony.uicc.IccCardStatus.CardState.CARDSTATE_ABSENT ) ) { return true ; } loge ( ( "hasIccCard: UiccProfile is not null but UiccCard is null or card state is " + "ABSENT" ) ) ; return false ; }
Source:
private void closeWithStatus ( int status , java.lang.String msg ) { if ( mClosed ) return ; mClosed = true ; mGuard.close ( ) ; writeCommStatusAndClose ( status , msg ) ; libcore.io.IoUtils.closeQuietly ( mFd ) ; releaseResources ( ) ; }

Target:
private void closeWithStatus ( int status , java.lang.String msg ) { if ( mClosed ) return ; mClosed = true ; if ( ( mGuard ) != null ) { mGuard.close ( ) ; } writeCommStatusAndClose ( status , msg ) ; libcore.io.IoUtils.closeQuietly ( mFd ) ; releaseResources ( ) ; }
Source:
public com.android.builder.model.AndroidProject getSingleModel ( ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }

Target:
public com.android.builder.model.AndroidProject getSingleModel ( ) { return getSingleModel ( false ) ; }
Source:
public void run ( ) { com.android.rs.test_v11.RenderScript pRS = com.android.rs.test_v11.RenderScript.create ( mCtx ) ; com.android.rs.test_v11.ScriptC_primitives s = new com.android.rs.test_v11.ScriptC_primitives ( pRS , mRes , R.raw.primitives ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { result = - 1 ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; } pRS.destroy ( ) ; }

Target:
public void run ( ) { com.android.rs.test_v11.RenderScript pRS = com.android.rs.test_v11.RenderScript.create ( mCtx ) ; com.android.rs.test_v11.ScriptC_primitives s = new com.android.rs.test_v11.ScriptC_primitives ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { result = - 1 ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; } pRS.destroy ( ) ; }
Source:
public static void skipTest ( java.lang.String tag , java.lang.String reason ) { android.util.Log.i ( tag , ( ( ( "SKIPPING " + ( android.cts.util.MediaUtils.getTestName ( ) ) ) + "(): " ) + reason ) ) ; com.android.compatibility.common.util.DeviceReportLog log = new com.android.compatibility.common.util.DeviceReportLog ( "CtsMediaSkippedTests" , "test_skipped" ) ; log.addValue ( "reason" , reason , ResultType.NEUTRAL , ResultUnit.NONE ) ; log.addValue ( "test" , android.cts.util.MediaUtils.getTestNameWithClass ( ) , ResultType.NEUTRAL , ResultUnit.NONE ) ; try { log.submit ( null ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public static void skipTest ( java.lang.String tag , java.lang.String reason ) { android.util.Log.i ( tag , ( ( ( "SKIPPING " + ( android.cts.util.MediaUtils.getTestName ( ) ) ) + "(): " ) + reason ) ) ; com.android.compatibility.common.util.DeviceReportLog log = new com.android.compatibility.common.util.DeviceReportLog ( "CtsMediaSkippedTests" , "test_skipped" ) ; try { log.addValue ( "reason" , reason , ResultType.NEUTRAL , ResultUnit.NONE ) ; log.addValue ( "test" , android.cts.util.MediaUtils.getTestNameWithClass ( ) , ResultType.NEUTRAL , ResultUnit.NONE ) ; log.submit ( ) ; } catch ( java.lang.NullPointerException e ) { } }
Source:
private void reportStartInstrumentationFailure ( android.app.IInstrumentationWatcher watcher , android.content.ComponentName cn , java.lang.String report ) { android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , report ) ; try { if ( watcher != null ) { android.os.Bundle results = new android.os.Bundle ( ) ; results.putString ( Instrumentation.REPORT_KEY_IDENTIFIER , "ActivityManagerService" ) ; results.putString ( "Error" , report ) ; watcher.instrumentationStatus ( cn , ( - 1 ) , results ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , e ) ; } }

Target:
private void reportStartInstrumentationFailure ( android.app.IInstrumentationWatcher watcher , android.content.ComponentName cn , java.lang.String report ) { android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , report ) ; try { if ( watcher != null ) { android.os.Bundle results = new android.os.Bundle ( ) ; results.putString ( Instrumentation.REPORT_KEY_IDENTIFIER , "ActivityManagerService" ) ; results.putString ( "Error" , report ) ; watcher.instrumentationStatus ( cn , ( - 1 ) , results ) ; } } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , e ) ; } }
Source:
private static void createDexFile ( ) { if ( ( com.android.dx.command.dexer.Main.outputDex ) != null ) { com.android.dx.command.dexer.Main.dexOutputArrays.add ( com.android.dx.command.dexer.Main.writeDex ( ) ) ; } com.android.dx.command.dexer.Main.outputDex = new com.android.dx.dex.file.DexFile ( com.android.dx.command.dexer.Main.args.dexOptions ) ; if ( ( com.android.dx.command.dexer.Main.args.dumpWidth ) != 0 ) { com.android.dx.command.dexer.Main.outputDex.setDumpWidth ( com.android.dx.command.dexer.Main.args.dumpWidth ) ; } }

Target:
private static void createDexFile ( ) { com.android.dx.command.dexer.Main.outputDex = new com.android.dx.dex.file.DexFile ( com.android.dx.command.dexer.Main.args.dexOptions ) ; if ( ( com.android.dx.command.dexer.Main.args.dumpWidth ) != 0 ) { com.android.dx.command.dexer.Main.outputDex.setDumpWidth ( com.android.dx.command.dexer.Main.args.dumpWidth ) ; } }
Source:
private void processAtCops ( android.bluetooth.BluetoothDevice device ) { if ( device == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetStateMachine.TAG , "processAtCops device is null" ) ; return ; } java.lang.String operatorName = mSystemInterface.getNetworkOperator ( ) ; if ( operatorName == null ) { operatorName = "" ; } mNativeInterface.copsResponse ( device , operatorName ) ; }

Target:
private void processAtCops ( android.bluetooth.BluetoothDevice device ) { java.lang.String operatorName = mSystemInterface.getNetworkOperator ( ) ; if ( operatorName == null ) { operatorName = "" ; } mNativeInterface.copsResponse ( device , operatorName ) ; }
Source:
private static java.net.InetAddress disallowDeprecatedFormats ( java.lang.String address , java.net.InetAddress inetAddress ) { if ( ( ! ( inetAddress instanceof java.net.Inet4Address ) ) || ( ( address.indexOf ( ':' ) ) != ( - 1 ) ) ) { return inetAddress ; } return Libcore.os.inet_pton ( java.net.AF_INET , address ) ; }

Target:
static java.net.InetAddress disallowDeprecatedFormats ( java.lang.String address , java.net.InetAddress inetAddress ) { if ( ( ! ( inetAddress instanceof java.net.Inet4Address ) ) || ( ( address.indexOf ( ':' ) ) != ( - 1 ) ) ) { return inetAddress ; } return Libcore.os.inet_pton ( java.net.AF_INET , address ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ! ( super . equals ( obj ) ) ) return false ; java.text.SimpleDateFormat that = ( ( java.text.SimpleDateFormat ) ( obj ) ) ; return ( pattern.equals ( that.pattern ) ) && ( formatData.equals ( that.formatData ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ! ( super . equals ( obj ) ) ) { return false ; } java.text.SimpleDateFormat that = ( ( java.text.SimpleDateFormat ) ( obj ) ) ; return ( pattern.equals ( that.pattern ) ) && ( formatData.equals ( that.formatData ) ) ; }
Source:
private void createTypes ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration x ) { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; try { com.android.jack.ir.ast.JDefinedClassOrInterface type = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( getTypeMap ( ) . get ( x.binding ) ) ) ; newTypes.add ( type ) ; if ( ( x.memberTypes ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration memberType : x.memberTypes ) { createTypes ( memberType ) ; } } } catch ( java.lang.Throwable e ) { throw translateException ( x , e , info ) ; } }

Target:
private void createTypes ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration x ) { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; try { com.android.jack.ir.ast.JDefinedClassOrInterface type = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( getTypeMap ( ) . get ( x.binding ) ) ) ; newTypes.add ( type ) ; if ( ( x.memberTypes ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration memberType : x.memberTypes ) { createTypes ( memberType ) ; } } } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e , info ) ; } }
Source:
public boolean showContextMenuForChild ( android.view.View originalView ) { int groupPosition = ( ( java.lang.Integer ) ( originalView.getTag ( R.id.group_position ) ) ) ; int childPosition = ( ( java.lang.Integer ) ( originalView.getTag ( R.id.child_position ) ) ) ; mContextMenuInfo = new com.android.browser.view.BookmarkExpandableView.BookmarkContextMenuInfo ( childPosition , groupPosition ) ; if ( ( getParent ( ) ) != null ) { getParent ( ) . showContextMenuForChild ( this ) ; } return true ; }

Target:
public boolean showContextMenuForChild ( android.view.View originalView ) { java.lang.Integer groupPosition = ( ( java.lang.Integer ) ( originalView.getTag ( R.id.group_position ) ) ) ; java.lang.Integer childPosition = ( ( java.lang.Integer ) ( originalView.getTag ( R.id.child_position ) ) ) ; if ( ( groupPosition == null ) || ( childPosition == null ) ) { return false ; } mContextMenuInfo = new com.android.browser.view.BookmarkExpandableView.BookmarkContextMenuInfo ( childPosition , groupPosition ) ; if ( ( getParent ( ) ) != null ) { getParent ( ) . showContextMenuForChild ( this ) ; } return true ; }
Source:
private static org.eclipse.jdt.core.IPackageFragmentRoot getSourcePackageRoot ( org.eclipse.jdt.core.IJavaProject javaProject ) { org.eclipse.jdt.core.IPackageFragmentRoot packageRoot = null ; java.util.List < org.eclipse.core.runtime.IPath > sources = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; org.eclipse.core.resources.IWorkspace workspace = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) ; for ( org.eclipse.core.runtime.IPath path : sources ) { org.eclipse.core.resources.IResource firstSource = workspace.getRoot ( ) . findMember ( path ) ; if ( firstSource != null ) { packageRoot = javaProject.getPackageFragmentRoot ( firstSource ) ; if ( packageRoot != null ) { break ; } } } return packageRoot ; }

Target:
public static org.eclipse.jdt.core.IPackageFragmentRoot getSourcePackageRoot ( org.eclipse.jdt.core.IJavaProject javaProject ) { org.eclipse.jdt.core.IPackageFragmentRoot packageRoot = null ; java.util.List < org.eclipse.core.runtime.IPath > sources = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; org.eclipse.core.resources.IWorkspace workspace = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) ; for ( org.eclipse.core.runtime.IPath path : sources ) { org.eclipse.core.resources.IResource firstSource = workspace.getRoot ( ) . findMember ( path ) ; if ( firstSource != null ) { packageRoot = javaProject.getPackageFragmentRoot ( firstSource ) ; if ( packageRoot != null ) { break ; } } } return packageRoot ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] findViewLayoutAttributes ( java.lang.String viewFqcn , java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor > knownViews ) { for ( com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor desc : knownViews ) { if ( desc instanceof com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor viewDesc = ( ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) ( desc ) ) ; if ( viewFqcn.equals ( viewDesc.getFullClassName ( ) ) ) { return viewDesc.getLayoutAttributes ( ) ; } } } return null ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor [ ] findViewLayoutAttributes ( java.lang.String viewFqcn , java.util.List < com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor > knownViews ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor viewDesc : knownViews ) { if ( viewFqcn.equals ( viewDesc.getFullClassName ( ) ) ) { return viewDesc.getLayoutAttributes ( ) ; } } return null ; }
Source:
public void connectionServiceFocusLost ( ) { if ( ( mConnSvrFocusListener ) != null ) { mConnSvrFocusListener.onConnectionServiceReleased ( this ) ; } com.android.server.telecom.BindCallback callback = new com.android.server.telecom.BindCallback ( ) { @ java.lang.Override public void onSuccess ( ) { try { mServiceInterface.connectionServiceFocusLost ( android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { android.telecom.Log.d ( this , "failed to inform the focus lost event" ) ; } } @ java.lang.Override public void onFailure ( ) { } } ; mBinder.bind ( callback , null ) ; }

Target:
public void connectionServiceFocusLost ( ) { if ( ( mConnSvrFocusListener ) != null ) { mConnSvrFocusListener.onConnectionServiceReleased ( this ) ; } }
Source:
public void testLibraries ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "bytecode/GetterTest.java.txt=>src/test/bytecode/GetterTest.java" , "bytecode/GetterTest.jar.data=>bin/classes.jar" ) ; checkDriver ( ( "\n" + ( ( "Scanning MainTest_testLibraries: \n" + "\n" ) + "No issues found.\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "FieldGetter" , "--libraries" , new java.io.File ( project , "bin/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) } ) ; }

Target:
public void testLibraries ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "bytecode/GetterTest.java.txt=>src/test/bytecode/GetterTest.java" , "bytecode/GetterTest.jar.data=>bin/classes.jar" ) ; checkDriver ( ( "\n" + ( "Scanning MainTest_testLibraries: \n" + "No issues found.\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "FieldGetter" , "--libraries" , new java.io.File ( project , "bin/classes.jar" ) . getPath ( ) , "--disable" , "LintError" , project.getPath ( ) } ) ; }
Source:
public void testRefactor2 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , false , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename package \'com.example.refactoringtest\' to \'my.pkg.name\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor2/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* AndroidManifest.xml - /testRefactor2/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"" ) ) ) ; }

Target:
public void testRefactor2 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , false , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename package \'com.example.refactoringtest\' to \'my.pkg.name\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor2/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* activity_main.xml - /testRefactor2/res/layout/activity_main.xml\n" ) + " @@ -33 +33\n" ) + " - <fragment android:name=\"com.example.refactoringtest.MyFragment\"/>\n" ) + " + <fragment android:name=\"my.pkg.name.MyFragment\"/>\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <my.pkg.name.CustomView1\n" ) + "\n" ) + "\n" ) + "* AndroidManifest.xml - /testRefactor2/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"my.pkg.name.MainActivity2\"" ) ) ) ; }
Source:
public void createTest ( com.android.rs.image2.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image2.ScriptC_vignette_approx_relaxed ( mRS , res , R.raw.vignette_approx_relaxed ) ; else mScript_approx_full = new com.android.rs.image2.ScriptC_vignette_approx_full ( mRS , res , R.raw.vignette_approx_full ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image2.ScriptC_vignette_relaxed ( mRS , res , R.raw.vignette_relaxed ) ; else mScript_full = new com.android.rs.image2.ScriptC_vignette_full ( mRS , res , R.raw.vignette_full ) ; do_init ( ) ; }

Target:
public void createTest ( com.android.rs.image2.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image2.ScriptC_vignette_approx_relaxed ( mRS , res , R.raw.vignette_approx_relaxed ) ; else mScript_approx_full = new com.android.rs.image2.ScriptC_vignette_approx_full ( mRS , res , R.raw.vignette_approx_full ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image2.ScriptC_vignette_relaxed ( mRS ) ; else mScript_full = new com.android.rs.image2.ScriptC_vignette_full ( mRS ) ; do_init ( ) ; }
Source:
public void setTelephonyCountryCodeAfterL2Connected ( ) throws java.lang.Exception { mWifiCountryCode.setReadyForChange ( true ) ; mWifiCountryCode.setReadyForChange ( false ) ; mWifiCountryCode.setCountryCode ( mTelephonyCountryCode , false ) ; org.junit.Assert.assertEquals ( mDefaultCountryCode , mWifiCountryCode.getCountryCodeSentToDriver ( ) ) ; mWifiCountryCode.setReadyForChange ( true ) ; org.mockito.Mockito.verify ( mWifiNative , org.mockito.Mockito.times ( 2 ) ) . setCountryCode ( org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertEquals ( mTelephonyCountryCode , mWifiCountryCode.getCountryCodeSentToDriver ( ) ) ; }

Target:
public void setTelephonyCountryCodeAfterL2Connected ( ) throws java.lang.Exception { mWifiCountryCode.setReadyForChange ( true ) ; mWifiCountryCode.setReadyForChange ( false ) ; mWifiCountryCode.setCountryCode ( mTelephonyCountryCode ) ; org.junit.Assert.assertEquals ( mDefaultCountryCode , mWifiCountryCode.getCountryCodeSentToDriver ( ) ) ; mWifiCountryCode.setReadyForChange ( true ) ; org.mockito.Mockito.verify ( mWifiNative , org.mockito.Mockito.times ( 2 ) ) . setCountryCode ( org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertEquals ( mTelephonyCountryCode , mWifiCountryCode.getCountryCodeSentToDriver ( ) ) ; }
Source:
public java.lang.String toString ( ) { int mod = getModifiers ( ) ; return ( ( ( ( ( mod == 0 ? "" : ( java.lang.reflect.Modifier.toString ( mod ) ) + " " ) + ( java.lang.reflect.Field.getTypeName ( getType ( ) ) ) ) + " " ) + ( java.lang.reflect.Field.getTypeName ( getDeclaringClass ( ) ) ) ) + "." ) + ( getName ( ) ) ; }

Target:
public java.lang.String toString ( ) { int mod = getModifiers ( ) ; return ( ( ( ( ( mod == 0 ? "" : ( java.lang.reflect.Modifier.toString ( mod ) ) + " " ) + ( getType ( ) . getTypeName ( ) ) ) + " " ) + ( getDeclaringClass ( ) . getTypeName ( ) ) ) + "." ) + ( getName ( ) ) ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws com.android.jack.JackAbortException { com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( DexFileWriter.DEX_WRITING_POLICY ) ; try { writingTool.finishMerge ( outputVDir ) ; } catch ( com.android.jack.backend.dex.DexWritingException e ) { session.getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } if ( com.android.sched.util.config.ThreadConfig.get ( Options.DETERMINISTIC_MULTIDEX_MODE ) . booleanValue ( ) ) { for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : session.getTypesToEmit ( ) ) { type.removeMarker ( com.android.jack.backend.dex.NumberMarker.class ) ; } } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws com.android.jack.JackAbortException { com.android.jack.backend.dex.DexWritingTool writingTool = com.android.sched.util.config.ThreadConfig.get ( DexFileWriter.DEX_WRITING_POLICY ) ; try { writingTool.finishMerge ( outputVDir ) ; } catch ( com.android.jack.backend.dex.DexWritingException e ) { session.getReporter ( ) . report ( Severity.FATAL , e ) ; throw new com.android.jack.JackAbortException ( e ) ; } }
Source:
private void cleanUp ( java.lang.ref.Reference < ? > reference ) throws com.google.common.base.internal.Finalizer.ShutDown { java.lang.reflect.Method finalizeReferentMethod = getFinalizeReferentMethod ( ) ; do { reference.clear ( ) ; if ( reference == ( frqReference ) ) { throw new com.google.common.base.internal.Finalizer.ShutDown ( ) ; } try { finalizeReferentMethod.invoke ( reference ) ; } catch ( java.lang.Throwable t ) { com.google.common.base.internal.Finalizer.logger.log ( java.util.logging.Level.SEVERE , "Error cleaning up after reference." , t ) ; } } while ( ( reference = queue.poll ( ) ) != null ) ; }

Target:
private boolean cleanUp ( java.lang.ref.Reference < ? > reference ) { java.lang.reflect.Method finalizeReferentMethod = getFinalizeReferentMethod ( ) ; if ( finalizeReferentMethod == null ) { return false ; } do { reference.clear ( ) ; if ( reference == ( frqReference ) ) { return false ; } try { finalizeReferentMethod.invoke ( reference ) ; } catch ( java.lang.Throwable t ) { com.google.common.base.internal.Finalizer.logger.log ( java.util.logging.Level.SEVERE , "Error cleaning up after reference." , t ) ; } } while ( ( reference = queue.poll ( ) ) != null ) ; return true ; }
Source:
public java.util.ListIterator < java.util.Map.Entry < K , V > > listIterator ( int index ) { return new com.google.common.collect.TransformedListIterator < com.google.common.collect.LinkedListMultimap.Node < K , V > , java.util.Map.Entry < K , V > > ( new NodeIterator ( index ) ) { @ java.lang.Override java.util.Map.Entry < K , V > transform ( com.google.common.collect.LinkedListMultimap.Node < K , V > node ) { return com.google.common.collect.LinkedListMultimap.createEntry ( node ) ; } } ; }

Target:
public java.util.ListIterator < java.util.Map.Entry < K , V > > listIterator ( int index ) { return new NodeIterator ( index ) ; }
Source:
public void test_SSL_get_options ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_options ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } int c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; int s = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_new ( c ) ; assertTrue ( ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_options ( s ) ) != 0 ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_free ( s ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_get_options ( ) throws java.lang.Exception { try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_options ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } long c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; long s = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_new ( c ) ; assertTrue ( ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_options ( s ) ) != 0 ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_free ( s ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
private void replyFailed ( android.os.Message msg , int what , int why ) { android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = what ; reply.arg1 = why ; try { msg.replyTo.send ( reply ) ; } catch ( android.os.RemoteException e ) { } }

Target:
private void replyFailed ( android.os.Message msg , int what , int why ) { if ( ( msg.replyTo ) == null ) return ; android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = what ; reply.arg1 = why ; try { msg.replyTo.send ( reply ) ; } catch ( android.os.RemoteException e ) { } }
Source:
private void getSigAlgName ( java.security.cert.CertificateFactory f ) throws java.lang.Exception { java.security.cert.X509CRL crlRsa = getCRL ( f , libcore.java.security.cert.X509CRLTest.CRL_RSA ) ; java.lang.String actual = crlRsa.getSigAlgName ( ) . toUpperCase ( java.util.Locale.US ) ; if ( "BC" . equals ( f.getProvider ( ) . getName ( ) ) ) { assertEquals ( "1.2.840.113549.1.1.5" , actual ) ; } else { assertEquals ( "SHA1WITHRSA" , actual ) ; } }

Target:
private void getSigAlgName ( java.security.cert.CertificateFactory f ) throws java.lang.Exception { java.security.cert.X509CRL crlRsa = getCRL ( f , libcore.java.security.cert.X509CRLTest.CRL_RSA ) ; assertEquals ( "SHA1WITHRSA" , getCRL ( f , libcore.java.security.cert.X509CRLTest.CRL_RSA ) . getSigAlgName ( ) . toUpperCase ( java.util.Locale.US ) ) ; }
Source:
public static void setParent ( int id , int parent ) { if ( id == parent ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.LOG.error ( "Cyclic parent/child relations" ) ; return ; } try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.incModCount ( id ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.putRecordInt ( id , com.intellij.openapi.vfs.newvfs.persistent.FSRecords.PARENT_OFFSET , parent ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }

Target:
public static void setParent ( int id , int parent ) { if ( id == parent ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.LOG.error ( "Cyclic parent/child relations" ) ; return ; } com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.incModCount ( id ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.putRecordInt ( id , com.intellij.openapi.vfs.newvfs.persistent.FSRecords.PARENT_OFFSET , parent ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }
Source:
public com.android.sdklib.internal.repository.packages.Package.UpdateInfo canBeUpdatedBy ( com.android.sdklib.internal.repository.packages.Package replacementPackage ) { if ( replacementPackage == null ) { return com.android.sdklib.internal.repository.packages.Package.UpdateInfo.INCOMPATIBLE ; } if ( ! ( sameItemAs ( replacementPackage ) ) ) { return com.android.sdklib.internal.repository.packages.Package.UpdateInfo.INCOMPATIBLE ; } if ( ( replacementPackage.getRevision ( ) . compareTo ( this . getRevision ( ) ) ) > 0 ) { return com.android.sdklib.internal.repository.packages.Package.UpdateInfo.UPDATE ; } return com.android.sdklib.internal.repository.packages.Package.UpdateInfo.NOT_UPDATE ; }

Target:
public abstract com.android.sdklib.internal.repository.packages.Package.UpdateInfo canBeUpdatedBy ( com.android.sdklib.internal.repository.packages.Package replacementPackage ) ;
Source:
public void testForceWrite ( ) throws java.lang.Exception { mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; mWifiConfigStore.write ( true , getEmptyStoreData ( ) ) ; assertFalse ( mAlarmManager.isPending ( WifiConfigStore.BUFFERED_WRITE_ALARM_TAG ) ) ; assertTrue ( mSharedStore.isStoreWritten ( ) ) ; assertTrue ( mUserStore.isStoreWritten ( ) ) ; }

Target:
public void testForceWrite ( ) throws java.lang.Exception { mWifiConfigStore.switchUserStoreAndRead ( mUserStore ) ; mWifiConfigStore.write ( true ) ; assertFalse ( mAlarmManager.isPending ( WifiConfigStore.BUFFERED_WRITE_ALARM_TAG ) ) ; assertTrue ( mSharedStore.isStoreWritten ( ) ) ; assertTrue ( mUserStore.isStoreWritten ( ) ) ; }
Source:
public void createTest ( com.android.rs.image2.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image2.ScriptC_vignette_approx_relaxed ( mRS , res , R.raw.vignette_approx_relaxed ) ; else mScript_approx_full = new com.android.rs.image2.ScriptC_vignette_approx_full ( mRS , res , R.raw.vignette_approx_full ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image2.ScriptC_vignette_relaxed ( mRS ) ; else mScript_full = new com.android.rs.image2.ScriptC_vignette_full ( mRS ) ; do_init ( ) ; }

Target:
public void createTest ( com.android.rs.image2.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image2.ScriptC_vignette_approx_relaxed ( mRS ) ; else mScript_approx_full = new com.android.rs.image2.ScriptC_vignette_approx_full ( mRS ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image2.ScriptC_vignette_relaxed ( mRS ) ; else mScript_full = new com.android.rs.image2.ScriptC_vignette_full ( mRS ) ; do_init ( ) ; }
Source:
public void test_getPort ( ) throws java.io.IOException { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ) ; assertEquals ( "Expected -1 for remote port as not connected" , ( - 1 ) , theSocket.getPort ( ) ) ; int portNumber = 49152 ; theSocket.connect ( java.net.InetAddress.getLocalHost ( ) , portNumber ) ; assertEquals ( "getPort returned wrong value" , portNumber , theSocket.getPort ( ) ) ; }

Target:
public void test_getPort ( ) throws java.io.IOException { try ( java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ) ) { assertEquals ( "Expected -1 for remote port as not connected" , ( - 1 ) , theSocket.getPort ( ) ) ; int portNumber = 49152 ; theSocket.connect ( java.net.InetAddress.getLocalHost ( ) , portNumber ) ; assertEquals ( "getPort returned wrong value" , portNumber , theSocket.getPort ( ) ) ; } }
Source:
public void testNotifyPackageDataDestroyForeignUse ( ) { java.util.List < java.lang.String > fooSecondaries = mFooUser0.getSecondaryDexPaths ( ) ; notifyDexLoad ( mFooUser0 , fooSecondaries , mUser0 ) ; notifyDexLoad ( mBarUser0 , mFooUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; mDexManager.notifyPackageDataDestroyed ( mFooUser0.getPackageName ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mFooUser0 ) ; org.junit.Assert.assertNotNull ( pui ) ; org.junit.Assert.assertTrue ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }

Target:
public void testNotifyPackageDataDestroyForeignUse ( ) { java.util.List < java.lang.String > fooSecondaries = mFooUser0.getSecondaryDexPaths ( ) ; notifyDexLoad ( mFooUser0 , fooSecondaries , mUser0 ) ; notifyDexLoad ( mBarUser0 , mFooUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; mDexManager.notifyPackageDataDestroyed ( mFooUser0.getPackageName ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mFooUser0 ) ; org.junit.Assert.assertTrue ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }
Source:
java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.CachedDirectFS.CachedParentVFile file , boolean append ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.WRITE ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileOutputStream ( path , append ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.WRITE ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.CachedDirectFS.CachedParentVFile file , boolean append ) throws com.android.sched.util.file.WrongPermissionException { assert capabilities.contains ( Capabilities.WRITE ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileOutputStream ( path , append ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.WRITE ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public byte [ ] exchangeAPDU ( com.android.se.security.arf.pkcs15.EF ef , byte [ ] cmd ) throws com.android.se.security.arf.SecureElementException { try { return mArfChannel.transmit ( cmd ) ; } catch ( java.lang.Exception e ) { throw new com.android.se.security.arf.SecureElementException ( ( "Secure Element access error " + ( e.getLocalizedMessage ( ) ) ) ) ; } }

Target:
public byte [ ] exchangeAPDU ( com.android.se.security.arf.pkcs15.EF ef , byte [ ] cmd ) throws com.android.se.security.arf.SecureElementException , java.io.IOException { try { return mArfChannel.transmit ( cmd ) ; } catch ( java.io.IOException e ) { throw e ; } catch ( java.lang.Exception e ) { throw new com.android.se.security.arf.SecureElementException ( ( "Secure Element access error " + ( e.getLocalizedMessage ( ) ) ) ) ; } }
Source:
private void writeUsbConfigurationOption ( java.lang.Object newValue ) { android.hardware.usb.UsbManager manager = ( ( android.hardware.usb.UsbManager ) ( getActivity ( ) . getSystemService ( Context.USB_SERVICE ) ) ) ; java.lang.String function = newValue.toString ( ) ; manager.setCurrentFunction ( function ) ; if ( function.equals ( "none" ) ) { manager.setUsbDataUnlocked ( false ) ; } else { manager.setUsbDataUnlocked ( true ) ; } }

Target:
private void writeUsbConfigurationOption ( java.lang.Object newValue ) { android.hardware.usb.UsbManager manager = ( ( android.hardware.usb.UsbManager ) ( getActivity ( ) . getSystemService ( Context.USB_SERVICE ) ) ) ; java.lang.String function = newValue.toString ( ) ; if ( function.equals ( "none" ) ) { manager.setCurrentFunction ( function , false ) ; } else { manager.setCurrentFunction ( function , true ) ; } }
Source:
private static com.android.jack.ir.ast.JMethodCall makeSuperCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , targetMethod.getMethodId ( ) , targetMethod.getType ( ) , false ) ; call.addMarker ( new com.android.jack.ir.impl.ResolutionTargetMarker ( targetMethod ) ) ; return call ; }

Target:
private static com.android.jack.ir.ast.JMethodCall makeSuperCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , targetMethod.getMethodId ( ) , targetMethod.getType ( ) , false ) ; return call ; }
Source:
protected long getEVP_AEAD ( int keyLength ) throws java.security.InvalidKeyException { final long evpAead ; if ( keyLength == 16 ) { return org.conscrypt.NativeCrypto.EVP_aead_aes_128_gcm ( ) ; } else if ( keyLength == 32 ) { return org.conscrypt.NativeCrypto.EVP_aead_aes_256_gcm ( ) ; } else { throw new java.lang.RuntimeException ( ( "Unexpected key length: " + keyLength ) ) ; } }

Target:
protected long getEVP_AEAD ( int keyLength ) throws java.security.InvalidKeyException { if ( keyLength == 16 ) { return org.conscrypt.NativeCrypto.EVP_aead_aes_128_gcm ( ) ; } else if ( keyLength == 32 ) { return org.conscrypt.NativeCrypto.EVP_aead_aes_256_gcm ( ) ; } else { throw new java.lang.RuntimeException ( ( "Unexpected key length: " + keyLength ) ) ; } }
Source:
void checkTokenizer ( java.lang.String [ ] expected , java.lang.String toParse ) { java.lang.String [ ] actual = org.chromium.base.CommandLine.tokenizeQuotedAruments ( toParse.toCharArray ( ) ) ; assertEquals ( expected.length , actual.length ) ; for ( int i = 0 ; i < ( expected.length ) ; ++ i ) { assertEquals ( ( "comparing element " + i ) , expected [ i ] , actual [ i ] ) ; } }

Target:
void checkTokenizer ( java.lang.String [ ] expected , java.lang.String toParse ) { java.lang.String [ ] actual = org.chromium.base.CommandLine.tokenizeQuotedAruments ( toParse.toCharArray ( ) ) ; org.junit.Assert.assertEquals ( expected.length , actual.length ) ; for ( int i = 0 ; i < ( expected.length ) ; ++ i ) { org.junit.Assert.assertEquals ( ( "comparing element " + i ) , expected [ i ] , actual [ i ] ) ; } }
Source:
private android.content.Intent createSetUserIconIntent ( ) { HEAD ( a1f672 ) ; com.android.cts.verifier.managedprovisioning.DO NOT ; com.android.cts.verifier.managedprovisioning.Improve check ; com.android.cts.verifier.managedprovisioning.activity on ; launch.new android.content.Intent ( this , com.android.cts.verifier.managedprovisioning.CommandReceiverActivity.class ) . putExtra ( CommandReceiverActivity.EXTRA_COMMAND , CommandReceiverActivity.COMMAND_SET_USER_ICON ) ; return new android.content.Intent ( this , com.android.cts.verifier.managedprovisioning.DeviceOwnerPositiveTestActivity.CommandReceiver.class ) . putExtra ( com.android.cts.verifier.managedprovisioning.EXTRA_COMMAND , com.android.cts.verifier.managedprovisioning.DeviceOwnerPositiveTestActivity.COMMAND_SET_USER_ICON ) ; }

Target:
private android.content.Intent createSetUserIconIntent ( ) { return new android.content.Intent ( this , com.android.cts.verifier.managedprovisioning.CommandReceiverActivity.class ) . putExtra ( CommandReceiverActivity.EXTRA_COMMAND , CommandReceiverActivity.COMMAND_SET_USER_ICON ) ; }
Source:
public void testActionEmergencyWithNonEmergencyNumber ( ) { android.net.Uri handle = android.net.Uri.parse ( "tel:6505551911" ) ; org.mockito.Mockito.doReturn ( false ) . when ( mPhoneNumberUtilsAdapterSpy ) . isPotentialLocalEmergencyNumber ( org.mockito.Matchers.any ( android.content.Context.class ) , org.mockito.Matchers.eq ( handle.getSchemeSpecificPart ( ) ) ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL_EMERGENCY , handle ) ; int result = processIntent ( intent , true ) ; assertEquals ( DisconnectCause.OUTGOING_CANCELED , result ) ; verifyNoCallPlaced ( ) ; verifyNoBroadcastSent ( ) ; }

Target:
public void testActionEmergencyWithNonEmergencyNumber ( ) { android.net.Uri handle = android.net.Uri.parse ( "tel:6505551911" ) ; org.mockito.Mockito.doReturn ( false ) . when ( mPhoneNumberUtilsAdapterSpy ) . isPotentialLocalEmergencyNumber ( org.mockito.Matchers.any ( android.content.Context.class ) , org.mockito.Matchers.eq ( handle.getSchemeSpecificPart ( ) ) ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL_EMERGENCY , handle ) ; int result = processIntent ( intent , true ) ; org.junit.Assert.assertEquals ( DisconnectCause.OUTGOING_CANCELED , result ) ; verifyNoCallPlaced ( ) ; verifyNoBroadcastSent ( ) ; }
Source:
public boolean isSuppressed ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { java.lang.String contents = getContents ( ) ; assert contents != null ; int start = mParser.getNodeStartOffset ( this , node ) ; if ( start != ( - 1 ) ) { return isSuppressedWithComment ( start , issue ) ; } return false ; }

Target:
public boolean isSuppressedWithComment ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { java.lang.String contents = getContents ( ) ; assert contents != null ; int start = mParser.getNodeStartOffset ( this , node ) ; if ( start != ( - 1 ) ) { return isSuppressedWithComment ( start , issue ) ; } return false ; }
Source:
public boolean isDiscovering ( ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "isDiscovering() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.isDiscovering ( ) ; }

Target:
public boolean isDiscovering ( ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "isDiscovering() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.isDiscovering ( ) ; }
Source:
public final boolean equals ( java.lang.Object other ) { if ( ( other == null ) || ( ( getClass ( ) ) != ( other.getClass ( ) ) ) ) { return false ; } com.android.jack.dx.rop.cst.CstMemberRef otherRef = ( ( com.android.jack.dx.rop.cst.CstMemberRef ) ( other ) ) ; return ( definingClass.equals ( otherRef.definingClass ) ) && ( nat.equals ( otherRef.nat ) ) ; }

Target:
public final boolean equals ( java.lang.Object other ) { if ( ( other == null ) || ( ( getClass ( ) ) != ( other.getClass ( ) ) ) ) { return false ; } com.android.jack.dx.rop.cst.CstMemberRef otherRef = ( ( com.android.jack.dx.rop.cst.CstMemberRef ) ( other ) ) ; return ( ( definingClass.equals ( otherRef.definingClass ) ) && ( name.equals ( otherRef.name ) ) ) && ( nat.equals ( otherRef.nat ) ) ; }
Source:
public synchronized com.android.jack.ir.sourceinfo.FileSourceInfo create ( @ javax.annotation.Nonnull java.lang.String fileName ) { com.android.jack.ir.sourceinfo.FileSourceInfo newInstance = new com.android.jack.ir.sourceinfo.FileSourceInfo ( fileName ) ; com.android.jack.ir.sourceinfo.FileSourceInfo canonical = canonicalFileSourceInfos.get ( newInstance ) ; assert ( canonical == null ) || ( ( newInstance != canonical ) && ( newInstance.equals ( canonical ) ) ) ; if ( canonical != null ) { return canonical ; } else { canonicalFileSourceInfos.put ( newInstance , newInstance ) ; return newInstance ; } }

Target:
public synchronized com.android.jack.ir.sourceinfo.FileSourceInfo create ( @ javax.annotation.Nonnull java.lang.String fileName ) { com.android.jack.ir.sourceinfo.FileSourceInfo newInstance = canonicalFileSourceInfos.get ( fileName ) ; if ( newInstance == null ) { newInstance = new com.android.jack.ir.sourceinfo.FileSourceInfo ( fileName ) ; canonicalFileSourceInfos.put ( fileName , newInstance ) ; } return newInstance ; }
Source:
public void test_ConstructorLjava_lang_String ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; java.lang.String fileName = f.getAbsolutePath ( ) ; fos = new java.io.FileOutputStream ( fileName ) ; fos = new java.io.FileOutputStream ( "/dev/null" ) ; fos.close ( ) ; }

Target:
public void test_ConstructorLjava_lang_String ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; java.lang.String fileName = f.getAbsolutePath ( ) ; fos = new java.io.FileOutputStream ( fileName ) ; fos.close ( ) ; fos = new java.io.FileOutputStream ( "/dev/null" ) ; fos.close ( ) ; }