auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final void testRectIntIntIntInt ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 1 , 2 , 3 , 4 ) ; assertEquals ( 1 , r.x ) ; assertEquals ( 2 , r.y ) ; assertEquals ( 3 , r.w ) ; assertEquals ( 4 , r.h ) ; }

Target:
public final void testRectIntIntIntInt ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 1 , 2 , 3 , 4 ) ; assertEquals ( 1 , r.x ) ; assertEquals ( 2 , r.y ) ; assertEquals ( 3 , r.w ) ; assertEquals ( 4 , r.h ) ; }
Source:
public void removeNotificationFromList ( int seqNumber , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . removeNotificationFromList ( mContext.getOpPackageName ( ) , seqNumber , new com.android.internal.telephony.euicc.IRemoveNotificationFromListCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling removeNotificationFromList" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void removeNotificationFromList ( java.lang.String cardId , int seqNumber , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . removeNotificationFromList ( mContext.getOpPackageName ( ) , cardId , seqNumber , new com.android.internal.telephony.euicc.IRemoveNotificationFromListCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling removeNotificationFromList" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean hasNonParentActiveOrBackgroundCall ( ) { for ( com.android.incallui.call.DialerCall call : callById.values ( ) ) { if ( ( ( ( ( call.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.ACTIVE ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.ONHOLD ) ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.DialerCall.State.CONFERENCED ) ) ) && ( ! ( call.wasParentCall ( ) ) ) ) { return true ; } } return false ; }

Target:
public boolean hasNonParentActiveOrBackgroundCall ( ) { for ( com.android.incallui.call.DialerCall call : callById.values ( ) ) { if ( ( ( ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.ACTIVE ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.ONHOLD ) ) ) || ( ( call.getState ( ) ) == ( com.android.incallui.call.state.DialerCallState.CONFERENCED ) ) ) && ( ! ( call.wasParentCall ( ) ) ) ) { return true ; } } return false ; }
Source:
void start ( ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "BluetoothScanManager" ) ; thread.start ( ) ; mHandler = new com.android.bluetooth.gatt.ScanManager.ClientHandler ( thread.getLooper ( ) ) ; }

Target:
void start ( ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "BluetoothScanManager" ) ; thread.start ( ) ; mHandler = new com.android.bluetooth.gatt.ScanManager.ClientHandler ( thread.getLooper ( ) ) ; if ( ( mDm ) != null ) { mDm.registerDisplayListener ( mDisplayListener , null ) ; } if ( ( mActivityManager ) != null ) { mActivityManager.addOnUidImportanceListener ( mUidImportanceListener , com.android.bluetooth.gatt.ScanManager.FOREGROUND_IMPORTANCE_CUTOFF ) ; } }
Source:
public java.io.File findResource ( @ com.android.annotations.NonNull java.lang.String relativePath ) { java.io.File dir = getLintBinDir ( ) ; if ( dir == null ) { throw new java.lang.IllegalArgumentException ( ( ( "Lint must be invoked with the System property " + ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ) + " pointing to the ANDROID_SDK tools directory" ) ) ; } java.io.File top = dir.getParentFile ( ) ; java.io.File file = new java.io.File ( top , relativePath ) ; if ( file.exists ( ) ) { return file ; } else { return null ; } }

Target:
public java.io.File findResource ( @ com.android.annotations.NonNull java.lang.String relativePath ) { java.io.File dir = com.android.tools.lint.client.api.LintClient.getLintBinDir ( ) ; if ( dir == null ) { throw new java.lang.IllegalArgumentException ( ( ( "Lint must be invoked with the System property " + ( com.android.tools.lint.client.api.LintClient.PROP_BIN_DIR ) ) + " pointing to the ANDROID_SDK tools directory" ) ) ; } java.io.File top = dir.getParentFile ( ) ; java.io.File file = new java.io.File ( top , relativePath ) ; if ( file.exists ( ) ) { return file ; } else { return null ; } }
Source:
private void doLog ( java.util.logging.LogRecord lr ) { lr.setLoggerName ( name ) ; java.lang.String ebname = getEffectiveResourceBundleName ( ) ; if ( ( ebname != null ) && ( ! ( ebname.equals ( java.util.logging.Logger.SYSTEM_LOGGER_RB_NAME ) ) ) ) { lr.setResourceBundleName ( ebname ) ; lr.setResourceBundle ( findResourceBundle ( ebname , true ) ) ; } log ( lr ) ; }

Target:
private void doLog ( java.util.logging.LogRecord lr ) { lr.setLoggerName ( name ) ; final java.util.logging.Logger.LoggerBundle lb = getEffectiveLoggerBundle ( ) ; final java.util.ResourceBundle bundle = lb.userBundle ; final java.lang.String ebname = lb.resourceBundleName ; if ( ( ebname != null ) && ( bundle != null ) ) { lr.setResourceBundleName ( ebname ) ; lr.setResourceBundle ( bundle ) ; } log ( lr ) ; }
Source:
public android.hardware.cts.helpers.TestSensorEvent [ ] collectEvents ( int eventCount ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return null ; } try { registerListener ( ) ; return getEvents ( eventCount ) ; } finally { unregisterListener ( ) ; } }

Target:
public void runSensor ( android.hardware.cts.helpers.TestSensorEventListener listener , int eventCount ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } try { registerListener ( listener ) ; waitForEvents ( eventCount ) ; } finally { unregisterListener ( ) ; } }
Source:
private synchronized void addMediaPlayerController ( com.android.bluetooth.avrcp.MediaController controller ) { java.lang.String packageName = controller.getPackageName ( ) ; com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( com.android.bluetooth.avrcp.MediaController.wrap ( controller ) , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getPlayStateBytes ( controller.getPlaybackState ( ) ) , getFeatureBitMask ( packageName ) , controller.getPackageName ( ) , getAppLabel ( packageName ) ) ; addMediaPlayerInfo ( info ) ; }

Target:
private synchronized boolean addMediaPlayerPackage ( java.lang.String packageName ) { com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( null , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getPlayStateBytes ( null ) , getFeatureBitMask ( packageName ) , packageName , getAppLabel ( packageName ) ) ; return addMediaPlayerInfo ( info ) ; }
Source:
public java.util.Collection < com.android.tools.perflib.heap.Instance > getInstances ( ) { return mInstances.values ( ) ; }

Target:
public java.util.Collection < com.android.tools.perflib.heap.Instance > getInstances ( ) { final java.util.ArrayList < com.android.tools.perflib.heap.Instance > result = new java.util.ArrayList < com.android.tools.perflib.heap.Instance > ( mInstances.size ( ) ) ; mInstances.forEachValue ( new gnu.trove.TObjectProcedure < com.android.tools.perflib.heap.Instance > ( ) { @ java.lang.Override public boolean execute ( com.android.tools.perflib.heap.Instance instance ) { result.add ( instance ) ; return true ; } } ) ; return result ; }
Source:
public void testAllocSpiSpiUnavaiableExeption ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.SPI_UNAVAILABLE , 0 , 0 ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; try { mIpSecManager.allocateSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.fail ( "ResourceUnavailableException was not thrown" ) ; } catch ( android.net.IpSecManager e ) { } }

Target:
public void testAllocSpiSpiUnavailableException ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.SPI_UNAVAILABLE , 0 , 0 ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; try { mIpSecManager.allocateSecurityParameterIndex ( android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.fail ( "ResourceUnavailableException was not thrown" ) ; } catch ( android.net.IpSecManager e ) { } }
Source:
public boolean equals ( @ javax.annotation.Nonnull java.lang.String otherName , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType otherType , @ javax.annotation.Nonnull com.android.jack.ir.ast.FieldKind otherKind ) { if ( ( ( this . kind ) != otherKind ) || ( ! ( this . name.equals ( otherName ) ) ) ) { return false ; } return type.equals ( otherType ) ; }

Target:
public boolean equals ( @ javax.annotation.Nonnull java.lang.String otherName , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType otherType , @ javax.annotation.Nonnull com.android.jack.ir.ast.FieldKind otherKind ) { if ( ( ( this . kind ) != otherKind ) || ( ! ( this . name.equals ( otherName ) ) ) ) { return false ; } return type.isSameType ( otherType ) ; }
Source:
public boolean getUseJack ( ) { java.lang.Boolean value = getBuildType ( ) . getUseJack ( ) ; if ( value != null ) { return value ; } for ( com.android.build.gradle.internal.dsl.ProductFlavor productFlavor : getProductFlavors ( ) ) { value = productFlavor.getUseJack ( ) ; if ( value != null ) { return value ; } } value = getDefaultConfig ( ) . getUseJack ( ) ; if ( value != null ) { return value ; } return false ; }

Target:
public boolean getUseJack ( ) { java.lang.Boolean value = getBuildType ( ) . getUseJack ( ) ; if ( value != null ) { return value ; } for ( com.android.build.gradle.internal.dsl.CoreProductFlavor productFlavor : getProductFlavors ( ) ) { value = productFlavor.getUseJack ( ) ; if ( value != null ) { return value ; } } value = getDefaultConfig ( ) . getUseJack ( ) ; if ( value != null ) { return value ; } return false ; }
Source:
void updateMenuActions ( boolean hasSelection ) { mCutAction.setEnabled ( hasSelection ) ; mCopyAction.setEnabled ( hasSelection ) ; mDeleteAction.setEnabled ( hasSelection ) ; mSelectAllAction.setEnabled ( hasSelection ) ; boolean hasSxt = mClipboardSupport.hasSxtOnClipboard ( ) ; mPasteAction.setEnabled ( hasSxt ) ; }

Target:
void updateMenuActionState ( boolean hasSelection ) { mCutAction.setEnabled ( hasSelection ) ; mCopyAction.setEnabled ( hasSelection ) ; mDeleteAction.setEnabled ( hasSelection ) ; mSelectAllAction.setEnabled ( hasSelection ) ; boolean hasSxt = mClipboardSupport.hasSxtOnClipboard ( ) ; mPasteAction.setEnabled ( hasSxt ) ; }
Source:
private void verifyNoAudioStateIntent ( int timeoutMs ) { android.content.Intent intent = waitForNoIntent ( timeoutMs , mAudioStateChangedQueue ) ; org.junit.Assert.assertNull ( intent ) ; }

Target:
private void verifyAudioStateIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , int newState , int prevState ) { android.content.Intent intent = com.android.bluetooth.TestUtils.waitForIntent ( timeoutMs , mAudioStateChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_PLAYING_STATE_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( newState , intent.getIntExtra ( BluetoothProfile.EXTRA_STATE , ( - 1 ) ) ) ; org.junit.Assert.assertEquals ( prevState , intent.getIntExtra ( BluetoothProfile.EXTRA_PREVIOUS_STATE , ( - 1 ) ) ) ; }
Source:
public boolean equals ( com.google.doclava.ClassInfo that ) { if ( that != null ) { return this . qualifiedName ( ) . equals ( that.qualifiedName ( ) ) ; } else { return false ; } }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } else if ( o instanceof com.google.doclava.ClassInfo ) { final com.google.doclava.ClassInfo c = ( ( com.google.doclava.ClassInfo ) ( o ) ) ; return mQualifiedName.equals ( c.mQualifiedName ) ; } else { return false ; } }
Source:
public void testRelease ( ) { com.android.builder.BuildType type = new com.android.builder.BuildType ( "release" ) ; assertFalse ( type.isDebuggable ( ) ) ; assertFalse ( type.isDebugJniBuild ( ) ) ; assertFalse ( type.isDebugSigned ( ) ) ; }

Target:
public void testDebug ( ) { com.android.builder.BuildType type = new com.android.builder.BuildType ( "debug" ) ; assertTrue ( type.isDebuggable ( ) ) ; assertTrue ( type.isDebugJniBuild ( ) ) ; assertNotNull ( type.getKeystore ( ) ) ; assertTrue ( type.getKeystore ( ) . isSigningReady ( ) ) ; }
Source:
public void registerJavaGeneratingTask ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.io.File ... generatedSourceFolders ) { if ( ( extraGeneratedSourceFolders ) == null ) { extraGeneratedSourceFolders = com.google.common.collect.Lists.newArrayList ( ) ; } javaCompileTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { javaCompileTask.source ( f ) ; } addJavaSourceFoldersToModel ( generatedSourceFolders ) ; }

Target:
public void registerJavaGeneratingTask ( @ com.android.annotations.NonNull org.gradle.api.Task task , @ com.android.annotations.NonNull java.io.File ... generatedSourceFolders ) { sourceGenTask.dependsOn ( task ) ; for ( java.io.File f : generatedSourceFolders ) { javaCompileTask.source ( f ) ; } addJavaSourceFoldersToModel ( generatedSourceFolders ) ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi/icon" , "drawable/icon2" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "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" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "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" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }
Source:
public void separateConnection ( int gsmIndex , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEPARATE_CONNECTION , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + gsmIndex ) ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( gsmIndex ) ; send ( rr ) ; }

Target:
public void setPreferredVoicePrivacy ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; send ( rr ) ; }
Source:
public void loadAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField loading ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; com.android.jack.jayce.v0002.io.ExportSession exportSession = new com.android.jack.jayce.v0002.io.ExportSession ( session.getPhantomLookup ( ) , session , com.android.jack.jayce.NodeLevel.STRUCTURE ) ; for ( com.android.jack.jayce.v0002.nodes.NAnnotation annotation : annotations ) { com.android.jack.ir.ast.JAnnotation annote = annotation.exportAsJast ( exportSession ) ; loading.addAnnotation ( annote ) ; annote.updateParents ( loading ) ; } }

Target:
public void loadAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField loading ) { if ( ! ( annotations.isEmpty ( ) ) ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; com.android.jack.jayce.v0002.io.ExportSession exportSession = new com.android.jack.jayce.v0002.io.ExportSession ( session.getPhantomLookup ( ) , session , com.android.jack.jayce.NodeLevel.STRUCTURE ) ; for ( com.android.jack.jayce.v0002.nodes.NAnnotation annotation : annotations ) { com.android.jack.ir.ast.JAnnotation annote = annotation.exportAsJast ( exportSession ) ; loading.addAnnotation ( annote ) ; annote.updateParents ( loading ) ; } } }
Source:
public com.android.builder.model.AndroidProject getSingleModel ( ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > getAllModels ( boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }
Source:
public void clearCache ( ) { if ( ( mCacheRoot ) != null ) { java.io.File [ ] files = mCacheRoot.listFiles ( ) ; if ( files != null ) { for ( java.io.File f : files ) { if ( f.isFile ( ) ) { java.lang.String name = f.getName ( ) ; if ( ( name.startsWith ( com.android.sdklib.internal.repository.DownloadCache.BIN_FILE_PREFIX ) ) || ( name.startsWith ( com.android.sdklib.internal.repository.DownloadCache.INFO_FILE_PREFIX ) ) ) { f.delete ( ) ; } } } } } }

Target:
public long getCurrentSize ( ) { long size = 0 ; if ( ( mCacheRoot ) != null ) { java.io.File [ ] files = mFileOp.listFiles ( mCacheRoot ) ; for ( java.io.File f : files ) { if ( mFileOp.isFile ( f ) ) { java.lang.String name = f.getName ( ) ; if ( ( name.startsWith ( com.android.sdklib.internal.repository.DownloadCache.BIN_FILE_PREFIX ) ) || ( name.startsWith ( com.android.sdklib.internal.repository.DownloadCache.INFO_FILE_PREFIX ) ) ) { size += f.length ( ) ; } } } } return size ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_copy_test s = new com.android.rs.test.ScriptC_copy_test ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; testFloat2 ( pRS , s ) ; testFloat3 ( pRS , s ) ; testFloat4 ( pRS , s ) ; s.invoke_sendResult ( true ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_copy_test s = new com.android.rs.test.ScriptC_copy_test ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; testFloat2 ( pRS , s ) ; testFloat3 ( pRS , s ) ; testFloat4 ( pRS , s ) ; s.invoke_sendResult ( true ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
private static void assertIconEquals ( android.graphics.drawable.Icon a , android.graphics.drawable.Icon b ) { if ( a != b ) { if ( ( a != null ) && ( b != null ) ) { assertEquals ( a.toString ( ) , b.toString ( ) ) ; } else { fail ( ( ( ( "Icons not equal: " + a ) + ", " ) + b ) ) ; } } }

Target:
private static void assertIconEquals ( android.graphics.drawable.Icon a , android.graphics.drawable.Icon b ) { if ( a != b ) { if ( ( a != null ) && ( b != null ) ) { org.junit.Assert.assertEquals ( a.toString ( ) , b.toString ( ) ) ; } else { org.junit.Assert.fail ( ( ( ( "Icons not equal: " + a ) + ", " ) + b ) ) ; } } }
Source:
private void unionAnnotationSetsAndDirectories ( ) { transformAnnotationSets ( dexA , aIndexMap ) ; transformAnnotationSets ( dexB , bIndexMap ) ; transformAnnotationDirectories ( dexA , aIndexMap ) ; transformAnnotationDirectories ( dexB , bIndexMap ) ; transformStaticValues ( dexA , aIndexMap ) ; transformStaticValues ( dexB , bIndexMap ) ; }

Target:
private void unionAnnotationSetsAndDirectories ( ) { transformAnnotationSets ( dexA , aIndexMap ) ; transformAnnotationSets ( dexB , bIndexMap ) ; transformAnnotationSetRefLists ( dexA , aIndexMap ) ; transformAnnotationSetRefLists ( dexB , bIndexMap ) ; transformAnnotationDirectories ( dexA , aIndexMap ) ; transformAnnotationDirectories ( dexB , bIndexMap ) ; transformStaticValues ( dexA , aIndexMap ) ; transformStaticValues ( dexB , bIndexMap ) ; }
Source:
private com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor getFqcnViewDescritor ( java.lang.String fqcn ) { com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor editor = mNode.getEditor ( ) ; if ( editor != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = editor.getTargetData ( ) ; if ( data != null ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors layoutDesc = data.getLayoutDescriptors ( ) ; if ( layoutDesc != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.DocumentDescriptor docDesc = layoutDesc.getDescriptor ( ) ; if ( docDesc != null ) { return internalFindFqcnViewDescritor ( fqcn , docDesc.getChildren ( ) , null ) ; } } } } return null ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor getFqcnViewDescritor ( java.lang.String fqcn ) { com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor editor = mNode.getEditor ( ) ; if ( editor instanceof com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor ) { return ( ( com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor ) ( editor ) ) . getFqcnViewDescritor ( fqcn ) ; } return null ; }
Source:
private boolean hasModifiedFile ( @ javax.annotation.Nonnull java.io.File inputLibrary , long timestamp ) { assert inputLibrary.isDirectory ( ) ; for ( java.io.File f : inputLibrary.listFiles ( ) ) { if ( f.isDirectory ( ) ) { if ( hasModifiedFile ( f , timestamp ) ) { return true ; } } else if ( ( f.lastModified ( ) ) > timestamp ) { return true ; } } return false ; }

Target:
private boolean needFullRebuild ( ) { if ( ! ( options.isAutomaticFullRebuildEnabled ( ) ) ) { return false ; } com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; assert ( libraryDependencies ) != null ; return ( ! ( libraryDependencies.hasSameLibraryOnClasspath ( session.getLibraryDependencies ( ) ) ) ) || ( ! ( libraryDependencies.hasSameImportedLibrary ( session.getLibraryDependencies ( ) ) ) ) ; }
Source:
public boolean getDataEnabled ( int subId ) { boolean retVal = false ; try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.getDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }

Target:
public void setDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setUserDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setUserDataEnabled" , e ) ; } }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > allAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return new com.google.common.util.concurrent.Futures.ListFuture < V > ( com.google.common.collect.ImmutableList.copyOf ( futures ) , true , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > successfulAsList ( com.google.common.util.concurrent.ListenableFuture < ? extends V > ... futures ) { return com.google.common.util.concurrent.Futures.listFuture ( com.google.common.collect.ImmutableList.copyOf ( futures ) , false , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
private void fillBucketFromSummaryEntry ( android.app.usage.NetworkStats.Bucket bucketOut ) { bucketOut.mUid = android.app.usage.NetworkStats.Bucket.convertUid ( mRecycledSummaryEntry.uid ) ; bucketOut.mTag = android.app.usage.NetworkStats.Bucket.convertTag ( mRecycledSummaryEntry.tag ) ; bucketOut.mState = android.app.usage.NetworkStats.Bucket.convertState ( mRecycledSummaryEntry.set ) ; bucketOut.mMetered = android.app.usage.NetworkStats.Bucket.METERED_ALL ; bucketOut.mRoaming = android.app.usage.NetworkStats.Bucket.convertRoaming ( mRecycledSummaryEntry.roaming ) ; bucketOut.mBeginTimeStamp = mStartTimeStamp ; bucketOut.mEndTimeStamp = mEndTimeStamp ; bucketOut.mRxBytes = mRecycledSummaryEntry.rxBytes ; bucketOut.mRxPackets = mRecycledSummaryEntry.rxPackets ; bucketOut.mTxBytes = mRecycledSummaryEntry.txBytes ; bucketOut.mTxPackets = mRecycledSummaryEntry.txPackets ; }

Target:
private void fillBucketFromSummaryEntry ( android.app.usage.NetworkStats.Bucket bucketOut ) { bucketOut.mUid = android.app.usage.NetworkStats.Bucket.convertUid ( mRecycledSummaryEntry.uid ) ; bucketOut.mTag = android.app.usage.NetworkStats.Bucket.convertTag ( mRecycledSummaryEntry.tag ) ; bucketOut.mState = android.app.usage.NetworkStats.Bucket.convertState ( mRecycledSummaryEntry.set ) ; bucketOut.mMetered = android.app.usage.NetworkStats.Bucket.convertMetered ( mRecycledSummaryEntry.metered ) ; bucketOut.mRoaming = android.app.usage.NetworkStats.Bucket.convertRoaming ( mRecycledSummaryEntry.roaming ) ; bucketOut.mBeginTimeStamp = mStartTimeStamp ; bucketOut.mEndTimeStamp = mEndTimeStamp ; bucketOut.mRxBytes = mRecycledSummaryEntry.rxBytes ; bucketOut.mRxPackets = mRecycledSummaryEntry.rxPackets ; bucketOut.mTxBytes = mRecycledSummaryEntry.txBytes ; bucketOut.mTxPackets = mRecycledSummaryEntry.txPackets ; }
Source:
public static boolean isApplicableFor ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.vfs.VirtualFile file ) { com.intellij.openapi.file.exclude.b7a64e Merge ; }

Target:
public static boolean isApplicableFor ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.vfs.VirtualFile file ) { if ( ( ! ( file instanceof com.intellij.openapi.vfs.VirtualFileWithId ) ) || ( file.isDirectory ( ) ) ) return false ; com.intellij.openapi.fileTypes.FileType originalType = com.intellij.openapi.fileTypes.FileTypeManager.getInstance ( ) . getFileTypeByFileName ( file.getName ( ) ) ; return ( ( ! ( originalType.isBinary ( ) ) ) && ( originalType != ( com.intellij.openapi.fileTypes.FileTypes.PLAIN_TEXT ) ) ) && ( originalType != ( com.intellij.openapi.fileTypes.StdFileTypes.JAVA ) ) ; }
Source:
public static int getTotalNumberOfLocals ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod m ) { com.android.jack.ir.ast.JMethodBodyCfg body = ( ( com.android.jack.ir.ast.JMethodBodyCfg ) ( m.getBody ( ) ) ) ; assert body != null ; int numParam = m.getParams ( ) . size ( ) ; assert ( body.getLocals ( ) ) != null ; int numLocal = body.getLocals ( ) . size ( ) ; int numCatch = com.android.jack.transformations.ssa.SsaUtil.getCatchVariables ( m ) . size ( ) ; return ( numLocal + numParam ) + numCatch ; }

Target:
public static int getTotalNumberOfLocals ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod m , @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { com.android.jack.ir.ast.JMethodBodyCfg body = ( ( com.android.jack.ir.ast.JMethodBodyCfg ) ( m.getBody ( ) ) ) ; assert body != null ; int numParam = m.getParams ( ) . size ( ) ; assert ( body.getLocals ( ) ) != null ; int numLocal = body.getLocals ( ) . size ( ) ; int numCatch = com.android.jack.transformations.ssa.SsaUtil.getCatchVariables ( cfg ) . size ( ) ; return ( numLocal + numParam ) + numCatch ; }
Source:
private void resetUnreadCountForSelectedFilter ( ) { int index = getSelectedSavedFilterIndex ( ) ; mLogCatFilters.get ( index ) . resetUnreadCount ( ) ; refreshFiltersTable ( ) ; }

Target:
public void bufferChanged ( java.util.List < com.android.ddmuilib.logcat.LogCatMessage > addedMessages , java.util.List < com.android.ddmuilib.logcat.LogCatMessage > deletedMessages ) { synchronized ( mLogBuffer ) { addedMessages = applyCurrentFilters ( addedMessages ) ; deletedMessages = applyCurrentFilters ( deletedMessages ) ; mLogBuffer.addAll ( addedMessages ) ; mDeletedLogCount += deletedMessages.size ( ) ; } refreshLogCatTable ( ) ; updateUnreadCount ( addedMessages ) ; refreshFiltersTable ( ) ; }
Source:
public void testPublish ( ) { android.net.wifi.nan.PublishConfig publishConfig = new android.net.wifi.nan.PublishConfig.Builder ( ) . setServiceName ( "something.valid" ) . build ( ) ; int clientId = doConnect ( ) ; android.net.wifi.nan.IWifiNanDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.nan.IWifiNanDiscoverySessionCallback.class ) ; mDut.publish ( clientId , publishConfig , mockCallback ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . publish ( clientId , publishConfig , mockCallback ) ; }

Target:
public void testPublish ( ) { android.net.wifi.aware.PublishConfig publishConfig = new android.net.wifi.aware.PublishConfig.Builder ( ) . setServiceName ( "something.valid" ) . build ( ) ; int clientId = doConnect ( ) ; android.net.wifi.aware.IWifiAwareDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.aware.IWifiAwareDiscoverySessionCallback.class ) ; mDut.publish ( clientId , publishConfig , mockCallback ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . publish ( clientId , publishConfig , mockCallback ) ; }
Source:
public void getProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }

Target:
public void testGetProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }
Source:
public int next ( int n ) { throw new java.lang.UnsupportedOperationException ( "next(int) is not yet implemented" ) ; }

Target:
private final int internalPrev ( int n ) { if ( ( ( n == 0 ) || ( n == ( com.ibm.icu.text.BreakIterator.DONE ) ) ) || ( ( backwardsTrie ) == null ) ) { return n ; } resetState ( ) ; while ( ( n != ( com.ibm.icu.text.BreakIterator.DONE ) ) && ( n != 0 ) ) { if ( breakExceptionAt ( n ) ) { n = delegate.previous ( ) ; } else { return n ; } } return n ; }
Source:
public void test_isInfiniteF ( ) { assertTrue ( "Infinity check failed" , ( ( ( java.lang.Float.isInfinite ( java.lang.Float.POSITIVE_INFINITY ) ) && ( java.lang.Float.isInfinite ( java.lang.Float.NEGATIVE_INFINITY ) ) ) && ( ! ( java.lang.Float.isInfinite ( 1.0F ) ) ) ) ) ; }

Target:
public void test_isFiniteF ( ) { assertFalse ( java.lang.Float.isFinite ( java.lang.Float.POSITIVE_INFINITY ) ) ; assertFalse ( java.lang.Float.isFinite ( java.lang.Float.NEGATIVE_INFINITY ) ) ; assertTrue ( java.lang.Float.isFinite ( java.lang.Float.MAX_VALUE ) ) ; assertTrue ( java.lang.Float.isFinite ( java.lang.Float.MIN_VALUE ) ) ; assertFalse ( java.lang.Float.isFinite ( java.lang.Float.NaN ) ) ; assertTrue ( java.lang.Float.isFinite ( 1.0F ) ) ; }
Source:
public void replaceUserDevice ( com.android.sdklib.devices.Device d ) { synchronized ( com.android.sdklib.devices.DeviceManager.sLock ) { if ( ( com.android.sdklib.devices.DeviceManager.mUserDevices ) == null ) { getUserDevices ( ) ; } removeUserDevice ( d ) ; addUserDevice ( d ) ; } }

Target:
public void addUserDevice ( com.android.sdklib.devices.Device d ) { boolean changed = false ; synchronized ( mLock ) { if ( ( mUserDevices ) == null ) { initUserDevices ( ) ; assert ( mUserDevices ) != null ; } if ( ( mUserDevices ) != null ) { mUserDevices.add ( d ) ; } changed = true ; } if ( changed ) { notifyListeners ( ) ; } }
Source:
public void linkNativeLibraryDirectory ( java.lang.String uuid , java.lang.String packageName , java.lang.String nativeLibPath32 , int userId ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.linkNativeLibraryDirectory ( uuid , packageName , nativeLibPath32 , userId ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void destroyUserData ( java.lang.String uuid , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.destroyUserData ( uuid , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public org.w3c.dom.DOMStringList getParameterNames ( ) { final java.lang.String [ ] result = org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.keySet ( ) . toArray ( new java.lang.String [ org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.size ( ) ] ) ; return new org.w3c.dom.DOMStringList ( ) { public java.lang.String item ( int index ) { return index < ( result.length ) ? result [ index ] : null ; } public int getLength ( ) { return result.length ; } public boolean contains ( java.lang.String str ) { return org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.containsKey ( str ) ; } } ; }

Target:
private static org.w3c.dom.DOMStringList internalGetParameterNames ( ) { final java.lang.String [ ] result = org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.keySet ( ) . toArray ( new java.lang.String [ org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.size ( ) ] ) ; return new org.w3c.dom.DOMStringList ( ) { public java.lang.String item ( int index ) { return index < ( result.length ) ? result [ index ] : null ; } public int getLength ( ) { return result.length ; } public boolean contains ( java.lang.String str ) { return org.apache.harmony.xml.dom.DOMConfigurationImpl.PARAMETERS.containsKey ( str ) ; } } ; }
Source:
private java.lang.Object [ ] buildBootstrapArguments ( annotations.CalledByIndy callsite ) { annotations.Constant [ ] rawArgs = callsite.methodHandleExtraArgs ( ) ; java.lang.Object [ ] args = new java.lang.Object [ rawArgs.length ] ; for ( int i = 0 ; i < ( rawArgs.length ) ; ++ i ) { args [ i ] = decodeConstant ( i , rawArgs [ i ] ) ; } return args ; }

Target:
private java.lang.Object [ ] buildBootstrapArguments ( annotations.Constant [ ] bootstrapMethodArguments ) { java.lang.Object [ ] args = new java.lang.Object [ bootstrapMethodArguments.length ] ; for ( int i = 0 ; i < ( bootstrapMethodArguments.length ) ; ++ i ) { args [ i ] = decodeConstant ( i , bootstrapMethodArguments [ i ] ) ; } return args ; }
Source:
public void testV1SignedAttrsWrongContentType ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v1-only-with-signed-attrs-wrong-content-type.apk" ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; }

Target:
public void testV1SignedAttrsWrongContentType ( ) throws java.lang.Exception { java.lang.String apk = "v1-only-with-signed-attrs-wrong-content-type.apk" ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( apk ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; apk = "v1-only-with-signed-attrs-signerInfo1-wrong-content-type-signerInfo2-good.apk" ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.N ) ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( apk ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { if ( which == ( com.android.internal.app.ExternalMediaFormatActivity.POSITIVE_BUTTON ) ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.os.storage.ExternalStorageFormatter.FORMAT_ONLY ) ; intent.setComponent ( ExternalStorageFormatter.COMPONENT_NAME ) ; startService ( intent ) ; } finish ( ) ; }

Target:
public void onClick ( android.content.DialogInterface dialog , int which ) { if ( which == ( com.android.internal.app.ExternalMediaFormatActivity.POSITIVE_BUTTON ) ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.os.storage.ExternalStorageFormatter.FORMAT_ONLY ) ; intent.setComponent ( ExternalStorageFormatter.COMPONENT_NAME ) ; final android.os.storage.StorageVolume storageVolume = getIntent ( ) . getParcelableExtra ( StorageVolume.EXTRA_STORAGE_VOLUME ) ; intent.putExtra ( StorageVolume.EXTRA_STORAGE_VOLUME , storageVolume ) ; startService ( intent ) ; } finish ( ) ; }
Source:
public void testInstall_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneDistroInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneDistroInstaller ( "TimeZoneDistroInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.TimeZoneDistro tzData = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; try { brokenSystemInstaller.installWithErrorCode ( tzData.getBytes ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoContentInstalled ( ) ; }

Target:
public void testInstall_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneDistroInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneDistroInstaller ( "TimeZoneDistroInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.shared2.TimeZoneDistro tzData = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; try { brokenSystemInstaller.installWithErrorCode ( tzData.getBytes ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoContentInstalled ( ) ; }
Source:
public void testTimedoutNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.UNAVAILABLE , null ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testTimedoutNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.UNAVAILABLE , null ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
private void sendInternalMessage ( int messageCode , int arg1 ) { android.telecom.Logging.Session subsession = android.telecom.Log.createSubsession ( ) ; if ( subsession != null ) { sendMessageAtFrontOfQueue ( messageCode , arg1 , 0 , subsession ) ; } else { sendMessageAtFrontOfQueue ( messageCode , arg1 ) ; } }

Target:
private void sendInternalMessage ( int messageCode , int arg1 ) { android.telecom.Logging.Session subsession = android.telecom.Log.createSubsession ( ) ; if ( subsession != null ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = subsession ; sendMessageAtFrontOfQueue ( messageCode , arg1 , 0 , args ) ; } else { sendMessageAtFrontOfQueue ( messageCode , arg1 ) ; } }
Source:
protected final void stopBuild ( java.lang.String error , java.lang.Object ... args ) throws org.eclipse.core.runtime.CoreException { throw new org.eclipse.core.runtime.CoreException ( new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.CANCEL , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , java.lang.String.format ( error , args ) ) ) ; }

Target:
protected void stopOnMarker ( org.eclipse.core.resources.IProject project , java.lang.String markerType , int depth ) throws com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.AbortBuildException { try { org.eclipse.core.resources.IMarker [ ] markers = project.findMarkers ( markerType , false , depth ) ; if ( ( markers.length ) > 0 ) { throw new com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.AbortBuildException ( ) ; } } catch ( org.eclipse.core.runtime.CoreException e ) { } }
Source:
public void run ( ) { mPrivateFlags &= ~ ( android.view.View.PREPRESSED ) ; mPrivateFlags |= android.view.View.PRESSED ; refreshDrawableState ( ) ; if ( ( ( mViewFlags ) & ( android.view.View.LONG_CLICKABLE ) ) == ( android.view.View.LONG_CLICKABLE ) ) { postCheckForLongClick ( android.view.ViewConfiguration.getTapTimeout ( ) ) ; } }

Target:
private void checkForLongClick ( int delayOffset ) { if ( ( ( mViewFlags ) & ( android.view.View.LONG_CLICKABLE ) ) == ( android.view.View.LONG_CLICKABLE ) ) { mHasPerformedLongPress = false ; if ( ( mPendingCheckForLongPress ) == null ) { mPendingCheckForLongPress = new android.view.View.CheckForLongPress ( ) ; } mPendingCheckForLongPress.rememberWindowAttachCount ( ) ; postDelayed ( mPendingCheckForLongPress , ( ( android.view.ViewConfiguration.getLongPressTimeout ( ) ) - delayOffset ) ) ; } }
Source:
protected java.util.Map < T , U > convert ( @ javax.annotation.Nonnull java.util.List < java.util.Map.Entry < T , U > > list ) { java.util.Map < T , U > map = new java.util.HashMap < T , U > ( java.lang.Math.round ( ( ( list.size ( ) ) / 0.75F ) ) , 0.75F ) ; for ( java.util.Map.Entry < T , U > entry : list ) { map.put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return map ; }

Target:
protected java.util.List < com.android.sched.util.codec.PairCodec.Pair < T , U > > revert ( @ javax.annotation.Nonnull java.util.Map < T , U > data ) { java.util.List < com.android.sched.util.codec.PairCodec.Pair < T , U > > list = new java.util.ArrayList < com.android.sched.util.codec.PairCodec.Pair < T , U > > ( data.size ( ) ) ; for ( java.util.Map.Entry < T , U > entry : data.entrySet ( ) ) { list.add ( new com.android.sched.util.codec.PairCodec.Pair < T , U > ( entry.getKey ( ) , entry.getValue ( ) ) ) ; } return list ; }
Source:
public static java.nio.ShortBuffer wrap ( short [ ] array , int start , int shortCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , shortCount ) ; java.nio.ShortBuffer buf = new java.nio.ReadWriteShortArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + shortCount ; return buf ; }

Target:
public static java.nio.ShortBuffer wrap ( short [ ] array , int start , int shortCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , shortCount ) ; java.nio.ShortBuffer buf = new java.nio.ShortArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + shortCount ; return buf ; }
Source:
public void clear ( ) { mPastTime [ 0 ] = 0 ; }

Target:
private void addPoint ( float x , float y , long time ) { final int lastTouch = ( ( mLastTouch ) + 1 ) % ( android.view.VelocityTracker.NUM_PAST ) ; mPastX [ lastTouch ] = x ; mPastY [ lastTouch ] = y ; mPastTime [ lastTouch ] = time ; mLastTouch = lastTouch ; }
Source:
private static com.android.internal.telephony.MccTable.MccEntry entryForMcc ( int mcc ) { int index ; com.android.internal.telephony.MccTable.MccEntry m ; m = new com.android.internal.telephony.MccTable.MccEntry ( mcc , null , 0 ) ; index = java.util.Collections.binarySearch ( com.android.internal.telephony.MccTable.table , m ) ; if ( index < 0 ) { return null ; } else { return com.android.internal.telephony.MccTable.table.get ( index ) ; } }

Target:
private static com.android.internal.telephony.MccTable.MccEntry entryForMcc ( int mcc ) { int index ; com.android.internal.telephony.MccTable.MccEntry m ; m = new com.android.internal.telephony.MccTable.MccEntry ( mcc , null , 0 ) ; index = java.util.Collections.binarySearch ( com.android.internal.telephony.MccTable.sTable , m ) ; if ( index < 0 ) { return null ; } else { return com.android.internal.telephony.MccTable.sTable.get ( index ) ; } }