auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; return null ; }

Target:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { com.android.traceur.AtraceUtils.atraceDump ( mFile ) ; return null ; }
Source:
private int putListener ( java.lang.Object listener , android.net.nsd.NsdServiceInfo s ) { if ( listener == null ) return android.net.nsd.NsdManager.INVALID_LISTENER_KEY ; int key ; synchronized ( mMapLock ) { int valueIndex = mListenerMap.indexOfValue ( listener ) ; if ( valueIndex != ( - 1 ) ) { return android.net.nsd.NsdManager.BUSY_LISTENER_KEY ; } do { key = ( mListenerKey ) ++ ; } while ( key == ( android.net.nsd.NsdManager.INVALID_LISTENER_KEY ) ) ; mListenerMap.put ( key , listener ) ; mServiceMap.put ( key , s ) ; } return key ; }

Target:
private int nextListenerKey ( ) { mListenerKey = java.lang.Math.max ( android.net.nsd.NsdManager.FIRST_LISTENER_KEY , ( ( mListenerKey ) + 1 ) ) ; return mListenerKey ; }
Source:
private void outputBlock ( byte [ ] output , int offset ) { if ( ( totalLength ) == 0 ) { initCipher ( ) ; } gCTRBlock ( bufBlock , output , offset ) ; if ( forEncryption ) { bufOff = 0 ; } else { java.lang.System.arraycopy ( bufBlock , org.bouncycastle.crypto.modes.GCMBlockCipher.BLOCK_SIZE , bufBlock , 0 , macSize ) ; bufOff = macSize ; } }

Target:
private void outputBlock ( byte [ ] output , int offset ) { if ( ( output.length ) < ( offset + ( org.bouncycastle.crypto.modes.GCMBlockCipher.BLOCK_SIZE ) ) ) { throw new org.bouncycastle.crypto.OutputLengthException ( "Output buffer too short" ) ; } if ( ( totalLength ) == 0 ) { initCipher ( ) ; } gCTRBlock ( bufBlock , output , offset ) ; if ( forEncryption ) { bufOff = 0 ; } else { java.lang.System.arraycopy ( bufBlock , org.bouncycastle.crypto.modes.GCMBlockCipher.BLOCK_SIZE , bufBlock , 0 , macSize ) ; bufOff = macSize ; } }
Source:
public static java.lang.String getGMSVersionCode ( android.content.Context context ) { java.lang.String msg = "gms versionCode not available." ; try { android.content.pm.PackageManager packageManager = context.getPackageManager ( ) ; android.content.pm.PackageInfo packageInfo = packageManager.getPackageInfo ( "com.google.android.gms" , 0 ) ; msg = java.lang.Integer.toString ( packageInfo.versionCode ) ; } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { android.util.Log.d ( org.chromium.base.BuildInfo.TAG , "GMS package is not found: %s" , e ) ; } return msg ; }

Target:
public static java.lang.String getGMSVersionCode ( android.content.Context context ) { java.lang.String msg = "gms versionCode not available." ; try { android.content.pm.PackageManager packageManager = context.getPackageManager ( ) ; android.content.pm.PackageInfo packageInfo = packageManager.getPackageInfo ( "com.google.android.gms" , 0 ) ; msg = java.lang.Integer.toString ( packageInfo.versionCode ) ; } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { org.chromium.base.Log.d ( org.chromium.base.BuildInfo.TAG , "GMS package is not found." , e ) ; } return msg ; }
Source:
private void cmdStats ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { synchronized ( mLock ) { pw.println ( ( "Buffered events: " + ( mBuffer.size ( ) ) ) ) ; pw.println ( ( "Buffer capacity: " + ( mCapacity ) ) ) ; pw.println ( ( "Dropped events: " + ( mDropped ) ) ) ; } if ( ( mNetdListener ) != null ) { mNetdListener.dump ( pw ) ; } }

Target:
public com.android.server.connectivity.DefaultNetworkMetrics defaultNetworkMetrics ( ) { return mDefaultNetworkMetrics ; }
Source:
private java.security.cert.X509Certificate generateJcaObject ( org.bouncycastle.asn1.x509.TBSCertificate tbsCert , byte [ ] signature ) throws java.security.cert.CertificateParsingException { org.bouncycastle.asn1.ASN1EncodableVector v = new org.bouncycastle.asn1.ASN1EncodableVector ( ) ; v.add ( tbsCert ) ; v.add ( sigAlgId ) ; v.add ( new org.bouncycastle.asn1.DERBitString ( signature ) ) ; return new org.bouncycastle.jce.provider.X509CertificateObject ( org.bouncycastle.asn1.x509.Certificate.getInstance ( new org.bouncycastle.asn1.DERSequence ( v ) ) ) ; }

Target:
private java.security.cert.X509Certificate generateJcaObject ( org.bouncycastle.asn1.x509.TBSCertificate tbsCert , byte [ ] signature ) throws java.security.cert.CertificateParsingException { org.bouncycastle.asn1.ASN1EncodableVector v = new org.bouncycastle.asn1.ASN1EncodableVector ( ) ; v.add ( tbsCert ) ; v.add ( sigAlgId ) ; v.add ( new org.bouncycastle.asn1.DERBitString ( signature ) ) ; return new org.bouncycastle.jcajce.provider.asymmetric.x509.X509CertificateObject ( jcaJceHelper , org.bouncycastle.asn1.x509.Certificate.getInstance ( new org.bouncycastle.asn1.DERSequence ( v ) ) ) ; }
Source:
public void visitAnyParameterAnnotationsAttribute ( proguard.shrink.Clazz clazz , proguard.shrink.Method method , proguard.shrink.ParameterAnnotationsAttribute parameterAnnotationsAttribute ) { for ( int parameterIndex = 0 ; parameterIndex < ( parameterAnnotationsAttribute.u2parametersCount ) ; parameterIndex ++ ) { parameterAnnotationsAttribute.u2parameterAnnotationsCount [ parameterIndex ] = shrinkArray ( parameterAnnotationsAttribute.parameterAnnotations [ parameterIndex ] , parameterAnnotationsAttribute.u2parameterAnnotationsCount [ parameterIndex ] ) ; } parameterAnnotationsAttribute.annotationsAccept ( clazz , method , this ) ; }

Target:
public void visitAnyParameterAnnotationsAttribute ( proguard.shrink.Clazz clazz , proguard.shrink.Method method , proguard.shrink.ParameterAnnotationsAttribute parameterAnnotationsAttribute ) { for ( int parameterIndex = 0 ; parameterIndex < ( parameterAnnotationsAttribute.u1parametersCount ) ; parameterIndex ++ ) { parameterAnnotationsAttribute.u2parameterAnnotationsCount [ parameterIndex ] = shrinkArray ( parameterAnnotationsAttribute.parameterAnnotations [ parameterIndex ] , parameterAnnotationsAttribute.u2parameterAnnotationsCount [ parameterIndex ] ) ; } parameterAnnotationsAttribute.annotationsAccept ( clazz , method , this ) ; }
Source:
public boolean pageUp ( final boolean top ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return pageUp ( top ) ; } } ) ; return ret ; } return mAwContents.pageUp ( top ) ; }

Target:
public boolean canGoBackOrForward ( final int steps ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return canGoBackOrForward ( steps ) ; } } ) ; return ret ; } return mAwContents.canGoBackOrForward ( steps ) ; }
Source:
public void setIncludeClassRetentionAnnotations ( boolean include ) { this . includeClassRetentionAnnotations = include ; }

Target:
static boolean hasSourceRetention ( @ com.android.annotations.NonNull org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding a ) { if ( new java.lang.String ( a.getAnnotationType ( ) . readableName ( ) ) . equals ( "java.lang.annotation.Retention" ) ) { org.eclipse.jdt.internal.compiler.lookup.ElementValuePair [ ] pairs = a.getElementValuePairs ( ) ; if ( ( pairs == null ) || ( ( pairs.length ) != 1 ) ) { com.android.build.gradle.tasks.annotations.Extractor.warning ( "Expected exactly one parameter passed to @Retention" ) ; return false ; } org.eclipse.jdt.internal.compiler.lookup.ElementValuePair pair = pairs [ 0 ] ; java.lang.Object value = pair.getValue ( ) ; if ( value instanceof org.eclipse.jdt.internal.compiler.lookup.FieldBinding ) { org.eclipse.jdt.internal.compiler.lookup.FieldBinding field = ( ( org.eclipse.jdt.internal.compiler.lookup.FieldBinding ) ( value ) ) ; if ( "SOURCE" . equals ( new java.lang.String ( field.readableName ( ) ) ) ) { return true ; } } } return false ; }
Source:
public void testRefactor2 ( ) throws java.lang.Exception { renameType ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , "com.example.refactoringtest.CustomView1" , true , "NewCustomViewName" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename compilation unit \'CustomView1.java\' to \'NewCustomViewName.java\'\n" ) + "\n" ) + "* Android Type Rename\n" ) + "\n" ) + " * customviews.xml - /testRefactor2/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <com.example.refactoringtest.NewCustomViewName\n" ) + "\n" ) + "\n" ) + " * customviews.xml - /testRefactor2/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <com.example.refactoringtest.NewCustomViewName" ) ) ) ; }

Target:
public void testRefactor2 ( ) throws java.lang.Exception { renameType ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT2 , "com.example.refactoringtest.CustomView1" , true , "NewCustomViewName" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename compilation unit \'CustomView1.java\' to \'NewCustomViewName.java\'\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <com.example.refactoringtest.NewCustomViewName\n" ) + "\n" ) + "\n" ) + "* customviews.xml - /testRefactor2/res/layout-land/customviews.xml\n" ) + " @@ -9 +9\n" ) + " - <com.example.refactoringtest.CustomView1\n" ) + " + <com.example.refactoringtest.NewCustomViewName" ) ) ) ; }
Source:
public java.lang.String run ( ) { return java.security.Security.getProperty ( propertyName ) ; }

Target:
private static sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraints getKeySizeConstraints ( java.lang.String [ ] disabledAlgorithms , java.lang.String propertyName ) { synchronized ( sun.security.util.DisabledAlgorithmConstraints.keySizeConstraintsMap ) { if ( ! ( sun.security.util.DisabledAlgorithmConstraints.keySizeConstraintsMap.containsKey ( propertyName ) ) ) { sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraints keySizeConstraints = new sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraints ( disabledAlgorithms ) ; sun.security.util.DisabledAlgorithmConstraints.keySizeConstraintsMap.put ( propertyName , keySizeConstraints ) ; } return sun.security.util.DisabledAlgorithmConstraints.keySizeConstraintsMap.get ( propertyName ) ; } }
Source:
void startMultiAdvertising ( int advertiserId , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.AdvertiseSettings settings ) { enforceAdminPermission ( ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "startMultiAdvertising() - advertiserId=" + advertiserId ) ) ; mAdvertiseManager.startAdvertising ( new com.android.bluetooth.gatt.AdvertiseClient ( advertiserId , settings , advertiseData , scanResponse ) ) ; }

Target:
void stopAdvertisingSet ( android.bluetooth.le.IAdvertisingSetCallback callback ) { enforceAdminPermission ( ) ; mAdvertiseManager.stopAdvertisingSet ( callback ) ; }
Source:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigFailedResponse ( transactionId , WifiNanEventCallback.REASON_INVALID_ARGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigFailedResponse ( transactionId , WifiNanAttachCallback.REASON_INVALID_ARGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }
Source:
public final java.nio.ByteBuffer asReadOnlyBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return new java.nio.DirectByteBuffer ( memoryRef , this . markValue ( ) , this . position ( ) , this . limit ( ) , this . capacity ( ) , offset , true ) ; }

Target:
char getCharUnchecked ( int i ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return ( ( char ) ( libcore.io.Memory.peekShort ( ix ( i ) , ( ! ( nativeByteOrder ) ) ) ) ) ; }
Source:
private android.telephony.ims.feature.ImsFeature makeImsFeature ( int slotId , int feature ) { switch ( feature ) { case android.telephony.ims.feature.ImsFeature.EMERGENCY_MMTEL : { return onCreateEmergencyMMTelImsFeature ( slotId ) ; } case android.telephony.ims.feature.ImsFeature.MMTEL : { return onCreateMMTelImsFeature ( slotId ) ; } case android.telephony.ims.feature.ImsFeature.RCS : { return onCreateRcsFeature ( slotId ) ; } } return null ; }

Target:
public android.telephony.ims.feature.MMTelFeature onCreateEmergencyMMTelImsFeature ( int slotId ) { return null ; }
Source:
public java.lang.String replace ( java.lang.String uri , java.lang.String name , java.lang.String value ) { if ( ! ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI.equals ( uri ) ) ) { return value ; } if ( ( mExcludes ) == null ) { mExcludes = new java.util.HashSet < java.lang.String > ( com.android.ide.common.layout.BaseLayoutRule.EXCLUDED_ATTRIBUTES.length ) ; mExcludes.addAll ( java.util.Arrays.asList ( com.android.ide.common.layout.BaseLayoutRule.EXCLUDED_ATTRIBUTES ) ) ; } return mExcludes.contains ( name ) ? null : value ; }

Target:
public java.lang.String replace ( java.lang.String uri , java.lang.String name , java.lang.String value ) { if ( ! ( com.android.util.XmlUtils.ANDROID_URI.equals ( uri ) ) ) { return value ; } if ( ( mExcludes ) == null ) { mExcludes = new java.util.HashSet < java.lang.String > ( com.android.ide.common.layout.BaseLayoutRule.EXCLUDED_ATTRIBUTES.length ) ; mExcludes.addAll ( java.util.Arrays.asList ( com.android.ide.common.layout.BaseLayoutRule.EXCLUDED_ATTRIBUTES ) ) ; } return mExcludes.contains ( name ) ? null : value ; }
Source:
private void revertToNitzTimeZone ( ) { java.lang.String tmpLog = "Reverting to NITZ TimeZone: tz=" + ( mSavedTimeZoneId ) ; if ( com.android.internal.telephony.NitzStateMachine.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.NitzStateMachine.LOG_TAG , tmpLog ) ; } mTimeZoneLog.log ( tmpLog ) ; if ( ( mSavedTimeZoneId ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZoneId ) ; } else { java.lang.String iso = getNetworkCountryIsoForPhone ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( iso ) ) ) { updateTimeZoneByNetworkCountryCode ( iso ) ; } } }

Target:
private void revertToNitzTimeZone ( ) { java.lang.String tmpLog = "Reverting to NITZ TimeZone: tz=" + ( mSavedTimeZoneId ) ; if ( com.android.internal.telephony.NitzStateMachine.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.NitzStateMachine.LOG_TAG , tmpLog ) ; } mTimeZoneLog.log ( tmpLog ) ; if ( ( mSavedTimeZoneId ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZoneId ) ; } else { java.lang.String iso = mDeviceState.getNetworkCountryIsoForPhone ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( iso ) ) ) { updateTimeZoneByNetworkCountryCode ( iso ) ; } } }
Source:
private static java.lang.String getNativeLibraryDirectory ( android.content.Context appContext ) { android.content.pm.ApplicationInfo ai = appContext.getApplicationInfo ( ) ; if ( ( ( ( ai.flags ) & ( android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP ) ) != 0 ) || ( ( ( ai.flags ) & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) == 0 ) ) { return ai.nativeLibraryDir ; } return "/system/lib/" ; }

Target:
private static java.lang.String getNativeLibraryDirectory ( ) { android.content.pm.ApplicationInfo ai = org.chromium.base.ContextUtils.getApplicationContext ( ) . getApplicationInfo ( ) ; if ( ( ( ( ai.flags ) & ( android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP ) ) != 0 ) || ( ( ( ai.flags ) & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) == 0 ) ) { return ai.nativeLibraryDir ; } return "/system/lib/" ; }
Source:
public void onSelected ( boolean newState ) { mZoomOutButton.setEnabled ( ( ! newState ) ) ; mZoomResetButton.setEnabled ( ( ! newState ) ) ; mZoomInButton.setEnabled ( ( ! newState ) ) ; rescaleToReal ( newState ) ; }

Target:
public void onSelected ( boolean newState ) { if ( rescaleToReal ( newState ) ) { mZoomOutButton.setEnabled ( ( ! newState ) ) ; mZoomResetButton.setEnabled ( ( ! newState ) ) ; mZoomInButton.setEnabled ( ( ! newState ) ) ; } else { mZoomRealSizeButton.setSelection ( ( ! newState ) ) ; } }
Source:
private com.android.ahat.heapdump.Value getDumpedValue ( java.lang.String name , com.android.ahat.heapdump.AhatSnapshot snapshot ) { com.android.ahat.heapdump.AhatClassObj main = snapshot.findClass ( "Main" ) ; com.android.ahat.heapdump.AhatInstance stuff = null ; for ( com.android.ahat.heapdump.FieldValue fields : main.getStaticFieldValues ( ) ) { if ( "stuff" . equals ( fields.getName ( ) ) ) { stuff = fields.getValue ( ) . asAhatInstance ( ) ; } } return stuff.getField ( name ) ; }

Target:
private com.android.ahat.heapdump.Value getDumpedValue ( java.lang.String name , com.android.ahat.heapdump.AhatSnapshot snapshot ) { com.android.ahat.heapdump.AhatClassObj main = snapshot.findClass ( "Main" ) ; com.android.ahat.heapdump.AhatInstance stuff = null ; for ( com.android.ahat.heapdump.FieldValue field : main.getStaticFieldValues ( ) ) { if ( "stuff" . equals ( field.name ) ) { stuff = field.value.asAhatInstance ( ) ; } } return stuff.getField ( name ) ; }
Source:
private static org.intellij.plugins.intelliLang.inject.groovy.PsiFile getRootByClasses ( java.lang.Class [ ] classes , com.intellij.openapi.project.Project project ) { final java.lang.String text = com.intellij.patterns.compiler.PatternCompilerFactory.getFactory ( ) . getPatternCompiler ( classes ) . dumpContextDeclarations ( ) ; return org.intellij.plugins.intelliLang.inject.groovy.PsiFileFactory.getInstance ( project ) . createFileFromText ( "context.groovy" , GroovyFileType.GROOVY_FILE_TYPE , text ) ; }

Target:
protected org.intellij.plugins.intelliLang.inject.groovy.PsiFile create ( java.lang.Class [ ] key ) { java.lang.String text = com.intellij.patterns.compiler.PatternCompilerFactory.getFactory ( ) . getPatternCompiler ( key ) . dumpContextDeclarations ( ) ; return org.intellij.plugins.intelliLang.inject.groovy.PsiFileFactory.getInstance ( project ) . createFileFromText ( "context.groovy" , GroovyFileType.GROOVY_FILE_TYPE , text ) ; }
Source:
protected void onFinishInflate ( ) { super . onFinishInflate ( ) ; mLockPatternUtils = new com.android.internal.widget.LockPatternUtils ( mContext ) ; mPowerManager = ( ( android.os.PowerManager ) ( mContext.getSystemService ( Context.POWER_SERVICE ) ) ) ; setOnClickListener ( new com.android.keyguard.OnClickListener ( ) { public void onClick ( android.view.View v ) { takeEmergencyCallAction ( ) ; } } ) ; updateEmergencyCallButton ( ) ; }

Target:
public boolean onLongClick ( android.view.View v ) { if ( ( ! ( mLongPressWasDragged ) ) && ( mEmergencyAffordanceManager.needsEmergencyAffordance ( ) ) ) { mEmergencyAffordanceManager.performEmergencyCall ( ) ; return true ; } return false ; }
Source:
public static < T > boolean addAll ( java.util.Collection < T > addTo , java.lang.Iterable < ? extends T > elementsToAdd ) { if ( elementsToAdd instanceof java.util.Collection ) { java.util.Collection < ? extends T > c = com.google.common.collect.Collections2.cast ( elementsToAdd ) ; return addTo.addAll ( c ) ; } return com.google.common.collect.Iterators.addAll ( addTo , elementsToAdd.iterator ( ) ) ; }

Target:
public static < T > boolean addAll ( java.util.Collection < T > addTo , java.lang.Iterable < ? extends T > elementsToAdd ) { if ( elementsToAdd instanceof java.util.Collection ) { java.util.Collection < ? extends T > c = com.google.common.collect.Collections2.cast ( elementsToAdd ) ; return addTo.addAll ( c ) ; } return com.google.common.collect.Iterators.addAll ( addTo , com.google.common.base.Preconditions.checkNotNull ( elementsToAdd ) . iterator ( ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( mMajor ) . append ( '.' ) . append ( mMinor ) . append ( '.' ) . append ( mMicro ) ; if ( ( mPreview ) != ( com.android.sdklib.repository.FullRevision.NOT_A_PREVIEW ) ) { sb.append ( " rc" ) . append ( mPreview ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( mMajor ) . append ( '.' ) . append ( mMinor ) . append ( '.' ) . append ( mMicro ) ; if ( ( mPreview ) != ( com.android.sdklib.repository.FullRevision.NOT_A_PREVIEW ) ) { sb.append ( mPreviewSeparator ) . append ( "rc" ) . append ( mPreview ) ; } return sb.toString ( ) ; }
Source:
private void disconnectConferenceParticipants ( ) { android.telecom.Log.v ( this , "disconnectConferenceParticipants" ) ; synchronized ( mUpdateSyncRoot ) { for ( com.android.services.telephony.ConferenceParticipantConnection connection : mConferenceParticipantConnections.values ( ) ) { connection.removeConnectionListener ( mParticipantListener ) ; connection.setDisconnected ( new android.telecom.DisconnectCause ( android.telecom.DisconnectCause.CANCELED ) ) ; mTelephonyConnectionService.removeConnection ( connection ) ; connection.destroy ( ) ; } mConferenceParticipantConnections.clear ( ) ; } }

Target:
private void removeConferenceParticipant ( com.android.services.telephony.ConferenceParticipantConnection participant ) { android.telecom.Log.i ( this , "removeConferenceParticipant: %s" , participant ) ; participant.removeConnectionListener ( mParticipantListener ) ; synchronized ( mUpdateSyncRoot ) { mConferenceParticipantConnections.remove ( participant.getUserEntity ( ) ) ; } mTelephonyConnectionService.removeConnection ( participant ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_byte.d.T_aput_byte_1 t = new dot.junit.opcodes.aput_byte.d.T_aput_byte_1 ( ) ; byte [ ] arr = new byte [ 2 ] ; try { t.run ( arr , 2 , ( ( byte ) ( 100 ) ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput_byte.d.T_aput_byte_1" , java.lang.NullPointerException.class , null , 2 , ( ( byte ) ( 100 ) ) ) ; }
Source:
public void testSetValues013_StringAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value actualValue = getStaticFieldValue ( classID , "STRING_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "STRING_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.STRING_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , actualValue , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues008_Double ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.DOUBLE_METHOD ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.DOUBLE_PARAM_VALUE ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.DOUBLE_PARAM_VALUE_TO_SET ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointDouble" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointDouble" ) ; methodInfo.addVariable ( "param" , oldValue , newValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendTestMessages.testSendEtwsMessageOther ( this , getMessageId ( ) ) ; } }

Target:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendTestMessages.testSendEtwsMessageOther ( this , getSerialNumber ( ) ) ; } }
Source:
private void setWifiStatus ( ) { android.net.wifi.WifiManager wifiManager = ( ( android.net.wifi.WifiManager ) ( getSystemService ( com.android.settings.deviceinfo.WIFI_SERVICE ) ) ) ; android.net.wifi.WifiInfo wifiInfo = wifiManager.getConnectionInfo ( ) ; android.preference.Preference wifiMacAddressPref = findPreference ( com.android.settings.deviceinfo.Status.KEY_WIFI_MAC_ADDRESS ) ; java.lang.String macAddress = ( wifiInfo == null ) ? null : wifiInfo.getMacAddress ( ) ; wifiMacAddressPref.setSummary ( ( ! ( android.text.TextUtils.isEmpty ( macAddress ) ) ? macAddress : getString ( R.string.status_unavailable ) ) ) ; }

Target:
private void setWimaxStatus ( ) { if ( ( mWimaxMacAddress ) != null ) { java.lang.String macAddress = android.os.SystemProperties.get ( "net.wimax.mac.address" , mUnavailable ) ; mWimaxMacAddress.setSummary ( macAddress ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "res/drawable-mdpi/sample_icon.gif: Warning: Using the .gif format for bitmaps is discouraged [GifUsage]\n" + ( ( ( ( ( ( "res/drawable/ic_launcher.png: Warning: The ic_launcher.png icon has identical contents in the following configuration folders: drawable-mdpi, drawable [IconDuplicatesConfig]\n" + " res/drawable-mdpi/ic_launcher.png: <No location-specific message\n" ) + "res/drawable/ic_launcher.png: Warning: Found bitmap drawable res/drawable/ic_launcher.png in densityless folder [IconLocation]\n" ) + "res/drawable-hdpi: Warning: Missing the following drawables in drawable-hdpi: sample_icon.gif (found in drawable-mdpi) [IconDensities]\n" ) + "res: Warning: Missing density variation folders in res: drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 5 warnings\n" ) + "" ) ) , lintProject ( "apicheck/minsdk4.xml=>AndroidManifest.xml" , "res/drawable/ic_launcher.png" , "res/drawable/ic_launcher.png=>res/drawable-mdpi/ic_launcher.png" , "res/drawable-mdpi/sample_icon.gif" , "res/drawable-mdpi/sample_icon.gif=>res/drawable-hdpi/.svn" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-mdpi/sample_icon.gif: Warning: Using the .gif format for bitmaps is discouraged [GifUsage]\n" + ( ( ( ( ( ( "res/drawable/ic_launcher.png: Warning: The ic_launcher.png icon has identical contents in the following configuration folders: drawable-mdpi, drawable [IconDuplicatesConfig]\n" + " res/drawable-mdpi/ic_launcher.png: <No location-specific message\n" ) + "res/drawable/ic_launcher.png: Warning: Found bitmap drawable res/drawable/ic_launcher.png in densityless folder [IconLocation]\n" ) + "res/drawable-hdpi: Warning: Missing the following drawables in drawable-hdpi: sample_icon.gif (found in drawable-mdpi) [IconDensities]\n" ) + "res: Warning: Missing density variation folders in res: drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 5 warnings\n" ) + "" ) ) , lintProject ( "apicheck/minsdk4.xml=>AndroidManifest.xml" , "res/drawable/ic_launcher.png" , "res/drawable/ic_launcher.png=>res/drawable-mdpi/ic_launcher.png" , "res/drawable-mdpi/sample_icon.gif" , "res/drawable-mdpi/sample_icon.gif=>res/drawable-hdpi/.svn" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nScriptSetTimeZone ( long script , byte [ ] timeZone , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetTimeZone ( curCon , script , timeZone , mUseInc ) ; }
Source:
public void setFeatureValue ( int feature , int network , int value , com.android.ims.ImsConfigListener listener ) throws com.android.ims.ImsException { if ( DBG ) { android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( ( ( ( ( "setFeatureValue: feature = " + feature ) + ", network =" ) + network ) + ", value =" ) + value ) + ", listener =" ) + listener ) ) ; } try { miConfig.setFeatureValue ( feature , network , value , listener ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setFeatureValue()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } }

Target:
public void removeConfigCallback ( android.telephony.ims.stub.ImsConfigImplBase.Callback callback ) throws com.android.ims.ImsException { if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( "removeConfigCallback: " + callback ) ) ; try { miConfig.removeImsConfigCallback ( callback ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "removeConfigCallback()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } }
Source:
public static int getTunerCount ( android.content.Context context ) { if ( ( com.android.tv.tuner.TunerHal.getTunerType ( context ) ) == ( com.android.tv.tuner.TunerHal.TUNER_TYPE_BUILT_IN ) ) { } return com.android.tv.tuner.UsbTunerHal.getNumberOfDevices ( context ) ; }

Target:
public static synchronized com.android.tv.tuner.TunerHal createInstance ( android.content.Context context ) { com.android.tv.tuner.TunerHal tunerHal = null ; if ( com.android.tv.tuner.TunerHal.useBuiltInTuner ( context ) ) { } if ( ( tunerHal == null ) && ( ( com.android.tv.tuner.UsbTunerHal.getNumberOfDevices ( context ) ) > 0 ) ) { tunerHal = new com.android.tv.tuner.UsbTunerHal ( context ) ; } return ( tunerHal != null ) && ( tunerHal.openFirstAvailable ( ) ) ? tunerHal : null ; }
Source:
private static android.net.wifi.hotspot2.pps.HomeSP createHomeSp ( ) { android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.fqdn = "fqdn" ; homeSp.friendlyName = "friendly name" ; homeSp.roamingConsortiumOIs = new long [ ] { 85 , 102 } ; return homeSp ; }

Target:
private static android.net.wifi.hotspot2.pps.HomeSP createHomeSp ( java.util.Map < java.lang.String , java.lang.Long > homeNetworkIds ) { android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.fqdn = "fqdn" ; homeSp.friendlyName = "friendly name" ; homeSp.iconUrl = "icon.url" ; homeSp.homeNetworkIds = homeNetworkIds ; homeSp.matchAllOIs = new long [ ] { 17L , 34L } ; homeSp.matchAnyOIs = new long [ ] { 51L , 68L } ; homeSp.otherHomePartners = new java.lang.String [ ] { "partner1" , "partner2" } ; homeSp.roamingConsortiumOIs = new long [ ] { 85 , 102 } ; return homeSp ; }
Source:
public static void v ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.VERBOSE ) { android.util.Log.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }

Target:
public static void v ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } else if ( android.telecom.Log.VERBOSE ) { android.util.Slog.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }
Source:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; failure.reset ( ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }

Target:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; failure.reset ( ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . isEqualTo ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }
Source:
public void systemReady ( ) { mSystemReady = true ; boolean compatibilityModeEnabled = ( android.provider.Settings.System.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.System.COMPATIBILITY_MODE , 1 ) ) == 1 ; android.content.pm.PackageParser.setCompatibilityModeEnabled ( compatibilityModeEnabled ) ; if ( com.android.server.pm.PackageManagerService.DEBUG_SETTINGS ) { android.util.Log.d ( com.android.server.pm.PackageManagerService.TAG , ( "compatibility mode:" + compatibilityModeEnabled ) ) ; } }

Target:
private boolean isPermissionEnforcedDefault ( java.lang.String permission ) { if ( android.Manifest.permission.READ_EXTERNAL_STORAGE.equals ( permission ) ) { return ( android.provider.Settings.Global.getInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT , 0 ) ) != 0 ; } else { return true ; } }
Source:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view ) ; return newVoicemailViewHolder ; }

Target:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view , clock ) ; return newVoicemailViewHolder ; }
Source:
public int update ( android.net.Uri uri , android.content.ContentValues values , java.lang.String selection , java.lang.String [ ] selectionArgs ) { for ( java.lang.String key : values.keySet ( ) ) { mSubscriptionContent.put ( key , values.get ( key ) ) ; } return 1 ; }

Target:
public java.lang.Integer answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { android.content.ContentValues values = invocation.getArgument ( 1 ) ; for ( java.lang.String key : values.keySet ( ) ) { mSubscriptionContent.put ( key , values.get ( key ) ) ; } return 1 ; }
Source:
public boolean requestScores ( android.net.NetworkKey [ ] networks ) throws java.lang.SecurityException { java.lang.String activeScorer = getActiveScorerPackage ( ) ; if ( activeScorer == null ) { return false ; } android.content.Intent intent = new android.content.Intent ( android.net.NetworkScoreManager.ACTION_SCORE_NETWORKS ) ; intent.setPackage ( activeScorer ) ; intent.setFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( android.net.NetworkScoreManager.EXTRA_NETWORKS_TO_SCORE , networks ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.SYSTEM , Manifest.permission.SCORE_NETWORKS ) ; return true ; }

Target:
public boolean requestScores ( android.net.NetworkKey [ ] networks ) throws java.lang.SecurityException { try { return mService.requestScores ( networks ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( declaredType ) ; com.android.jack.backend.dex.annotations.ReflectAnnotationsAdder.Visitor visitor = new com.android.jack.backend.dex.annotations.ReflectAnnotationsAdder.Visitor ( tr , declaredType.getSession ( ) . getPhantomLookup ( ) ) ; visitor.accept ( declaredType ) ; tr.commit ( ) ; }

Target:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( declaredType ) ; com.android.jack.backend.dex.annotations.ReflectAnnotationsAdder.Visitor visitor = new com.android.jack.backend.dex.annotations.ReflectAnnotationsAdder.Visitor ( tr , com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) ) ; visitor.accept ( declaredType ) ; tr.commit ( ) ; }
Source:
public void acknowledgeLastIncomingCdmaSms ( boolean success , int cause , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE , result ) ; rr.mParcel.writeInt ( ( success ? 0 : 1 ) ) ; rr.mParcel.writeInt ( cause ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + success ) + " " ) + cause ) ) ; send ( rr ) ; }

Target:
public void setFacilityLock ( java.lang.String facility , boolean lockState , java.lang.String password , int serviceClass , android.os.Message result ) { setFacilityLockForApp ( facility , lockState , password , serviceClass , null , result ) ; }
Source:
public void swap ( ) { super . swap ( ) ; producerPop ( ) ; producerPop ( ) ; producerPush ( ) ; producerPush ( ) ; }

Target:
public void dup2_x1 ( ) { super . dup2_x1 ( ) ; producerStack.pop ( ) ; producerStack.pop ( ) ; producerStack.pop ( ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; actualProducerStack.dup2_x1 ( ) ; }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; int retCode = - 1 ; retCode = mInstaller.freeCache ( freeStorageSize ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "Couldn't clear application caches" ) ; } if ( observer != null ) { try { observer.onRemoveCompleted ( null , ( retCode >= 0 ) ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "RemoveException when invoking call back" ) ; } } }

Target:
public void run ( ) { mHandler.removeCallbacks ( this ) ; int retCode = - 1 ; synchronized ( mInstallLock ) { retCode = mInstaller.freeCache ( freeStorageSize ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "Couldn't clear application caches" ) ; } } if ( observer != null ) { try { observer.onRemoveCompleted ( null , ( retCode >= 0 ) ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , "RemoveException when invoking call back" ) ; } } }
Source:
public void windowsChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.ComponentRegistry.getDeviceSelectionModel ( ) . updateDevice ( device , windows ) ; } } ) ; }

Target:
public void windowsChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Refreshing windows" , new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateDevice ( device , windows ) ; } } ) ; }
Source:
public boolean hasTetherableConfiguration ( ) { final com.android.server.connectivity.Tethering.TetheringConfiguration cfg = mConfig ; final boolean hasDownstreamConfiguration = ( ( ( cfg.tetherableUsbRegexs.length ) != 0 ) || ( ( cfg.tetherableWifiRegexs.length ) != 0 ) ) || ( ( cfg.tetherableBluetoothRegexs.length ) != 0 ) ; final boolean hasUpstreamConfiguration = ! ( cfg.preferredUpstreamIfaceTypes.isEmpty ( ) ) ; return hasDownstreamConfiguration && hasUpstreamConfiguration ; }

Target:
public boolean hasTetherableConfiguration ( ) { final com.android.server.connectivity.tethering.TetheringConfiguration cfg = mConfig ; final boolean hasDownstreamConfiguration = ( ( ( cfg.tetherableUsbRegexs.length ) != 0 ) || ( ( cfg.tetherableWifiRegexs.length ) != 0 ) ) || ( ( cfg.tetherableBluetoothRegexs.length ) != 0 ) ; final boolean hasUpstreamConfiguration = ! ( cfg.preferredUpstreamIfaceTypes.isEmpty ( ) ) ; return hasDownstreamConfiguration && hasUpstreamConfiguration ; }
Source:
public void testCompareTo_DiffCharsetClass ( ) { tests.api.java.nio.charset.CharsetTest.MockCharset c1 = new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mock" , null ) ; tests.api.java.nio.charset.CharsetTest.MockCharset2 c2 = new tests.api.java.nio.charset.CharsetTest.MockCharset2 ( "Mock" , new java.lang.String [ ] { "myname" } ) ; assertEquals ( 0 , c1.compareTo ( c2 ) ) ; assertEquals ( 0 , c2.compareTo ( c1 ) ) ; }

Target:
public void testCompareTo_DiffCharsetClass ( ) { org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset c1 = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "mock" , null ) ; org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset2 c2 = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset2 ( "Mock" , new java.lang.String [ ] { "myname" } ) ; assertEquals ( 0 , c1.compareTo ( c2 ) ) ; assertEquals ( 0 , c2.compareTo ( c1 ) ) ; }
Source:
public static long getChecksum ( com.google.common.io.InputSupplier < ? extends java.io.InputStream > supplier , final java.util.zip.Checksum checksum ) throws java.io.IOException { return com.google.common.io.ByteStreams.readBytes ( supplier , new com.google.common.io.ByteProcessor < java.lang.Long > ( ) { @ java.lang.Override public boolean processBytes ( byte [ ] buf , int off , int len ) { checksum.update ( buf , off , len ) ; return true ; } @ java.lang.Override public java.lang.Long getResult ( ) { long result = checksum.getValue ( ) ; checksum.reset ( ) ; return result ; } } ) ; }

Target:
public synchronized void reset ( ) throws java.io.IOException { if ( ! ( in.markSupported ( ) ) ) { throw new java.io.IOException ( "Mark not supported" ) ; } if ( ( mark ) == ( - 1 ) ) { throw new java.io.IOException ( "Mark not set" ) ; } in.reset ( ) ; left = mark ; }
Source:
static android.renderscript.FieldPacker createFieldPack ( java.lang.Object [ ] args ) { int len = 0 ; for ( java.lang.Object arg : args ) { len += android.renderscript.FieldPacker.getPackedSize ( arg ) ; } android.renderscript.FieldPacker fp = new android.renderscript.FieldPacker ( len ) ; for ( java.lang.Object arg : args ) { android.renderscript.FieldPacker.addToPack ( fp , arg ) ; } return fp ; }

Target:
private void addSafely ( java.lang.Object obj ) { boolean retry ; final int oldPos = mPos ; do { retry = false ; try { add ( obj ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException e ) { mPos = oldPos ; resize ( ( ( mLen ) * 2 ) ) ; retry = true ; } } while ( retry ) ; }
Source:
public void onMatch ( int peerId , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) android.util.Log.v ( android.net.wifi.nan.WifiNanManager.TAG , ( "onMatch: peerId=" + peerId ) ) ; android.os.Bundle data = new android.os.Bundle ( ) ; data.putByteArray ( android.net.wifi.nan.WifiNanManager.WifiNanDiscoverySessionCallbackProxy.MESSAGE_BUNDLE_KEY_MESSAGE , serviceSpecificInfo ) ; data.putByteArray ( android.net.wifi.nan.WifiNanManager.WifiNanDiscoverySessionCallbackProxy.MESSAGE_BUNDLE_KEY_MESSAGE2 , matchFilter ) ; android.os.Message msg = mHandler.obtainMessage ( android.net.wifi.nan.WifiNanManager.WifiNanDiscoverySessionCallbackProxy.CALLBACK_MATCH ) ; msg.arg1 = peerId ; msg.setData ( data ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void onMatch ( int peerId , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , ( "onMatch: peerId=" + peerId ) ) ; android.os.Bundle data = new android.os.Bundle ( ) ; data.putByteArray ( android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy.MESSAGE_BUNDLE_KEY_MESSAGE , serviceSpecificInfo ) ; data.putByteArray ( android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy.MESSAGE_BUNDLE_KEY_MESSAGE2 , matchFilter ) ; android.os.Message msg = mHandler.obtainMessage ( android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy.CALLBACK_MATCH ) ; msg.arg1 = peerId ; msg.setData ( data ) ; mHandler.sendMessage ( msg ) ; }