auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected int compareTo0 ( com.android.jack.dx.rop.cst.Constant other ) { com.android.jack.dx.rop.cst.CstMemberRef otherMember = ( ( com.android.jack.dx.rop.cst.CstMemberRef ) ( other ) ) ; int cmp = definingClass.compareTo ( otherMember.definingClass ) ; if ( cmp != 0 ) { return cmp ; } com.android.jack.dx.rop.cst.CstString thisName = nat.getName ( ) ; com.android.jack.dx.rop.cst.CstString otherName = otherMember.nat.getName ( ) ; return thisName.compareTo ( otherName ) ; }

Target:
protected int compareTo0 ( com.android.jack.dx.rop.cst.Constant other ) { com.android.jack.dx.rop.cst.CstMemberRef otherMember = ( ( com.android.jack.dx.rop.cst.CstMemberRef ) ( other ) ) ; int cmp = definingClass.compareTo ( otherMember.definingClass ) ; if ( cmp != 0 ) { return cmp ; } return name.compareTo ( otherMember.name ) ; }
Source:
public com.android.tools.lint.detector.api.Severity getSeverity ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { com.android.tools.lint.detector.api.Severity severity = computeSeverity ( issue ) ; if ( ( mFatalOnly ) && ( severity != ( com.android.tools.lint.detector.api.Severity.FATAL ) ) ) { return com.android.tools.lint.detector.api.Severity.IGNORE ; } if ( ( mFlags.isWarningsAsErrors ( ) ) && ( ( severity.compareTo ( Severity.ERROR ) ) > 0 ) ) { severity = com.android.tools.lint.detector.api.Severity.ERROR ; } if ( ( mFlags.isIgnoreWarnings ( ) ) && ( severity == ( com.android.tools.lint.detector.api.Severity.WARNING ) ) ) { severity = com.android.tools.lint.detector.api.Severity.IGNORE ; } return severity ; }

Target:
public com.android.tools.lint.detector.api.Severity getSeverity ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { com.android.tools.lint.detector.api.Severity severity = computeSeverity ( issue ) ; if ( ( mFatalOnly ) && ( severity != ( com.android.tools.lint.detector.api.Severity.FATAL ) ) ) { return com.android.tools.lint.detector.api.Severity.IGNORE ; } if ( ( mFlags.isWarningsAsErrors ( ) ) && ( severity == ( com.android.tools.lint.detector.api.Severity.WARNING ) ) ) { severity = com.android.tools.lint.detector.api.Severity.ERROR ; } if ( ( mFlags.isIgnoreWarnings ( ) ) && ( severity == ( com.android.tools.lint.detector.api.Severity.WARNING ) ) ) { severity = com.android.tools.lint.detector.api.Severity.IGNORE ; } return severity ; }
Source:
public void testConnectFailureDueToNetworkSaveFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( false , false , false ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; }

Target:
public void testConnectFailureDueToNetworkSaveFailure ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ) . thenReturn ( false ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; }
Source:
public com.google.common.collect.ImmutableMap.Builder < K , V > putAll ( java.util.Map < ? extends K , ? extends V > map ) { entries.ensureCapacity ( ( ( entries.size ( ) ) + ( map.size ( ) ) ) ) ; for ( java.util.Map.Entry < ? extends K , ? extends V > entry : map.entrySet ( ) ) { put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return this ; }

Target:
public com.google.common.collect.ImmutableMap.Builder < K , V > put ( java.util.Map.Entry < ? extends K , ? extends V > entry ) { return put ( entry.getKey ( ) , entry.getValue ( ) ) ; }
Source:
private void performShowDialpadFragment ( @ android.support.annotation.NonNull android.support.v4.app.FragmentManager dialpadFragmentManager ) { android.support.v4.app.FragmentTransaction transaction = dialpadFragmentManager.beginTransaction ( ) ; com.android.incallui.DialpadFragment dialpadFragment = inCallActivity.getDialpadFragment ( ) ; if ( dialpadFragment == null ) { transaction.add ( inCallActivity.getDialpadContainerId ( ) , new com.android.incallui.DialpadFragment ( ) , com.android.incallui.InCallActivityCommon.TAG_DIALPAD_FRAGMENT ) ; } else { transaction.show ( dialpadFragment ) ; } transaction.commitAllowingStateLoss ( ) ; dialpadFragmentManager.executePendingTransactions ( ) ; com.android.dialer.logging.Logger.get ( inCallActivity ) . logScreenView ( ScreenEvent.Type.INCALL_DIALPAD , inCallActivity ) ; updateNavigationBar ( true ) ; }

Target:
private void performShowDialpadFragment ( @ android.support.annotation.NonNull android.support.v4.app.FragmentManager dialpadFragmentManager ) { android.support.v4.app.FragmentTransaction transaction = dialpadFragmentManager.beginTransaction ( ) ; com.android.incallui.DialpadFragment dialpadFragment = inCallActivity.getDialpadFragment ( ) ; if ( dialpadFragment == null ) { transaction.add ( inCallActivity.getDialpadContainerId ( ) , new com.android.incallui.DialpadFragment ( ) , com.android.incallui.InCallActivityCommon.TAG_DIALPAD_FRAGMENT ) ; } else { transaction.show ( dialpadFragment ) ; } transaction.commitAllowingStateLoss ( ) ; dialpadFragmentManager.executePendingTransactions ( ) ; com.android.dialer.logging.Logger.get ( inCallActivity ) . logScreenView ( ScreenEvent.Type.INCALL_DIALPAD , inCallActivity ) ; inCallActivity.updateNavigationBar ( true ) ; }
Source:
public javax.obex.PasswordAuthentication onAuthenticationChallenge ( final java.lang.String description , final boolean isUserIdRequired , final boolean isFullAccess ) { waitUserConfirmation ( ) ; if ( ( mSessionKey.trim ( ) . length ( ) ) != 0 ) { javax.obex.PasswordAuthentication pa = new javax.obex.PasswordAuthentication ( null , mSessionKey.getBytes ( ) ) ; return pa ; } return null ; }

Target:
public javax.obex.PasswordAuthentication onAuthenticationChallenge ( final java.lang.String description , final boolean isUserIdRequired , final boolean isFullAccess ) { waitUserConfirmation ( ) ; if ( ( mSessionKey.trim ( ) . length ( ) ) != 0 ) { return new javax.obex.PasswordAuthentication ( null , mSessionKey.getBytes ( ) ) ; } return null ; }
Source:
private final void resetContext ( ) { org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = new org.conscrypt.NativeRef.EVP_MD_CTX ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; org.conscrypt.NativeCrypto.EVP_MD_CTX_init ( ctxLocal ) ; if ( signing ) { enableDSASignatureNonceHardeningIfApplicable ( ) ; org.conscrypt.NativeCrypto.EVP_SignInit ( ctxLocal , evpAlgorithm ) ; } else { org.conscrypt.NativeCrypto.EVP_VerifyInit ( ctxLocal , evpAlgorithm ) ; } this . ctx = ctxLocal ; }

Target:
private final void resetContext ( ) { org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = new org.conscrypt.NativeRef.EVP_MD_CTX ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; if ( signing ) { enableDSASignatureNonceHardeningIfApplicable ( ) ; org.conscrypt.NativeCrypto.EVP_SignInit ( ctxLocal , evpAlgorithm ) ; } else { org.conscrypt.NativeCrypto.EVP_VerifyInit ( ctxLocal , evpAlgorithm ) ; } this . ctx = ctxLocal ; }
Source:
static void startConfigService ( android.content.Context context ) { if ( com.android.cellbroadcastreceiver.CellBroadcastReceiver.phoneIsCdma ( ) ) { if ( com.android.cellbroadcastreceiver.CellBroadcastReceiver.DBG ) com.android.cellbroadcastreceiver.CellBroadcastReceiver.log ( "CDMA phone detected; doing nothing" ) ; } else { android.content.Intent serviceIntent = new android.content.Intent ( CellBroadcastConfigService.ACTION_ENABLE_CHANNELS , null , context , com.android.cellbroadcastreceiver.CellBroadcastConfigService.class ) ; context.startService ( serviceIntent ) ; } }

Target:
static void startConfigService ( android.content.Context context ) { android.content.Intent serviceIntent = new android.content.Intent ( CellBroadcastConfigService.ACTION_ENABLE_CHANNELS , null , context , com.android.cellbroadcastreceiver.CellBroadcastConfigService.class ) ; context.startService ( serviceIntent ) ; }
Source:
private static java.lang.AssertionError createError ( java.lang.Object checked , java.lang.reflect.Field f ) { java.lang.String message = ( ( ( ( "Duplicate type found in " + checked ) + " of class " ) + ( checked.getClass ( ) . getName ( ) ) ) + " in field " ) + ( f.getName ( ) ) ; return new java.lang.AssertionError ( message ) ; }

Target:
private static java.lang.AssertionError createError ( @ javax.annotation.Nonnull java.lang.Object checked , @ javax.annotation.Nonnull java.lang.reflect.Field f ) { java.lang.String message = ( ( ( ( "Duplicate type found in " + ( checked.toString ( ) ) ) + " of class " ) + ( checked.getClass ( ) . getName ( ) ) ) + " in field " ) + ( f.getName ( ) ) ; return new java.lang.AssertionError ( message ) ; }
Source:
public static void dispose ( ) { try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.force ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.closeFiles ( ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.ourIsDisposed = true ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }

Target:
public static void dispose ( ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.force ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.closeFiles ( ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.ourIsDisposed = true ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( java.lang.String name ) { for ( com.android.tools.perflib.heap.Heap heap : mHeaps.values ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = heap.getClass ( name ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
private static com.android.jack.dx.rop.cst.CstArray makeCstArray ( com.android.jack.dx.rop.type.TypeList types ) { int size = types.size ( ) ; com.android.jack.dx.rop.cst.CstArray.List list = new com.android.jack.dx.rop.cst.CstArray.List ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list.set ( i , com.android.jack.dx.rop.cst.CstType.intern ( types.getType ( i ) ) ) ; } list.setImmutable ( ) ; return new com.android.jack.dx.rop.cst.CstArray ( list ) ; }

Target:
private static com.android.jack.dx.rop.cst.CstArray makeCstArray ( com.android.jack.dx.rop.type.TypeList types ) { int size = types.size ( ) ; com.android.jack.dx.rop.cst.CstArray.List list = new com.android.jack.dx.rop.cst.CstArray.List ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list.set ( i , types.getType ( i ) ) ; } list.setImmutable ( ) ; return new com.android.jack.dx.rop.cst.CstArray ( list ) ; }
Source:
public void visibleAreaChanged ( com.intellij.execution.impl.VisibleAreaEvent e ) { java.awt.Rectangle oldR = e.getOldRectangle ( ) ; if ( ( ( ( ! ( shouldPreserveCurrentVisualArea ( ) ) ) && ( oldR != null ) ) && ( ( oldR.height ) <= 0 ) ) && ( ( e.getNewRectangle ( ) . height ) > 0 ) ) { scrollToEnd ( ) ; } }

Target:
public void visibleAreaChanged ( com.intellij.execution.impl.VisibleAreaEvent e ) { java.awt.Rectangle oldR = e.getOldRectangle ( ) ; if ( ( ( ( oldR != null ) && ( ( oldR.height ) <= 0 ) ) && ( ( e.getNewRectangle ( ) . height ) > 0 ) ) && ( ! ( shouldPreserveCurrentVisualArea ( ) ) ) ) { scrollToEnd ( ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JUnlock unlockStmt ) { com.android.jack.dx.rop.code.RegisterSpec unlockReg = getRegisterSpec ( unlockStmt.getLockExpr ( ) ) ; if ( unlockReg.isClosure ( ) ) { unlockReg = ropReg.getRegularObjectFromClosure ( unlockReg ) ; } com.android.jack.dx.rop.code.Insn unlockInsn = new com.android.jack.dx.rop.code.ThrowingInsn ( com.android.jack.dx.rop.code.Rops.MONITOR_EXIT , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( unlockStmt ) , com.android.jack.dx.rop.code.RegisterSpecList.make ( unlockReg ) , getCatchTypes ( ) ) ; addInstruction ( unlockInsn ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JUnlock unlockStmt ) { com.android.jack.dx.rop.code.RegisterSpec unlockReg = getRegisterSpec ( unlockStmt.getLockExpr ( ) ) ; com.android.jack.dx.rop.code.Insn unlockInsn = new com.android.jack.dx.rop.code.ThrowingInsn ( com.android.jack.dx.rop.code.Rops.MONITOR_EXIT , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( unlockStmt ) , com.android.jack.dx.rop.code.RegisterSpecList.make ( unlockReg ) , getCatchTypes ( ) ) ; addInstruction ( unlockInsn ) ; return false ; }
Source:
private com.android.ddmlib.IDevice getDevice ( java.lang.String deviceName ) { com.android.ddmlib.IDevice [ ] devices = com.android.ddmlib.AndroidDebugBridge.getBridge ( ) . getDevices ( ) ; for ( com.android.ddmlib.IDevice device : devices ) { java.lang.String name = device.getAvdName ( ) ; if ( name == null ) { name = device.getSerialNumber ( ) ; } if ( name.equals ( deviceName ) ) { return device ; } } return null ; }

Target:
private com.android.ddmlib.IDevice getDevice ( java.lang.String deviceName ) { com.android.ddmlib.IDevice [ ] devices = com.android.ddmlib.AndroidDebugBridge.getBridge ( ) . getDevices ( ) ; for ( com.android.ddmlib.IDevice device : devices ) { if ( device.getName ( ) . equals ( deviceName ) ) { return device ; } } return null ; }
Source:
public java.lang.CharSequence getAndroidCarrierNameForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return null ; }

Target:
public java.lang.CharSequence getAndroidCarrierNameForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } return null ; }
Source:
public boolean isParent ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo potentialParent ) { if ( potentialParent == null ) { } com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo p = mParent ; while ( p != null ) { if ( p == potentialParent ) { return true ; } p = p.getParent ( ) ; } return false ; }

Target:
public boolean isParent ( @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo potentialParent ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo p = mParent ; while ( p != null ) { if ( p == potentialParent ) { return true ; } p = p.getParent ( ) ; } return false ; }
Source:
protected java.util.Map < java.lang.String , java.lang.Object > instrument ( java.lang.String packageName , java.util.Map < java.lang.String , java.lang.Object > args ) { java.util.List < java.lang.String > shellCmd = com.google.common.collect.Lists.newArrayList ( "am" , "instrument" , "-w" , "-r" , packageName ) ; java.lang.String result = shell ( shellCmd.toArray ( com.android.monkeyrunner.adb.AdbMonkeyDevice.ZERO_LENGTH_STRING_ARRAY ) ) ; return com.android.monkeyrunner.adb.AdbMonkeyDevice.convertInstrumentResult ( result ) ; }

Target:
public java.util.Map < java.lang.String , java.lang.Object > instrument ( java.lang.String packageName , java.util.Map < java.lang.String , java.lang.Object > args ) { java.util.List < java.lang.String > shellCmd = com.google.common.collect.Lists.newArrayList ( "am" , "instrument" , "-w" , "-r" , packageName ) ; java.lang.String result = shell ( shellCmd.toArray ( com.android.monkeyrunner.adb.AdbMonkeyDevice.ZERO_LENGTH_STRING_ARRAY ) ) ; return com.android.monkeyrunner.adb.AdbMonkeyDevice.convertInstrumentResult ( result ) ; }
Source:
public static void assertDefaultCipherSuites ( java.lang.String [ ] cipherSuites ) { libcore.java.security.StandardNames.assertValidCipherSuites ( cipherSuites ) ; assertEquals ( libcore.java.security.StandardNames.CIPHER_SUITES_DEFAULT , java.util.Arrays.asList ( cipherSuites ) ) ; if ( ! ( libcore.java.security.StandardNames.IS_RI ) ) { java.util.List < java.lang.String > disallowedDefaultCipherSuites = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String cipherSuite : cipherSuites ) { if ( ! ( libcore.java.security.StandardNames.isPermittedDefaultCipherSuite ( cipherSuite ) ) ) { disallowedDefaultCipherSuites.add ( cipherSuite ) ; } } assertEquals ( java.util.Collections.EMPTY_LIST , disallowedDefaultCipherSuites ) ; } }

Target:
public static void assertDefaultCipherSuites ( java.lang.String [ ] cipherSuites ) { libcore.java.security.StandardNames.assertValidCipherSuites ( cipherSuites ) ; org.junit.Assert.assertEquals ( libcore.java.security.StandardNames.CIPHER_SUITES_DEFAULT , java.util.Arrays.asList ( cipherSuites ) ) ; if ( ! ( libcore.java.security.StandardNames.IS_RI ) ) { java.util.List < java.lang.String > disallowedDefaultCipherSuites = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String cipherSuite : cipherSuites ) { if ( ! ( libcore.java.security.StandardNames.isPermittedDefaultCipherSuite ( cipherSuite ) ) ) { disallowedDefaultCipherSuites.add ( cipherSuite ) ; } } org.junit.Assert.assertEquals ( java.util.Collections.EMPTY_LIST , disallowedDefaultCipherSuites ) ; } }
Source:
public android.net.wifi.p2p.WifiP2pConfig createFromParcel ( android.os.Parcel in ) { android.net.wifi.p2p.WifiP2pConfig config = new android.net.wifi.p2p.WifiP2pConfig ( ) ; config.deviceAddress = in.readString ( ) ; config.wps = ( ( android.net.wifi.WpsInfo ) ( in.readParcelable ( null ) ) ) ; config.groupOwnerIntent = in.readInt ( ) ; config.persist = android.net.wifi.p2p.WifiP2pConfig.Persist.valueOf ( in.readString ( ) ) ; return config ; }

Target:
public android.net.wifi.p2p.WifiP2pConfig createFromParcel ( android.os.Parcel in ) { android.net.wifi.p2p.WifiP2pConfig config = new android.net.wifi.p2p.WifiP2pConfig ( ) ; config.deviceAddress = in.readString ( ) ; config.wps = ( ( android.net.wifi.WpsInfo ) ( in.readParcelable ( null ) ) ) ; config.groupOwnerIntent = in.readInt ( ) ; config.netId = in.readInt ( ) ; return config ; }
Source:
private WifiNative.PnoSettings createDummyPnoSettings ( boolean isConnected ) { com.android.server.wifi.WifiNative.PnoSettings pnoSettings = new com.android.server.wifi.WifiNative.PnoSettings ( ) ; pnoSettings.isConnected = isConnected ; pnoSettings.networkList = new com.android.server.wifi.WifiNative.PnoNetwork [ 2 ] ; pnoSettings.networkList [ 0 ] = createDummyPnoNetwork ( "ssid_pno_1" , 1 , 1 ) ; pnoSettings.networkList [ 1 ] = createDummyPnoNetwork ( "ssid_pno_2" , 2 , 2 ) ; return pnoSettings ; }

Target:
private WifiNative.PnoSettings createDummyPnoSettings ( boolean isConnected ) { com.android.server.wifi.WifiNative.PnoSettings pnoSettings = new com.android.server.wifi.WifiNative.PnoSettings ( ) ; pnoSettings.isConnected = isConnected ; pnoSettings.networkList = new com.android.server.wifi.WifiNative.PnoNetwork [ 2 ] ; pnoSettings.networkList [ 0 ] = createDummyPnoNetwork ( "ssid_pno_1" ) ; pnoSettings.networkList [ 1 ] = createDummyPnoNetwork ( "ssid_pno_2" ) ; return pnoSettings ; }
Source:
public boolean processMessage ( android.os.Message message ) { logStateAndMessage ( message , this ) ; switch ( message.what ) { case com.android.server.wifi.WifiStateMachine.CMD_DISABLE_P2P_RSP : transitionTo ( mTransitionToState ) ; break ; case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT : case com.android.server.wifi.WifiStateMachine.CMD_START_SUPPLICANT : case com.android.server.wifi.WifiStateMachine.CMD_STOP_SUPPLICANT : case com.android.server.wifi.WifiStateMachine.CMD_START_AP : case com.android.server.wifi.WifiStateMachine.CMD_STOP_AP : case com.android.server.wifi.WifiStateMachine.CMD_SET_OPERATIONAL_MODE : case com.android.server.wifi.WifiStateMachine.CMD_SET_FREQUENCY_BAND : case com.android.server.wifi.WifiStateMachine.CMD_START_SCAN : case com.android.server.wifi.WifiStateMachine.CMD_DISCONNECT : case com.android.server.wifi.WifiStateMachine.CMD_REASSOCIATE : case com.android.server.wifi.WifiStateMachine.CMD_RECONNECT : messageHandlingStatus = com.android.server.wifi.WifiStateMachine.MESSAGE_HANDLING_STATUS_DEFERRED ; deferMessage ( message ) ; break ; default : return NOT_HANDLED ; } return HANDLED ; }

Target:
public boolean processMessage ( android.os.Message message ) { logStateAndMessage ( message , this ) ; switch ( message.what ) { case com.android.server.wifi.WifiStateMachine.CMD_DISABLE_P2P_RSP : transitionTo ( mTransitionToState ) ; break ; case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT : case com.android.server.wifi.WifiStateMachine.CMD_START_SUPPLICANT : case com.android.server.wifi.WifiStateMachine.CMD_STOP_SUPPLICANT : case com.android.server.wifi.WifiStateMachine.CMD_START_AP : case com.android.server.wifi.WifiStateMachine.CMD_STOP_AP : case com.android.server.wifi.WifiStateMachine.CMD_SET_OPERATIONAL_MODE : case com.android.server.wifi.WifiStateMachine.CMD_START_SCAN : case com.android.server.wifi.WifiStateMachine.CMD_DISCONNECT : case com.android.server.wifi.WifiStateMachine.CMD_REASSOCIATE : case com.android.server.wifi.WifiStateMachine.CMD_RECONNECT : messageHandlingStatus = com.android.server.wifi.WifiStateMachine.MESSAGE_HANDLING_STATUS_DEFERRED ; deferMessage ( message ) ; break ; default : return NOT_HANDLED ; } return HANDLED ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newPlatform ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_PLATFORMS ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } @ java.lang.Override public java.lang.String getPath ( ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( getAndroidVersion ( ) ) ; } } ; }

Target:
public java.lang.String getPath ( ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( getAndroidVersion ( ) ) ; }
Source:
private void addProcess ( com.googlecode.android_scripting.interpreter.InterpreterProcess process ) { mProcessMap.put ( process.getPort ( ) , process ) ; ( mModCount ) ++ ; if ( ! ( mHide ) ) { updateNotification ( ( ( process.getName ( ) ) + " started." ) ) ; } }

Target:
private void addProcess ( com.googlecode.android_scripting.interpreter.InterpreterProcess process ) { synchronized ( mProcessMap ) { mProcessMap.put ( process.getPort ( ) , process ) ; ( mModCount ) ++ ; } if ( ! ( mHide ) ) { updateNotification ( ( ( process.getName ( ) ) + " started." ) ) ; } }
Source:
public void topAppWindowChanged ( boolean showMenu ) { if ( com.android.systemui.statusbar.phone.PhoneStatusBar.DEBUG ) { android.util.Slog.d ( com.android.systemui.statusbar.phone.PhoneStatusBar.TAG , ( ( showMenu ? "showing" : "hiding" ) + " the MENU button" ) ) ; } if ( ( mNavigationBarView ) != null ) { mNavigationBarView.setMenuVisibility ( showMenu ) ; } if ( showMenu ) setLightsOn ( true ) ; }

Target:
public void topAppWindowChanged ( boolean showMenu ) { if ( com.android.systemui.statusbar.phone.PhoneStatusBar.DEBUG ) { android.util.Log.d ( com.android.systemui.statusbar.phone.PhoneStatusBar.TAG , ( ( showMenu ? "showing" : "hiding" ) + " the MENU button" ) ) ; } if ( ( mNavigationBarView ) != null ) { mNavigationBarView.setMenuVisibility ( showMenu ) ; } if ( showMenu ) setLightsOn ( true ) ; }
Source:
static com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrap ( android.content.Context context , java.lang.String packageName , java.lang.String className , com.android.bluetooth.avrcp.BrowsedPlayerWrapper.ConnectionCallback cb ) { android.util.Log.i ( com.android.bluetooth.avrcp.BrowsedPlayerWrapper.TAG , ( "Wrapping Media Browser " + packageName ) ) ; com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrapper = new com.android.bluetooth.avrcp.BrowsedPlayerWrapper ( context , packageName , className , cb ) ; wrapper.mConnectionState = com.android.bluetooth.avrcp.BrowsedPlayerWrapper.ConnectionState.CONNECTING ; wrapper.mWrappedBrowser.connect ( ) ; return wrapper ; }

Target:
static com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrap ( android.content.Context context , java.lang.String packageName , java.lang.String className ) { android.util.Log.i ( com.android.bluetooth.avrcp.BrowsedPlayerWrapper.TAG , ( "Wrapping Media Browser " + packageName ) ) ; com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrapper = new com.android.bluetooth.avrcp.BrowsedPlayerWrapper ( context , packageName , className ) ; return wrapper ; }
Source:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } if ( com.intellij.ide.actions.ShowStructureSettingsAction.isGradleProject ( project ) ) { com.intellij.ide.actions.ShowStructureSettingsAction.showDisabledProjectStructureDialogMessage ( ) ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }

Target:
public void actionPerformed ( com.intellij.openapi.actionSystem.AnActionEvent e ) { com.intellij.openapi.project.Project project = PlatformDataKeys.PROJECT.getData ( e.getDataContext ( ) ) ; if ( project == null ) { project = com.intellij.openapi.project.ProjectManager.getInstance ( ) . getDefaultProject ( ) ; } com.intellij.openapi.options.ShowSettingsUtil.getInstance ( ) . editConfigurable ( project , OptionsEditorDialog.DIMENSION_KEY , com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.getInstance ( project ) ) ; }
Source:
private void setupGraphicsSupport ( android.app.LoadedApk info , java.io.File cacheDir ) { if ( java.lang.Process.isIsolated ( ) ) { return ; } try { int uid = java.lang.Process.myUid ( ) ; java.lang.String [ ] packages = android.app.ActivityThread.getPackageManager ( ) . getPackagesForUid ( uid ) ; if ( ( packages != null ) && ( ( packages.length ) == 1 ) ) { android.view.HardwareRenderer.setupDiskCache ( cacheDir ) ; android.renderscript.RenderScriptCacheDir.setupDiskCache ( cacheDir ) ; } } catch ( android.os.RemoteException e ) { } }

Target:
private void setupGraphicsSupport ( android.app.LoadedApk info , java.io.File cacheDir ) { if ( java.lang.Process.isIsolated ( ) ) { return ; } try { int uid = java.lang.Process.myUid ( ) ; java.lang.String [ ] packages = android.app.ActivityThread.getPackageManager ( ) . getPackagesForUid ( uid ) ; if ( packages != null ) { android.view.HardwareRenderer.setupDiskCache ( cacheDir ) ; android.renderscript.RenderScriptCacheDir.setupDiskCache ( cacheDir ) ; } } catch ( android.os.RemoteException e ) { } }
Source:
public static void checkStructure ( @ javax.annotation.CheckForNull java.io.File [ ] bootclasspath , @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourceList , boolean withDebugInfo , boolean compareInstructionNumber , float instructionNumberTolerance , @ javax.annotation.CheckForNull com.android.jack.JarJarRules jarjarRules , @ javax.annotation.CheckForNull com.android.jack.ProguardFlags [ ] proguardFlagFiles ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( new com.android.jack.Options ( ) , bootclasspath , classpath , fileOrSourceList , withDebugInfo , compareInstructionNumber , instructionNumberTolerance , jarjarRules , proguardFlagFiles ) ; }

Target:
public static void checkStructure ( @ javax.annotation.CheckForNull java.io.File [ ] bootclasspath , @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourceList , boolean withDebugInfo , boolean compareInstructionNumber , float instructionNumberTolerance , @ javax.annotation.CheckForNull com.android.jack.JarJarRules jarjarRules , @ javax.annotation.CheckForNull com.android.jack.ProguardFlags [ ] proguardFlagFiles ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( new com.android.jack.Options ( ) , bootclasspath , classpath , null , null , fileOrSourceList , withDebugInfo , compareInstructionNumber , instructionNumberTolerance , jarjarRules , proguardFlagFiles ) ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/android:colorForegroundInverse" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }
Source:
public int getMinSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { java.lang.Object value = com.android.xml.AndroidManifest.getMinSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; if ( value instanceof java.lang.Integer ) { return ( ( java.lang.Integer ) ( value ) ) ; } else if ( value instanceof java.lang.String ) { } } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return 1 ; }

Target:
public java.lang.Object getMinSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { return com.android.xml.AndroidManifest.getMinSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return 1 ; }
Source:
public void testShowDescription ( ) throws java.lang.Exception { checkDriver ( ( "NewApi\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "------\n" + "Summary: Finds API accesses to APIs that are not supported in all targeted API\n" ) + "versions\n" ) + "\n" ) + "Priority: 6 / 10\n" ) + "Severity: Error\n" ) + "Category: Correctness\n" ) + "\n" ) + "This check scans through all the Android API calls in the application and\n" ) + "warns about any calls that are not available on all versions targeted by this\n" ) + "application (according to its minimum SDK attribute in the manifest).\n" ) + "\n" ) + "If you really want to use this API and don\'t need to support older devices\n" ) + "just set the minSdkVersion in your AndroidManifest.xml file.\n" ) + "If your code is deliberately accessing newer APIs, and you have ensured (e.g.\n" ) + "with conditional execution) that this code will only ever be called on a\n" ) + "supported platform, then you can annotate your class or method with the\n" ) + "@TargetApi annotation specifying the local minimum SDK to apply, such as\n" ) + "@TargetApi(11), such that this check considers 11 rather than your manifest\n" ) + "file\'s minimum SDK as the required API level.\n" ) + "\n" ) + "\n" ) ) , "" , new java.lang.String [ ] { "--show" , "NewApi" } ) ; }

Target:
public void testShowDescription ( ) throws java.lang.Exception { checkDriver ( ( "NewApi\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "------\n" + "Summary: Finds API accesses to APIs that are not supported in all targeted API\n" ) + "versions\n" ) + "\n" ) + "Priority: 6 / 10\n" ) + "Severity: Error\n" ) + "Category: Correctness\n" ) + "\n" ) + "This check scans through all the Android API calls in the application and\n" ) + "warns about any calls that are not available on all versions targeted by this\n" ) + "application (according to its minimum SDK attribute in the manifest).\n" ) + "\n" ) + "If you really want to use this API and don\'t need to support older devices\n" ) + "just set the minSdkVersion in your AndroidManifest.xml file.\n" ) + "If your code is deliberately accessing newer APIs, and you have ensured (e.g.\n" ) + "with conditional execution) that this code will only ever be called on a\n" ) + "supported platform, then you can annotate your class or method with the\n" ) + "@TargetApi annotation specifying the local minimum SDK to apply, such as\n" ) + "@TargetApi(11), such that this check considers 11 rather than your manifest\n" ) + "file\'s minimum SDK as the required API level.\n" ) + "\n" ) + "Similarly, you can use tools:targetApi=\"11\" in an XML file to indicate that\n" ) + "the element will only be inflated in an adequate context.\n" ) + "\n" ) + "\n" ) ) , "" , new java.lang.String [ ] { "--show" , "NewApi" } ) ; }
Source:
public int getSupportedLoggerFeatureSet ( ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getSupportedLoggerFeatureSet ( ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } legacyHalWarning ( ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getSupportedLoggerFeatureSetNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return 0 ; } } }

Target:
public int getSupportedLoggerFeatureSet ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getSupportedLoggerFeatureSetNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return 0 ; } } }
Source:
public boolean visitImportDeclaration ( lombok.ast.ImportDeclaration node ) { java.lang.String fqn = node.asFullyQualifiedName ( ) ; if ( fqn.equals ( "android.R" ) ) { com.android.tools.lint.detector.api.Location location = mContext.getLocation ( node ) ; mContext.report ( com.android.tools.lint.checks.WrongImportDetector.ISSUE , node , location , ( "Don't include `android.R` here; use a fully qualified name for " + "each usage instead" ) , null ) ; } return false ; }

Target:
public boolean visitImportDeclaration ( lombok.ast.ImportDeclaration node ) { java.lang.String fqn = node.asFullyQualifiedName ( ) ; if ( fqn.equals ( "android.R" ) ) { com.android.tools.lint.detector.api.Location location = mContext.getLocation ( node ) ; mContext.report ( com.android.tools.lint.checks.WrongImportDetector.ISSUE , node , location , ( "Don't include `android.R` here; use a fully qualified name for " + "each usage instead" ) ) ; } return false ; }
Source:
public void dump ( java.lang.StringBuilder sb ) { sb.append ( "\nProfile: AvrcpTargetService:\n" ) ; if ( ( com.android.bluetooth.avrcp.AvrcpTargetService.sInstance ) == null ) { sb.append ( "AvrcpTargetService not running" ) ; return ; } if ( ( mMediaPlayerList ) != null ) { mMediaPlayerList.dump ( sb ) ; } else { sb.append ( "\nMedia Player List is empty\n" ) ; } mVolumeManager.dump ( sb ) ; sb.append ( "\n" ) ; }

Target:
public void dump ( java.lang.StringBuilder sb ) { sb.append ( "\nProfile: AvrcpTargetService:\n" ) ; if ( ( com.android.bluetooth.avrcp.AvrcpTargetService.sInstance ) == null ) { sb.append ( "AvrcpTargetService not running" ) ; return ; } if ( ( mMediaPlayerList ) != null ) { mMediaPlayerList.dump ( sb ) ; } else { sb.append ( "\nMedia Player List is empty\n" ) ; } mVolumeManager.dump ( sb ) ; }
Source:
public com.android.ide.common.resources.configuration.FolderConfiguration getConfiguration ( ) { assert ( getSource ( ) ) != null ; java.lang.String qualifier = getSource ( ) . getQualifiers ( ) ; if ( qualifier.isEmpty ( ) ) { return new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; } return com.android.ide.common.resources.configuration.FolderConfiguration.getConfigFromQualifiers ( com.google.common.base.Splitter.on ( '-' ) . split ( qualifier ) ) ; }

Target:
public com.android.ide.common.resources.configuration.FolderConfiguration getConfiguration ( ) { assert ( getSource ( ) ) != null : this ; java.lang.String qualifier = getSource ( ) . getQualifiers ( ) ; if ( qualifier.isEmpty ( ) ) { return new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; } return com.android.ide.common.resources.configuration.FolderConfiguration.getConfigFromQualifiers ( com.google.common.base.Splitter.on ( '-' ) . split ( qualifier ) ) ; }
Source:
public void testProcessChldHoldActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_HOLDACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldHoldActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_HOLDACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public int lastIndexOf ( int ch , int fromIndex ) { if ( ch < ( java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT ) ) { int i = java.lang.Math.min ( fromIndex , ( ( count ) - 1 ) ) ; for ( ; i >= 0 ; i -- ) { if ( ( charAt ( i ) ) == ch ) { return i ; } } return - 1 ; } else { return lastIndexOfSupplementary ( ch , fromIndex ) ; } }

Target:
public int lastIndexOf ( int ch , int fromIndex ) { if ( ch < ( java.lang.Character.MIN_SUPPLEMENTARY_CODE_POINT ) ) { int i = java.lang.Math.min ( fromIndex , ( ( length ( ) ) - 1 ) ) ; for ( ; i >= 0 ; i -- ) { if ( ( charAt ( i ) ) == ch ) { return i ; } } return - 1 ; } else { return lastIndexOfSupplementary ( ch , fromIndex ) ; } }
Source:
public void onChange ( boolean selfChange ) { if ( ! ( isBleScanAlwaysAvailable ( ) ) ) { disableBleScanMode ( ) ; clearBleApps ( ) ; try { mBluetoothLock.readLock ( ) . lock ( ) ; if ( ( mBluetooth ) != null ) mBluetooth.onBrEdrDown ( ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.server.BluetoothManagerService.TAG , "error when disabling bluetooth" , e ) ; } finally { mBluetoothLock.readLock ( ) . unlock ( ) ; } } }

Target:
public void onChange ( boolean selfChange ) { if ( isBleScanAlwaysAvailable ( ) ) { return ; } disableBleScanMode ( ) ; clearBleApps ( ) ; try { mBluetoothLock.readLock ( ) . lock ( ) ; if ( ( mBluetooth ) != null ) mBluetooth.onBrEdrDown ( ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.server.BluetoothManagerService.TAG , "error when disabling bluetooth" , e ) ; } finally { mBluetoothLock.readLock ( ) . unlock ( ) ; } }
Source:
private byte getBluetoothPlayState ( android.media.session.PlaybackState pbState ) { if ( pbState == null ) { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , "playState object null, sending STOPPED" ) ; return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; } switch ( pbState.getState ( ) ) { case android.media.session.PlaybackState.STATE_PLAYING : case android.media.session.PlaybackState.STATE_BUFFERING : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PLAYING ; case android.media.session.PlaybackState.STATE_STOPPED : case android.media.session.PlaybackState.STATE_NONE : case android.media.session.PlaybackState.STATE_CONNECTING : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; case android.media.session.PlaybackState.STATE_PAUSED : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PAUSED ; case android.media.session.PlaybackState.STATE_FAST_FORWARDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_NEXT : case android.media.session.PlaybackState.STATE_SKIPPING_TO_QUEUE_ITEM : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_FWD_SEEK ; case android.media.session.PlaybackState.STATE_REWINDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_PREVIOUS : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_REV_SEEK ; case android.media.session.PlaybackState.STATE_ERROR : default : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_ERROR ; } }

Target:
private byte getBluetoothPlayState ( android.media.session.PlaybackState pbState ) { if ( pbState == null ) { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , "playState object null, sending STOPPED" ) ; return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; } switch ( pbState.getState ( ) ) { case android.media.session.PlaybackState.STATE_PLAYING : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PLAYING ; case android.media.session.PlaybackState.STATE_BUFFERING : case android.media.session.PlaybackState.STATE_STOPPED : case android.media.session.PlaybackState.STATE_NONE : case android.media.session.PlaybackState.STATE_CONNECTING : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; case android.media.session.PlaybackState.STATE_PAUSED : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PAUSED ; case android.media.session.PlaybackState.STATE_FAST_FORWARDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_NEXT : case android.media.session.PlaybackState.STATE_SKIPPING_TO_QUEUE_ITEM : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_FWD_SEEK ; case android.media.session.PlaybackState.STATE_REWINDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_PREVIOUS : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_REV_SEEK ; case android.media.session.PlaybackState.STATE_ERROR : default : return com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_ERROR ; } }
Source:
public static com.android.server.wifi.hotspot2.anqp.ANQPElement buildHS20Element ( com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType infoID , java.nio.ByteBuffer payload ) throws java.net.ProtocolException { switch ( infoID ) { case HSFriendlyName : return com.android.server.wifi.hotspot2.anqp.HSFriendlyNameElement.parse ( payload ) ; case HSWANMetrics : return new com.android.server.wifi.hotspot2.anqp.HSWanMetricsElement ( infoID , payload ) ; case HSConnCapability : return new com.android.server.wifi.hotspot2.anqp.HSConnectionCapabilityElement ( infoID , payload ) ; case HSOSUProviders : return new com.android.server.wifi.hotspot2.anqp.RawByteElement ( infoID , payload ) ; default : throw new java.net.ProtocolException ( ( "Unknown element ID: " + infoID ) ) ; } }

Target:
public static com.android.server.wifi.hotspot2.anqp.ANQPElement buildHS20Element ( com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType infoID , java.nio.ByteBuffer payload ) throws java.net.ProtocolException { switch ( infoID ) { case HSFriendlyName : return com.android.server.wifi.hotspot2.anqp.HSFriendlyNameElement.parse ( payload ) ; case HSWANMetrics : return com.android.server.wifi.hotspot2.anqp.HSWanMetricsElement.parse ( payload ) ; case HSConnCapability : return com.android.server.wifi.hotspot2.anqp.HSConnectionCapabilityElement.parse ( payload ) ; case HSOSUProviders : return com.android.server.wifi.hotspot2.anqp.RawByteElement.parse ( infoID , payload ) ; default : throw new java.net.ProtocolException ( ( "Unknown element ID: " + infoID ) ) ; } }
Source:
public void init ( ) { if ( ! ( org.jetbrains.android.sdk.AndroidSdkUtils.isAndroidSdkAvailable ( ) ) ) { java.lang.String title = "SDK problem" ; java.lang.String msg = "<html>Your Android SDK is missing or out of date.<br>" + "You can configure your SDK via <b>Configure | Project Defaults | Project Structure | SDKs</b></html>" ; super . init ( ) ; com.intellij.openapi.ui.Messages.showErrorDialog ( msg , title ) ; throw new java.lang.IllegalStateException ( msg ) ; } addPath ( new com.google.gct.idea.samples.SampleImportWizardPath ( mySampleList , getDisposable ( ) ) ) ; super . init ( ) ; }

Target:
public void init ( ) { if ( ! ( org.jetbrains.android.sdk.AndroidSdkUtils.isAndroidSdkAvailable ( ) ) ) { java.lang.String title = "SDK problem" ; java.lang.String msg = "<html>Your Android SDK is missing or out of date.<br>" + "You can configure your SDK via <b>Configure | Project Defaults | Project Structure | SDKs</b></html>" ; super . init ( ) ; com.intellij.openapi.ui.Messages.showErrorDialog ( msg , title ) ; return ; } addPath ( new com.google.gct.idea.samples.SampleImportWizardPath ( mySampleList , getDisposable ( ) ) ) ; super . init ( ) ; }
Source:
private void setBrowsedPlayerRequestFromNative ( byte [ ] address , int playerId ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "setBrPlayerRequestFromNative: playerId=" + playerId ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_SET_BR_PLAYER , playerId , 0 ) ; msg.obj = address ; mHandler.sendMessage ( msg ) ; }

Target:
private void setBrowsedPlayerRequestFromNative ( byte [ ] address , int playerId ) { android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_SET_BR_PLAYER , playerId , 0 ) ; msg.obj = address ; mHandler.sendMessage ( msg ) ; }
Source:
private java.lang.String getPluralFormatter ( android.icu.util.MeasureUnit unit , android.icu.text.MeasureFormat.FormatWidth width , int index ) { if ( index != ( android.icu.impl.StandardPlural.OTHER_INDEX ) ) { java.lang.String pattern = getFormatterOrNull ( unit , width , index ) ; if ( pattern != null ) { return pattern ; } } return getFormatter ( unit , width , StandardPlural.OTHER_INDEX ) ; }

Target:
public java.lang.String getPluralFormatter ( android.icu.util.MeasureUnit unit , android.icu.text.MeasureFormat.FormatWidth width , int index ) { if ( index != ( android.icu.impl.StandardPlural.OTHER_INDEX ) ) { java.lang.String pattern = getFormatterOrNull ( unit , width , index ) ; if ( pattern != null ) { return pattern ; } } return getFormatter ( unit , width , StandardPlural.OTHER_INDEX ) ; }