auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private libcore.tzdata.update2.tools.TzDataBundleBuilder createValidTzDataBundleBuilder ( java.lang.String tzDataVersion ) throws java.io.IOException { java.io.File fileToChecksum = libcore.tzdata.update2.TzDataBundleInstallerTest.SYSTEM_ZONE_INFO_FILE ; long checksum = libcore.tzdata.update2.FileUtils.calculateChecksum ( fileToChecksum ) ; java.io.File bionicTzData = new java.io.File ( tempDir , "zoneinfo" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( bionicTzData ) ; java.io.File icuData = new java.io.File ( tempDir , "icudata" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( icuData ) ; return new libcore.tzdata.update2.tools.TzDataBundleBuilder ( ) . addChecksum ( fileToChecksum.getPath ( ) , checksum ) . setTzDataVersion ( tzDataVersion ) . addBionicTzData ( bionicTzData ) . addIcuTzData ( icuData ) ; }

Target:
private libcore.tzdata.update2.tools.TzDataBundleBuilder createValidTzDataBundleBuilder ( java.lang.String tzDataVersion ) throws java.io.IOException { java.io.File bionicTzData = new java.io.File ( tempDir , "zoneinfo" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( bionicTzData ) ; java.io.File icuData = new java.io.File ( tempDir , "icudata" ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( icuData ) ; return new libcore.tzdata.update2.tools.TzDataBundleBuilder ( ) . setTzDataVersion ( tzDataVersion ) . addBionicTzData ( bionicTzData ) . addIcuTzData ( icuData ) ; }
Source:
void connectionDisconnected ( com.android.internal.telephony.cdma.CdmaConnection conn ) { if ( ( mState ) != ( State.DISCONNECTED ) ) { boolean hasOnlyDisconnectedConnections = true ; for ( int i = 0 , s = mConnections.size ( ) ; i < s ; i ++ ) { if ( ( mConnections.get ( i ) . getState ( ) ) != ( State.DISCONNECTED ) ) { hasOnlyDisconnectedConnections = false ; break ; } } if ( hasOnlyDisconnectedConnections ) { mState = State.DISCONNECTED ; } } }

Target:
boolean connectionDisconnected ( com.android.internal.telephony.cdma.CdmaConnection conn ) { if ( ( mState ) != ( State.DISCONNECTED ) ) { boolean hasOnlyDisconnectedConnections = true ; for ( int i = 0 , s = mConnections.size ( ) ; i < s ; i ++ ) { if ( ( mConnections.get ( i ) . getState ( ) ) != ( State.DISCONNECTED ) ) { hasOnlyDisconnectedConnections = false ; break ; } } if ( hasOnlyDisconnectedConnections ) { mState = State.DISCONNECTED ; return true ; } } return false ; }
Source:
public boolean launchAssistIntent ( android.content.Intent intent , int requestType , java.lang.String hint , int userHandle , android.os.Bundle args ) { return ( enqueueAssistContext ( requestType , intent , hint , null , null , userHandle , args , com.android.server.am.ActivityManagerService.PENDING_ASSIST_EXTRAS_TIMEOUT ) ) != null ; }

Target:
public boolean launchAssistIntent ( android.content.Intent intent , int requestType , java.lang.String hint , int userHandle , android.os.Bundle args ) { return ( enqueueAssistContext ( requestType , intent , hint , null , null , null , true , true , userHandle , args , com.android.server.am.ActivityManagerService.PENDING_ASSIST_EXTRAS_TIMEOUT ) ) != null ; }
Source:
public void _testOneLine ( java.lang.String line , int options ) throws java.lang.Exception { java.lang.String [ ] fields = new java.lang.String [ 5 ] ; java.lang.StringBuffer buf = new java.lang.StringBuffer ( ) ; android.icu.dev.test.normalizer.ConformanceTest.hexsplit ( line , ';' , fields , buf ) ; checkConformance ( fields , line , options ) ; }

Target:
private void _testOneLine ( java.lang.String line , int options ) throws java.lang.Exception { java.lang.String [ ] fields = new java.lang.String [ 5 ] ; java.lang.StringBuffer buf = new java.lang.StringBuffer ( ) ; android.icu.dev.test.normalizer.ConformanceTest.hexsplit ( line , ';' , fields , buf ) ; checkConformance ( fields , line , options ) ; }
Source:
public java.lang.String getSystemProperty ( java.lang.String property , java.lang.String defValue ) { if ( ( isPhoneTypeGsm ( ) ) || ( isPhoneTypeCdmaLte ( ) ) ) { if ( getUnitTestMode ( ) ) { return null ; } return android.telephony.TelephonyManager.getTelephonyProperty ( mPhoneId , property , defValue ) ; } else { return super . getSystemProperty ( property , defValue ) ; } }

Target:
public java.lang.String getSystemProperty ( java.lang.String property , java.lang.String defValue ) { if ( getUnitTestMode ( ) ) { return null ; } return android.telephony.TelephonyManager.getTelephonyProperty ( mPhoneId , property , defValue ) ; }
Source:
public int openConvertSession ( java.lang.String mimeType ) { if ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimeType should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _openConvertSession ( mUniqueId , mimeType ) ; }

Target:
public int openConvertSession ( java.lang.String mimeType ) { if ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimeType should be non null" ) ; } return _openConvertSession ( mUniqueId , mimeType ) ; }
Source:
public void handleMethod ( com.android.traceview.MethodData method ) { java.lang.String methodName = method.getMethodName ( ) ; java.lang.String className = method.getClassName ( ) . replaceAll ( "/" , "." ) ; java.lang.String fqmn = ( className + "." ) + methodName ; com.android.ide.eclipse.ddms.JavaSourceRevealer.revealMethod ( fqmn , null ) ; }

Target:
public void handleMethod ( com.android.traceview.MethodData method ) { java.lang.String methodName = method.getMethodName ( ) ; java.lang.String className = method.getClassName ( ) . replaceAll ( "/" , "." ) ; java.lang.String fqmn = ( className + "." ) + methodName ; com.android.ide.eclipse.ddms.JavaSourceRevealer.revealMethod ( fqmn , null , ( - 1 ) , null ) ; }
Source:
public com.android.jack.dx.dex.file.IndexedItem get ( com.android.jack.dx.rop.cst.Constant cst ) { if ( cst == null ) { throw new java.lang.NullPointerException ( "cst == null" ) ; } throwIfNotPrepared ( ) ; com.android.jack.dx.rop.type.Type type = ( ( com.android.jack.dx.rop.cst.CstType ) ( cst ) ) . getClassType ( ) ; com.android.jack.dx.dex.file.IndexedItem result = classDefs.get ( type ) ; if ( result == null ) { throw new java.lang.IllegalArgumentException ( "not found" ) ; } return result ; }

Target:
public com.android.jack.dx.dex.file.IndexedItem get ( com.android.jack.dx.rop.cst.Constant cst ) { assert cst != null ; throwIfNotPrepared ( ) ; com.android.jack.dx.dex.file.IndexedItem result = classDefs.get ( cst ) ; if ( result == null ) { throw new java.lang.IllegalArgumentException ( "not found" ) ; } return result ; }
Source:
public boolean onTouchEvent ( final android.view.MotionEvent ev ) { 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 onTouchEvent ( ev ) ; } } ) ; return ret ; } return mAwContents.getAwContentsProxy ( ) . onTouchEvent ( ev ) ; }

Target:
public boolean onTouchEvent ( final android.view.MotionEvent ev ) { 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 onTouchEvent ( ev ) ; } } ) ; return ret ; } return mAwContents.onTouchEvent ( ev ) ; }
Source:
public com.android.jack.dx.dex.file.MethodIdItem intern ( com.android.jack.dx.rop.cst.CstBaseMethodRef method ) { if ( method == null ) { throw new java.lang.NullPointerException ( "method == null" ) ; } throwIfPrepared ( ) ; com.android.jack.dx.dex.file.MethodIdItem result = methodIds.get ( method ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.MethodIdItem ( method ) ; methodIds.put ( method , result ) ; } return result ; }

Target:
public com.android.jack.dx.dex.file.MethodIdItem intern ( com.android.jack.dx.rop.cst.CstBaseMethodRef method ) { assert method != null ; throwIfPrepared ( ) ; com.android.jack.dx.dex.file.MethodIdItem result = methodIds.get ( method ) ; if ( result == null ) { result = new com.android.jack.dx.dex.file.MethodIdItem ( method ) ; methodIds.put ( method , result ) ; } return result ; }
Source:
public java.lang.String printPosition ( boolean shortFormat ) { com.android.utils.PositionXmlParser.Position position = getPosition ( ) ; if ( position == null ) { return com.android.manifmerger.XmlNode.UNKNOWN_POSITION ; } return new java.lang.StringBuilder ( ) . append ( ( ( getSourceLocation ( ) ) != null ? getSourceLocation ( ) . print ( shortFormat ) : "Unknown location" ) ) . append ( ":" ) . append ( position.getLine ( ) ) . append ( ":" ) . append ( position.getColumn ( ) ) . toString ( ) ; }

Target:
public java.lang.String printPosition ( boolean shortFormat ) { com.android.utils.PositionXmlParser.Position position = getPosition ( ) ; return new java.lang.StringBuilder ( ) . append ( getSourceLocation ( ) . print ( shortFormat ) ) . append ( ":" ) . append ( position.getLine ( ) ) . append ( ":" ) . append ( position.getColumn ( ) ) . toString ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.reflect.InvocationHandler handler = new Clash2InvocationHandler ( ) ; try { java.lang.reflect.Proxy.newProxyInstance ( Clash.class . getClassLoader ( ) , new java.lang.Class < ? > [ ] { Interface2A.class , Interface2B.class } , handler ) ; java.lang.System.err.println ( "Clash2 did not throw expected exception" ) ; } catch ( java.lang.IllegalArgumentException iae ) { java.lang.System.out.println ( "Clash2 threw expected exception" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.reflect.InvocationHandler handler = new Clash2InvocationHandler ( ) ; try { java.lang.reflect.Proxy.newProxyInstance ( Clash.class . getClassLoader ( ) , new java.lang.Class < ? > [ ] { Interface2A.class , Interface2B.class } , handler ) ; java.lang.System.out.println ( "Clash2 did not throw expected exception" ) ; } catch ( java.lang.IllegalArgumentException iae ) { java.lang.System.out.println ( "Clash2 threw expected exception" ) ; } }
Source:
public java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { if ( ( spiImpl ) instanceof java.lang.Cloneable ) { java.security.SignatureSpi spi = ( ( java.security.SignatureSpi ) ( spiImpl.clone ( ) ) ) ; return new java.security.Signature.SignatureImpl ( getAlgorithm ( ) , getProvider ( ) , spiImpl ) ; } throw new java.lang.CloneNotSupportedException ( ) ; }

Target:
public java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { java.security.SignatureSpi spi = ( ( java.security.SignatureSpi ) ( spiImpl.clone ( ) ) ) ; return new java.security.Signature.SignatureImpl ( getAlgorithm ( ) , getProvider ( ) , spi ) ; }
Source:
public java.lang.String getDigest ( ) { if ( ! ( containsFileType ( FileType.DEX ) ) ) { return null ; } else { try { return ( ( com.android.sched.vfs.MessageDigestInputVFS ) ( getSectionVFS ( FileType.DEX ) ) ) . getDigest ( ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new java.lang.AssertionError ( e ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new java.lang.AssertionError ( e ) ; } } }

Target:
public java.lang.String getDigest ( ) { if ( ! ( containsFileType ( FileType.DEX ) ) ) { return null ; } else { return getSectionVFS ( FileType.DEX ) . getDigest ( ) ; } }
Source:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ! ( ( super . getBasicBlock ( ) ) instanceof com.android.jack.ir.ast.cfg.JThrowingExpressionBasicBlock ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The parent node must be JThrowingExpressionBasicBlock" ) ; } if ( ( this ) != ( getBasicBlock ( ) . getLastElement ( ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Must be the last element of the basic block" ) ; } }

Target:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ! ( ( super . getBasicBlock ( ) ) instanceof com.android.jack.ir.ast.cfg.JThrowingExpressionBasicBlock ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The parent node must be JThrowingExpressionBasicBlock" ) ; } }
Source:
public java.lang.String insnArgString ( com.android.dx.dex.code.DalvInsn insn ) { com.android.dx.rop.code.RegisterSpecList regs = insn.getRegisters ( ) ; return ( ( ( ( regs.get ( 0 ) . regString ( ) ) + ", " ) + ( regs.get ( 1 ) . regString ( ) ) ) + ", " ) + ( cstString ( insn ) ) ; }

Target:
public java.lang.String insnArgString ( com.android.dx.dex.code.DalvInsn insn ) { com.android.dx.rop.code.RegisterSpecList regs = insn.getRegisters ( ) ; return ( ( ( ( regs.get ( 0 ) . regString ( ) ) + ", " ) + ( regs.get ( 1 ) . regString ( ) ) ) + ", " ) + ( insn.cstString ( ) ) ; }
Source:
public void testFailed ( com.android.builder.internal.testing.TestFailure status , com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( ( mLogger ) != null ) { mLogger.warning ( java.lang.String.format ( "\n%1$s > %2$s[%3$s] [31mFAILED [0m" , test.getClassName ( ) , test.getTestName ( ) , mDeviceName ) ) ; mLogger.warning ( getModifiedTrace ( trace ) ) ; } mFailedTests.add ( test ) ; super . testFailed ( TestFailure.FAILURE , test , trace ) ; }

Target:
public void testFailed ( com.android.ddmlib.testrunner.TestIdentifier test , java.lang.String trace ) { if ( ( mLogger ) != null ) { mLogger.warning ( java.lang.String.format ( "\n%1$s > %2$s[%3$s] [31mFAILED [0m" , test.getClassName ( ) , test.getTestName ( ) , mDeviceName ) ) ; mLogger.warning ( getModifiedTrace ( trace ) ) ; } mFailedTests.add ( test ) ; super . testFailed ( test , trace ) ; }
Source:
public android.app.IActivityContainer createStackOnDisplay ( int displayId ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "createStackOnDisplay()" ) ; synchronized ( this ) { final int stackId = mStackSupervisor.getNextStackId ( ) ; final com.android.server.am.ActivityStack stack = mStackSupervisor.createStackOnDisplay ( stackId , displayId ) ; if ( stack == null ) { return null ; } return stack.mActivityContainer ; } }

Target:
public android.app.IActivityContainer createStackOnDisplay ( int displayId ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "createStackOnDisplay()" ) ; synchronized ( this ) { final int stackId = mStackSupervisor.getNextStackId ( ) ; final com.android.server.am.ActivityStack stack = mStackSupervisor.createStackOnDisplay ( stackId , displayId , true ) ; if ( stack == null ) { return null ; } return stack.mActivityContainer ; } }
Source:
public void testGetResources ( ) { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; android.support.test.espresso.IdlingResource r2 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r2" ) ; assertEquals ( registry.getResources ( ) . size ( ) , 0 ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 , r2 ) ) ; assertEquals ( registry.getResources ( ) . size ( ) , 2 ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r1 , r2 ) ) ; assertEquals ( registry.getResources ( ) . size ( ) , 0 ) ; }

Target:
public void getResources ( ) { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; android.support.test.espresso.IdlingResource r2 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r2" ) ; org.junit.Assert.assertEquals ( registry.getResources ( ) . size ( ) , 0 ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 , r2 ) ) ; org.junit.Assert.assertEquals ( registry.getResources ( ) . size ( ) , 2 ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r1 , r2 ) ) ; org.junit.Assert.assertEquals ( registry.getResources ( ) . size ( ) , 0 ) ; }
Source:
void getFolderItemsNowPlaying ( byte [ ] bdaddr , com.android.bluetooth.avrcp.AvrcpCmd.FolderItemsCmd reqObj , @ android.annotation.Nullable com.android.bluetooth.avrcp.MediaController mediaController ) { if ( com.android.bluetooth.avrcp.AddressedMediaPlayer.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , "getFolderItemsNowPlaying" ) ; if ( mediaController == null ) { android.util.Log.e ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , "mediaController = null, sending no available players response" ) ; mMediaInterface.folderItemsRsp ( bdaddr , AvrcpConstants.RSP_NO_AVBL_PLAY , null ) ; return ; } java.util.List < android.media.session.MediaSession.QueueItem > items = getNowPlayingList ( mediaController ) ; getFolderItemsFilterAttr ( bdaddr , reqObj , items , AvrcpConstants.BTRC_SCOPE_NOW_PLAYING , reqObj.mStartItem , reqObj.mEndItem , mediaController ) ; }

Target:
void getFolderItemsNowPlaying ( byte [ ] bdaddr , com.android.bluetooth.avrcp.AvrcpCmd.FolderItemsCmd reqObj , @ android.annotation.Nullable com.android.bluetooth.avrcp.MediaController mediaController ) { if ( mediaController == null ) { android.util.Log.e ( com.android.bluetooth.avrcp.AddressedMediaPlayer.TAG , "mediaController = null, sending no available players response" ) ; mMediaInterface.folderItemsRsp ( bdaddr , AvrcpConstants.RSP_NO_AVBL_PLAY , null ) ; return ; } java.util.List < android.media.session.MediaSession.QueueItem > items = getNowPlayingList ( mediaController ) ; getFolderItemsFilterAttr ( bdaddr , reqObj , items , AvrcpConstants.BTRC_SCOPE_NOW_PLAYING , reqObj.mStartItem , reqObj.mEndItem , mediaController ) ; }
Source:
protected void onDestroy ( ) { super . onDestroy ( ) ; if ( ( mScreenManipulator ) != null ) { mScreenManipulator.releaseScreenOn ( ) ; mScreenManipulator.close ( ) ; } if ( mDeviceSuspendLock.isHeld ( ) ) { mDeviceSuspendLock.release ( ) ; } }

Target:
protected void onDestroy ( ) { super . onDestroy ( ) ; if ( ( mScreenManipulator ) != null ) { mScreenManipulator.releaseScreenOn ( ) ; mScreenManipulator.close ( ) ; } }
Source:
public java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { if ( ( spiImpl ) instanceof java.lang.Cloneable ) { java.security.MessageDigestSpi spi = ( ( java.security.MessageDigestSpi ) ( spiImpl.clone ( ) ) ) ; return new java.security.MessageDigest.MessageDigestImpl ( spi , getProvider ( ) , getAlgorithm ( ) ) ; } throw new java.lang.CloneNotSupportedException ( ) ; }

Target:
public java.lang.Object clone ( ) throws java.lang.CloneNotSupportedException { java.security.MessageDigestSpi spi = ( ( java.security.MessageDigestSpi ) ( spiImpl.clone ( ) ) ) ; return new java.security.MessageDigest.MessageDigestImpl ( spi , getProvider ( ) , getAlgorithm ( ) ) ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { org.w3c.dom.Attr nameNode = element.getAttributeNodeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_NAME ) ; if ( nameNode != null ) { java.lang.String permissionName = nameNode.getValue ( ) ; if ( ( java.util.Arrays.binarySearch ( com.android.tools.lint.checks.SystemPermissionsDetector.SYSTEM_PERMISSIONS , permissionName ) ) >= 0 ) { context.report ( com.android.tools.lint.checks.SystemPermissionsDetector.ISSUE , element , context.getLocation ( nameNode ) , "Permission is only granted to system apps" , null ) ; } } }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { org.w3c.dom.Attr nameNode = element.getAttributeNodeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_NAME ) ; if ( nameNode != null ) { java.lang.String permissionName = nameNode.getValue ( ) ; if ( ( java.util.Arrays.binarySearch ( com.android.tools.lint.checks.SystemPermissionsDetector.SYSTEM_PERMISSIONS , permissionName ) ) >= 0 ) { context.report ( com.android.tools.lint.checks.SystemPermissionsDetector.ISSUE , element , context.getLocation ( nameNode ) , "Permission is only granted to system apps" ) ; } } }
Source:
public void test_run_for_SimpleTest2_limiting_to_1method_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( target , null , new java.lang.String [ ] { "testSimple2" } ) ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , skipPastReference , testEnvironment , 0 , tests ) ; runner.run ( null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest2_limiting_to_1method_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( target , null , new java.lang.String [ ] { "testSimple2" } ) ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , skipPastReference , testEnvironment , 0 , tests ) ; runner.run ( null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
static void native_set ( int native_object , int other ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } android.graphics.Matrix_Delegate src = android.graphics.Matrix_Delegate.sManager.getDelegate ( other ) ; if ( src == null ) { return ; } java.lang.System.arraycopy ( src.mValues , 0 , d.mValues , 0 , android.graphics.Matrix_Delegate.MATRIX_SIZE ) ; }

Target:
static void native_set ( long native_object , long other ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return ; } android.graphics.Matrix_Delegate src = android.graphics.Matrix_Delegate.sManager.getDelegate ( other ) ; if ( src == null ) { return ; } java.lang.System.arraycopy ( src.mValues , 0 , d.mValues , 0 , android.graphics.Matrix_Delegate.MATRIX_SIZE ) ; }
Source:
public void add ( com.android.jack.dx.dex.file.ClassDefItem clazz ) { com.android.jack.dx.rop.type.Type type ; try { type = clazz.getThisClass ( ) . getClassType ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.NullPointerException ( "clazz == null" ) ; } throwIfPrepared ( ) ; if ( ( classDefs.get ( type ) ) != null ) { throw new java.lang.IllegalArgumentException ( ( "already added: " + type ) ) ; } classDefs.put ( type , clazz ) ; }

Target:
public void add ( com.android.jack.dx.dex.file.ClassDefItem clazz ) { com.android.jack.dx.rop.type.Type type ; try { type = clazz.getThisClass ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.NullPointerException ( "clazz == null" ) ; } throwIfPrepared ( ) ; if ( ( classDefs.get ( type ) ) != null ) { throw new java.lang.IllegalArgumentException ( ( "already added: " + type ) ) ; } classDefs.put ( type , clazz ) ; }
Source:
static void getShort ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , short value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { final short got = ( v == null ) ? ( ( short ) ( m.invokeExact ( ) ) ) : ( ( short ) ( m.invokeExact ( v ) ) ) ; Main.Tester.assertTrue ( ( got == value ) ) ; } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }

Target:
static void getShort ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , short value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { final short got = ( v == null ) ? ( ( short ) ( m.invokeExact ( ) ) ) : ( ( short ) ( m.invokeExact ( v ) ) ) ; Main.Tester.assertTrue ( ( got == value ) ) ; } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( expectFailure , exceptionThrown ) ; }
Source:
public static android.renderscript.Sampler WRAP_LINEAR ( android.renderscript.RenderScript rs ) { if ( ( rs.mSampler_WRAP_LINEAR ) == null ) { android.renderscript.Sampler.Builder b = new android.renderscript.Sampler.Builder ( rs ) ; b.setMinification ( android.renderscript.Sampler.Value.LINEAR ) ; b.setMagnification ( android.renderscript.Sampler.Value.LINEAR ) ; b.setWrapS ( android.renderscript.Sampler.Value.WRAP ) ; b.setWrapT ( android.renderscript.Sampler.Value.WRAP ) ; rs.mSampler_WRAP_LINEAR = b.create ( ) ; } return rs.mSampler_WRAP_LINEAR ; }

Target:
public static android.renderscript.Sampler WRAP_LINEAR ( android.renderscript.RenderScript rs ) { if ( ( rs.mSampler_WRAP_LINEAR ) == null ) { synchronized ( rs ) { if ( ( rs.mSampler_WRAP_LINEAR ) == null ) { android.renderscript.Sampler.Builder b = new android.renderscript.Sampler.Builder ( rs ) ; b.setMinification ( android.renderscript.Sampler.Value.LINEAR ) ; b.setMagnification ( android.renderscript.Sampler.Value.LINEAR ) ; b.setWrapS ( android.renderscript.Sampler.Value.WRAP ) ; b.setWrapT ( android.renderscript.Sampler.Value.WRAP ) ; rs.mSampler_WRAP_LINEAR = b.create ( ) ; } } } return rs.mSampler_WRAP_LINEAR ; }
Source:
protected void socketSetOption ( int opt , boolean b , java.lang.Object val ) throws java.net.SocketException { try { socketSetOption0 ( opt , b , val ) ; } catch ( java.net.SocketException se ) { if ( ( ( socket ) == null ) || ( ! ( socket.isConnected ( ) ) ) ) throw se ; } }

Target:
protected void socketSetOption ( int opt , java.lang.Object val ) throws java.net.SocketException { try { socketSetOption0 ( opt , val ) ; } catch ( java.net.SocketException se ) { if ( ( ( socket ) == null ) || ( ! ( socket.isConnected ( ) ) ) ) throw se ; } }
Source:
private void assertContent ( java.lang.String expected , java.net.URLConnection connection , int limit ) throws java.io.IOException { connection.connect ( ) ; assertEquals ( expected , readAscii ( connection.getInputStream ( ) , limit ) ) ; ( ( java.net.HttpURLConnection ) ( connection ) ) . disconnect ( ) ; }

Target:
private void assertContent ( java.lang.String expected , java.net.URLConnection connection , int limit ) throws java.io.IOException { connection.connect ( ) ; org.junit.Assert.assertEquals ( expected , readAscii ( connection.getInputStream ( ) , limit ) ) ; ( ( java.net.HttpURLConnection ) ( connection ) ) . disconnect ( ) ; }
Source:
public byte returnByte ( byte in ) { if ( limitExceeded ( ) ) { throw new org.bouncycastle.crypto.MaxBytesExceededException ( "2^70 byte limit per IV; Change IV" ) ; } if ( ( index ) == 0 ) { generateKeyStream ( keyStream ) ; advanceCounter ( ) ; } byte out = ( ( byte ) ( ( keyStream [ index ] ) ^ in ) ) ; index = ( ( index ) + 1 ) & 63 ; return out ; }

Target:
public byte returnByte ( byte in ) { if ( limitExceeded ( ) ) { throw new org.bouncycastle.crypto.MaxBytesExceededException ( "2^70 byte limit per IV; Change IV" ) ; } byte out = ( ( byte ) ( ( keyStream [ index ] ) ^ in ) ) ; index = ( ( index ) + 1 ) & 63 ; if ( ( index ) == 0 ) { advanceCounter ( ) ; generateKeyStream ( keyStream ) ; } return out ; }
Source:
public void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { if ( exception != null ) { exception.printStackTrace ( ) ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( format != null ) { sb.append ( java.lang.String.format ( format , args ) ) ; } if ( exception != null ) { sb.append ( exception.toString ( ) ) ; } java.lang.System.err.println ( sb ) ; if ( exception != null ) { fail ( exception.toString ( ) ) ; } }

Target:
public void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { if ( exception != null ) { exception.printStackTrace ( ) ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( format != null ) { sb.append ( java.lang.String.format ( format , args ) ) ; } if ( exception != null ) { sb.append ( exception.toString ( ) ) ; } java.lang.System.err.println ( sb ) ; if ( exception != null ) { throw new java.lang.RuntimeException ( exception ) ; } }
Source:
public void test_isReachable_neverThrows ( ) throws java.lang.Exception { java.net.InetAddress inetAddress = java.net.InetAddress.getByName ( "www.google.com" ) ; final java.net.NetworkInterface netIf ; try { netIf = java.net.NetworkInterface.getByName ( "dummy0" ) ; } catch ( java.net.SocketException e ) { java.lang.System.logI ( "Skipping test_isReachable_neverThrows because dummy0 isn't available" ) ; return ; } assertFalse ( inetAddress.isReachable ( netIf , 256 , 500 ) ) ; }

Target:
public void test_isReachable_neverThrows ( ) throws java.lang.Exception { java.net.InetAddress inetAddress = java.net.InetAddress.getByName ( "www.google.com" ) ; final java.net.NetworkInterface netIf = java.net.NetworkInterface.getByName ( "dummy0" ) ; if ( netIf == null ) { java.lang.System.logI ( "Skipping test_isReachable_neverThrows because dummy0 isn't available" ) ; return ; } assertFalse ( inetAddress.isReachable ( netIf , 256 , 500 ) ) ; }
Source:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile ) { for ( vogar.target.RunnerFactory runnerFactory : runnerFactories ) { vogar.target.Runner runner = runnerFactory.newRunner ( monitor , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds , profile ) ; if ( runner != null ) { return runner ; } } return null ; }

Target:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { for ( vogar.target.RunnerFactory runnerFactory : runnerFactories ) { vogar.target.Runner runner = runnerFactory.newRunner ( monitor , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds , profile , args ) ; if ( runner != null ) { return runner ; } } return null ; }
Source:
public boolean startStreaming ( android.telephony.MbmsStreamingManager streamingManager ) { try { mStreamingService = streamingManager.startStreaming ( mStreamingServiceInfo , new com.android.phone.testapps.embmsfrontend.StreamingServiceTracker.Callback ( ) , null ) ; return true ; } catch ( android.telephony.mbms.MbmsException e ) { android.widget.Toast.makeText ( mActivity , ( "Error starting streaming: " + ( e.getErrorCode ( ) ) ) , Toast.LENGTH_SHORT ) . show ( ) ; } return false ; }

Target:
public boolean startStreaming ( android.telephony.MbmsStreamingManager streamingManager ) { try { mStreamingService = streamingManager.startStreaming ( mStreamingServiceInfo , new com.android.phone.testapps.embmsfrontend.StreamingServiceTracker.Callback ( ) ) ; return true ; } catch ( android.telephony.mbms.MbmsException e ) { android.widget.Toast.makeText ( mActivity , ( "Error starting streaming: " + ( e.getErrorCode ( ) ) ) , Toast.LENGTH_SHORT ) . show ( ) ; } return false ; }
Source:
public static boolean canCurrentUserOpenBlockSettings ( android.content.Context context ) { if ( ( android.os.Build.VERSION.SDK_INT ) < ( android.os.Build.VERSION_CODES.N ) ) { return context.getSystemService ( android.os.UserManager.class ) . isSystemUser ( ) ; } return ( com.android.dialer.telecom.TelecomUtil.isDefaultDialer ( context ) ) && ( com.android.dialer.blocking.FilteredNumberCompat.safeBlockedNumbersContractCanCurrentUserBlockNumbers ( context ) ) ; }

Target:
public static boolean canCurrentUserOpenBlockSettings ( android.content.Context context ) { return ( com.android.dialer.telecom.TelecomUtil.isDefaultDialer ( context ) ) && ( com.android.dialer.blocking.FilteredNumberCompat.safeBlockedNumbersContractCanCurrentUserBlockNumbers ( context ) ) ; }
Source:
private void testTwo ( java.security.cert.X509Certificate x1 , java.lang.String alias1 , java.security.cert.X509Certificate x2 , java.lang.String alias2 ) { org.conscrypt.TrustedCertificateStoreTest.install ( x1 , alias1 ) ; org.conscrypt.TrustedCertificateStoreTest.install ( x2 , alias2 ) ; assertRootCa ( x1 , alias1 ) ; assertRootCa ( x2 , alias2 ) ; assertAliases ( alias1 , alias2 ) ; }

Target:
private void testTwo ( java.security.cert.X509Certificate x1 , java.lang.String alias1 , java.security.cert.X509Certificate x2 , java.lang.String alias2 ) { install ( x1 , alias1 ) ; install ( x2 , alias2 ) ; assertRootCa ( x1 , alias1 ) ; assertRootCa ( x2 , alias2 ) ; assertAliases ( alias1 , alias2 ) ; }
Source:
public com.android.server.pm.Settings.VersionInfo findOrCreateVersion ( java.lang.String volumeUuid ) { com.android.server.pm.Settings.VersionInfo ver = mVersion.get ( volumeUuid ) ; if ( ver == null ) { ver = new com.android.server.pm.Settings.VersionInfo ( ) ; ver.forceCurrent ( ) ; mVersion.put ( volumeUuid , ver ) ; } return ver ; }

Target:
public com.android.server.pm.Settings.VersionInfo findOrCreateVersion ( java.lang.String volumeUuid ) { com.android.server.pm.Settings.VersionInfo ver = mVersion.get ( volumeUuid ) ; if ( ver == null ) { ver = new com.android.server.pm.Settings.VersionInfo ( ) ; mVersion.put ( volumeUuid , ver ) ; } return ver ; }
Source:
public void testOneSystemOneDeleted ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }

Target:
public void testOneSystemOneDeleted ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }
Source:
public void initialize ( ) { mEnableNewManualSelectNetworkUI = getContext ( ) . getResources ( ) . getBoolean ( com.android.internal.R.bool.config_enableNewAutoSelectNetworkUI ) ; mAutoSelect = ( ( android.preference.TwoStatePreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_AUTO_SELECT_KEY ) ) ) ; mChooseNetwork = findPreference ( com.android.phone.NetworkOperators.BUTTON_CHOOSE_NETWORK_KEY ) ; mNetworkSelect = ( ( com.android.phone.NetworkSelectListPreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_NETWORK_SELECT_KEY ) ) ) ; if ( mEnableNewManualSelectNetworkUI ) { this . removePreference ( mNetworkSelect ) ; } else { this . removePreference ( mChooseNetwork ) ; } mProgressDialog = new android.app.ProgressDialog ( getContext ( ) ) ; }

Target:
public void initialize ( ) { mEnableNewManualSelectNetworkUI = getContext ( ) . getResources ( ) . getBoolean ( com.android.internal.R.bool.config_enableNewAutoSelectNetworkUI ) ; mAutoSelect = ( ( android.preference.TwoStatePreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_AUTO_SELECT_KEY ) ) ) ; mChooseNetwork = findPreference ( com.android.phone.NetworkOperators.BUTTON_CHOOSE_NETWORK_KEY ) ; mNetworkSelect = ( ( com.android.phone.NetworkSelectListPreference ) ( findPreference ( com.android.phone.NetworkOperators.BUTTON_NETWORK_SELECT_KEY ) ) ) ; if ( mEnableNewManualSelectNetworkUI ) { removePreference ( mNetworkSelect ) ; } else { removePreference ( mChooseNetwork ) ; } mProgressDialog = new android.app.ProgressDialog ( getContext ( ) ) ; }
Source:
public void test_binarySearchLjava_util_ListLjava_lang_Object ( ) { final int llSize = ll.size ( ) ; try { java.util.Collections.binarySearch ( null , new java.lang.Object ( ) ) ; fail ( "Expected NullPointerException for null list parameter" ) ; } catch ( java.lang.NullPointerException e ) { } for ( int counter = 0 ; counter < llSize ; counter ++ ) { assertTrue ( "Returned incorrect binary search item position" , ( ( ll.get ( java.util.Collections.binarySearch ( ll , ll.get ( counter ) ) ) ) == ( ll.get ( counter ) ) ) ) ; } }

Target:
public void test_binarySearchLjava_util_ListLjava_lang_Object ( ) { final int llSize = ll.size ( ) ; try { java.util.Collections.binarySearch ( null , new java.lang.Object ( ) ) ; fail ( "Expected NullPointerException for null list parameter" ) ; } catch ( java.lang.NullPointerException e ) { } for ( int counter = 0 ; counter < llSize ; counter ++ ) { assertEquals ( "Returned incorrect binary search item position" , ll.get ( counter ) , ll.get ( java.util.Collections.binarySearch ( ll , ll.get ( counter ) ) ) ) ; } }
Source:
public static void sort ( short [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) ) ; }

Target:
public static void sort ( double [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) , null , 0 , 0 ) ; }
Source:
public static java.lang.String $noinline$shortToCharToBytePrint ( short value ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } char c = ( ( char ) ( value ) ) ; byte b = ( ( byte ) ( c ) ) ; return ( ( "c=" + ( ( int ) ( c ) ) ) + ", b=" ) + ( ( int ) ( b ) ) ; }

Target:
public static java.lang.String $noinline$shortToCharToBytePrint ( short value ) { char c = ( ( char ) ( value ) ) ; byte b = ( ( byte ) ( c ) ) ; return ( ( "c=" + ( ( int ) ( c ) ) ) + ", b=" ) + ( ( int ) ( b ) ) ; }
Source:
private synchronized void onGetReport ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDevService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }

Target:
private synchronized void onGetReport ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDevService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }
Source:
public void simRefresh ( int indicationType , android.hardware.radio.V1_0.SimRefreshResult refreshResult ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.uicc.IccRefreshResponse response = new com.android.internal.telephony.uicc.IccRefreshResponse ( ) ; response.refreshResult = refreshResult.type ; response.efId = refreshResult.efId ; response.aid = refreshResult.aid ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_REFRESH , response ) ; if ( ( mRil.mIccRefreshRegistrants ) != null ) { mRil.mIccRefreshRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; } }

Target:
public void simRefresh ( int indicationType , android.hardware.radio.V1_0.SimRefreshResult refreshResult ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.uicc.IccRefreshResponse response = new com.android.internal.telephony.uicc.IccRefreshResponse ( ) ; response.refreshResult = refreshResult.type ; response.efId = refreshResult.efId ; response.aid = refreshResult.aid ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_REFRESH , response ) ; mRil.mIccRefreshRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void ensureAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField loaded ) { synchronized ( this ) { if ( isAnnotationsLoaded ) { return ; } com.android.jack.jayce.FieldNode node ; try { node = getNNode ( ) ; node.loadAnnotations ( loaded ) ; } catch ( com.android.jack.LibraryException e ) { throw new com.android.jack.load.JackLoadingException ( getLocation ( loaded ) , e ) ; } isAnnotationsLoaded = true ; } }

Target:
public void ensureAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField loaded ) { synchronized ( this ) { if ( isAnnotationsLoaded ) { return ; } com.android.jack.jayce.FieldNode node ; try { node = getNNode ( ) ; node.loadAnnotations ( loaded , this ) ; } catch ( com.android.jack.LibraryException e ) { throw new com.android.jack.load.JackLoadingException ( getLocation ( loaded ) , e ) ; } isAnnotationsLoaded = true ; } }
Source:
public void getProperty_volatile ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , "[dev.bootcomplete]: [0]\r\n" ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , "[dev.bootcomplete]: [1]\r\n" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertEquals ( "0" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; org.junit.Assert.assertEquals ( "1" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }

Target:
public void getProperty_volatile ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , "[dev.bootcomplete]: [0]\r\n" ) ; injectShellResponse ( mockDevice , "[dev.bootcomplete]: [1]\r\n" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertEquals ( "0" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; org.junit.Assert.assertEquals ( "1" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }
Source:
public synchronized void onDnsEvent ( int netId , int eventType , int returnCode , int latencyMs , java.lang.String hostname , java.lang.String [ ] ipAddresses , int ipAddressesCount , int uid ) throws android.os.RemoteException { com.android.server.connectivity.NetdEventListenerService.maybeVerboseLog ( "onDnsEvent(%d, %d, %d, %dms)" , netId , eventType , returnCode , latencyMs ) ; long timestamp = java.lang.System.currentTimeMillis ( ) ; getMetricsForNetwork ( timestamp , netId ) . addDnsResult ( eventType , returnCode , latencyMs ) ; if ( ( mNetdEventCallback ) != null ) { mNetdEventCallback.onDnsEvent ( hostname , ipAddresses , ipAddressesCount , timestamp , uid ) ; } }

Target:
public synchronized void onDnsEvent ( int netId , int eventType , int returnCode , int latencyMs , java.lang.String hostname , java.lang.String [ ] ipAddresses , int ipAddressesCount , int uid ) throws android.os.RemoteException { long timestamp = java.lang.System.currentTimeMillis ( ) ; getMetricsForNetwork ( timestamp , netId ) . addDnsResult ( eventType , returnCode , latencyMs ) ; if ( ( mNetdEventCallback ) != null ) { mNetdEventCallback.onDnsEvent ( hostname , ipAddresses , ipAddressesCount , timestamp , uid ) ; } }
Source:
public int compare ( com.android.server.AlarmManagerService.Batch b1 , com.android.server.AlarmManagerService.Batch b2 ) { long when1 = b1.start ; long when2 = b2.start ; if ( ( when1 - when2 ) > 0 ) { return 1 ; } if ( ( when1 - when2 ) < 0 ) { return - 1 ; } return 0 ; }

Target:
public int compare ( com.android.server.AlarmManagerService.Batch b1 , com.android.server.AlarmManagerService.Batch b2 ) { long when1 = b1.start ; long when2 = b2.start ; if ( when1 > when2 ) { return 1 ; } if ( when1 < when2 ) { return - 1 ; } return 0 ; }
Source:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( getFieldMethodId ) == null ) { getFieldMethodId = javaLangClass.getMethodIdWide ( com.android.jack.transformations.ast.string.parameterrefiners.GetDeclaredFieldsParameterRefiner.GETDECLAREDFIELD_METHOD_NAME , java.util.Collections.singletonList ( ( ( com.android.jack.ir.ast.JType ) ( javaLangString ) ) ) , MethodKind.INSTANCE_VIRTUAL ) ; } if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( getFieldMethodId ) ) ) { assert formatter.getName ( call.getType ( ) ) . equals ( com.android.jack.transformations.ast.string.parameterrefiners.FIELD_CLASS_SIGNATURE ) ; return true ; } return false ; }

Target:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( getFieldMethodId ) ) ) { assert formatter.getName ( call.getType ( ) ) . equals ( com.android.jack.transformations.ast.string.parameterrefiners.FIELD_CLASS_SIGNATURE ) ; return true ; } return false ; }
Source:
public java.util.List < com.google.devtools.build.android.aapt2.StaticLibrary > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { final com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.aapt2.StaticLibrary > builder = com.google.common.collect.ImmutableList.< com.google.devtools.build.android.aapt2.StaticLibrary > builder ( ) ; for ( java.lang.String unused : com.google.devtools.build.android.Converters.StaticLibraryListConverter.SPLITTER.splitToList ( input ) ) { builder.add ( com.google.devtools.build.android.Converters.StaticLibraryListConverter.libraryConverter.convert ( input ) ) ; } return builder.build ( ) ; }

Target:
public java.util.List < com.google.devtools.build.android.aapt2.StaticLibrary > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { final com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.aapt2.StaticLibrary > builder = com.google.common.collect.ImmutableList.< com.google.devtools.build.android.aapt2.StaticLibrary > builder ( ) ; for ( java.lang.String path : com.google.devtools.build.android.Converters.StaticLibraryListConverter.SPLITTER.splitToList ( input ) ) { builder.add ( com.google.devtools.build.android.Converters.StaticLibraryListConverter.libraryConverter.convert ( path ) ) ; } return builder.build ( ) ; }
Source:
private com.google.doclava.TypeInfo getTypeParameter ( java.lang.String qualifiedTypeName ) { if ( hasTypeParameters ( ) ) { for ( com.google.doclava.TypeInfo parameter : mTypeParameters ) { if ( parameter.qualifiedTypeName ( ) . equals ( qualifiedTypeName ) ) { return parameter ; } } } return containingClass ( ) . getTypeParameter ( qualifiedTypeName ) ; }

Target:
public com.google.doclava.TypeInfo getTypeParameter ( java.lang.String qualifiedTypeName ) { if ( hasTypeParameters ( ) ) { for ( com.google.doclava.TypeInfo parameter : mTypeParameters ) { if ( parameter.qualifiedTypeName ( ) . equals ( qualifiedTypeName ) ) { return parameter ; } } } return containingClass ( ) . getTypeParameter ( qualifiedTypeName ) ; }