auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.io.File getToolsFolder ( ) { if ( ( mTools ) == null ) { mTools = new java.io.File ( mSdkLocation , com.android.SdkConstants.FD_TOOLS ) ; } return mTools ; }

Target:
private java.io.File getToolsFolder ( ) { if ( ( mTools ) == null ) { mTools = new java.io.File ( mSdkLocation , com.android.SdkConstants.FD_TOOLS ) ; if ( ! ( mTools.isDirectory ( ) ) ) { throw new java.lang.IllegalStateException ( ( "Platform-tools folder missing: " + ( mTools.getAbsolutePath ( ) ) ) ) ; } } return mTools ; }
Source:
public static java.lang.String sessionEventToString ( int event ) { switch ( event ) { case android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE : return android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_READY : return android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_READY_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_PAUSE : return android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_PAUSE_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_RESUME : return android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_RESUME_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_START : return android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_START_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_STOP : return android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_STOP_STR ; default : return ( ( android.telecom.Connection.VideoProvider.SESSION_EVENT_UNKNOWN_STR ) + " " ) + event ; } }

Target:
public static java.lang.String sessionEventToString ( int event ) { switch ( event ) { case android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE : return android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_FAILURE_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_READY : return android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_READY_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_PAUSE : return android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_PAUSE_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_RESUME : return android.telecom.Connection.VideoProvider.SESSION_EVENT_RX_RESUME_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_START : return android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_START_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_STOP : return android.telecom.Connection.VideoProvider.SESSION_EVENT_TX_STOP_STR ; case android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_PERMISSION_ERROR : return android.telecom.Connection.VideoProvider.SESSION_EVENT_CAMERA_PERMISSION_ERROR_STR ; default : return ( ( android.telecom.Connection.VideoProvider.SESSION_EVENT_UNKNOWN_STR ) + " " ) + event ; } }
Source:
public void callOnDropped ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements , com.android.ide.common.api.DropFeedback feedback , com.android.ide.common.api.Point where , com.android.ide.common.api.InsertType insertType ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { mInsertType = insertType ; rule.onDropped ( targetNode , elements , feedback , where ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropped() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callDropFeedbackPaint ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "DropFeedback.painter failed: %s" , e.toString ( ) ) ; } } }
Source:
public void testRootnF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandom ( 305419896 , 32 , 1 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }

Target:
public void testRootnF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , 32 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }
Source:
public boolean setP2pPowerSave ( java.lang.String iface , boolean enabled ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setPowerSave ( iface , enabled ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( enabled ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 1" ) ) ; } else { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 0" ) ) ; } } } }

Target:
public boolean setP2pPowerSave ( java.lang.String iface , boolean enabled ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setPowerSave ( iface , enabled ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( enabled ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 1" ) ) ; } else { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 0" ) ) ; } } } }
Source:
public boolean disableNetwork ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "disableNetwork nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( "DISABLE_NETWORK " + netId ) ) ; }

Target:
public boolean setP2pGroupIdle ( java.lang.String iface , int time ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setGroupIdle ( iface , time ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " SET p2p_group_idle " ) + time ) ) ; } } }
Source:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setCallType ( 0 ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }

Target:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setNumberPresentation ( 0 ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setCallType ( 0 ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }
Source:
private android.icu.text.DecimalFormat newDecimalFormat ( android.icu.dev.test.format.NumberFormatTestTuple tuple ) { android.icu.text.DecimalFormat fmt = new android.icu.text.DecimalFormat ( ( ( tuple.pattern ) == null ? "0" : tuple.pattern ) , new android.icu.text.DecimalFormatSymbols ( ( ( tuple.locale ) == null ? android.icu.dev.test.format.NumberFormatTest.EN : tuple.locale ) ) ) ; adjustDecimalFormat ( tuple , fmt ) ; return fmt ; }

Target:
private android.icu.text.DecimalFormat newDecimalFormat ( android.icu.dev.test.format.NumberFormatTestData tuple ) { android.icu.text.DecimalFormat fmt = new android.icu.text.DecimalFormat ( ( ( tuple.pattern ) == null ? "0" : tuple.pattern ) , new android.icu.text.DecimalFormatSymbols ( ( ( tuple.locale ) == null ? android.icu.dev.test.format.NumberFormatTest.EN : tuple.locale ) ) ) ; adjustDecimalFormat ( tuple , fmt ) ; return fmt ; }
Source:
private boolean wipeThread ( java.lang.Thread t ) { t.stop ( ) ; try { t.join ( 1000 ) ; } catch ( java.lang.InterruptedException ie ) { fail ( "Should not have been interrupted" ) ; } if ( t.isAlive ( ) ) { return false ; } return true ; }

Target:
public void assertWasCalled ( java.lang.Thread thread , java.lang.Throwable ex ) { assertTrue ( called ) ; assertSame ( this . thread , thread ) ; assertSame ( this . ex , ex ) ; }
Source:
public boolean resetRoamingConfiguration ( ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "resetRoamingConfiguration " ) ; try { if ( ( mWifiVendorHal ) != null ) { com.android.server.wifi.WifiNative.RoamingConfig config = new com.android.server.wifi.WifiNative.RoamingConfig ( ) ; return mWifiVendorHal.configureRoaming ( config ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return false ; }

Target:
public boolean p2pServiceFlush ( ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceFlush ( ) ; } else { return doBooleanCommand ( "P2P_SERVICE_FLUSH" ) ; } }
Source:
synchronized void setHeapInfo ( int heapId , long maxSizeInBytes , long sizeInBytes , long bytesAllocated , long objectsAllocated ) { java.util.HashMap < java.lang.String , java.lang.Long > heapInfo = new java.util.HashMap < java.lang.String , java.lang.Long > ( ) ; heapInfo.put ( com.android.ddmlib.ClientData.HEAP_MAX_SIZE_BYTES , maxSizeInBytes ) ; heapInfo.put ( com.android.ddmlib.ClientData.HEAP_SIZE_BYTES , sizeInBytes ) ; heapInfo.put ( com.android.ddmlib.ClientData.HEAP_BYTES_ALLOCATED , bytesAllocated ) ; heapInfo.put ( com.android.ddmlib.ClientData.HEAP_OBJECTS_ALLOCATED , objectsAllocated ) ; mHeapInfoMap.put ( heapId , heapInfo ) ; }

Target:
synchronized void setHeapInfo ( int heapId , long maxSizeInBytes , long sizeInBytes , long bytesAllocated , long objectsAllocated , long timeStamp , byte reason ) { mHeapInfoMap.put ( heapId , new com.android.ddmlib.ClientData.HeapInfo ( maxSizeInBytes , sizeInBytes , bytesAllocated , objectsAllocated , timeStamp , reason ) ) ; }
Source:
public void test_getServerAliases ( ) { init ( tests.api.javax.net.ssl.X509KeyManagerTest.SERVER ) ; assertNull ( manager.getServerAliases ( null , null ) ) ; assertNull ( manager.getServerAliases ( "" , null ) ) ; java.lang.String [ ] resArray = manager.getServerAliases ( tests.api.javax.net.ssl.X509KeyManagerTest.TYPE_RSA , null ) ; assertNotNull ( resArray ) ; assertEquals ( "Incorrect length" , 1 , resArray.length ) ; assertEquals ( "Incorrect aliase" , "serverkey_00" , resArray [ 0 ] . toLowerCase ( ) ) ; }

Target:
public void test_getServerAliases ( ) { init ( org.apache.harmony.tests.javax.net.ssl.X509KeyManagerTest.SERVER ) ; assertNull ( manager.getServerAliases ( null , null ) ) ; assertNull ( manager.getServerAliases ( "" , null ) ) ; java.lang.String [ ] resArray = manager.getServerAliases ( org.apache.harmony.tests.javax.net.ssl.X509KeyManagerTest.TYPE_RSA , null ) ; assertNotNull ( resArray ) ; assertEquals ( "Incorrect length" , 1 , resArray.length ) ; assertEquals ( "Incorrect aliase" , "serverkey_00" , resArray [ 0 ] . toLowerCase ( ) ) ; }
Source:
synchronized boolean disconnect ( ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , "disconnect()" ) ; return disconnectNative ( ) ; }

Target:
synchronized boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; if ( ! ( checkDevice ( device ) ) ) { return false ; } return replyReportNative ( type , id , data ) ; }
Source:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( node == ( mTarget ) ) { mDone = true ; } java.lang.String name = node.astName ( ) . astValue ( ) ; if ( ( ( name.startsWith ( "check" ) ) || ( name.startsWith ( "enforce" ) ) ) && ( name.endsWith ( "Permission" ) ) ) { mChecksPermission = true ; mDone = true ; } return super . visitMethodInvocation ( node ) ; }

Target:
public void visitMethodCallExpression ( com.intellij.psi.PsiMethodCallExpression node ) { if ( node == ( mTarget ) ) { mDone = true ; } java.lang.String name = node.getMethodExpression ( ) . getReferenceName ( ) ; if ( ( ( name != null ) && ( ( name.startsWith ( "check" ) ) || ( name.startsWith ( "enforce" ) ) ) ) && ( name.endsWith ( "Permission" ) ) ) { mChecksPermission = true ; mDone = true ; } }
Source:
public final short getShort ( int index ) { checkIndex ( index , SizeOf.SHORT ) ; return this . block.peekShort ( ( ( offset ) + index ) , order ) ; }

Target:
public final double getDouble ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.DOUBLE ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } double result = java.lang.Double.longBitsToDouble ( this . block.peekLong ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }
Source:
public void testRegistrationConfigPermutationEqual ( ) { android.telephony.ims.internal.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.internal.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . addFeature ( ImsFeature.FEATURE_RCS ) . build ( ) ; android.telephony.ims.internal.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.internal.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_RCS ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }

Target:
public void testRegistrationConfigPermutationEqual ( ) { android.telephony.ims.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . addFeature ( ImsFeature.FEATURE_RCS ) . build ( ) ; android.telephony.ims.stub.ImsFeatureConfiguration testConfig2 = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_RCS ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . build ( ) ; junit.framework.Assert.assertEquals ( testConfig , testConfig2 ) ; }
Source:
public boolean validate ( ) { if ( ( ( homeSp ) == null ) || ( ! ( homeSp.validate ( ) ) ) ) { return false ; } if ( ( ( credential ) == null ) || ( ! ( credential.validate ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean validate ( ) { if ( ( ( homeSp ) == null ) || ( ! ( homeSp.validate ( ) ) ) ) { return false ; } if ( ( ( credential ) == null ) || ( ! ( credential.validate ( ) ) ) ) { return false ; } if ( ( ( policy ) != null ) && ( ! ( policy.validate ( ) ) ) ) { return false ; } return true ; }
Source:
private android.net.NetworkStats internalGetSummaryForNetwork ( android.net.NetworkTemplate template , long start , long end , @ com.android.server.net.NetworkStatsAccess.Level int accessLevel ) { return mXtStatsCached.getSummary ( template , start , end , accessLevel ) ; }

Target:
private android.net.NetworkStatsHistory internalGetHistoryForNetwork ( android.net.NetworkTemplate template , int flags , int fields , @ com.android.server.net.NetworkStatsAccess.Level int accessLevel , int callingUid ) { final android.telephony.SubscriptionPlan augmentPlan = resolveSubscriptionPlan ( template , flags ) ; synchronized ( mStatsLock ) { return mXtStatsCached.getHistory ( template , augmentPlan , android.net.NetworkStats.UID_ALL , android.net.NetworkStats.SET_ALL , android.net.NetworkStats.TAG_NONE , fields , java.lang.Long.MIN_VALUE , java.lang.Long.MAX_VALUE , accessLevel , callingUid ) ; } }
Source:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( com.android.build.gradle.FOLDER_TEST_REGULAR , "overlay1" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
public java.lang.String toString ( ) { return mName ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "State <mDefaultState=" ) ; sb.append ( mDefaultState ) ; sb.append ( ", mName=" ) ; sb.append ( mName ) ; sb.append ( ", mDescription=" ) ; sb.append ( mDescription ) ; sb.append ( ", mOrientation=" ) ; sb.append ( mOrientation ) ; sb.append ( ", mKeyState=" ) ; sb.append ( mKeyState ) ; sb.append ( ", mNavState=" ) ; sb.append ( mNavState ) ; sb.append ( ", mHardwareOverride=" ) ; sb.append ( mHardwareOverride ) ; sb.append ( ">" ) ; return sb.toString ( ) ; }
Source:
public java.lang.String getLongDescription ( ) { java.lang.String s = java.lang.String.format ( "%1$s, Android API %2$s, revision %3$s%4$s\nBy %5$s" , getDisplayName ( ) , mVersion.getApiString ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) , getDisplayVendor ( ) ) ; java.lang.String d = getDescription ( ) ; if ( ( d != null ) && ( ( d.length ( ) ) > 0 ) ) { s += '\n' + d ; } s += java.lang.String.format ( "\nRequires SDK Platform Android API %1$s" , mVersion.getApiString ( ) ) ; return s ; }

Target:
public java.lang.String getLongDescription ( ) { java.lang.String s = java.lang.String.format ( "%1$s, Android API %2$s, revision %3$s%4$s\nBy %5$s" , getDisplayName ( ) , mVersion.getApiString ( ) , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) , getDisplayVendor ( ) ) ; java.lang.String d = getDescription ( ) ; if ( ( d != null ) && ( ! ( d.isEmpty ( ) ) ) ) { s += '\n' + d ; } s += java.lang.String.format ( "\nRequires SDK Platform Android API %1$s" , mVersion.getApiString ( ) ) ; return s ; }
Source:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , java.lang.String vendor , java.lang.String name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = com.android.sdklib.repository.descriptors.PkgDesc.newAddon ( version , revision , vendor , name ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , java.lang.String vendor , java.lang.String name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newAddon ( version , revision , vendor , name ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public boolean isEndpointClass ( com.google.gct.intellij.endpoints.validation.PsiElement psiElement ) { com.google.gct.intellij.endpoints.validation.PsiClass psiClass = com.google.gct.intellij.endpoints.util.PsiUtils.findClass ( psiElement ) ; if ( psiClass == null ) { return false ; } if ( ( ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API , true ) ) || ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API_CLASS , true ) ) ) || ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API_REFERENCE , true ) ) ) { return true ; } else { return false ; } }

Target:
public boolean isEndpointClass ( com.intellij.psi.PsiElement psiElement ) { com.intellij.psi.PsiClass psiClass = com.google.gct.intellij.endpoints.util.PsiUtils.findClass ( psiElement ) ; if ( psiClass == null ) { return false ; } if ( ( ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API , true ) ) || ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API_CLASS , true ) ) ) || ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( psiClass , GctConstants.APP_ENGINE_ANNOTATION_API_REFERENCE , true ) ) ) { return true ; } else { return false ; } }
Source:
protected void performDefaults ( ) { super . performDefaults ( ) ; mWhichPerspective.setEnabled ( mSwitchPerspective.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; mMaxMessages.setStringValue ( java.lang.Integer.toString ( LogCatMessageList.MAX_MESSAGES_DEFAULT ) ) ; }

Target:
protected void performDefaults ( ) { super . performDefaults ( ) ; mWhichPerspective.setEnabled ( mSwitchPerspective.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; mMaxMessages.setStringValue ( java.lang.Integer.toString ( LogCatMessageList.MAX_MESSAGES_DEFAULT ) ) ; mAutoMonitorLogcatLevel.setEnabled ( mAutoMonitorLogcat.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierIdentifierTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) . addProvider ( CarrierIdentification.AUTHORITY , new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdContentProvider ( ) ) ; mCarrierIdentifierHandler = new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdentifierHandler ( getClass ( ) . getSimpleName ( ) ) ; mCarrierIdentifierHandler.start ( ) ; waitUntilReady ( ) ; logd ( "CarrierIdentifierTest -Setup!" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { logd ( "CarrierIdentifierTest +Setup!" ) ; super . setUp ( getClass ( ) . getSimpleName ( ) ) ; ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) . addProvider ( CarrierId.AUTHORITY , new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdContentProvider ( ) ) ; mCarrierIdentifierHandler = new com.android.internal.telephony.CarrierIdentifierTest.CarrierIdentifierHandler ( getClass ( ) . getSimpleName ( ) ) ; mCarrierIdentifierHandler.start ( ) ; waitUntilReady ( ) ; logd ( "CarrierIdentifierTest -Setup!" ) ; }
Source:
protected void restartDataStallAlarm ( ) { if ( ( isConnected ( ) ) == false ) return ; int nextAction = getRecoveryAction ( ) ; if ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.RecoveryAction.isAggressiveRecovery ( nextAction ) ) { if ( DBG ) log ( "data stall recovery action is pending. not resetting the alarm." ) ; return ; } stopDataStallAlarm ( ) ; startDataStallAlarm ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.DATA_STALL_NOT_SUSPECTED ) ; }

Target:
protected void onVoiceCallStarted ( ) { if ( DBG ) log ( "onVoiceCallStarted" ) ; if ( ( isConnected ( ) ) && ( ! ( mPhone.getServiceStateTracker ( ) . isConcurrentVoiceAndDataAllowed ( ) ) ) ) { if ( DBG ) log ( "onVoiceCallStarted stop polling" ) ; stopNetStatPoll ( ) ; stopDataStallAlarm ( ) ; notifyDataConnection ( Phone.REASON_VOICE_CALL_STARTED ) ; } }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput.d.T_aput_1 t = new dot.junit.opcodes.aput.d.T_aput_1 ( ) ; int [ ] arr = new int [ 2 ] ; try { t.run ( arr , 2 , 100000000 ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput.d.T_aput_1" , java.lang.NullPointerException.class , null , 2 , 100000000 ) ; }
Source:
public void testAdd1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testAdd1_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.add ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public static com.google.gct.testing.dimension.LanguageDimension.Language getLanguage ( final java.lang.String locale ) { return com.google.common.collect.Iterables.find ( com.google.gct.testing.dimension.LanguageDimension.getFullDomain ( ) , new com.google.common.base.Predicate < com.google.gct.testing.dimension.LanguageDimension.Language > ( ) { @ java.lang.Override public boolean apply ( com.google.gct.testing.dimension.LanguageDimension.Language input ) { return input.getId ( ) . equals ( locale ) ; } } ) ; }

Target:
public static com.google.gct.testing.dimension.LanguageDimension.Language getLanguage ( final java.lang.String locale ) { try { return com.google.common.collect.Iterables.find ( com.google.gct.testing.dimension.LanguageDimension.getFullDomain ( ) , new com.google.common.base.Predicate < com.google.gct.testing.dimension.LanguageDimension.Language > ( ) { @ java.lang.Override public boolean apply ( com.google.gct.testing.dimension.LanguageDimension.Language input ) { return input.getId ( ) . equals ( locale ) ; } } ) ; } catch ( java.util.NoSuchElementException e ) { return null ; } }
Source:
public void testResetIllegalState ( ) throws java.nio.charset.CharacterCodingException { tests.api.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) , java.nio.CharBuffer.allocate ( 3 ) , false ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) , java.nio.CharBuffer.allocate ( 3 ) , true ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; }

Target:
public void testResetIllegalState ( ) throws java.nio.charset.CharacterCodingException { org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) , java.nio.CharBuffer.allocate ( 3 ) , false ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.decode ( getByteBuffer ( ) , java.nio.CharBuffer.allocate ( 3 ) , true ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; }
Source:
public static < E extends java.lang.Comparable > java.util.TreeSet < E > newTreeSet ( java.lang.Iterable < ? extends E > elements ) { java.util.TreeSet < E > set = com.google.common.collect.Sets.newTreeSet ( ) ; for ( E element : elements ) { set.add ( element ) ; } return set ; }

Target:
public static < E extends java.lang.Comparable > java.util.TreeSet < E > newTreeSet ( java.lang.Iterable < ? extends E > elements ) { java.util.TreeSet < E > set = com.google.common.collect.Sets.newTreeSet ( ) ; com.google.common.collect.Iterables.addAll ( set , elements ) ; return set ; }
Source:
private void emitLocalRestart ( com.android.dx.dex.code.LocalList.Entry entry ) throws java.io.IOException { int mark = output.getCursor ( ) ; output.writeByte ( com.android.dx.dex.file.DBG_RESTART_LOCAL ) ; emitUnsignedLeb128 ( entry.getRegister ( ) ) ; if ( ( ( annotateTo ) != null ) || ( ( debugPrint ) != null ) ) { annotate ( ( ( output.getCursor ( ) ) - mark ) , java.lang.String.format ( "%04x: +local restart %s" , address , entryAnnotationString ( entry ) ) ) ; } if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { java.lang.System.err.println ( "emit local restart" ) ; } }

Target:
private void emitLocalRestart ( com.android.dx.dex.code.LocalList.Entry entry ) throws java.io.IOException { int mark = output.getCursor ( ) ; output.writeByte ( com.android.dx.dex.file.DebugInfoConstants.DBG_RESTART_LOCAL ) ; emitUnsignedLeb128 ( entry.getRegister ( ) ) ; if ( ( ( annotateTo ) != null ) || ( ( debugPrint ) != null ) ) { annotate ( ( ( output.getCursor ( ) ) - mark ) , java.lang.String.format ( "%04x: +local restart %s" , address , entryAnnotationString ( entry ) ) ) ; } if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { java.lang.System.err.println ( "emit local restart" ) ; } }
Source:
public java.lang.String getViewFooter ( android.content.Context context ) { java.lang.Long date = getDate ( ) ; return date == null ? null : com.android.contacts.interactions.ContactInteractionUtil.formatDateStringFromTimestamp ( date , context ) ; }

Target:
public java.lang.String getViewFooter ( android.content.Context context ) { final java.lang.Long date = getDate ( ) ; if ( date != null ) { final java.lang.StringBuilder callDetail = new java.lang.StringBuilder ( ) ; callDetail.append ( com.android.contacts.interactions.ContactInteractionUtil.formatDateStringFromTimestamp ( date , context ) ) ; final java.lang.Long duration = getDuration ( ) ; if ( duration != null ) { callDetail.append ( "\n" ) ; callDetail.append ( com.android.contacts.interactions.ContactInteractionUtil.formatDuration ( duration , context ) ) ; } return callDetail.toString ( ) ; } return null ; }
Source:
public void validateCertCredentialWithMismatchFingerprint ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = new byte [ 32 ] ; java.util.Arrays.fill ( cred.certCredential.certSha256FingerPrint , ( ( byte ) ( 0 ) ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; cred.clientPrivateKey = android.net.wifi.FakeKeys.RSA_KEY1 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateUserCredentialWithEapTls ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithUserCredential ( ) ; cred.getUserCredential ( ) . setEapType ( EAPConstants.EAP_TLS ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
public static int waitpid ( int pid , android.system.WaitpidStatus status , int options ) throws android.system.ErrnoException { if ( status == null ) { return Libcore.os.waitpid ( pid , null , options ) ; } else { android.util.MutableInt internalStatus = new android.util.MutableInt ( status.value ) ; try { return Libcore.os.waitpid ( pid , internalStatus , options ) ; } finally { status.value = internalStatus.value ; } } }

Target:
public static int waitpid ( int pid , android.system.Int32Ref status , int options ) throws android.system.ErrnoException { return Libcore.os.waitpid ( pid , status , options ) ; }
Source:
public void createAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo , int targetSdkVersion ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createAppData ( uuid , packageName , userId , flags , appId , seInfo , targetSdkVersion ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void createAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo , int targetSdkVersion ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createAppData ( uuid , packageName , userId , flags , appId , seInfo , targetSdkVersion ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1 t = new dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1 ( ) ; boolean [ ] arr = new boolean [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE3 ( ) { loadAndRun ( "dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1" , java.lang.ArrayIndexOutOfBoundsException.class , new boolean [ 2 ] , ( - 1 ) ) ; }
Source:
private void runStartService ( ) throws java.lang.Exception { android.content.Intent intent = makeIntent ( ) ; if ( intent != null ) { java.lang.System.out.println ( ( "Starting: " + intent ) ) ; try { mAm.startService ( null , intent , intent.getType ( ) ) ; } catch ( java.lang.Exception e ) { java.lang.System.err.println ( ( "Error: " + e ) ) ; } } }

Target:
private void runStartService ( ) throws java.lang.Exception { android.content.Intent intent = makeIntent ( ) ; java.lang.System.out.println ( ( "Starting service: " + intent ) ) ; android.content.ComponentName cn = mAm.startService ( null , intent , intent.getType ( ) ) ; if ( cn == null ) { java.lang.System.err.println ( "Error: Not found; no service started." ) ; } }
Source:
public int match ( com.android.server.wifi.hotspot2.pps.Credential credential ) { if ( mRealmData.isEmpty ( ) ) return com.android.server.wifi.hotspot2.AuthMatch.Indeterminate ; java.util.List < java.lang.String > credLabels = com.android.server.wifi.hotspot2.Utils.splitDomain ( credential.getRealm ( ) ) ; int best = com.android.server.wifi.hotspot2.AuthMatch.None ; for ( com.android.server.wifi.anqp.NAIRealmData realmData : mRealmData ) { int match = realmData.match ( credLabels , credential ) ; if ( match > best ) { best = match ; if ( best == ( com.android.server.wifi.hotspot2.AuthMatch.Exact ) ) { return best ; } } } return best ; }

Target:
public int match ( java.lang.String realm , com.android.server.wifi.anqp.eap.EAPMethod credMethod ) { if ( mRealmData.isEmpty ( ) ) return com.android.server.wifi.hotspot2.AuthMatch.Indeterminate ; java.util.List < java.lang.String > credLabels = com.android.server.wifi.hotspot2.Utils.splitDomain ( realm ) ; int best = com.android.server.wifi.hotspot2.AuthMatch.None ; for ( com.android.server.wifi.anqp.NAIRealmData realmData : mRealmData ) { int match = realmData.match ( credLabels , credMethod ) ; if ( match > best ) { best = match ; if ( best == ( com.android.server.wifi.hotspot2.AuthMatch.Exact ) ) { return best ; } } } return best ; }
Source:
protected void removeFile ( com.android.resources.ResourceType type , com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile file ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > list = mResourceMap.get ( type ) ; for ( int i = 0 ; i < ( list.size ( ) ) ; i ++ ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem item = list.get ( i ) ; item.removeFile ( file ) ; } }

Target:
protected void removeFile ( com.android.resources.ResourceType type , com.android.ide.common.resources.ResourceFile file ) { java.util.List < com.android.ide.common.resources.ResourceItem > list = mResourceMap.get ( type ) ; for ( int i = 0 ; i < ( list.size ( ) ) ; i ++ ) { com.android.ide.common.resources.ResourceItem item = list.get ( i ) ; item.removeFile ( file ) ; } }
Source:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getErrorStream ( ) ) ; java.io.BufferedReader errReader = new java.io.BufferedReader ( is ) ; try { while ( true ) { java.lang.String line = errReader.readLine ( ) ; if ( line != null ) { monitor.setResult ( "%1$s" , line ) ; } else { break ; } } } catch ( java.io.IOException e ) { } }

Target:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getErrorStream ( ) ) ; java.io.BufferedReader errReader = new java.io.BufferedReader ( is ) ; try { while ( true ) { java.lang.String line = errReader.readLine ( ) ; if ( line != null ) { monitor.logError ( "%1$s" , line ) ; } else { break ; } } } catch ( java.io.IOException e ) { } }
Source:
public void testCompile021 ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test021.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; { input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; } checkCompiledCode ( packageName , input ) ; }

Target:
public void testCompile022a ( ) throws java.lang.Exception { java.lang.String packageName = "com.android.jack.switchstatement.test022.jack" ; java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input = com.google.common.collect.Maps.newHashMap ( ) ; input.put ( "Switch1" , new com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo ( true ) . specifyInfo ( "java-lang-Thread$State" , true ) ) ; compileCode ( packageName , input ) ; }
Source:
private static java.lang.ClassLoader createClassLoader ( com.google.devtools.build.android.desugar.CoreLibraryRewriter rewriter , java.util.List < java.nio.file.Path > bootclasspath , java.nio.file.Path inputJar , java.util.List < java.nio.file.Path > classpath , java.lang.ClassLoader parent ) throws java.io.IOException { classpath = com.google.common.collect.ImmutableList.< java.nio.file.Path > builder ( ) . add ( inputJar ) . addAll ( classpath ) . build ( ) ; if ( ! ( bootclasspath.isEmpty ( ) ) ) { parent = com.google.devtools.build.android.desugar.HeaderClassLoader.fromClassPath ( bootclasspath , rewriter , parent ) ; } return com.google.devtools.build.android.desugar.HeaderClassLoader.fromClassPath ( classpath , rewriter , parent ) ; }

Target:
private static java.lang.ClassLoader createClassLoader ( com.google.devtools.build.android.desugar.CoreLibraryRewriter rewriter , java.util.List < java.nio.file.Path > bootclasspath , com.google.devtools.build.android.desugar.IndexedJars appAndClasspathIndexedJars , java.lang.ClassLoader parent ) throws java.io.IOException { if ( ! ( bootclasspath.isEmpty ( ) ) ) { parent = new com.google.devtools.build.android.desugar.HeaderClassLoader ( new com.google.devtools.build.android.desugar.IndexedJars ( bootclasspath ) , rewriter , parent ) ; } return new com.google.devtools.build.android.desugar.HeaderClassLoader ( appAndClasspathIndexedJars , rewriter , parent ) ; }
Source:
public void run ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.progress.ProgressIndicator indicator ) { java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > contents = org.jetbrains.plugins.github.GithubCreateGistAction.collectContents ( project , editor , file , files ) ; java.lang.String gistUrl = org.jetbrains.plugins.github.GithubCreateGistAction.createGist ( project , auth , contents , dialog.isPrivate ( ) , dialog.getDescription ( ) , dialog.getFileName ( ) ) ; url.set ( gistUrl ) ; }

Target:
public void run ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.progress.ProgressIndicator indicator ) { java.util.List < org.jetbrains.plugins.github.api.GithubGist.FileContent > contents = org.jetbrains.plugins.github.GithubCreateGistAction.collectContents ( project , editor , file , files ) ; java.lang.String gistUrl = org.jetbrains.plugins.github.GithubCreateGistAction.createGist ( project , finalAuth , contents , dialog.isPrivate ( ) , dialog.getDescription ( ) , dialog.getFileName ( ) ) ; url.set ( gistUrl ) ; }
Source:
protected void needNetworkFor ( android.net.NetworkRequest networkRequest , int score ) { if ( DBG ) log ( ( "Cellular needs Network for " + networkRequest ) ) ; com.android.internal.telephony.dataconnection.ApnContext apnContext = apnContextForNetworkRequest ( networkRequest ) ; if ( apnContext != null ) apnContext.incRefCount ( ) ; }

Target:
public boolean isApnSupported ( java.lang.String name ) { if ( name == null ) { loge ( "isApnSupported: name=null" ) ; return false ; } com.android.internal.telephony.dataconnection.ApnContext apnContext = mApnContexts.get ( name ) ; if ( apnContext == null ) { loge ( ( "Request for unsupported mobile name: " + name ) ) ; return false ; } return true ; }
Source:
public void test_getReuseAddress ( ) throws java.lang.Exception { java.net.ServerSocket theSocket = new java.net.ServerSocket ( ) ; theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be False" , theSocket.getReuseAddress ( ) ) ; }

Target:
public void test_getReuseAddress ( ) throws java.lang.Exception { try ( java.net.ServerSocket theSocket = new java.net.ServerSocket ( ) ) { theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be false" , theSocket.getReuseAddress ( ) ) ; } }
Source:
protected int getMinSdk ( com.android.tools.lint.detector.api.Context context ) { if ( ( mMinApi ) == ( - 1 ) ) { mMinApi = context.getMainProject ( ) . getMinSdk ( ) ; } return mMinApi ; }

Target:
protected int getMinSdk ( com.android.tools.lint.detector.api.Context context ) { if ( ( mMinApi ) == ( - 1 ) ) { com.android.sdklib.AndroidVersion minSdkVersion = context.getMainProject ( ) . getMinSdkVersion ( ) ; mMinApi = minSdkVersion.getApiLevel ( ) ; if ( minSdkVersion.isPreview ( ) ) { ( mMinApi ) ++ ; } } return mMinApi ; }
Source:
public void reset ( boolean animate ) { if ( mTransformationAnimator.isRunning ( ) ) { mTransformationAnimator.cancel ( ) ; } mCurrentMagnificationSpec.clear ( ) ; if ( animate ) { animateMangificationSpec ( mSentMagnificationSpec , mCurrentMagnificationSpec ) ; } else { setMagnificationSpec ( mCurrentMagnificationSpec ) ; } android.graphics.Rect bounds = mTempRect ; bounds.setEmpty ( ) ; mAms.onMagnificationStateChanged ( ) ; }

Target:
public void reset ( boolean animate ) { cancelAnimation ( ) ; mCurrentMagnificationSpec.clear ( ) ; if ( animate ) { animateMangificationSpec ( mSentMagnificationSpec , mCurrentMagnificationSpec ) ; } else { setMagnificationSpec ( mCurrentMagnificationSpec ) ; } android.graphics.Rect bounds = mTempRect ; bounds.setEmpty ( ) ; mAms.onMagnificationStateChanged ( ) ; }
Source:
private void doAddFile ( java.io.File file , java.lang.String archivePath ) throws com.android.sdklib.build.ApkBuilder.DuplicateFileException , java.io.IOException { verbosePrintln ( "%1$s => %2$s" , file , archivePath ) ; java.io.File duplicate = checkFileForDuplicate ( archivePath ) ; if ( duplicate != null ) { throw new com.android.sdklib.build.ApkBuilder.DuplicateFileException ( archivePath , duplicate , file ) ; } mAddedFiles.put ( archivePath , file ) ; mBuilder.writeFile ( file , archivePath ) ; }

Target:
private void doAddFile ( java.io.File file , java.lang.String archivePath ) throws com.android.sdklib.build.DuplicateFileException , java.io.IOException { verbosePrintln ( "%1$s => %2$s" , file , archivePath ) ; java.io.File duplicate = checkFileForDuplicate ( archivePath ) ; if ( duplicate != null ) { throw new com.android.sdklib.build.DuplicateFileException ( archivePath , duplicate , file ) ; } mAddedFiles.put ( archivePath , file ) ; mBuilder.writeFile ( file , archivePath ) ; }
Source:
public void canBeTethered ( ) throws java.lang.Exception { initStateMachine ( ConnectivityManager.TETHERING_BLUETOOTH ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mTetherHelper , mNMService ) ; inOrder.verify ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }

Target:
public void canBeTethered ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED ) ; org.mockito.InOrder inOrder = org.mockito.Mockito.inOrder ( mTetherHelper , mNMService ) ; inOrder.verify ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; inOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }
Source:
protected android.support.v8.renderscript.Script.FieldID createFieldID ( int slot , android.support.v8.renderscript.Element e ) { android.support.v8.renderscript.Script.FieldID f = mFIDs.get ( slot ) ; if ( f != null ) { return f ; } long id = mRS.nScriptFieldIDCreate ( getID ( mRS ) , slot ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create FieldID" ) ; } f = new android.support.v8.renderscript.Script.FieldID ( id , mRS , this , slot ) ; mFIDs.put ( slot , f ) ; return f ; }

Target:
protected android.support.v8.renderscript.Script.FieldID createFieldID ( int slot , android.support.v8.renderscript.Element e ) { android.support.v8.renderscript.Script.FieldID f = mFIDs.get ( slot ) ; if ( f != null ) { return f ; } long id = mRS.nScriptFieldIDCreate ( getID ( mRS ) , slot , mUseIncSupp ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create FieldID" ) ; } f = new android.support.v8.renderscript.Script.FieldID ( id , mRS , this , slot ) ; mFIDs.put ( slot , f ) ; return f ; }