auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void stopDtmf ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_DTMF_STOP , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void cancelPendingUssd ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_CANCEL_USSD , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.cancelPendingUssd ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "cancelPendingUssd" , e ) ; } } }
Source:
public java.lang.String getAttributePrefix ( int i ) { if ( mZeroAttributeIsPadding ) { if ( i == 0 ) { org.w3c.dom.Document doc = mRoot.getXmlDocument ( ) ; return doc.lookupPrefix ( AndroidConstants.NS_CUSTOM_RESOURCES ) ; } else { i -- ; } } org.w3c.dom.Node attribute = getAttribute ( i ) ; if ( attribute != null ) { return attribute.getPrefix ( ) ; } return null ; }

Target:
public java.lang.String getAttributePrefix ( int i ) { if ( mZeroAttributeIsPadding ) { if ( i == 0 ) { org.w3c.dom.Document doc = mRoot.getXmlDocument ( ) ; return doc.lookupPrefix ( SdkConstants.NS_RESOURCES ) ; } else { i -- ; } } org.w3c.dom.Node attribute = getAttribute ( i ) ; if ( attribute != null ) { return attribute.getPrefix ( ) ; } return null ; }
Source:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toUnicode ( input , flags ) ; }

Target:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToASCII ( input , result , info ) ; if ( info.hasErrors ( ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid input to toASCII: " + input ) ) ; } return result.toString ( ) ; }
Source:
private org.eclipse.jgit.api.Git getLocalRepo ( ) { java.io.File localRepo = new java.io.File ( LOCAL_REPO_PATH ) ; if ( localRepo.exists ( ) ) { try { return org.eclipse.jgit.api.Git.open ( localRepo ) ; } catch ( java.io.IOException e ) { com.google.gct.intellij.endpoints.synchronization.SampleSyncTask.LOG.error ( "Error getting the local sample repository" , e ) ; } } return null ; }

Target:
private org.eclipse.jgit.api.Git getLocalRepo ( ) { java.io.File localRepo = new java.io.File ( LOCAL_REPO_PATH ) ; if ( localRepo.exists ( ) ) { try { return org.eclipse.jgit.api.Git.open ( localRepo ) ; } catch ( java.io.IOException e ) { com.google.gct.idea.appengine.synchronization.SampleSyncTask.LOG.error ( "Error getting the local sample repository" , e ) ; } } return null ; }
Source:
public java.lang.String format ( com.ibm.icu.dev.test.format.NumberFormatTestTuple tuple ) { com.ibm.icu.text.DecimalFormat fmt = newDecimalFormat ( tuple ) ; java.lang.String actual = fmt.format ( com.ibm.icu.dev.test.format.NumberFormatTest.toNumber ( tuple.format ) ) ; java.lang.String expected = tuple.output ; if ( ! ( expected.equals ( actual ) ) ) { return ( ( "Expected " + expected ) + ", got " ) + actual ; } return null ; }

Target:
public java.lang.String format ( com.ibm.icu.dev.test.format.NumberFormatTestData tuple ) { com.ibm.icu.text.DecimalFormat fmt = newDecimalFormat ( tuple ) ; java.lang.String actual = fmt.format ( com.ibm.icu.dev.test.format.NumberFormatTest.toNumber ( tuple.format ) ) ; java.lang.String expected = tuple.output ; if ( ! ( expected.equals ( actual ) ) ) { return ( ( "Expected " + expected ) + ", got " ) + actual ; } return null ; }
Source:
private static org.eclipse.core.resources.IProject getNonAndroidProjectByName ( java.lang.String name ) { try { org.eclipse.core.resources.IProject project = org.eclipse.core.resources.ResourcesPlugin.getWorkspace ( ) . getRoot ( ) . getProject ( name ) ; if ( ( project.exists ( ) ) && ( ! ( project.hasNature ( AdtConstants.NATURE_DEFAULT ) ) ) ) { return project ; } } catch ( java.lang.IllegalArgumentException iae ) { } catch ( org.eclipse.core.runtime.CoreException e ) { } return null ; }

Target:
private static void writeRootBuildGradle ( java.io.File buildFile ) throws java.io.IOException { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n" ) ; com.android.ide.eclipse.adt.internal.wizards.exportgradle.BuildFileCreator.appendBuildScript ( sb ) ; com.google.common.io.Files.write ( sb.toString ( ) , buildFile , com.google.common.base.Charsets.UTF_8 ) ; }
Source:
public void testEncode ( ) throws java.lang.Exception { assertEncoded ( "" ) ; assertEncoded ( "Eg==" , 18 ) ; assertEncoded ( "EjQ=" , 18 , 52 ) ; assertEncoded ( "EjRW" , 18 , 52 , 86 ) ; assertEncoded ( "EjRWeA==" , 18 , 52 , 86 , 120 ) ; assertEncoded ( "EjRWeJo=" , 18 , 52 , 86 , 120 , 154 ) ; assertEncoded ( "EjRWeJq8" , 18 , 52 , 86 , 120 , 154 , 188 ) ; }

Target:
public void testEncodeDecode ( ) throws java.lang.Exception { libcore.io.Base64Test.assertEncodeDecode ( "" ) ; libcore.io.Base64Test.assertEncodeDecode ( "Eg==" , 18 ) ; libcore.io.Base64Test.assertEncodeDecode ( "EjQ=" , 18 , 52 ) ; libcore.io.Base64Test.assertEncodeDecode ( "EjRW" , 18 , 52 , 86 ) ; libcore.io.Base64Test.assertEncodeDecode ( "EjRWeA==" , 18 , 52 , 86 , 120 ) ; libcore.io.Base64Test.assertEncodeDecode ( "EjRWeJo=" , 18 , 52 , 86 , 120 , 154 ) ; libcore.io.Base64Test.assertEncodeDecode ( "EjRWeJq8" , 18 , 52 , 86 , 120 , 154 , 188 ) ; }
Source:
public com.android.tools.lint.detector.api.Severity getSeverity ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { com.android.tools.lint.detector.api.Severity severity = computeSeverity ( issue ) ; if ( ( mFlags.isWarningsAsErrors ( ) ) && ( severity != ( com.android.tools.lint.detector.api.Severity.IGNORE ) ) ) { severity = com.android.tools.lint.detector.api.Severity.ERROR ; } if ( ( mFlags.isIgnoreWarnings ( ) ) && ( severity == ( com.android.tools.lint.detector.api.Severity.WARNING ) ) ) { severity = com.android.tools.lint.detector.api.Severity.IGNORE ; } return severity ; }

Target:
public com.android.tools.lint.detector.api.Severity getSeverity ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { com.android.tools.lint.detector.api.Severity severity = computeSeverity ( issue ) ; if ( ( mFatalOnly ) && ( severity != ( com.android.tools.lint.detector.api.Severity.FATAL ) ) ) { return com.android.tools.lint.detector.api.Severity.IGNORE ; } if ( ( mFlags.isWarningsAsErrors ( ) ) && ( ( severity.compareTo ( Severity.ERROR ) ) < 0 ) ) { severity = com.android.tools.lint.detector.api.Severity.ERROR ; } if ( ( mFlags.isIgnoreWarnings ( ) ) && ( severity == ( com.android.tools.lint.detector.api.Severity.WARNING ) ) ) { severity = com.android.tools.lint.detector.api.Severity.IGNORE ; } return severity ; }
Source:
protected int [ ] readToc ( int n ) throws java.io.IOException { int [ ] toc = new int [ n ] ; for ( int i = 0 ; i < n ; ++ i ) { toc [ i ] = ( byteBuffer.getInt ( ) ) & ( com.ibm.icu.charset.UConverterAliasDataReader.UNSIGNED_INT_MASK ) ; } return toc ; }

Target:
protected int [ ] readToc ( int n ) throws java.io.IOException { return com.ibm.icu.impl.ICUBinary.getInts ( byteBuffer , n , 0 ) ; }
Source:
protected dexfuzz.ExecutionResult executeOnDevice ( java.lang.String command , boolean captureOutput ) { java.lang.String timeoutString = ( "timeout " + ( timeout ) ) + " " ; return executeCommand ( ( ( timeoutString + ( device.getExecutionShellPrefix ( ) ) ) + command ) , captureOutput ) ; }

Target:
protected dexfuzz.ExecutionResult executeCommandWithTimeout ( java.lang.String command , boolean captureOutput ) { java.lang.String timeoutString = ( "timeout " + ( timeout ) ) + " " ; return device.executeCommand ( ( ( timeoutString + ( device.getExecutionShellPrefix ( ) ) ) + command ) , captureOutput , outputConsumer , errorConsumer ) ; }
Source:
public com.android.sched.vfs.InputVDir getDir ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return inputVFS.getRootInputVDir ( ) . getInputVDir ( typePath ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return inputVFS.getRootInputVDir ( ) . getInputVFile ( clonedPath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
synchronized long nScriptFieldIDCreate ( long sid , int slot ) { validate ( ) ; return rsnScriptFieldIDCreate ( mContext , sid , slot ) ; }

Target:
synchronized void nScriptSetVarV ( long id , int slot , byte [ ] val , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarV ( curCon , id , slot , val , mUseInc ) ; }
Source:
private static libcore.tzdata.update2.tools.TimeZoneDistroBuilder createValidTimeZoneDistroBuilder ( java.lang.String rulesVersion , int revision ) throws java.lang.Exception { byte [ ] bionicTzData = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTzData ( rulesVersion ) ; byte [ ] icuData = new byte [ ] { 'a' } ; libcore.tzdata.update2.DistroVersion distroVersion = new libcore.tzdata.update2.DistroVersion ( DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , DistroVersion.CURRENT_FORMAT_MINOR_VERSION , rulesVersion , revision ) ; return new libcore.tzdata.update2.tools.TimeZoneDistroBuilder ( ) . setDistroVersion ( distroVersion ) . setTzData ( bionicTzData ) . setIcuData ( icuData ) ; }

Target:
private static libcore.tzdata.update2.tools.TimeZoneDistroBuilder createValidTimeZoneDistroBuilder ( java.lang.String rulesVersion , int revision ) throws java.lang.Exception { byte [ ] bionicTzData = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTzData ( rulesVersion ) ; byte [ ] icuData = new byte [ ] { 'a' } ; libcore.tzdata.shared2.DistroVersion distroVersion = new libcore.tzdata.shared2.DistroVersion ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MINOR_VERSION , rulesVersion , revision ) ; return new libcore.tzdata.update2.tools.TimeZoneDistroBuilder ( ) . setDistroVersion ( distroVersion ) . setTzData ( bionicTzData ) . setIcuData ( icuData ) ; }
Source:
public void saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) throws java.io.IOException { java.io.OutputStream fos = null ; try { fos = newFileOutputStream ( file ) ; props.store ( fos , comments ) ; } finally { com.google.common.io.Closeables.closeQuietly ( fos ) ; } }

Target:
public void saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) throws java.io.IOException { com.google.common.io.Closer closer = com.google.common.io.Closer.create ( ) ; try { java.io.OutputStream fos = closer.register ( newFileOutputStream ( file ) ) ; props.store ( fos , comments ) ; } catch ( java.lang.Throwable e ) { throw closer.rethrow ( e ) ; } finally { closer.close ( ) ; } }
Source:
protected com.example.android.rs.vr.engine.Volume doInBackground ( java.lang.String ... names ) { return mLoader.getVolume ( mRs , names [ 0 ] ) ; }

Target:
protected com.example.android.rs.vr.engine.Volume doInBackground ( java.lang.String ... names ) { if ( ( names [ 0 ] . equals ( Droid.NAME ) ) || ( names [ 0 ] . equals ( Mandelbulb.NAME ) ) ) { message = ( "Computing " + ( names [ 0 ] ) ) + ": " ; } else { message = ( " Loading " + ( names [ 0 ] ) ) + ": " ; } return mLoader.getVolume ( mRs , names [ 0 ] ) ; }
Source:
public void getFeatureValue ( int feature , int network , com.android.ims.ImsConfigListener listener ) throws com.android.ims.ImsException { if ( DBG ) { android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( ( ( ( ( "getFeatureValue: feature = " + feature ) + ", network =" ) + network ) + ", listener =" ) + listener ) ) ; } try { miConfig.getFeatureValue ( feature , network , listener ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getFeatureValue()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } }

Target:
public void addConfigCallback ( android.telephony.ims.stub.ImsConfigImplBase.Callback callback ) throws com.android.ims.ImsException { if ( DBG ) android.telephony.Rlog.d ( com.android.ims.ImsConfig.TAG , ( "addConfigCallback: " + callback ) ) ; try { miConfig.addImsConfigCallback ( callback ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addConfigCallback()" , e , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } }
Source:
private void enableTracing ( ) { try { android.os.FileUtils.stringToFile ( mEventEnablePath , "1" ) ; } catch ( java.io.IOException e ) { mLog.warn ( "Failed to start event tracing: %" ) . r ( e.getMessage ( ) ) . flush ( ) ; } }

Target:
private void enableTracing ( ) { if ( ! ( ensureFailSafeIsArmed ( ) ) ) { mLog.wC ( "Failed to arm fail-safe." ) ; return ; } try { android.os.FileUtils.stringToFile ( mEventEnablePath , "1" ) ; } catch ( java.io.IOException e ) { mLog.warn ( "Failed to start event tracing: %" ) . r ( e.getMessage ( ) ) . flush ( ) ; } }
Source:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlActiveTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gldebugger.GLEnum texture = com.android.ide.eclipse.gldebugger.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer textureIndex = java.lang.Integer.valueOf ( ( ( texture.value ) - ( GLEnum.GL_TEXTURE0.value ) ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( com.android.ide.eclipse.gltrace.state.transforms.GLPropertyAccessor.makeAccessor ( msg.getContextId ( ) , GLStateType.TEXTURE_STATE , GLStateType.ACTIVE_TEXTURE_UNIT ) , textureIndex ) ; return java.util.Collections.singletonList ( transform ) ; }

Target:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlActiveTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gltrace.GLEnum texture = com.android.ide.eclipse.gltrace.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer textureIndex = java.lang.Integer.valueOf ( ( ( texture.value ) - ( GLEnum.GL_TEXTURE0.value ) ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( com.android.ide.eclipse.gltrace.state.transforms.GLPropertyAccessor.makeAccessor ( msg.getContextId ( ) , GLStateType.TEXTURE_STATE , GLStateType.ACTIVE_TEXTURE_UNIT ) , textureIndex ) ; return java.util.Collections.singletonList ( transform ) ; }
Source:
void init ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; filter.addAction ( BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.PLANTRONICS ) ) ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.APPLE ) ) ) ; filter.addAction ( BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED ) ; com.android.bluetooth.btservice.RemoteDevices.mAdapterService.registerReceiver ( mReceiver , filter ) ; }

Target:
void init ( ) { android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; filter.addAction ( BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.PLANTRONICS ) ) ) ; filter.addCategory ( ( ( ( android.bluetooth.BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY ) + "." ) + ( android.bluetooth.BluetoothAssignedNumbers.APPLE ) ) ) ; filter.addAction ( BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED ) ; com.android.bluetooth.btservice.RemoteDevices.sAdapterService.registerReceiver ( mReceiver , filter ) ; }
Source:
public boolean p2pFind ( int timeout ) { if ( timeout <= 0 ) { return p2pFind ( ) ; } return doBooleanCommand ( ( "P2P_FIND " + timeout ) ) ; }

Target:
public boolean p2pFind ( int timeout ) { if ( timeout <= 0 ) { return p2pFind ( ) ; } if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.find ( timeout ) ; } else { return doBooleanCommand ( ( "P2P_FIND " + timeout ) ) ; } }
Source:
public void testCheckAndSetCaseInsensitive ( ) { assertEquals ( true , lq.checkAndSet ( "b+KOK" , config ) ) ; assertTrue ( ( ( config.getLocaleQualifier ( ) ) != null ) ) ; assertEquals ( "b+kok" , config.getLocaleQualifier ( ) . toString ( ) ) ; assertEquals ( "b+kok" , com.android.ide.common.resources.configuration.LocaleQualifier.getFolderSegment ( "b+KOK" ) ) ; }

Target:
public void testCheckAndSetCaseInsensitive ( ) { assertEquals ( true , lq.checkAndSet ( "b+KOK" , config ) ) ; assertTrue ( ( ( config.getLocaleQualifier ( ) ) != null ) ) ; assertEquals ( "kok" , config.getLocaleQualifier ( ) . toString ( ) ) ; }
Source:
public boolean init ( java.io.File fontLocation , java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Integer > > enumValueMap , com.android.ide.common.rendering.api.LayoutLog log ) { if ( ( mBridge ) != null ) { return mBridge.init ( fontLocation , enumValueMap , log ) ; } else if ( ( mLegacyBridge ) != null ) { return mLegacyBridge.init ( fontLocation.getAbsolutePath ( ) , enumValueMap ) ; } return false ; }

Target:
public boolean init ( java.util.Map < java.lang.String , java.lang.String > platformProperties , java.io.File fontLocation , java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Integer > > enumValueMap , com.android.ide.common.rendering.api.LayoutLog log ) { if ( ( mBridge ) != null ) { return mBridge.init ( platformProperties , fontLocation , enumValueMap , log ) ; } else if ( ( mLegacyBridge ) != null ) { return mLegacyBridge.init ( fontLocation.getAbsolutePath ( ) , enumValueMap ) ; } return false ; }
Source:
public java.util.List < com.android.jack.ir.ast.JType > getCallSiteParameterTypes ( ) { com.android.jack.ir.ast.JType jlv = com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_VOID ) ; java.util.List < com.android.jack.ir.ast.JType > callSiteParameterTypes = new java.util.ArrayList ( getArgs ( ) . size ( ) ) ; for ( com.android.jack.ir.ast.JExpression pExp : getArgs ( ) ) { if ( pExp instanceof com.android.jack.ir.ast.JNullLiteral ) { callSiteParameterTypes.add ( jlv ) ; } else { callSiteParameterTypes.add ( pExp.getType ( ) ) ; } } return callSiteParameterTypes ; }

Target:
public void checkValidity ( ) { com.android.jack.ir.ast.JExpression instance = getInstance ( ) ; if ( instance == null ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Call to method with polymorphic signature must not be static" ) ; } if ( ! ( getReceiverType ( ) . isSameType ( instance.getType ( ) ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Receiver type mismatch with instance type" ) ; } if ( ( callSiteParameterTypes.size ( ) ) != ( getArgs ( ) . size ( ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Number of method call arguments does not match the number of call site parameters" ) ; } }
Source:
public void testIdentityStringIdentityScope ( ) throws java.lang.Exception { java.security.IdentityScope s = java.security.IdentityScope.getSystemScope ( ) ; java.security.Identity i = new org.apache.harmony.security.tests.support.IdentityStub ( "iii2" , s ) ; assertNotNull ( i ) ; assertEquals ( "iii2" , i.getName ( ) ) ; assertSame ( s , i.getScope ( ) ) ; assertSame ( i , s.getIdentity ( i.getName ( ) ) ) ; }

Target:
public void testIdentityStringIdentityScope ( ) throws java.lang.Exception { java.security.IdentityScope s = new org.apache.harmony.security.tests.support.SystemScope ( ) ; java.security.Identity i = new org.apache.harmony.security.tests.support.IdentityStub ( "iii2" , s ) ; assertNotNull ( i ) ; assertEquals ( "iii2" , i.getName ( ) ) ; assertSame ( s , i.getScope ( ) ) ; assertSame ( i , s.getIdentity ( i.getName ( ) ) ) ; }
Source:
public void test_getSerialVersionUID_inner_private_class ( ) { java.io.ObjectStreamClass osc1 = java.io.ObjectStreamClass.lookup ( tests.api.java.io.ObjectStreamClassTest.SyntheticTest.class ) ; assertEquals ( ( "SyntheticTest unexpected UID: " + ( osc1.getSerialVersionUID ( ) ) ) , ( - 7784078941584535183L ) , osc1.getSerialVersionUID ( ) ) ; java.io.ObjectStreamClass osc2 = java.io.ObjectStreamClass.lookup ( tests.api.java.io.ObjectStreamClassTest.SyntheticTest.X.class ) ; assertEquals ( ( "SyntheticTest.X unexpected UID: " + ( osc2.getSerialVersionUID ( ) ) ) , ( - 7703000075736397332L ) , osc2.getSerialVersionUID ( ) ) ; }

Target:
public void test_getSerialVersionUID_inner_private_class ( ) { java.io.ObjectStreamClass osc1 = java.io.ObjectStreamClass.lookup ( tests.api.java.io.ObjectStreamClassTest.SyntheticTest.class ) ; assertEquals ( ( "SyntheticTest unexpected UID: " + ( osc1.getSerialVersionUID ( ) ) ) , 4405770616475181267L , osc1.getSerialVersionUID ( ) ) ; java.io.ObjectStreamClass osc2 = java.io.ObjectStreamClass.lookup ( tests.api.java.io.ObjectStreamClassTest.SyntheticTest.X.class ) ; assertEquals ( ( "SyntheticTest.X unexpected UID: " + ( osc2.getSerialVersionUID ( ) ) ) , 676101599466902119L , osc2.getSerialVersionUID ( ) ) ; }
Source:
public void testFocusConnectionServiceReleased ( ) { requestFocus ( mActiveCall , null ) ; com.android.server.telecom.tests.ConnectionServiceFocusListener connSvrFocusListener = com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.getConnectionServiceFocusListener ( mActiveConnectionService ) ; connSvrFocusListener.onConnectionServiceReleased ( mActiveConnectionService ) ; waitForHandlerAction ( mFocusManagerUT.getHandler ( ) , com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.CHECK_HANDLER_INTERVAL_MS ) ; assertNull ( mFocusManagerUT.getCurrentFocusCall ( ) ) ; assertNull ( mFocusManagerUT.getCurrentFocusConnectionService ( ) ) ; }

Target:
public void testFocusConnectionServiceReleased ( ) { requestFocus ( mActiveCall , null ) ; com.android.server.telecom.tests.ConnectionServiceFocusListener connSvrFocusListener = com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.getConnectionServiceFocusListener ( mActiveConnectionService ) ; connSvrFocusListener.onConnectionServiceReleased ( mActiveConnectionService ) ; waitForHandlerAction ( mFocusManagerUT.getHandler ( ) , com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.CHECK_HANDLER_INTERVAL_MS ) ; org.junit.Assert.assertNull ( mFocusManagerUT.getCurrentFocusCall ( ) ) ; org.junit.Assert.assertNull ( mFocusManagerUT.getCurrentFocusConnectionService ( ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "{ mediaId=\"" + ( mediaId ) ) + "\" title=\"" ) + ( title ) ) + "\" artist=\"" ) + ( artist ) ) + "\" album=\"" ) + ( album ) ) + "\" }" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( "{ mediaId=\"" + ( mediaId ) ) + "\" title=\"" ) + ( title ) ) + "\" artist=\"" ) + ( artist ) ) + "\" album=\"" ) + ( album ) ) + "\" duration=" ) + ( duration ) ) + " trackPosition=" ) + ( trackNum ) ) + "/" ) + ( numTracks ) ) + " }" ; }
Source:
public boolean getDataEnabled ( ) { return getDataEnabled ( getSubId ( ) ) ; }

Target:
public boolean isConcurrentVoiceAndDataAllowed ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; return telephony == null ? false : telephony.isConcurrentVoiceAndDataAllowed ( getSubId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isConcurrentVoiceAndDataAllowed" , e ) ; } return false ; }
Source:
void configureAndroidModel ( com.android.build.gradle.managed.AndroidConfig androidModel , org.gradle.internal.service.ServiceRegistry serviceRegistry ) { org.gradle.internal.reflect.Instantiator instantiator = serviceRegistry.get ( org.gradle.internal.reflect.Instantiator.class ) ; com.android.build.gradle.internal.AndroidConfigHelper.configure ( androidModel , instantiator ) ; androidModel.signingConfigs.create = $missing$ ; it.name = com.android.builder.core.BuilderConstants.DEBUG ; }

Target:
public void execute ( com.android.build.gradle.managed.SigningConfig signingConfig ) { try { signingConfig.setName ( com.android.builder.core.BuilderConstants.DEBUG ) ; signingConfig.setStoreFile ( com.android.ide.common.signing.KeystoreHelper.defaultDebugKeystoreLocation ( ) ) ; signingConfig.setStorePassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setKeyAlias ( DefaultSigningConfig.DEFAULT_ALIAS ) ; signingConfig.setKeyPassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setStoreType ( java.security.KeyStore.getDefaultType ( ) ) ; } catch ( com.android.prefs.AndroidLocation e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public java.lang.String wifiAwareCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.aware.WifiAwareDiscoveryBaseSession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( new android.net.wifi.aware.WifiAwareManager.PeerHandle ( peerId ) , bytes ) ; }

Target:
public java.lang.String wifiAwareCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.aware.DiscoverySession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwareStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( new android.net.wifi.aware.PeerHandle ( peerId ) , bytes ) ; }
Source:
private void updateRecTimeText ( ) { if ( isEnabled ( ) ) { mProgramStartTimeText.setVisibility ( View.VISIBLE ) ; mProgramStartTimeText.setText ( getTimeString ( mProgramStartTimeMs ) ) ; mProgramEndTimeText.setVisibility ( View.VISIBLE ) ; mProgramEndTimeText.setText ( getTimeString ( mProgramEndTimeMs ) ) ; } else { mProgramStartTimeText.setVisibility ( View.GONE ) ; mProgramEndTimeText.setVisibility ( View.GONE ) ; } }

Target:
private void updateRecTimeText ( ) { if ( isEnabled ( ) ) { mProgramStartTimeText.setVisibility ( View.VISIBLE ) ; setTextIfNeeded ( mProgramStartTimeText , getTimeString ( mProgramStartTimeMs ) ) ; mProgramEndTimeText.setVisibility ( View.VISIBLE ) ; setTextIfNeeded ( mProgramEndTimeText , getTimeString ( mProgramEndTimeMs ) ) ; } else { mProgramStartTimeText.setVisibility ( View.GONE ) ; mProgramEndTimeText.setVisibility ( View.GONE ) ; } }
Source:
protected void place0 ( com.android.dx.dex.file.Section addedTo , int offset ) { try { encoded = encode ( addedTo.getFile ( ) , null , null , null , false ) ; setWriteSize ( encoded.length ) ; } catch ( java.lang.RuntimeException ex ) { throw com.android.dx.util.ExceptionWithContext.withContext ( ex , ( "...while placing debug info for " + ( ref.toHuman ( ) ) ) ) ; } }

Target:
protected void place0 ( com.android.dx.dex.file.Section addedTo , int offset ) { try { encoded = encode ( addedTo.getFile ( ) , null , null , null , false ) ; setWriteSize ( encoded.length ) ; } catch ( java.lang.RuntimeException ex ) { throw com.android.dex.util.ExceptionWithContext.withContext ( ex , ( "...while placing debug info for " + ( ref.toHuman ( ) ) ) ) ; } }
Source:
public com.google.common.collect.ImmutableSortedMap.Builder < K , V > putAll ( java.util.Map < ? extends K , ? extends V > map ) { for ( java.util.Map.Entry < ? extends K , ? extends V > entry : map.entrySet ( ) ) { put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return this ; }

Target:
public com.google.common.collect.ImmutableSortedMap < K , V > build ( ) { return com.google.common.collect.ImmutableSortedMap.fromEntries ( comparator , false , size , entries ) ; }
Source:
private com.android.builder.VariantConfiguration getVariantWithManifestPackage ( final java.lang.String packageName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override public java.lang.String getPackageFromManifest ( ) { return packageName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariantWithManifestPackage ( final java.lang.String packageName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT , "test" ) { @ java.lang.Override public java.lang.String getPackageFromManifest ( ) { return packageName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }
Source:
static final java.lang.String getMediaDirString ( ) { return ( android.mediastress.cts.WorkDir.getTopDirString ( ) ) + "test/" ; }

Target:
static final java.lang.String getMediaDirString ( ) { android.os.Bundle bundle = android.support.test.InstrumentationRegistry.getArguments ( ) ; java.lang.String mediaDirString = bundle.getString ( android.mediastress.cts.WorkDir.MEDIA_PATH_INSTR_ARG_KEY ) ; if ( mediaDirString != null ) { return mediaDirString + ( mediaDirString.endsWith ( "/" ) ? "" : "/" ) ; } else { return ( android.mediastress.cts.WorkDir.getTopDirString ( ) ) + "test/" ; } }
Source:
public void run ( com.android.sched.util.file.ReaderFile file ) { if ( file.hasUsedReader ( ) ) { com.android.sched.util.stream.ExtendedBufferedReader reader = file.getBufferedReader ( ) ; try { reader.close ( ) ; } catch ( java.io.IOException e ) { com.android.sched.util.config.id.ReaderFilePropertyId.logger.log ( java.util.logging.Level.SEVERE , ( ( ( ( "Failed to close '" + ( file.getPath ( ) ) ) + "' from property '" ) + ( getName ( ) ) ) + "'" ) , e ) ; } } }

Target:
public void run ( com.android.sched.util.file.ReaderFile file ) { if ( ( file.getStatus ( ) ) == ( com.android.sched.util.file.StreamFileStatus.OPEN ) ) { try { file.getBufferedReader ( ) . close ( ) ; } catch ( java.io.IOException e ) { com.android.sched.util.config.id.ReaderFilePropertyId.logger.log ( java.util.logging.Level.SEVERE , ( ( ( ( "Failed to close '" + ( file.getPath ( ) ) ) + "' from property '" ) + ( getName ( ) ) ) + "'" ) , e ) ; } } }
Source:
public int dpToPx ( int dp ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite config = mRulesEngine.getEditor ( ) . getConfigurationComposite ( ) ; float dpi = config.getDensity ( ) . getDpiValue ( ) ; return ( ( int ) ( ( dp * dpi ) / 160 ) ) ; }

Target:
public int dpToPx ( int dp ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationChooser chooser = mRulesEngine.getEditor ( ) . getConfigurationChooser ( ) ; float dpi = chooser.getConfiguration ( ) . getDensity ( ) . getDpiValue ( ) ; return ( ( int ) ( ( dp * dpi ) / 160 ) ) ; }
Source:
public void run ( ) { cache.get ( "foo" ) ; }

Target:
public void testClear ( ) throws java.lang.Exception { java.util.concurrent.CountDownLatch factoryLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; final com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > cache = new com.android.ide.common.caching.CreatingCache < java.lang.String , java.lang.String > ( new com.android.ide.common.caching.CreatingCacheTest.DelayedFactory ( factoryLatch ) ) ; java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; new java.lang.Thread ( new com.android.ide.common.caching.CreatingCacheTest.CacheRunnable ( cache , latch ) ) . start ( ) ; latch.await ( ) ; cache.clear ( ) ; }
Source:
boolean eatWhitespace ( ) { boolean ate = false ; while ( ( ( mPos ) < ( mBuf.length ) ) && ( com.android.tools.metalava.doclava1.ApiFile.isspace ( mBuf [ mPos ] ) ) ) { if ( ( mBuf [ mPos ] ) == '\n' ) { ( mLine ) ++ ; } ( mPos ) ++ ; ate = true ; } return ate ; }

Target:
boolean eatWhitespace ( ) { boolean ate = false ; while ( ( ( mPos ) < ( mBuf.length ) ) && ( com.android.tools.metalava.doclava1.ApiFile.isSpace ( mBuf [ mPos ] ) ) ) { if ( ( mBuf [ mPos ] ) == '\n' ) { ( mLine ) ++ ; } ( mPos ) ++ ; ate = true ; } return ate ; }
Source:
private static java.nio.charset.Charset lookup ( java.lang.String charsetName ) { if ( charsetName == null ) throw new java.lang.IllegalArgumentException ( "Null charset name" ) ; if ( ( ( java.nio.charset.Charset.cache1 ) != null ) && ( charsetName.equals ( java.nio.charset.Charset.cache1.getKey ( ) ) ) ) return java.nio.charset.Charset.cache1.getValue ( ) ; return java.nio.charset.Charset.lookup2 ( charsetName ) ; }

Target:
private static java.nio.charset.Charset lookup ( java.lang.String charsetName ) { if ( charsetName == null ) throw new java.lang.IllegalArgumentException ( "Null charset name" ) ; final java.util.Map.Entry < java.lang.String , java.nio.charset.Charset > cached = java.nio.charset.Charset.cache1 ; if ( ( cached != null ) && ( charsetName.equals ( cached.getKey ( ) ) ) ) return cached.getValue ( ) ; return java.nio.charset.Charset.lookup2 ( charsetName ) ; }
Source:
private static java.io.File prepareLib ( @ javax.annotation.Nonnull java.io.File sources , @ javax.annotation.Nonnull java.io.File ... classpath ) throws java.lang.Exception { java.io.File outDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathsAsString ( toolchain.getDefaultBootClasspath ( ) , classpath ) , outDir , false , sources ) ; return outDir ; }

Target:
private static java.io.File prepareLib ( @ javax.annotation.Nonnull java.io.File sources , @ javax.annotation.Nonnull java.io.File ... classpath ) throws java.lang.Exception { java.io.File outDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . addToClasspath ( classpath ) . srcToLib ( outDir , false , sources ) ; return outDir ; }
Source:
public static java.lang.String getFolderSegment ( java.lang.String value ) { if ( value != null ) { java.lang.String segment = "r" + ( value.toUpperCase ( ) ) ; if ( com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier.sRegionPattern.matcher ( segment ) . matches ( ) ) { return segment ; } } return "" ; }

Target:
public static java.lang.String getFolderSegment ( java.lang.String value ) { if ( value != null ) { java.lang.String segment = "r" + ( value.toUpperCase ( ) ) ; if ( com.android.ide.common.resources.configuration.RegionQualifier.sRegionPattern.matcher ( segment ) . matches ( ) ) { return segment ; } } return "" ; }
Source:
public void initialize ( int gsmSignalStrength , int gsmBitErrorRate , int cdmaDbm , int cdmaEcio , int evdoDbm , int evdoEcio , int evdoSnr , boolean gsm ) { initialize ( gsmSignalStrength , gsmBitErrorRate , cdmaDbm , cdmaEcio , evdoDbm , evdoEcio , evdoSnr , 99 , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , 0 , gsm ) ; }

Target:
public void setLteRsrpThresholds ( int [ ] lteRsrpThresholds ) { if ( ( lteRsrpThresholds == null ) || ( ( lteRsrpThresholds.length ) != ( android.telephony.SignalStrength.LTE_RSRP_THRESHOLDS_NUM ) ) ) { android.util.Log.wtf ( android.telephony.SignalStrength.LOG_TAG , "setLteRsrpThresholds - lteRsrpThresholds is invalid." ) ; return ; } java.lang.System.arraycopy ( lteRsrpThresholds , 0 , mLteRsrpThresholds , 0 , android.telephony.SignalStrength.LTE_RSRP_THRESHOLDS_NUM ) ; }
Source:
public void testVload_ushort_relaxed ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.I16 ( mRS ) , w ) ) ; short [ ] tmp = randomShortArray ( w ) ; short [ ] tmp2 = new short [ w ] ; scriptRelaxed.forEach_copy2d_ushort ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch ushort: " ) ; }

Target:
public void testVload_ushort_relaxed ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.U16 ( mRS ) , w ) ) ; short [ ] tmp = randomShortArray ( w ) ; short [ ] tmp2 = new short [ w ] ; scriptRelaxed.forEach_copy2d_ushort ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch ushort: " ) ; }
Source:
private void TestHalf4 ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_fp16 s , int nDims ) { initializeGlobals ( RS , s , com.android.rs.test.Element.F16_4 ( RS ) , nDims ) ; s.forEach_set_kernel_half4 ( alloc ) ; s.invoke_verify_half4 ( ) ; initializeGlobals ( RS , s , com.android.rs.test.Element.F16_4 ( RS ) , nDims ) ; s.invoke_set_half4 ( ) ; s.forEach_verify_kernel_half4 ( alloc ) ; }

Target:
private void TestHalf4 ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_fp16 s , int nDims ) { initializeGlobals ( RS , s , android.renderscript.Element.F16_4 ( RS ) , nDims ) ; s.forEach_set_kernel_half4 ( alloc ) ; s.invoke_verify_half4 ( ) ; initializeGlobals ( RS , s , android.renderscript.Element.F16_4 ( RS ) , nDims ) ; s.invoke_set_half4 ( ) ; s.forEach_verify_kernel_half4 ( alloc ) ; }
Source:
public void testProcSelfOomAdjSane ( ) { java.io.File f = new java.io.File ( "/proc/self/oom_adj" ) ; assertFalse ( f.canWrite ( ) ) ; assertFalse ( f.canExecute ( ) ) ; }

Target:
public void testProcSelfOomAdjSane ( ) throws java.io.IOException { final int OOM_DISABLE = - 17 ; java.io.File f = new java.io.File ( "/proc/self/oom_adj" ) ; assertTrue ( f.canRead ( ) ) ; assertFalse ( f.canExecute ( ) ) ; int oom_adj = android.permission.cts.FileSystemPermissionTest.readInt ( f ) ; assertNotSame ( "unprivileged processes should not be unkillable" , OOM_DISABLE , oom_adj ) ; if ( f.canWrite ( ) ) assertFalse ( "unprivileged processes should not be able to reduce their oom_adj value" , android.permission.cts.FileSystemPermissionTest.writeInt ( f , ( oom_adj - 1 ) ) ) ; }
Source:
public void testCannotAccessScanResult_AppNotAllowed ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }

Target:
public void testCannotAccessScanResult_AppNotAllowed ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }
Source:
public void onListenerConnected ( ) { if ( com.android.systemui.statusbar.BaseStatusBar.DEBUG ) android.util.Log.d ( com.android.systemui.statusbar.BaseStatusBar.TAG , "onListenerConnected" ) ; final android.service.notification.StatusBarNotification [ ] notifications = getActiveNotifications ( ) ; final android.service.notification.NotificationListenerService.RankingMap currentRanking = getCurrentRanking ( ) ; mHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( android.service.notification.StatusBarNotification sbn : notifications ) { addNotification ( sbn , currentRanking , null ) ; } } } ) ; }

Target:
public void onListenerConnected ( ) { if ( com.android.systemui.statusbar.BaseStatusBar.DEBUG ) android.util.Log.d ( com.android.systemui.statusbar.BaseStatusBar.TAG , "onListenerConnected" ) ; final android.service.notification.StatusBarNotification [ ] notifications = getActiveNotifications ( ) ; if ( notifications == null ) { android.util.Log.w ( com.android.systemui.statusbar.BaseStatusBar.TAG , "onListenerConnected unable to get active notifications." ) ; return ; } final android.service.notification.NotificationListenerService.RankingMap currentRanking = getCurrentRanking ( ) ; mHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( android.service.notification.StatusBarNotification sbn : notifications ) { addNotification ( sbn , currentRanking , null ) ; } } } ) ; }
Source:
private static char sadShort2Short ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { sad += java.lang.Math.abs ( ( ( s1 [ i ] ) - ( s2 [ i ] ) ) ) ; } return sad ; }

Target:
private static char sadChar2Char ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { sad += java.lang.Math.abs ( ( ( s1 [ i ] ) - ( s2 [ i ] ) ) ) ; } return sad ; }
Source:
public final void dumpSizes ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.mInstances ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }

Target:
public final void dumpSizes ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.mInstances.get ( getId ( ) ) ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }
Source:
public int startSendingOffloadedPacket ( int slot , com.android.server.connectivity.KeepalivePacketData keepAlivePacket , int period ) { java.lang.String [ ] macAddrStr = getMacAddress ( ) . split ( ":" ) ; byte [ ] srcMac = new byte [ 6 ] ; for ( int i = 0 ; i < 6 ; i ++ ) { java.lang.Integer hexVal = java.lang.Integer.parseInt ( macAddrStr [ i ] , 16 ) ; srcMac [ i ] = hexVal.byteValue ( ) ; } return mWifiVendorHal.startSendingOffloadedPacket ( slot , srcMac , keepAlivePacket , period ) ; }

Target:
public int startSendingOffloadedPacket ( int slot , android.net.KeepalivePacketData keepAlivePacket , int period ) { java.lang.String [ ] macAddrStr = getMacAddress ( ) . split ( ":" ) ; byte [ ] srcMac = new byte [ 6 ] ; for ( int i = 0 ; i < 6 ; i ++ ) { java.lang.Integer hexVal = java.lang.Integer.parseInt ( macAddrStr [ i ] , 16 ) ; srcMac [ i ] = hexVal.byteValue ( ) ; } return mWifiVendorHal.startSendingOffloadedPacket ( slot , srcMac , keepAlivePacket , period ) ; }
Source:
com.android.ide.common.api.Point displayToCanvasPoint ( int displayX , int displayY ) { com.android.ide.common.api.Point p = this . toControl ( displayX , displayY ) ; int x = mHScale.inverseTranslate ( p.x ) ; int y = mVScale.inverseTranslate ( p.y ) ; return new com.android.ide.common.api.Point ( x , y ) ; }

Target:
double getScale ( ) { return mHScale.getScale ( ) ; }