auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void hangupConnectionByIndex ( com.android.internal.telephony.gsm.GsmCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.connections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.gsm.GsmConnection cn = ( ( com.android.internal.telephony.gsm.GsmConnection ) ( call.connections.get ( i ) ) ) ; if ( ( cn.getGSMIndex ( ) ) == index ) { cm.hangupConnection ( index , obtainCompleteMessage ( ) ) ; return ; } } throw new com.android.internal.telephony.CallStateException ( "no gsm index found" ) ; }

Target:
void hangupConnectionByIndex ( com.android.internal.telephony.gsm.GsmCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.mConnections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.gsm.GsmConnection cn = ( ( com.android.internal.telephony.gsm.GsmConnection ) ( call.mConnections.get ( i ) ) ) ; if ( ( cn.getGSMIndex ( ) ) == index ) { mCi.hangupConnection ( index , obtainCompleteMessage ( ) ) ; return ; } } throw new com.android.internal.telephony.CallStateException ( "no gsm index found" ) ; }
Source:
public java.util.List < java.lang.String > getEcjArguments ( ) { if ( ( inputSources ) == null ) { return ecjExtraArguments ; } java.util.ArrayList < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( ecjExtraArguments ) ; for ( java.io.File input : inputSources ) { list.add ( input.getPath ( ) ) ; } return list ; }

Target:
public void setEmitSyntheticDebugInfo ( boolean emitSyntheticDebugInfo ) { this . emitSyntheticDebugInfo = emitSyntheticDebugInfo ; }
Source:
private final boolean canGcNowLocked ( ) { boolean processingBroadcasts = false ; for ( com.android.server.am.BroadcastQueue q : mBroadcastQueues ) { if ( ( ( q.mParallelBroadcasts.size ( ) ) != 0 ) || ( ( q.mOrderedBroadcasts.size ( ) ) != 0 ) ) { processingBroadcasts = true ; } } return ( ! processingBroadcasts ) && ( ( isSleeping ( ) ) || ( mStackSupervisor.allResumedActivitiesIdle ( ) ) ) ; }

Target:
private final boolean canGcNowLocked ( ) { boolean processingBroadcasts = false ; for ( com.android.server.am.BroadcastQueue q : mBroadcastQueues ) { if ( ( ( q.mParallelBroadcasts.size ( ) ) != 0 ) || ( ( q.mOrderedBroadcasts.size ( ) ) != 0 ) ) { processingBroadcasts = true ; } } return ( ! processingBroadcasts ) && ( ( isSleepingLocked ( ) ) || ( mStackSupervisor.allResumedActivitiesIdle ( ) ) ) ; }
Source:
public java.nio.ByteBuffer putChar ( char value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , ( ( short ) ( value ) ) , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putChar ( int index , char value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.CHAR ) ; this . block.pokeShort ( ( ( offset ) + index ) , ( ( short ) ( value ) ) , order ) ; return this ; }
Source:
private void copyTo ( java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , array , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void copyTo ( java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; mRS.validate ( ) ; boolean usePadding = false ; if ( ( mAutoPadding ) && ( ( mType.getElement ( ) . getVectorSize ( ) ) == 3 ) ) { usePadding = true ; } mRS.nAllocationRead ( getID ( mRS ) , array , dt , mType.mElement.mType.mSize , usePadding ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
void setContent ( com.android.ide.eclipse.adt.internal.project.ProjectState state , com.android.sdklib.internal.project.ProjectPropertiesWorkingCopy propertiesWorkingCopy ) { mState = state ; mPropertiesWorkingCopy = propertiesWorkingCopy ; mTable.removeAll ( ) ; mItemDataList.clear ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.project.ProjectState.LibraryState > libs = state.getLibraries ( ) ; for ( com.android.ide.eclipse.adt.internal.project.ProjectState.LibraryState lib : libs ) { com.android.ide.eclipse.adt.internal.project.ProjectState libState = lib.getProjectState ( ) ; addItem ( lib.getRelativePath ( ) , ( libState != null ? libState.getProject ( ) : null ) , ( - 1 ) ) ; } mMustSave = false ; resetEnabled ( ) ; }

Target:
void setContent ( com.android.ide.eclipse.adt.internal.sdk.ProjectState state , com.android.sdklib.internal.project.ProjectPropertiesWorkingCopy propertiesWorkingCopy ) { mState = state ; mPropertiesWorkingCopy = propertiesWorkingCopy ; mTable.removeAll ( ) ; mItemDataList.clear ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.sdk.ProjectState.LibraryState > libs = state.getLibraries ( ) ; for ( com.android.ide.eclipse.adt.internal.sdk.ProjectState.LibraryState lib : libs ) { com.android.ide.eclipse.adt.internal.sdk.ProjectState libState = lib.getProjectState ( ) ; addItem ( lib.getRelativePath ( ) , ( libState != null ? libState.getProject ( ) : null ) , ( - 1 ) ) ; } mMustSave = false ; resetEnabled ( ) ; }
Source:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result ) ; constructGsmSendSmsRilRequest ( rr , smscPDU , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilSendSms ( mInstanceId , rr.mSerial , SmsSession.Event.Tech.SMS_GSM , SmsSession.Event.Format.SMS_FORMAT_3GPP ) ; send ( rr ) ; }

Target:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result , mRILDefaultWorkSource ) ; constructGsmSendSmsRilRequest ( rr , smscPDU , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilSendSms ( mInstanceId , rr.mSerial , SmsSession.Event.Tech.SMS_GSM , SmsSession.Event.Format.SMS_FORMAT_3GPP ) ; send ( rr ) ; }
Source:
public void testAddNonComparable ( ) { try { java.util.NavigableSet q = jsr166.TreeSubSetTest.set0 ( ) ; q.add ( new java.lang.Object ( ) ) ; q.add ( new java.lang.Object ( ) ) ; q.add ( new java.lang.Object ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.ClassCastException success ) { } }

Target:
public void testAddAll1 ( ) { java.util.NavigableSet q = jsr166.TreeSubSetTest.set0 ( ) ; try { q.addAll ( null ) ; shouldThrow ( ) ; } catch ( java.lang.NullPointerException success ) { } }
Source:
public final char getChar ( ) { checkNotFreed ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char result = ( ( char ) ( this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ) ) ; position = newPosition ; return result ; }

Target:
public final char getChar ( ) { checkIsAccessible ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } char result = ( ( char ) ( this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ) ) ; position = newPosition ; return result ; }
Source:
static boolean triggerInstanceOOM ( ) { Main.InstanceMemEater memEater = Main.InstanceMemEater.allocate ( ) ; Main.InstanceMemEater lastMemEater = memEater ; do { lastMemEater.next = Main.InstanceMemEater.allocate ( ) ; lastMemEater = lastMemEater.next ; } while ( lastMemEater != null ) ; memEater.confuseCompilerOptimization ( memEater ) ; return Main.InstanceMemEater.sawOome ; }

Target:
static boolean triggerInstanceOOM ( ) { Main.InstanceMemEater memEater = Main.InstanceMemEater.allocate ( ) ; Main.InstanceMemEater lastMemEater = memEater ; do { lastMemEater.next = Main.InstanceMemEater.allocate ( ) ; lastMemEater = lastMemEater.next ; } while ( lastMemEater != null ) ; memEater.confuseCompilerOptimization ( memEater ) ; Main.InstanceMemEater.hook = null ; return Main.InstanceMemEater.sawOome ; }
Source:
public com.android.builder.core.VariantConfiguration addProductFlavor ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dsl.GroupableProductFlavor productFlavor , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider , @ com.android.annotations.NonNull java.lang.String dimensionName ) { super . addProductFlavor ( productFlavor , sourceProvider , dimensionName ) ; computeNdkConfig ( ) ; return this ; }

Target:
public com.android.builder.core.VariantConfiguration addProductFlavor ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dsl.GroupableProductFlavor productFlavor , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider , @ com.android.annotations.NonNull java.lang.String dimensionName ) { com.google.common.base.Preconditions.checkNotNull ( productFlavor ) ; com.google.common.base.Preconditions.checkNotNull ( sourceProvider ) ; com.google.common.base.Preconditions.checkNotNull ( dimensionName ) ; super . addProductFlavor ( productFlavor , sourceProvider , dimensionName ) ; computeNdkConfig ( ) ; return this ; }
Source:
public byte [ ] getDriverStateDump ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getDriverStateDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } }

Target:
public byte [ ] getDriverStateDump ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getDriverStateDump ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getDriverStateDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }
Source:
public void handleUserSwitch ( int userId ) { if ( userId == ( mCurrentUserId ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( "User already in foreground " + userId ) ) ; return ; } if ( mUserManager.isUserUnlockingOrUnlocked ( mCurrentUserId ) ) { saveToStore ( true ) ; } mCurrentUserId = userId ; mConfiguredNetworks.setNewUser ( userId ) ; clearInternalData ( ) ; if ( mUserManager.isUserUnlockingOrUnlocked ( mCurrentUserId ) ) { loadFromStoreAndMigrateAfterUserSwitch ( mCurrentUserId ) ; } else { android.util.Log.i ( com.android.server.wifi.WifiConfigManagerNew.TAG , "Waiting for user unlock to load from store" ) ; } }

Target:
public void handleUserSwitch ( int userId ) { if ( userId == ( mCurrentUserId ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigManager.TAG , ( "User already in foreground " + userId ) ) ; return ; } if ( mUserManager.isUserUnlockingOrUnlocked ( mCurrentUserId ) ) { saveToStore ( true ) ; } mCurrentUserId = userId ; mConfiguredNetworks.setNewUser ( userId ) ; clearInternalData ( ) ; if ( mUserManager.isUserUnlockingOrUnlocked ( mCurrentUserId ) ) { loadFromStoreAndMigrateAfterUserSwitch ( mCurrentUserId ) ; } else { android.util.Log.i ( com.android.server.wifi.WifiConfigManager.TAG , "Waiting for user unlock to load from store" ) ; } }
Source:
public proguard.gui.KeepClassSpecification getKeepSpecification ( ) { boolean markClasses = ! ( keepClassMembersRadioButton.isSelected ( ) ) ; boolean markConditionally = keepClassesWithMembersRadioButton.isSelected ( ) ; boolean allowShrinking = allowShrinkingCheckBox.isSelected ( ) ; boolean allowOptimization = allowOptimizationCheckBox.isSelected ( ) ; boolean allowObfuscation = allowObfuscationCheckBox.isSelected ( ) ; return new proguard.gui.KeepClassSpecification ( markClasses , markConditionally , allowShrinking , allowOptimization , allowObfuscation , getClassSpecification ( ) ) ; }

Target:
public proguard.gui.KeepClassSpecification getKeepSpecification ( ) { boolean markClasses = ! ( keepClassMembersRadioButton.isSelected ( ) ) ; boolean markConditionally = keepClassesWithMembersRadioButton.isSelected ( ) ; boolean markDescriptorClasses = keepDescriptorClassesCheckBox.isSelected ( ) ; boolean allowShrinking = allowShrinkingCheckBox.isSelected ( ) ; boolean allowOptimization = allowOptimizationCheckBox.isSelected ( ) ; boolean allowObfuscation = allowObfuscationCheckBox.isSelected ( ) ; return new proguard.gui.KeepClassSpecification ( markClasses , markConditionally , markDescriptorClasses , allowShrinking , allowOptimization , allowObfuscation , getClassSpecification ( ) ) ; }
Source:
protected org.eclipse.core.resources.IProject getProject ( ) { return com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.sProject ; }

Target:
protected java.io.File getTargetDir ( ) { java.lang.String sdk = java.lang.System.getenv ( "ADT_SDK_SOURCE_PATH" ) ; if ( sdk != null ) { java.io.File sdkPath = new java.io.File ( sdk ) ; if ( sdkPath.exists ( ) ) { java.io.File testData = new java.io.File ( sdkPath , com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest.TEST_DATA_REL_PATH.replace ( '/' , java.io.File.separatorChar ) ) ; if ( testData.exists ( ) ) { return testData ; } } } return getTempDir ( ) ; }
Source:
protected static boolean isInterestingBlock ( @ com.android.annotations.NonNull java.lang.String parent ) { return ( ( parent.equals ( "defaultConfig" ) ) || ( parent.equals ( "android" ) ) ) || ( parent.equals ( "dependencies" ) ) ; }

Target:
protected static boolean isInterestingBlock ( @ com.android.annotations.NonNull java.lang.String parent , @ com.android.annotations.Nullable java.lang.String parentParent ) { return ( ( ( parent.equals ( "defaultConfig" ) ) || ( parent.equals ( "android" ) ) ) || ( parent.equals ( "dependencies" ) ) ) || ( ( parentParent != null ) && ( parentParent.equals ( "buildTypes" ) ) ) ; }
Source:
protected void onDestroy ( ) { super . onDestroy ( ) ; unregisterReceiver ( mReceiver ) ; mReader.close ( ) ; }

Target:
protected void onDestroy ( ) { super . onDestroy ( ) ; unregisterReceiver ( mReceiver ) ; try { mService.stopRendering ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.cts.verifier.projection.offscreen.ProjectionOffscreenActivity.TAG , "Failed to execute stopRendering" , e ) ; } if ( ( mConnection ) != null ) { unbindService ( mConnection ) ; } mReader.close ( ) ; }
Source:
public void visitDocument ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Document document ) { org.w3c.dom.Element root = document.getDocumentElement ( ) ; if ( ( root != null ) && ( root.getTagName ( ) . equals ( com.android.SdkConstants.TAG_RESOURCES ) ) ) { context.report ( com.android.tools.lint.checks.WrongLocationDetector.ISSUE , root , context.getLocation ( root ) , "This file should be placed in a values/ folder, not a layout/ folder" , null ) ; } }

Target:
public void visitDocument ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Document document ) { org.w3c.dom.Element root = document.getDocumentElement ( ) ; if ( ( root != null ) && ( root.getTagName ( ) . equals ( com.android.SdkConstants.TAG_RESOURCES ) ) ) { context.report ( com.android.tools.lint.checks.WrongLocationDetector.ISSUE , root , context.getLocation ( root ) , "This file should be placed in a `values`/ folder, not a `layout`/ folder" , null ) ; } }
Source:
public final int readUnsignedShort ( ) throws java.io.IOException { int ch1 = in.read ( ) ; int ch2 = in.read ( ) ; if ( ( ch1 | ch2 ) < 0 ) throw new java.io.EOFException ( ) ; return ( ch1 << 8 ) + ( ch2 << 0 ) ; }

Target:
public final int readUnsignedShort ( ) throws java.io.IOException { readFully ( readBuffer , 0 , 2 ) ; return ( libcore.io.Memory.peekShort ( readBuffer , 0 , java.nio.ByteOrder.BIG_ENDIAN ) ) & 65535 ; }
Source:
synchronized boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return reportErrorNative ( error ) ; }

Target:
synchronized boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return mHidDeviceNativeInterface.reportError ( error ) ; }
Source:
public void testInnerClassSingleParameter ( ) throws java.lang.Exception { java.lang.reflect.Constructor < ? > constructor = libcore.java.lang.reflect.ParameterTest.InnerClass.class . getDeclaredConstructor ( libcore.java.lang.reflect.ParameterTest.class ) ; libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( "[libcore.java.lang.reflect.ParameterTest arg0]" ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( libcore.java.lang.reflect.ParameterTest.class ) . checkGetParameterizedType ( "class libcore.java.lang.reflect.ParameterTest" ) ; }

Target:
private void checkLambdaClassConstructor ( java.lang.Class < ? > outerClass , java.lang.reflect.Constructor < ? > constructor ) { libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( ( ( "[" + ( outerClass.getName ( ) ) ) + " arg0]" ) ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( outerClass ) . checkGetParameterizedType ( ( ( "class " + ( outerClass.getName ( ) ) ) + "" ) ) ; }
Source:
void selectMultiple ( java.util.Collection < com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo > viewInfos ) { mAltSelection = null ; mSelections.clear ( ) ; if ( viewInfos != null ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo viewInfo : viewInfos ) { mSelections.add ( createSelection ( viewInfo ) ) ; } } fireSelectionChanged ( ) ; redraw ( ) ; }

Target:
void selectMultiple ( java.util.Collection < com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo > viewInfos ) { mAltSelection = null ; boolean redoLayout = hasExplodedItems ( ) ; mSelections.clear ( ) ; if ( viewInfos != null ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo viewInfo : viewInfos ) { mSelections.add ( createSelection ( viewInfo ) ) ; if ( viewInfo.isInvisibleParent ( ) ) { redoLayout = true ; } } } fireSelectionChanged ( ) ; if ( redoLayout ) { mCanvas.getLayoutEditor ( ) . recomputeLayout ( ) ; } redraw ( ) ; }
Source:
public int hashCode ( ) { return toString ( ) . hashCode ( ) ; }

Target:
public int hashCode ( ) { int hashCode = 1 ; hashCode = ( 31 * hashCode ) + ( sourceUserId ) ; hashCode = ( 31 * hashCode ) + ( uri.hashCode ( ) ) ; hashCode = ( 31 * hashCode ) + ( prefix ? 1231 : 1237 ) ; return hashCode ; }
Source:
private void trackDeprecationsRecursively ( org.eclipse.jdt.core.dom.AbstractTypeDeclaration matchedType ) { for ( org.eclipse.jdt.core.dom.BodyDeclaration bodyDeclaration : ( ( java.util.List < org.eclipse.jdt.core.dom.BodyDeclaration > ) ( matchedType.bodyDeclarations ( ) ) ) ) { if ( ( isApiVisible ( bodyDeclaration ) ) && ( com.android.icu4j.srcgen.CaptureDeprecatedElements.CaptureDeprecatedTransformer.isDeprecated ( bodyDeclaration ) ) ) { deprecatedElements.add ( com.google.currysrc.api.transform.ast.BodyDeclarationLocaters.toLocaterStringForm ( bodyDeclaration ) ) ; if ( bodyDeclaration instanceof org.eclipse.jdt.core.dom.AbstractTypeDeclaration ) { trackDeprecationsRecursively ( ( ( org.eclipse.jdt.core.dom.AbstractTypeDeclaration ) ( bodyDeclaration ) ) ) ; } } } }

Target:
private void trackDeprecationsRecursively ( org.eclipse.jdt.core.dom.AbstractTypeDeclaration matchedType ) { for ( org.eclipse.jdt.core.dom.BodyDeclaration bodyDeclaration : ( ( java.util.List < org.eclipse.jdt.core.dom.BodyDeclaration > ) ( matchedType.bodyDeclarations ( ) ) ) ) { if ( ( isApiVisible ( matchedType , bodyDeclaration ) ) && ( com.android.icu4j.srcgen.CaptureDeprecatedElements.CaptureDeprecatedTransformer.isDeprecated ( bodyDeclaration ) ) ) { deprecatedElements.addAll ( com.google.currysrc.api.transform.ast.BodyDeclarationLocaters.toLocaterStringForms ( bodyDeclaration ) ) ; if ( bodyDeclaration instanceof org.eclipse.jdt.core.dom.AbstractTypeDeclaration ) { trackDeprecationsRecursively ( ( ( org.eclipse.jdt.core.dom.AbstractTypeDeclaration ) ( bodyDeclaration ) ) ) ; } } } }
Source:
java.lang.String getBasePattern ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { if ( ( baseOriginal [ i ] . length ( ) ) != 0 ) result.append ( baseOriginal [ i ] ) ; } return result.toString ( ) ; }

Target:
public int compareTo ( android.icu.text.DateTimePatternGenerator.SkeletonFields other ) { for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { int charDiff = ( chars [ i ] ) - ( other.chars [ i ] ) ; if ( charDiff != 0 ) { return charDiff ; } int lengthDiff = ( lengths [ i ] ) - ( other.lengths [ i ] ) ; if ( lengthDiff != 0 ) { return lengthDiff ; } } return 0 ; }
Source:
public void execute ( ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; getStats ( ) . addValue ( "executed" , true ) ; if ( mFail ) { doFail ( ) ; } } catch ( java.lang.InterruptedException e ) { } }

Target:
public void execute ( android.hardware.cts.helpers.reporting.ISensorTestNode parent ) { long delayNs = java.util.concurrent.TimeUnit.NANOSECONDS.convert ( mDelay , mTimeUnit ) ; try { java.lang.Thread.sleep ( ( delayNs / ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) , ( ( int ) ( delayNs % ( android.hardware.cts.helpers.sensoroperations.FakeSensorOperation.NANOS_PER_MILLI ) ) ) ) ; getStats ( ) . addValue ( "executed" , true ) ; if ( mFail ) { doFail ( ) ; } } catch ( java.lang.InterruptedException e ) { } }
Source:
protected void engineInitSign ( java.security.PrivateKey privateKey ) throws java.security.InvalidKeyException { initInternal ( org.conscrypt.OpenSSLKey.fromPrivateKey ( privateKey ) ) ; enableDSASignatureNonceHardeningIfApplicable ( ) ; signing = true ; }

Target:
private final void resetContext ( ) { org.conscrypt.OpenSSLDigestContext ctxLocal = new org.conscrypt.OpenSSLDigestContext ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; org.conscrypt.NativeCrypto.EVP_MD_CTX_init ( ctxLocal ) ; if ( signing ) { enableDSASignatureNonceHardeningIfApplicable ( ) ; org.conscrypt.NativeCrypto.EVP_SignInit ( ctxLocal , evpAlgorithm ) ; } else { org.conscrypt.NativeCrypto.EVP_VerifyInit ( ctxLocal , evpAlgorithm ) ; } this . ctx = ctxLocal ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( "ClientHello{client version: " + ( clientVersion ) ) + ", random: " ) + ( libcore.tlswire.util.HexEncoding.encode ( random ) ) ) + ", sessionId: " ) + ( libcore.tlswire.util.HexEncoding.encode ( sessionId ) ) ) + ", cipher suites: " ) + ( cipherSuites ) ) + ", compression methods: " ) + ( compressionMethods ) ) + ( ( extensions ) != null ? ", extensions: " + ( java.lang.String.valueOf ( extensions ) ) : "" ) ) + "}" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( "ClientHello{client version: " + ( clientVersion ) ) + ", random: " ) + ( new java.lang.String ( libcore.util.HexEncoding.encode ( random ) ) ) ) + ", sessionId: " ) + ( new java.lang.String ( libcore.util.HexEncoding.encode ( sessionId ) ) ) ) + ", cipher suites: " ) + ( cipherSuites ) ) + ", compression methods: " ) + ( compressionMethods ) ) + ( ( extensions ) != null ? ", extensions: " + ( java.lang.String.valueOf ( extensions ) ) : "" ) ) + "}" ; }
Source:
public void abortTest ( com.android.ddmlib.testrunner.TestIdentifier testId , java.lang.String errorMessage ) { final com.android.cts.tradefed.testtype.DeqpTestRunner.TestInstanceResultListener.PendingResult result = mPendingResults.get ( testId ) ; result.allInstancesPassed = false ; result.errorMessages.put ( mRunConfig , errorMessage ) ; result.remainingConfigs.remove ( mRunConfig ) ; if ( result.remainingConfigs.isEmpty ( ) ) { forwardFinalizedPendingResult ( testId ) ; } if ( testId.equals ( mCurrentTestId ) ) { mCurrentTestId = null ; } }

Target:
public void abortTest ( com.android.ddmlib.testrunner.TestIdentifier testId , java.lang.String errorMessage ) { final com.android.cts.tradefed.testtype.DeqpTestRunner.TestInstanceResultListener.PendingResult result = mPendingResults.get ( testId ) ; com.android.tradefed.log.LogUtil.CLog.i ( "Test %s aborted with message %s" , testId , errorMessage ) ; result.allInstancesPassed = false ; result.errorMessages.put ( mRunConfig , errorMessage ) ; result.remainingConfigs.remove ( mRunConfig ) ; if ( result.remainingConfigs.isEmpty ( ) ) { forwardFinalizedPendingResult ( testId ) ; } if ( testId.equals ( mCurrentTestId ) ) { mCurrentTestId = null ; } }
Source:
public boolean zoomOut ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomOut ( ) ; } } ) ; return ret ; } return mAwContents.zoomOut ( ) ; }

Target:
public boolean shouldDelayChildPressedState ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return shouldDelayChildPressedState ( ) ; } } ) ; return ret ; } return true ; }
Source:
public boolean execute ( org.intellij.plugins.intelliLang.inject.groovy.PsiElement element , int offsetInElement ) { final com.intellij.psi.xml.XmlTag tag = com.intellij.psi.util.PsiTreeUtil.getParentOfType ( element , com.intellij.psi.xml.XmlTag.class ) ; final java.lang.String className = ( tag == null ) ? null : tag.getAttributeValue ( "className" ) ; if ( ( className != null ) && ( tag.getLocalName ( ) . endsWith ( "patternClass" ) ) ) { com.intellij.util.containers.ContainerUtil.addIfNotNull ( psiFacade.findClass ( className , com.intellij.psi.search.GlobalSearchScope.allScope ( project ) ) , roots ) ; } return true ; }

Target:
public boolean process ( org.intellij.plugins.intelliLang.inject.groovy.PsiElement element ) { return element.processDeclarations ( scopeProcessor , state , null , place ) ; }
Source:
private void scanProject ( ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) . getProjectResources ( mProject ) ; if ( resources != null ) { java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > layouts = resources.getResourceItemsOfType ( com.android.resources.ResourceType.LAYOUT ) ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem layout : layouts ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile > sources = layout.getSourceFileList ( ) ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile source : sources ) { updateFileIncludes ( source , false ) ; } } return ; } }

Target:
private void scanProject ( ) { com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources = com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) . getProjectResources ( mProject ) ; if ( resources != null ) { java.util.Collection < com.android.ide.common.resources.ResourceItem > layouts = resources.getResourceItemsOfType ( com.android.resources.ResourceType.LAYOUT ) ; for ( com.android.ide.common.resources.ResourceItem layout : layouts ) { java.util.List < com.android.ide.common.resources.ResourceFile > sources = layout.getSourceFileList ( ) ; for ( com.android.ide.common.resources.ResourceFile source : sources ) { updateFileIncludes ( source , false ) ; } } return ; } }
Source:
private void handleLibrary2 ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dependency.LibraryDependencyImpl libDependency , @ com.android.annotations.NonNull com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap ) { org.gradle.api.Task task = handleLibrary ( libDependency , project ) ; java.util.Collection < com.android.build.gradle.internal.dependency.VariantDependencies > configDepList = reverseMap.get ( libDependency ) ; if ( ( configDepList != null ) && ( ! ( configDepList.isEmpty ( ) ) ) ) { for ( com.android.build.gradle.internal.dependency.VariantDependencies configDependencies : configDepList ) { task.dependsOn ( configDependencies.getCompileConfiguration ( ) . getBuildDependencies ( ) ) ; } } }

Target:
private void setupPrepareLibraryTask ( @ com.android.annotations.NonNull com.android.build.gradle.internal.dependency.LibraryDependencyImpl libDependency , @ com.android.annotations.NonNull com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap ) { org.gradle.api.Task task = maybeCreatePrepareLibraryTask ( libDependency , project ) ; java.util.Collection < com.android.build.gradle.internal.dependency.VariantDependencies > configDepList = reverseMap.get ( libDependency ) ; if ( ( configDepList != null ) && ( ! ( configDepList.isEmpty ( ) ) ) ) { for ( com.android.build.gradle.internal.dependency.VariantDependencies configDependencies : configDepList ) { task.dependsOn ( configDependencies.getCompileConfiguration ( ) . getBuildDependencies ( ) ) ; } } }
Source:
protected void setKernelData ( int targetLayer , com.android.rs.test.BlurStack blurStack ) { com.android.rs.test.f32.KernelDataForRenderScriptF32 kernelData = new com.android.rs.test.f32.KernelDataForRenderScriptF32 ( targetLayer , blurStack , renderScript ) ; if ( ( com.android.rs.test.f32.RefocusFilterF32.ENABLE_FAST_FILTER ) && ( ( kernelData.minDiskRadius ) > ( com.android.rs.test.f32.RefocusFilterF32.MIN_DISC_RADIUS_FOR_FAST_FILTER ) ) ) { useFastFilterForCurrentLayer = true ; } else { useFastFilterForCurrentLayer = false ; } scriptC.bind_g_kernel_info ( kernelData.getKernelInfo ( ) ) ; scriptC.bind_g_kernel_stack ( kernelData.stackAllocation ) ; }

Target:
protected void setKernelData ( int targetLayer , com.android.rs.refocus.BlurStack blurStack ) { com.android.rs.refocus.f32.KernelDataForRenderScriptF32 kernelData = new com.android.rs.refocus.f32.KernelDataForRenderScriptF32 ( targetLayer , blurStack , renderScript ) ; if ( ( com.android.rs.refocus.f32.RefocusFilterF32.ENABLE_FAST_FILTER ) && ( ( kernelData.minDiskRadius ) > ( com.android.rs.refocus.f32.RefocusFilterF32.MIN_DISC_RADIUS_FOR_FAST_FILTER ) ) ) { useFastFilterForCurrentLayer = true ; } else { useFastFilterForCurrentLayer = false ; } scriptC.bind_g_kernel_info ( kernelData.getKernelInfo ( ) ) ; scriptC.bind_g_kernel_stack ( kernelData.stackAllocation ) ; }
Source:
public void onLooperPrepared ( ) { android.os.Handler h = new android.os.Handler ( ) ; mDcc = com.android.internal.telephony.dataconnection.DcController.makeDcc ( mPhone , mDcTracker , h ) ; mDc = com.android.internal.telephony.dataconnection.DataConnection.makeDataConnection ( mPhone , 0 , mDcTracker , mDcTesterFailBringUpAll , mDcc ) ; }

Target:
public void onLooperPrepared ( ) { android.os.Handler h = new android.os.Handler ( ) ; com.android.internal.telephony.dataconnection.DataServiceManager manager = new com.android.internal.telephony.dataconnection.DataServiceManager ( mPhone , android.telephony.AccessNetworkConstants.TransportType.WWAN ) ; mDcc = com.android.internal.telephony.dataconnection.DcController.makeDcc ( mPhone , mDcTracker , manager , h ) ; mDcc.start ( ) ; mDc = com.android.internal.telephony.dataconnection.DataConnection.makeDataConnection ( mPhone , 0 , mDcTracker , manager , mDcTesterFailBringUpAll , mDcc ) ; }
Source:
public static boolean isWfcModeWifiOnly ( android.content.Context context ) { boolean isWifiOnlyMode = ( com.android.ims.ImsManager.getWfcMode ( context ) ) == ( ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcModeWifiOnly :: isWifiOnlyMode" + isWifiOnlyMode ) ) ; return ( com.android.phone.ImsUtil.isWfcEnabled ( context ) ) && isWifiOnlyMode ; }

Target:
public static boolean isWfcModeWifiOnly ( android.content.Context context ) { boolean isWifiOnlyMode = ( com.android.phone.ImsUtil.getDefaultImsManagerInstance ( context ) . getWfcMode ( ) ) == ( ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcModeWifiOnly :: isWifiOnlyMode" + isWifiOnlyMode ) ) ; return ( com.android.phone.ImsUtil.isWfcEnabled ( context ) ) && isWifiOnlyMode ; }
Source:
public boolean hasMatchedTetherApnSetting ( ) { com.android.internal.telephony.dataconnection.ApnSetting matched = fetchDunApn ( ) ; log ( ( "hasMatchedTetherApnSetting: APN=" + matched ) ) ; return matched != null ; }

Target:
private int getPreferredApnSetId ( ) { android.database.Cursor c = mPhone.getContext ( ) . getContentResolver ( ) . query ( android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , ( "preferapnset/subId/" + ( mPhone.getSubId ( ) ) ) ) , new java.lang.String [ ] { Telephony.Carriers.APN_SET_ID } , null , null , null ) ; if ( ( c.getCount ( ) ) < 1 ) { loge ( "getPreferredApnSetId: no APNs found" ) ; return Telephony.Carriers.NO_SET_SET ; } else { c.moveToFirst ( ) ; return c.getInt ( 0 ) ; } }
Source:
protected void onPreHandleMessage ( android.os.Message msg ) { if ( ( ( msg.obj ) != null ) && ( ( msg.obj ) instanceof com.android.server.telecom.Session ) ) { java.lang.String messageCodeName = com.android.server.telecom.CallAudioRouteStateMachine.MESSAGE_CODE_TO_NAME.get ( msg.what , "unknown" ) ; com.android.server.telecom.Log.continueSession ( ( ( com.android.server.telecom.Session ) ( msg.obj ) ) , ( "CARSM.pM_" + messageCodeName ) ) ; com.android.server.telecom.Log.i ( this , "Message received: %s=%d" , messageCodeName , msg.what ) ; } }

Target:
protected void onPreHandleMessage ( android.os.Message msg ) { if ( ( ( msg.obj ) != null ) && ( ( msg.obj ) instanceof android.telecom.Logging.Session ) ) { java.lang.String messageCodeName = com.android.server.telecom.CallAudioRouteStateMachine.MESSAGE_CODE_TO_NAME.get ( msg.what , "unknown" ) ; android.telecom.Log.continueSession ( ( ( android.telecom.Logging.Session ) ( msg.obj ) ) , ( "CARSM.pM_" + messageCodeName ) ) ; android.telecom.Log.i ( this , "Message received: %s=%d, arg1=%d" , messageCodeName , msg.what , msg.arg1 ) ; } }
Source:
public void updateScheduledRecording ( com.android.tv.dvr.ScheduledRecording ... scheduledRecordings ) { for ( com.android.tv.dvr.ScheduledRecording r : scheduledRecordings ) { long id = r.getId ( ) ; if ( mScheduledRecordings.containsKey ( id ) ) { mScheduledRecordings.put ( id , r ) ; } else { android.util.Log.d ( com.android.tv.dvr.DvrDataManagerInMemoryImpl.TAG , ( "Recording not found:" + r ) ) ; } } notifyScheduledRecordingStatusChanged ( scheduledRecordings ) ; }

Target:
public void updateScheduledRecording ( com.android.tv.dvr.data.ScheduledRecording ... scheduledRecordings ) { for ( com.android.tv.dvr.data.ScheduledRecording r : scheduledRecordings ) { long id = r.getId ( ) ; if ( mScheduledRecordings.containsKey ( id ) ) { mScheduledRecordings.put ( id , r ) ; } else { android.util.Log.d ( com.android.tv.dvr.DvrDataManagerInMemoryImpl.TAG , ( "Recording not found:" + r ) ) ; } } notifyScheduledRecordingStatusChanged ( scheduledRecordings ) ; }
Source:
public final < T > T getExtension ( com.google.protobuf.nano.Extension < M , T > extension ) { return extension.getValueFrom ( unknownFieldData ) ; }

Target:
public final < T > T getExtension ( com.google.protobuf.nano.Extension < M , T > extension ) { if ( ( unknownFieldData ) == null ) { return null ; } com.google.protobuf.nano.FieldData field = unknownFieldData.get ( com.google.protobuf.nano.WireFormatNano.getTagFieldNumber ( extension.tag ) ) ; return field == null ? null : field.getValue ( extension ) ; }
Source:
public void testRequestPermissionFromTwoGroups23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRequestPermissionFromTwoGroups" ) ; }

Target:
public void testUpgradeKeepsPermissions ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testAllPermissionsGrantedByDefault" ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testAllPermissionsGrantedOnUpgrade" ) ; }
Source:
public int getComponentEnabledSetting ( android.content.ComponentName componentName ) { synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName ) ; } }

Target:
public void setPackageStoppedState ( java.lang.String packageName , boolean stopped , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; final int uid = android.os.Binder.getCallingUid ( ) ; final int permission = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE ) ; final boolean allowedByPermission = permission == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { if ( mSettings.setPackageStoppedStateLPw ( packageName , stopped , allowedByPermission , uid , userId ) ) { scheduleWritePackageRestrictionsLocked ( userId ) ; } } }
Source:
public void test2_findFirst1 ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 100 ; i ++ ) { assertEquals ( com.android.dx.util._tests.BitsTest.label ( i ) , i , com.android.dx.util.Bits.findFirst ( bits , i ) ) ; } }

Target:
public void test2_findFirst1 ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 100 ; i ++ ) { assertEquals ( com.android.dx.util.BitsTest.label ( i ) , i , com.android.dx.util.Bits.findFirst ( bits , i ) ) ; } }
Source:
public void timeRelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV ( int reps ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; int flags = libcore.icu.RelativeDateTimeFormatter.FORMAT_ABBREV_RELATIVE ; for ( int rep = 0 ; rep < reps ; ++ rep ) { libcore.icu.RelativeDateTimeFormatter.getRelativeDateTimeString ( l , utc , 0L , 0L , 0L , 0L , flags ) ; } }

Target:
public void timeRelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV ( int reps ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ; int flags = libcore.icu.DateUtilsBridge.FORMAT_ABBREV_RELATIVE ; for ( int rep = 0 ; rep < reps ; ++ rep ) { libcore.icu.RelativeDateTimeFormatter.getRelativeDateTimeString ( l , utc , 0L , 0L , 0L , 0L , flags ) ; } }
Source:
public void outcomeStarted ( vogar.target.Runner runner , java.lang.String outcomeName , java.lang.String actionName ) { com.google.gson.JsonObject jsonObject = new com.google.gson.JsonObject ( ) ; jsonObject.addProperty ( "outcome" , outcomeName ) ; if ( runner != null ) { jsonObject.addProperty ( "runner" , runner.getClass ( ) . getName ( ) ) ; } writer.print ( ( ( ( marker ) + ( gson.toJson ( jsonObject ) ) ) + "\n" ) ) ; }

Target:
public void outcomeStarted ( java.lang.Class < ? extends vogar.target.Runner > runnerClass , java.lang.String outcomeName ) { com.google.gson.JsonObject jsonObject = new com.google.gson.JsonObject ( ) ; jsonObject.addProperty ( "outcome" , outcomeName ) ; if ( runnerClass != null ) { jsonObject.addProperty ( "runner" , runnerClass.getName ( ) ) ; } writer.print ( ( ( ( marker ) + ( gson.toJson ( jsonObject ) ) ) + "\n" ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { new com.ibm.icu.dev.test.rbbi.RBBIAPITest ( ) . run ( args ) ; }

Target:
public void testGetTitleInstance ( ) { com.ibm.icu.text.BreakIterator bi = com.ibm.icu.text.BreakIterator.getTitleInstance ( new java.util.Locale ( "en" , "CA" ) ) ; com.ibm.icu.dev.test.TestFmwk.assertNotEquals ( "Title instance break iterator not correctly instantiated" , bi.first ( ) , null ) ; bi.setText ( "Here is some Text" ) ; com.ibm.icu.dev.test.TestFmwk.assertEquals ( "Title instance break iterator not correctly instantiated" , bi.first ( ) , 0 ) ; }
Source:
public void visitMethod ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { if ( ( ( node.astArguments ( ) . size ( ) ) == 1 ) && ( ! ( node.astArguments ( ) . first ( ) . toString ( ) . equals ( "false" ) ) ) ) { context.report ( com.android.tools.lint.checks.SetJavaScriptEnabledDetector.ISSUE , node , context.getLocation ( node ) , ( "Using setJavaScriptEnabled can introduce XSS vulnerabilities " + "into you application, review carefully." ) , null ) ; } }

Target:
public void visitMethod ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { if ( ( ( node.astArguments ( ) . size ( ) ) == 1 ) && ( ! ( node.astArguments ( ) . first ( ) . toString ( ) . equals ( "false" ) ) ) ) { context.report ( com.android.tools.lint.checks.SetJavaScriptEnabledDetector.ISSUE , node , context.getLocation ( node ) , ( "Using `setJavaScriptEnabled` can introduce XSS vulnerabilities " + "into you application, review carefully." ) , null ) ; } }
Source:
protected java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( getSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( "Test requires build-tools 20" ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }

Target:
protected java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( getSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toShortString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }
Source:
private static void addBodyIfExists ( java.net.HttpURLConnection connection , com.android.volley.Request < ? > request ) throws com.android.volley.AuthFailureError , java.io.IOException { byte [ ] body = request.getBody ( ) ; if ( body != null ) { connection.setDoOutput ( true ) ; connection.addRequestProperty ( com.android.volley.toolbox.HurlStack.HEADER_CONTENT_TYPE , request.getBodyContentType ( ) ) ; java.io.DataOutputStream out = new java.io.DataOutputStream ( connection.getOutputStream ( ) ) ; out.write ( body ) ; out.close ( ) ; } }

Target:
private static void addBody ( java.net.HttpURLConnection connection , com.android.volley.Request < ? > request , byte [ ] body ) throws com.android.volley.AuthFailureError , java.io.IOException { connection.setDoOutput ( true ) ; connection.addRequestProperty ( com.android.volley.toolbox.HurlStack.HEADER_CONTENT_TYPE , request.getBodyContentType ( ) ) ; java.io.DataOutputStream out = new java.io.DataOutputStream ( connection.getOutputStream ( ) ) ; out.write ( body ) ; out.close ( ) ; }