auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final java.nio.MappedByteBuffer force ( ) { checkIsMapped ( ) ; if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toLong ( ) , block.getSize ( ) , libcore.io.OsConstants.MS_SYNC ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }

Target:
public final java.nio.MappedByteBuffer force ( ) { checkIsMapped ( ) ; if ( ( mapMode ) == ( java.nio.channels.FileChannel.MapMode.READ_WRITE ) ) { try { Libcore.os.msync ( block.toLong ( ) , block.getSize ( ) , android.system.OsConstants.MS_SYNC ) ; } catch ( android.system.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } } return this ; }
Source:
public boolean factoryReset ( ) { try { if ( ( mService ) != null ) { return mService.factoryReset ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean factoryReset ( ) { try { if ( ( mService ) != null ) { return mService.factoryReset ( ) ; } else { android.os.SystemProperties.set ( "persist.bluetooth.factoryreset" , "true" ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result ) ; rr.mParcel.writeInt ( 2 ) ; rr.mParcel.writeString ( smscPDU ) ; rr.mParcel.writeString ( pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
private void constructGsmSendSmsRilRequest ( com.android.internal.telephony.RILRequest rr , java.lang.String smscPDU , java.lang.String pdu ) { rr.mParcel.writeInt ( 2 ) ; rr.mParcel.writeString ( smscPDU ) ; rr.mParcel.writeString ( pdu ) ; }
Source:
private javax.swing.JComponent buildStretchesViewer ( ) { stretchesViewer = new com.android.draw9patch.ui.ImageEditorPanel.StretchesViewer ( ) ; javax.swing.JScrollPane scroller = new javax.swing.JScrollPane ( stretchesViewer ) ; scroller.setBorder ( null ) ; scroller.getViewport ( ) . setBorder ( null ) ; scroller.setHorizontalScrollBarPolicy ( javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS ) ; scroller.setVerticalScrollBarPolicy ( javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ) ; return scroller ; }

Target:
private javax.swing.JComponent buildStretchesViewer ( ) { stretchesViewer = new com.android.draw9patch.ui.StretchesViewer ( this , viewer , texture ) ; javax.swing.JScrollPane scroller = new javax.swing.JScrollPane ( stretchesViewer ) ; scroller.setBorder ( null ) ; scroller.getViewport ( ) . setBorder ( null ) ; scroller.setHorizontalScrollBarPolicy ( javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS ) ; scroller.setVerticalScrollBarPolicy ( javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS ) ; return scroller ; }
Source:
public void testCarrierNetworkChange_carrierNetworkChange ( ) { int strength = android.telephony.SignalStrength.SIGNAL_STRENGTH_GREAT ; setupDefaultSignal ( ) ; setLevel ( strength ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON ) ; setCarrierNetworkChange ( true ) ; verifyLastMobileDataIndicators ( true , com.android.systemui.statusbar.phone.SignalDrawable.getCarrierChangeState ( SignalStrength.NUM_SIGNAL_STRENGTH_BINS ) , 0 ) ; setCarrierNetworkChange ( false ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON ) ; }

Target:
public void testCarrierNetworkChange_carrierNetworkChange ( ) { int strength = android.telephony.SignalStrength.SIGNAL_STRENGTH_GREAT ; setupDefaultSignal ( ) ; setLevel ( strength ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON ) ; setCarrierNetworkChange ( true ) ; verifyLastMobileDataIndicators ( true , com.android.settingslib.graph.SignalDrawable.getCarrierChangeState ( SignalStrength.NUM_SIGNAL_STRENGTH_BINS ) , 0 ) ; setCarrierNetworkChange ( false ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON ) ; }
Source:
public final void setNewSources ( com.android.dx.ssa.RegisterSpecList newSources ) { com.android.dx.ssa.RegisterSpecList origSources = insn.getSources ( ) ; if ( ( origSources.size ( ) ) != ( newSources.size ( ) ) ) { throw new java.lang.RuntimeException ( "Sources counts don't match" ) ; } insn = insn.withNewRegisters ( getResult ( ) , newSources ) ; }

Target:
public final void setNewSources ( com.android.dx.rop.code.RegisterSpecList newSources ) { com.android.dx.rop.code.RegisterSpecList origSources = insn.getSources ( ) ; if ( ( origSources.size ( ) ) != ( newSources.size ( ) ) ) { throw new java.lang.RuntimeException ( "Sources counts don't match" ) ; } insn = insn.withNewRegisters ( getResult ( ) , newSources ) ; }
Source:
private static boolean isReachableFrom ( @ com.android.annotations.NonNull lombok.ast.Node method , @ com.android.annotations.NonNull lombok.ast.MethodInvocation from , @ com.android.annotations.NonNull lombok.ast.MethodInvocation to ) { com.android.tools.lint.checks.CutPasteDetector.ReachableVisitor visitor = new com.android.tools.lint.checks.CutPasteDetector.ReachableVisitor ( from , to ) ; method.accept ( visitor ) ; return visitor.isReachable ( ) ; }

Target:
static boolean isReachableFrom ( @ com.android.annotations.NonNull com.intellij.psi.PsiMethod method , @ com.android.annotations.NonNull com.intellij.psi.PsiElement from , @ com.android.annotations.NonNull com.intellij.psi.PsiElement to ) { com.intellij.psi.PsiElement prev = from ; com.intellij.psi.PsiElement curr = com.android.tools.lint.checks.CutPasteDetector.next ( method , from , to , null ) ; while ( curr != null ) { if ( com.android.tools.lint.checks.CutPasteDetector.containsElement ( method , curr , to ) ) { return true ; } curr = com.android.tools.lint.checks.CutPasteDetector.next ( method , curr , to , prev ) ; prev = curr ; } return false ; }
Source:
public void testToString ( ) { org.xml.sax.SAXException e = new org.xml.sax.SAXException ( tests.api.org.xml.sax.SAXExceptionTest.ERR ) ; java.lang.String s = e.toString ( ) ; assertTrue ( s.contains ( tests.api.org.xml.sax.SAXExceptionTest.ERR ) ) ; e = new org.xml.sax.SAXException ( ) ; s = e.toString ( ) ; assertFalse ( s.contains ( tests.api.org.xml.sax.SAXExceptionTest.ERR ) ) ; }

Target:
public void testToString ( ) { org.xml.sax.SAXException e = new org.xml.sax.SAXException ( org.apache.harmony.tests.org.xml.sax.SAXExceptionTest.ERR ) ; java.lang.String s = e.toString ( ) ; assertTrue ( s.contains ( org.apache.harmony.tests.org.xml.sax.SAXExceptionTest.ERR ) ) ; e = new org.xml.sax.SAXException ( ) ; s = e.toString ( ) ; assertFalse ( s.contains ( org.apache.harmony.tests.org.xml.sax.SAXExceptionTest.ERR ) ) ; }
Source:
protected void finalize ( ) throws java.lang.Throwable { try { if ( ( guard ) != null ) { guard.warnIfOpen ( ) ; } close ( ) ; } finally { super . finalize ( ) ; } }

Target:
protected void finalize ( ) throws java.lang.Throwable { try { if ( ( guard ) != null ) { guard.warnIfOpen ( ) ; } if ( ( ( mInternalCookie ) != null ) && ( ! ( dalvik.system.DexFile.closeDexFile ( mInternalCookie ) ) ) ) { throw new java.lang.AssertionError ( "Failed to close dex file in finalizer." ) ; } mInternalCookie = null ; mCookie = null ; } finally { super . finalize ( ) ; } }
Source:
private boolean scanWithParams ( java.lang.String freqList , java.lang.String hiddenNetworkSSIDList ) { java.lang.StringBuilder scanCommand = new java.lang.StringBuilder ( ) ; scanCommand.append ( "SCAN TYPE=ONLY" ) ; if ( freqList != null ) { scanCommand.append ( ( " freq=" + freqList ) ) ; } if ( hiddenNetworkSSIDList != null ) { scanCommand.append ( ( " ssid " + hiddenNetworkSSIDList ) ) ; } return doBooleanCommand ( scanCommand.toString ( ) ) ; }

Target:
public boolean scan ( java.util.Set < java.lang.Integer > freqs , java.util.Set < java.lang.String > hiddenNetworkSSIDs ) { return mWificondControl.scan ( freqs , hiddenNetworkSSIDs ) ; }
Source:
public boolean postDelayed ( java.lang.Runnable action , long delayMillis ) { android.os.Handler handler ; if ( ( mAttachInfo ) != null ) { handler = mAttachInfo.mHandler ; } else { android.view.ViewRoot.getRunQueue ( ) . postDelayed ( action , delayMillis ) ; return true ; } return handler.postDelayed ( action , delayMillis ) ; }

Target:
public boolean postDelayed ( java.lang.Runnable action , long delayMillis ) { android.os.Handler handler ; android.view.View.AttachInfo attachInfo = mAttachInfo ; if ( attachInfo != null ) { handler = attachInfo.mHandler ; } else { android.view.ViewRootImpl.getRunQueue ( ) . postDelayed ( action , delayMillis ) ; return true ; } return handler.postDelayed ( action , delayMillis ) ; }
Source:
private com.android.jack.ir.ast.JPackage getPackage ( @ javax.annotation.Nonnull java.lang.String packageName ) throws com.android.jack.ir.ast.JPackageLookupException { assert ! ( packageName.contains ( "." ) ) ; com.android.jack.ir.ast.JPackage currentPackage = topLevelPackage ; java.util.Iterator < java.lang.String > iterator = packageBinaryNameSplitter.split ( packageName ) . iterator ( ) ; while ( iterator.hasNext ( ) ) { java.lang.String name = iterator.next ( ) ; currentPackage = currentPackage.getSubPackage ( name ) ; } assert com.android.jack.Jack.getLookupFormatter ( ) . getName ( currentPackage ) . equals ( packageName ) ; return currentPackage ; }

Target:
public com.android.jack.ir.ast.JType getType ( @ javax.annotation.Nonnull java.lang.String typeName ) throws com.android.jack.ir.ast.JTypeLookupException { com.android.sched.util.log.stats.Percent statistic = tracer.getStatistic ( com.android.jack.lookup.JNodeLookup.SUCCESS_LOOKUP ) ; statistic.addFalse ( ) ; com.android.jack.ir.ast.JType result = getType ( typeName , adapter ) ; statistic.removeFalse ( ) ; statistic.addTrue ( ) ; return result ; }
Source:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , com.google.common.util.concurrent.AsyncFunction < ? super I , ? extends O > function ) { return com.google.common.util.concurrent.Futures.transform ( input , function , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function , java.util.concurrent.Executor executor ) { com.google.common.base.Preconditions.checkNotNull ( function ) ; return com.google.common.util.concurrent.Futures.transform ( input , com.google.common.util.concurrent.Futures.asAsyncFunction ( function ) , executor ) ; }
Source:
public void test_socket_accept_Nonblocking_NotBound ( ) throws java.io.IOException { java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; serverChannel.configureBlocking ( false ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } }

Target:
public void test_bind_closed ( ) throws java.lang.Exception { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; ssc.close ( ) ; try { ssc.bind ( null ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } finally { ssc.close ( ) ; } }
Source:
public void testAdd2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.add ( "asdasdasd" ) ; c.add ( 100 , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testListIterator2_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.listIterator ( ( ( list.size ( ) ) + 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void testGetCurrentNetworkNfcWpsConfigurationToken ( ) throws java.lang.Exception { java.lang.String token = "45adbc1" ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.getNfcWpsConfigurationToken ( ) ) . thenReturn ( token ) ; executeAndValidateInitializationSequence ( false , false , false ) ; assertTrue ( ( ( mDut.getCurrentNetworkNfcWpsConfigurationToken ( ) ) == null ) ) ; executeAndValidateConnectSequence ( 4 , false , false ) ; assertEquals ( token , mDut.getCurrentNetworkNfcWpsConfigurationToken ( ) ) ; }

Target:
public void testGetCurrentNetworkWpsNfcConfigurationToken ( ) throws java.lang.Exception { java.lang.String token = "45adbc1" ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.getWpsNfcConfigurationToken ( ) ) . thenReturn ( token ) ; executeAndValidateInitializationSequence ( false , false , false ) ; assertTrue ( ( ( mDut.getCurrentNetworkWpsNfcConfigurationToken ( ) ) == null ) ) ; executeAndValidateConnectSequence ( 4 , false , false ) ; assertEquals ( token , mDut.getCurrentNetworkWpsNfcConfigurationToken ( ) ) ; }
Source:
public android.graphics.Picture capturePicture ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Picture ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Picture > ( ) { @ java.lang.Override public android.graphics.Picture call ( ) { return capturePicture ( ) ; } } ) ; return ret ; } return mAwContents.capturePicture ( ) ; }

Target:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }
Source:
public boolean isPossibleShortNumberForRegion ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String regionDialingFrom ) { if ( ! ( regionDialingFromMatchesNumber ( number , regionDialingFrom ) ) ) { return false ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } return matcherApi.matchesPossibleNumber ( com.google.i18n.phonenumbers.ShortNumberInfo.getNationalSignificantNumber ( number ) , phoneMetadata.getGeneralDesc ( ) ) ; }

Target:
public boolean isPossibleShortNumberForRegion ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , java.lang.String regionDialingFrom ) { if ( ! ( regionDialingFromMatchesNumber ( number , regionDialingFrom ) ) ) { return false ; } com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata phoneMetadata = com.google.i18n.phonenumbers.MetadataManager.getShortNumberMetadataForRegion ( regionDialingFrom ) ; if ( phoneMetadata == null ) { return false ; } return matcherApi.matchesPossibleNumber ( com.google.i18n.phonenumbers.ShortNumberInfo.getNationalSignificantNumber ( number ) , phoneMetadata.generalDesc ) ; }
Source:
public java.util.Locale.Builder setScript ( java.lang.String script ) { if ( ( script == null ) || ( script.isEmpty ( ) ) ) { this . script = "" ; return this ; } if ( ! ( java.util.Locale.isValidBcp47Alpha ( script , 4 , 4 ) ) ) { throw new java.util.IllformedLocaleException ( ( "Invalid script: " + script ) ) ; } this . script = java.util.Locale.titleCaseAsciiWord ( script ) ; return this ; }

Target:
private static java.lang.String normalizeAndValidateScript ( java.lang.String script , boolean strict ) { if ( ( script == null ) || ( script.isEmpty ( ) ) ) { return "" ; } if ( ! ( java.util.Locale.isValidBcp47Alpha ( script , 4 , 4 ) ) ) { if ( strict ) { throw new java.util.IllformedLocaleException ( ( "Invalid script: " + script ) ) ; } else { return "" ; } } return java.util.Locale.titleCaseAsciiWord ( script ) ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object param1 ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }
Source:
public static java.io.InputStream findEntryInputStream ( java.util.zip.ZipFile zipFile , java.lang.String entryPath ) throws java.io.IOException { java.util.zip.ZipEntry entry = zipFile.getEntry ( entryPath ) ; if ( ( entry == null ) || ( entry.isDirectory ( ) ) ) return null ; if ( ( ! ( entryPath.endsWith ( "/" ) ) ) && ( ( zipFile.getEntry ( ( entryPath + "/" ) ) ) != null ) ) return null ; return new java.io.BufferedInputStream ( zipFile.getInputStream ( entry ) ) ; }

Target:
public static java.io.InputStream findEntryInputStreamForEntry ( java.util.zip.ZipFile zipFile , java.util.zip.ZipEntry entry ) throws java.io.IOException { if ( entry.isDirectory ( ) ) return null ; if ( ( zipFile.getEntry ( ( ( entry.getName ( ) ) + "/" ) ) ) != null ) return null ; return new java.io.BufferedInputStream ( zipFile.getInputStream ( entry ) ) ; }
Source:
public void onDetachedFromWindow ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDetachedFromWindow ( ) ; } } ) ; return ; } mAwContents.onDetachedFromWindow ( ) ; }

Target:
public void onConfigurationChanged ( final android.content.res.Configuration newConfig ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onConfigurationChanged ( newConfig ) ; } } ) ; return ; } mAwContents.onConfigurationChanged ( newConfig ) ; }
Source:
private void tryToGetAware ( ) { synchronized ( mLock ) { if ( ( mWifiNanIface ) != null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Already have a NAN interface" ) ; return ; } android.hardware.wifi.V1_0.IWifiNanIface iface = mHalDeviceManager.createNanIface ( mInterfaceDestroyedListener , mInterfaceAvailableForRequestListener , null ) ; if ( iface == null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Was not able to obtain an IWifiNanIface" ) ; } else { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Obtained an IWifiNanIface" ) ; mWifiNanIface = iface ; mWifiAwareStateManager.enableUsage ( ) ; } } }

Target:
public void onStatusChanged ( ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "onStatusChanged" ) ; if ( mHalDeviceManager.isStarted ( ) ) { mHalDeviceManager.registerInterfaceAvailableForRequestListener ( IfaceType.NAN , mInterfaceAvailableForRequestListener , null ) ; } else { awareIsDown ( ) ; } }
Source:
public void testGetPythonBinaryException ( ) { com.android.tradefed.util.CommandResult findPythonresult = new com.android.tradefed.util.CommandResult ( ) ; findPythonresult.setStatus ( CommandStatus.FAILED ) ; findPythonresult.setStdout ( "" ) ; com.android.tradefed.util.IRunUtil runUtil = createMockRunUtil ( findPythonresult ) ; mVtsPythonRunnerHelper = new com.android.tradefed.util.VtsPythonRunnerHelper ( null ) ; mVtsPythonRunnerHelper.setRunUtil ( runUtil ) ; try { java.lang.String pythonBinary = mVtsPythonRunnerHelper.getPythonBinary ( ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( "Could not find python binary on host machine" , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { com.android.tradefed.build.IFolderBuildInfo buildInfo = org.easymock.EasyMock.createNiceMock ( com.android.tradefed.build.IFolderBuildInfo.class ) ; org.easymock.EasyMock.replay ( buildInfo ) ; mVtsPythonRunnerHelper = new com.android.tradefed.util.VtsPythonRunnerHelper ( new java.io.File ( mVirtualenvPath ) ) { @ java.lang.Override protected com.android.tradefed.util.ProcessHelper createProcessHelper ( java.lang.String [ ] cmd ) { return mProcessHelper ; } } ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget_short.d.T_aget_short_1 t = new dot.junit.opcodes.aget_short.d.T_aget_short_1 ( ) ; short [ ] arr = new short [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testVFE4 ( ) { load ( "dot.junit.opcodes.aget_short.d.T_aget_short_5" , java.lang.VerifyError.class ) ; }
Source:
public boolean stopFilteringMulticastV6Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.addRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-ADD 3" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }

Target:
public boolean stopFilteringMulticastV6Packets ( ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.addRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.startRxFilter ( ) ) ; }
Source:
public void run ( ) { android.app.stubs.OrientationTestUtils.toggleOrientation ( activity ) ; }

Target:
public void testApplication ( ) throws java.lang.Throwable { final android.app.Instrumentation instrumentation = getInstrumentation ( ) ; final android.content.Context targetContext = instrumentation.getTargetContext ( ) ; final android.content.Intent intent = new android.content.Intent ( targetContext , android.app.stubs.MockApplicationActivity.class ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; final android.app.Activity activity = instrumentation.startActivitySync ( intent ) ; final android.app.stubs.MockApplication mockApp = ( ( android.app.stubs.MockApplication ) ( activity.getApplication ( ) ) ) ; assertTrue ( mockApp.isConstructorCalled ) ; assertTrue ( mockApp.isOnCreateCalled ) ; toggleFontScale ( ) ; assertTrue ( waitForOnConfigurationChange ( mockApp ) ) ; }
Source:
public void installDrmEngine ( java.lang.String engineFilePath ) { if ( ( null == engineFilePath ) || ( engineFilePath.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Given engineFilePath: " + engineFilePath ) + "is not valid" ) ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } _installDrmEngine ( mUniqueId , engineFilePath ) ; }

Target:
public int removeAllRights ( ) { if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } int result = android.drm.DrmManagerClient.ERROR_UNKNOWN ; if ( null != ( mEventHandler ) ) { android.os.Message msg = mEventHandler.obtainMessage ( android.drm.DrmManagerClient.ACTION_REMOVE_ALL_RIGHTS ) ; result = ( mEventHandler.sendMessage ( msg ) ) ? android.drm.DrmManagerClient.ERROR_NONE : result ; } return result ; }
Source:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ( versionSuffix.length ( ) ) > 0 ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }

Target:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }
Source:
public void processNewLines ( java.lang.String [ ] lines ) { for ( java.lang.String line : lines ) { if ( ! ( line.isEmpty ( ) ) ) { if ( line.startsWith ( com.android.ddmlib.Device.InstallReceiver.SUCCESS_OUTPUT ) ) { mErrorMessage = null ; } else { java.util.regex.Matcher m = com.android.ddmlib.Device.InstallReceiver.FAILURE_PATTERN.matcher ( line ) ; if ( m.matches ( ) ) { mErrorMessage = m.group ( 1 ) ; } else { mErrorMessage = "Unknown failure" ; } } } } }

Target:
public void processNewLines ( java.lang.String [ ] lines ) { for ( java.lang.String line : lines ) { if ( ! ( line.isEmpty ( ) ) ) { if ( line.startsWith ( com.android.ddmlib.Device.InstallReceiver.SUCCESS_OUTPUT ) ) { mErrorMessage = null ; } else { java.util.regex.Matcher m = com.android.ddmlib.Device.InstallReceiver.FAILURE_PATTERN.matcher ( line ) ; if ( m.matches ( ) ) { mErrorMessage = m.group ( 1 ) ; } else { mErrorMessage = ( "Unknown failure (" + line ) + ")" ; } } } } }
Source:
public void testTypeTextInFocusedView_constraintBreakage ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.send_data_to_call_edit_text ) ) ) . perform ( android.support.test.espresso.action.ViewActions.typeText ( "Hello World How Are You Today? I have alot of text to type." ) ) ; try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.edit_text_message ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) , android.support.test.espresso.action.ViewActions.typeTextIntoFocusedView ( "Jolly good!" ) ) ; fail ( "Should not have been able to type into focused view." ) ; } catch ( android.support.test.espresso.PerformException expected ) { } }

Target:
public void typeTextInFocusedView_constraintBreakage ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.send_data_to_call_edit_text ) ) ) . perform ( android.support.test.espresso.action.ViewActions.typeText ( "Hello World How Are You Today? I have alot of text to type." ) ) ; expectedException.expect ( android.support.test.espresso.PerformException.class ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.edit_text_message ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) , android.support.test.espresso.action.ViewActions.typeTextIntoFocusedView ( "Jolly good!" ) ) ; }
Source:
public void xmlParsing_unknownCountryReturnsNull ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones ianaversion=\"2017b\">\n" + ( ( " <countryzones>\n" + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; org.junit.Assert.assertNull ( finder.lookupTimeZonesByCountry ( "gb" ) ) ; }

Target:
public void xmlParsing_unknownCountryReturnsNull ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones ianaversion=\"2017b\">\n" + ( ( " <countryzones>\n" + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; org.junit.Assert.assertNull ( finder.lookupTimeZoneIdsByCountry ( "gb" ) ) ; org.junit.Assert.assertNull ( finder.lookupTimeZonesByCountry ( "gb" ) ) ; }
Source:
public boolean hasSource ( com.android.sdklib.internal.repository.SdkSource source ) { for ( com.android.sdklib.internal.repository.SdkSource s : mSources ) { if ( s.equals ( source ) ) { return true ; } } return false ; }

Target:
public com.android.sdklib.internal.repository.SdkSourceCategory getCategory ( com.android.sdklib.internal.repository.SdkSource source ) { if ( source != null ) { for ( java.util.Map.Entry < com.android.sdklib.internal.repository.SdkSourceCategory , java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > > entry : mSources.entrySet ( ) ) { if ( entry.getValue ( ) . contains ( source ) ) { return entry.getKey ( ) ; } } } return null ; }
Source:
public void forEach ( android.renderscript.Allocation aout ) { forEach ( 0 , ( ( android.renderscript.Allocation ) ( null ) ) , aout , null ) ; }

Target:
public void forEach ( android.renderscript.Allocation aout ) { if ( ( aout.getType ( ) . getY ( ) ) == 0 ) { throw new android.renderscript.RSIllegalArgumentException ( "Output is a 1D Allocation" ) ; } forEach ( 0 , ( ( android.renderscript.Allocation ) ( null ) ) , aout , null ) ; }
Source:
public void onPeriodicAdvertisingEnable ( int advertiserId , boolean enable , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.bluetooth.le.AdvertisingSet advertisingSet = mAdvertisingSets.get ( advertiserId ) ; callback.onPeriodicAdvertisingEnable ( advertisingSet , enable , status ) ; } } ) ; }

Target:
public void onPeriodicAdvertisingEnabled ( int advertiserId , boolean enable , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.bluetooth.le.AdvertisingSet advertisingSet = mAdvertisingSets.get ( advertiserId ) ; callback.onPeriodicAdvertisingEnabled ( advertisingSet , enable , status ) ; } } ) ; }
Source:
public void testDescendingAddAll2 ( ) { try { java.util.NavigableSet q = jsr166.TreeSubSetTest.dset0 ( ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }

Target:
public void testDescendingAddAll3 ( ) { java.util.NavigableSet q = jsr166.TreeSubSetTest.dset0 ( ) ; java.lang.Integer [ ] ints = new java.lang.Integer [ SIZE ] ; for ( int i = 0 ; i < ( ( SIZE ) - 1 ) ; ++ i ) ints [ i ] = new java.lang.Integer ( ( i + ( SIZE ) ) ) ; try { q.addAll ( java.util.Arrays.asList ( ints ) ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }
Source:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdkuilib.internal.repository.sdkman2.PkgItem ) { java.lang.Object input = mViewer.getInput ( ) ; if ( input != null ) { for ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategory cat : ( ( java.util.List < com.android.sdkuilib.internal.repository.sdkman2.PkgCategory > ) ( input ) ) ) { if ( cat.getItems ( ) . contains ( element ) ) { return cat ; } } } } return null ; }

Target:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdkuilib.internal.repository.core.PkgItem ) { java.lang.Object input = mViewer.getInput ( ) ; if ( input != null ) { for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : ( ( java.util.List < com.android.sdkuilib.internal.repository.core.PkgCategory > ) ( input ) ) ) { if ( cat.getItems ( ) . contains ( element ) ) { return cat ; } } } } return null ; }
Source:
public static long getCanonicalTime ( long time ) { long timeMillis = java.util.concurrent.TimeUnit.MICROSECONDS.toMillis ( time ) ; java.time.ZonedDateTime zdt = java.time.ZonedDateTime.ofInstant ( java.time.Instant.ofEpochMilli ( timeMillis ) , com.android.vts.servlet.VtsProfilingStatsJobServlet.PT_ZONE ) ; return java.util.concurrent.TimeUnit.SECONDS.toMicros ( zdt.withHour ( 0 ) . withMinute ( 0 ) . withSecond ( 0 ) . toEpochSecond ( ) ) ; }

Target:
public static long getCanonicalTime ( long time ) { long timeMillis = java.util.concurrent.TimeUnit.MICROSECONDS.toMillis ( time ) ; java.time.ZonedDateTime zdt = java.time.ZonedDateTime.ofInstant ( java.time.Instant.ofEpochMilli ( timeMillis ) , com.android.vts.job.VtsProfilingStatsJobServlet.PT_ZONE ) ; return java.util.concurrent.TimeUnit.SECONDS.toMicros ( zdt.withHour ( 0 ) . withMinute ( 0 ) . withSecond ( 0 ) . toEpochSecond ( ) ) ; }
Source:
public long getContext ( ) throws javax.net.ssl.SSLException { long sslCtx = super . getContext ( ) ; org.conscrypt.NativeCrypto.SSL_CTX_add_client_custom_ext ( sslCtx , TEST_EXTENSION_TYPE ) ; return sslCtx ; }

Target:
private static void assertContains ( java.lang.String actualValue , java.lang.String expectedSubstring ) { if ( actualValue == null ) { return ; } if ( actualValue.contains ( expectedSubstring ) ) { return ; } fail ( ( ( ( ( "\"" + actualValue ) + "\" does not contain \"" ) + expectedSubstring ) + "\"" ) ) ; }
Source:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }

Target:
public void testInstall_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }
Source:
private boolean isNanpaNumberWithNationalPrefix ( ) { return ( ( ( ( currentMetadata.getCountryCode ( ) ) == 1 ) && ( ( nationalNumber.charAt ( 0 ) ) == '1' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '0' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '1' ) ; }

Target:
private boolean isNanpaNumberWithNationalPrefix ( ) { return ( ( ( ( currentMetadata.countryCode ) == 1 ) && ( ( nationalNumber.charAt ( 0 ) ) == '1' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '0' ) ) && ( ( nationalNumber.charAt ( 1 ) ) != '1' ) ; }
Source:
public java.lang.String createNetworkSpecifier ( @ android.annotation.Nullable android.net.wifi.aware.PeerHandle peerHandle , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "createNetworkSpecifier: called post GC on WifiAwareManager" ) ; return null ; } int role = ( ( this ) instanceof android.net.wifi.aware.SubscribeDiscoverySession ) ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER ; return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerHandle , token ) ; } }

Target:
public java.lang.String createNetworkSpecifierOpen ( @ android.annotation.Nullable android.net.wifi.aware.PeerHandle peerHandle ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "createNetworkSpecifierOpen: called on terminated session" ) ; return null ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.DiscoverySession.TAG , "createNetworkSpecifierOpen: called post GC on WifiAwareManager" ) ; return null ; } int role = ( ( this ) instanceof android.net.wifi.aware.SubscribeDiscoverySession ) ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER ; return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerHandle , null ) ; } }
Source:
public void testAesCbcHmacMd5Tcp6 ( ) 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 ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha256Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 ) ; }
Source:
public void configureLoader ( com.android.dialer.dialpadview.SmartDialCursorLoader loader ) { if ( com.android.dialer.app.list.SmartDialNumberListAdapter.DEBUG ) { com.android.dialer.common.LogUtil.v ( com.android.dialer.app.list.SmartDialNumberListAdapter.TAG , ( "Configure Loader with query" + ( getQueryString ( ) ) ) ) ; } if ( ( getQueryString ( ) ) == null ) { loader.configureQuery ( "" ) ; mNameMatcher.setQuery ( "" ) ; } else { loader.configureQuery ( getQueryString ( ) ) ; mNameMatcher.setQuery ( android.telephony.PhoneNumberUtils.normalizeNumber ( getQueryString ( ) ) ) ; } }

Target:
public void configureLoader ( com.android.dialer.smartdial.SmartDialCursorLoader loader ) { if ( com.android.dialer.app.list.SmartDialNumberListAdapter.DEBUG ) { com.android.dialer.common.LogUtil.v ( com.android.dialer.app.list.SmartDialNumberListAdapter.TAG , ( "Configure Loader with query" + ( getQueryString ( ) ) ) ) ; } if ( ( getQueryString ( ) ) == null ) { loader.configureQuery ( "" ) ; mNameMatcher.setQuery ( "" ) ; } else { loader.configureQuery ( getQueryString ( ) ) ; mNameMatcher.setQuery ( android.telephony.PhoneNumberUtils.normalizeNumber ( getQueryString ( ) ) ) ; } }
Source:
public void onAccessPointChanged ( com.android.settingslib.wifi.AccessPoint accessPoint ) { ( ( com.android.settings.wifi.LongPressAccessPointPreference ) ( accessPoint.getTag ( ) ) ) . refresh ( ) ; }

Target:
public void onAccessPointChanged ( final com.android.settingslib.wifi.AccessPoint accessPoint ) { android.view.View view = getView ( ) ; if ( view != null ) { view.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { java.lang.Object tag = accessPoint.getTag ( ) ; if ( tag != null ) { ( ( com.android.settings.wifi.LongPressAccessPointPreference ) ( tag ) ) . refresh ( ) ; } } } ) ; } }
Source:
public int getType ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Remote Device type" ) ; return android.bluetooth.BluetoothDevice.DEVICE_TYPE_UNKNOWN ; } try { return android.bluetooth.BluetoothDevice.sService.getRemoteType ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.DEVICE_TYPE_UNKNOWN ; }

Target:
public int getType ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Remote Device type" ) ; return android.bluetooth.BluetoothDevice.DEVICE_TYPE_UNKNOWN ; } try { return service.getRemoteType ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.DEVICE_TYPE_UNKNOWN ; }
Source:
private com.android.ide.common.resources.ResourceFile getFile ( com.android.io.IAbstractFile file ) { if ( ( mFiles ) != null ) { for ( com.android.ide.common.resources.ResourceFile f : mFiles ) { if ( f.getFile ( ) . equals ( file ) ) { return f ; } } } return null ; }

Target:
public com.android.ide.common.resources.ResourceFile getFile ( java.lang.String filename ) { if ( ( mNames ) != null ) { com.android.ide.common.resources.ResourceFile resFile = mNames.get ( filename ) ; if ( resFile != null ) { return resFile ; } } com.android.io.IAbstractFile file = mFolder.getFile ( filename ) ; if ( ( file != null ) && ( file.exists ( ) ) ) { com.android.ide.common.resources.ResourceFile resFile = createResourceFile ( file ) ; resFile.load ( new com.android.ide.common.resources.ScanningContext ( mRepository ) ) ; addFile ( resFile ) ; return resFile ; } return null ; }
Source:
protected synchronized void onDraw ( android.graphics.Canvas canvas ) { super . onDraw ( canvas ) ; if ( ( mThumb ) != null ) { canvas.save ( ) ; canvas.translate ( ( ( mPaddingLeft ) - ( mThumbOffset ) ) , mPaddingTop ) ; mThumb.draw ( canvas ) ; canvas.restore ( ) ; } }

Target:
void drawThumb ( android.graphics.Canvas canvas ) { if ( ( mThumb ) != null ) { canvas.save ( ) ; canvas.translate ( ( ( mPaddingLeft ) - ( mThumbOffset ) ) , mPaddingTop ) ; mThumb.draw ( canvas ) ; canvas.restore ( ) ; } }
Source:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { return false ; } }

Target:
public boolean tearDownInterfaces ( ) { mWificond = mWifiInjector.makeWificond ( ) ; if ( ( mWificond ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to get reference to wificond" ) ; return false ; } try { mWificond.tearDownInterfaces ( ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to tear down interfaces due to remote exception" ) ; } return false ; }
Source:
public int answer ( java.lang.String permName , int uid ) throws java.lang.Exception { return android.content.pm.PackageManager.PERMISSION_DENIED ; }

Target:
public void testUpdateSingleOpenNetworkSuccessWithCreatorUID ( ) throws java.lang.Exception { android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; java.util.List < android.net.wifi.WifiConfiguration > networks = new java.util.ArrayList < > ( ) ; networks.add ( openNetwork ) ; verifyAddNetworkToWifiConfigManager ( openNetwork ) ; assertAndSetNetworkBSSID ( openNetwork , com.android.server.wifi.WifiConfigManagerTest.TEST_BSSID ) ; com.android.server.wifi.NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork ( openNetwork , com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ; assertTrue ( ( ( result.getNetworkId ( ) ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) ) ; java.util.List < android.net.wifi.WifiConfiguration > retrievedNetworks = mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate ( networks , retrievedNetworks ) ; }
Source:
public int getMessageAccessPermission ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; } try { return android.bluetooth.BluetoothDevice.sService.getMessageAccessPermission ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; }

Target:
public boolean setMessageAccessPermission ( int value ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return service.setMessageAccessPermission ( this , value ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public org.objectweb.asm.MethodVisitor visitMethod ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.String [ ] exceptions ) { org.objectweb.asm.MethodVisitor visitor = super . cv.visitMethod ( access , name , desc , signature , exceptions ) ; return ( visitor == null ) || ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ) ? visitor : new com.google.devtools.build.android.desugar.TryWithResourcesRewriter.TryWithResourceVisitor ( visitor , classLoader ) ; }

Target:
public org.objectweb.asm.MethodVisitor visitMethod ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.String [ ] exceptions ) { org.objectweb.asm.MethodVisitor visitor = super . cv.visitMethod ( access , name , desc , signature , exceptions ) ; return ( visitor == null ) || ( shouldCurrentClassBeIgnored ) ? visitor : new com.google.devtools.build.android.desugar.TryWithResourcesRewriter.TryWithResourceVisitor ( visitor , classLoader ) ; }
Source:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { if ( ( sdkFolder ) == null ) { throw new java.lang.RuntimeException ( "SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable." ) ; } if ( ( ( com.android.build.gradle.BasePlugin.TEST_SDK_DIR ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }

Target:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { getAndCheckSdkFolder ( ) ; if ( ( ( com.android.build.gradle.BasePlugin.TEST_SDK_DIR ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }