auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.lang.CharSequence getDialerTos ( ) { if ( ! ( isVoicemailTranscriptionEnabled ( ) ) ) { return "" ; } java.lang.String learnMoreText = context.getString ( R.string.dialer_terms_and_conditions_learn_more ) ; return isVvm3 ( ) ? context.getString ( R.string.dialer_terms_and_conditions_for_verizon_1_0 , learnMoreText ) : context.getString ( R.string.dialer_terms_and_conditions_1_0 , learnMoreText ) ; }

Target:
private java.lang.CharSequence getDialerTos ( ) { if ( ! ( isVoicemailTranscriptionEnabled ( ) ) ) { return "" ; } if ( isVvm3 ( ) ) { return context.getString ( R.string.dialer_terms_and_conditions_for_verizon_1_0 ) ; } else { java.lang.String learnMoreText = context.getString ( R.string.dialer_terms_and_conditions_learn_more ) ; return context.getString ( R.string.dialer_terms_and_conditions_1_0 , learnMoreText ) ; } }
Source:
private void handleAssociatedBSSIDEvent ( java.lang.String eventStr ) { java.lang.String BSSID = null ; java.util.regex.Matcher match = com.android.server.wifi.WifiMonitor.mAssociatedPattern.matcher ( eventStr ) ; if ( match.find ( ) ) { BSSID = match.group ( 1 ) ; } else { android.util.Log.d ( com.android.server.wifi.WifiMonitor.TAG , ( "handleAssociatedBSSIDEvent: didn't find BSSID " + eventStr ) ) ; } mStateMachine.sendMessage ( WifiStateMachine.CMD_ASSOCIATED_BSSID , com.android.server.wifi.WifiMonitor.eventLogCounter , 0 , BSSID ) ; }

Target:
private void handleAssociatedBSSIDEvent ( java.lang.String eventStr ) { java.lang.String BSSID = null ; java.util.regex.Matcher match = com.android.server.wifi.WifiMonitor.mAssociatedPattern.matcher ( eventStr ) ; if ( match.find ( ) ) { BSSID = match.group ( 1 ) ; } mStateMachine.sendMessage ( WifiStateMachine.CMD_ASSOCIATED_BSSID , com.android.server.wifi.WifiMonitor.eventLogCounter , 0 , BSSID ) ; }
Source:
static android.telephony.SignalStrength convertHalSignalStrength ( com.android.internal.telephony.V1_0.SignalStrength signalStrength ) { int tdscdmaRscp_1_2 = 255 ; if ( ( ( signalStrength.tdScdma.rscp ) >= 25 ) && ( ( signalStrength.tdScdma.rscp ) <= 120 ) ) { int rscpDbm = - ( signalStrength.tdScdma.rscp ) ; tdscdmaRscp_1_2 = rscpDbm + 120 ; } return new android.telephony.SignalStrength ( signalStrength.gw.signalStrength , signalStrength.gw.bitErrorRate , signalStrength.cdma.dbm , signalStrength.cdma.ecio , signalStrength.evdo.dbm , signalStrength.evdo.ecio , signalStrength.evdo.signalNoiseRatio , signalStrength.lte.signalStrength , signalStrength.lte.rsrp , signalStrength.lte.rsrq , signalStrength.lte.rssnr , signalStrength.lte.cqi , tdscdmaRscp_1_2 ) ; }

Target:
public static android.telephony.SignalStrength convertHalSignalStrength ( com.android.internal.telephony.V1_0.SignalStrength signalStrength ) { int tdscdmaRscp_1_2 = 255 ; if ( ( ( signalStrength.tdScdma.rscp ) >= 25 ) && ( ( signalStrength.tdScdma.rscp ) <= 120 ) ) { int rscpDbm = - ( signalStrength.tdScdma.rscp ) ; tdscdmaRscp_1_2 = rscpDbm + 120 ; } return new android.telephony.SignalStrength ( signalStrength.gw.signalStrength , signalStrength.gw.bitErrorRate , signalStrength.cdma.dbm , signalStrength.cdma.ecio , signalStrength.evdo.dbm , signalStrength.evdo.ecio , signalStrength.evdo.signalNoiseRatio , signalStrength.lte.signalStrength , signalStrength.lte.rsrp , signalStrength.lte.rsrq , signalStrength.lte.rssnr , signalStrength.lte.cqi , tdscdmaRscp_1_2 ) ; }
Source:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mUseAdbHost ) ) { mAdbHostValue.setEnabled ( mUseAdbHost.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } else if ( event.getSource ( ) . equals ( mProfilerBufsize ) ) { com.android.ddmlib.DdmPreferences.setProfilerBufferSizeMb ( mProfilerBufsize.getIntValue ( ) ) ; } }

Target:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mUseAdbHost ) ) { mAdbHostValue.setEnabled ( mUseAdbHost.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } else if ( event.getSource ( ) . equals ( mProfilerBufsize ) ) { com.android.ddmlib.DdmPreferences.setProfilerBufferSizeMb ( mProfilerBufsize.getIntValue ( ) ) ; } super . propertyChange ( event ) ; }
Source:
public void testMethodsGeneratedInDeterministicOrder ( ) throws java.lang.Exception { java.lang.reflect.Method [ ] methods1 = getMethodsForProxyClass ( com.google.dexmaker.stock.ProxyBuilderTest.TestOrderingClass.class ) ; assertNotNull ( methods1 ) ; com.google.dexmaker.stock.Map < java.lang.Class < ? > , java.lang.Class < ? > > map = getGeneratedProxyClasses ( ) ; assertNotNull ( map ) ; map.clear ( ) ; java.lang.reflect.Method [ ] methods2 = getMethodsForProxyClass ( com.google.dexmaker.stock.ProxyBuilderTest.TestOrderingClass.class ) ; assertNotNull ( methods2 ) ; assertTrue ( java.util.Arrays.equals ( methods1 , methods2 ) ) ; }

Target:
public void testMethodsGeneratedInDeterministicOrder ( ) throws java.lang.Exception { java.lang.reflect.Method [ ] methods1 = getMethodsForProxyClass ( com.google.dexmaker.stock.ProxyBuilderTest.TestOrderingClass.class ) ; assertNotNull ( methods1 ) ; java.util.Map < java.lang.Class < ? > , java.lang.Class < ? > > map = getGeneratedProxyClasses ( ) ; assertNotNull ( map ) ; map.clear ( ) ; java.lang.reflect.Method [ ] methods2 = getMethodsForProxyClass ( com.google.dexmaker.stock.ProxyBuilderTest.TestOrderingClass.class ) ; assertNotNull ( methods2 ) ; assertTrue ( java.util.Arrays.equals ( methods1 , methods2 ) ) ; }
Source:
private static void applyPattern ( int addr , boolean localized , java.lang.String pattern ) { try { libcore.icu.NativeDecimalFormat.applyPatternImpl ( addr , localized , pattern ) ; } catch ( java.lang.NullPointerException npe ) { throw npe ; } catch ( java.lang.RuntimeException re ) { throw new java.lang.IllegalArgumentException ( ( ( ( "syntax error: " + ( re.getMessage ( ) ) ) + ": " ) + pattern ) ) ; } }

Target:
private static void applyPattern ( long addr , boolean localized , java.lang.String pattern ) { try { libcore.icu.NativeDecimalFormat.applyPatternImpl ( addr , localized , pattern ) ; } catch ( java.lang.NullPointerException npe ) { throw npe ; } catch ( java.lang.RuntimeException re ) { throw new java.lang.IllegalArgumentException ( ( ( ( "syntax error: " + ( re.getMessage ( ) ) ) + ": " ) + pattern ) ) ; } }
Source:
private void updateDeviceNumberRow ( ) { if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }

Target:
private void updateDeviceNumberRow ( ) { if ( ( deviceNumberTextView ) == null ) { return ; } if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }
Source:
public static void blowup ( ) throws java.lang.Exception { int size = ( 32 * 1024 ) * 1024 ; for ( int i = 0 ; i < ( Main.holder.length ) ; ) { try { Main.holder [ i ] = new char [ size ] ; i ++ ; } catch ( java.lang.OutOfMemoryError oome ) { size = size / 2 ; if ( size == 0 ) { break ; } } } Main.holder [ 0 ] = new char [ 100000 ] ; }

Target:
public static void blowup ( ) throws java.lang.Exception { int size = ( 2 * 1024 ) * 1024 ; for ( int i = 0 ; i < ( Main.holder.length ) ; ) { try { Main.holder [ i ] = new char [ size ] ; i ++ ; } catch ( java.lang.OutOfMemoryError oome ) { size = size / 16 ; if ( size == 0 ) { break ; } } } Main.holder [ 0 ] = new char [ 100000 ] ; }
Source:
public void testSetTextString ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( "cha" ) ; iterator.setOffset ( 1 ) ; assertEquals ( 0 , iterator.getOffset ( ) ) ; }

Target:
public void testSetTextString ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( "cha" ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }
Source:
public com.android.jack.shrob.obfuscation.nameprovider.NameProvider getMethodNameProvider ( @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JMethodId > methodIds ) throws com.android.jack.JackIOException { com.android.jack.shrob.obfuscation.nameprovider.NameProvider provider ; if ( ( globalMethodNameProvider ) != null ) { provider = globalMethodNameProvider ; } else { java.util.Set < java.lang.String > existingNames = new java.util.HashSet < java.lang.String > ( ) ; fillExistingName ( methodIds , existingNames ) ; provider = new com.android.jack.shrob.obfuscation.nameprovider.UniqueNameProvider ( getNameProvider ( obfuscationDictionary ) , existingNames ) ; } return provider ; }

Target:
public com.android.jack.shrob.obfuscation.nameprovider.NameProvider getMethodNameProvider ( ) throws com.android.jack.JackIOException { com.android.jack.shrob.obfuscation.nameprovider.NameProvider provider ; if ( ( globalMethodNameProvider ) != null ) { provider = globalMethodNameProvider ; } else { provider = getNameProvider ( obfuscationDictionary ) ; } return provider ; }
Source:
static boolean native_preRotate ( int native_object , float degrees , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } d.preTransform ( android.graphics.Matrix_Delegate.getRotate ( degrees , px , py ) ) ; return true ; }

Target:
static boolean native_preRotate ( long native_object , float degrees , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } d.preTransform ( android.graphics.Matrix_Delegate.getRotate ( degrees , px , py ) ) ; return true ; }
Source:
void dumpAppTokensLocked ( ) { for ( int i = ( mAppTokens.size ( ) ) - 1 ; i >= 0 ; i -- ) { android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( ( ( " #" + i ) + ": " ) + ( mAppTokens.get ( i ) . token ) ) ) ; } }

Target:
void dumpAppTokensLocked ( ) { for ( int i = ( mAppTokens.size ( ) ) - 1 ; i >= 0 ; i -- ) { android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( ( ( " #" + i ) + ": " ) + ( mAppTokens.get ( i ) . token ) ) ) ; } }
Source:
public void testSetTestClassWithTestSuiteProvider ( ) throws java.lang.Exception { mAndroidTestRunner.setTestClassName ( android.test.AndroidTestRunnerTest.SampleTestSuiteProvider.class . getName ( ) , null ) ; java.util.List < junit.framework.TestCase > testCases = mAndroidTestRunner.getTestCases ( ) ; java.util.List < java.lang.String > testNames = com.google.android.collect.Lists.newArrayList ( ) ; for ( junit.framework.TestCase testCase : testCases ) { testNames.add ( testCase.getName ( ) ) ; } assertEquals ( java.util.Arrays.asList ( "testOne" ) , testNames ) ; }

Target:
public void testSetTestClassWithTestSuiteProvider ( ) throws java.lang.Exception { mAndroidTestRunner.setTestClassName ( android.test.AndroidTestRunnerTest.SampleTestSuiteProvider.class . getName ( ) , null ) ; java.util.List < junit.framework.TestCase > testCases = mAndroidTestRunner.getTestCases ( ) ; java.util.List < java.lang.String > testNames = new java.util.ArrayList < > ( ) ; for ( junit.framework.TestCase testCase : testCases ) { testNames.add ( testCase.getName ( ) ) ; } assertEquals ( java.util.Arrays.asList ( "testOne" ) , testNames ) ; }
Source:
public static java.lang.String getGcpUrl ( com.google.gct.login.CredentialedUser user , java.lang.String projectId ) { com.google.api.services.source.Source sourceRepos = new com.google.api.services.source.Source.Builder ( new com.google.api.client.http.javanet.NetHttpTransport ( ) , new com.google.api.client.json.jackson2.JacksonFactory ( ) , user.getCredential ( ) ) . setApplicationName ( "Android Studio" ) . build ( ) ; java.lang.String calculatedUrl = ( "https://source.developers.google.com/p/" + projectId ) + "/" ; try { com.google.api.services.source.model.ListReposResponse response = sourceRepos.repos ( ) . list ( projectId ) . execute ( ) ; if ( ( response != null ) && ( ( response.getRepos ( ) ) != null ) ) { for ( com.google.api.services.source.model.Repo repo : response.getRepos ( ) ) { if ( "default" . equalsIgnoreCase ( repo.getRepoName ( ) ) ) { calculatedUrl = repo.getCloneUrl ( ) ; } } } } catch ( java.lang.Exception e ) { com.google.gct.idea.git.GcpHttpAuthDataProvider.LOG.error ( ( "Exception loading repo url for " + projectId ) , e ) ; } if ( com.google.api.client.repackaged.com.google.common.base.Strings.isNullOrEmpty ( calculatedUrl ) ) { com.google.gct.idea.git.GcpHttpAuthDataProvider.LOG.error ( ( "Exception loading repo url for " + projectId ) ) ; } return calculatedUrl ; }

Target:
public static java.lang.String getGcpUrl ( java.lang.String projectId ) { return ( "https://source.developers.google.com/p/" + projectId ) + "/" ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , new byte [ 1 ] , 0 , 1 , 1 ) ; fail ( ) ; }
Source:
public void widgetDisposed ( org.eclipse.swt.events.DisposeEvent e ) { model.removeImageChangeListener ( this ) ; if ( ( image ) != null ) { image.dispose ( ) ; } crosshairColor.dispose ( ) ; transform.dispose ( ) ; if ( ( grid ) != null ) { grid.dispose ( ) ; } }

Target:
public void widgetDisposed ( org.eclipse.swt.events.DisposeEvent e ) { model.removeImageChangeListener ( this ) ; crosshairColor.dispose ( ) ; transform.dispose ( ) ; if ( ( grid ) != null ) { grid.dispose ( ) ; } }
Source:
static boolean native_postSkew ( int native_object , float kx , float ky , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } d.postTransform ( android.graphics.Matrix_Delegate.getSkew ( kx , ky , px , py ) ) ; return true ; }

Target:
static boolean native_postSkew ( long native_object , float kx , float ky , float px , float py ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } d.postTransform ( android.graphics.Matrix_Delegate.getSkew ( kx , ky , px , py ) ) ; return true ; }
Source:
private void expandRegister ( int regIdx , com.android.jack.dx.rop.code.RegisterSpec registerToExpand ) { boolean replace = ( ( compatRegs ) == null ) ? true : ! ( compatRegs.get ( regIdx ) ) ; com.android.jack.dx.rop.code.RegisterSpec expandedReg ; if ( replace ) { expandedReg = registerToExpand.withReg ( base ) ; if ( ! ( duplicateFirst ) ) { base += expandedReg.getCategory ( ) ; } duplicateFirst = false ; } else { expandedReg = registerToExpand ; } result.set0 ( regIdx , expandedReg ) ; }

Target:
private void expandRegister ( int regIdx , com.android.jack.dx.rop.code.RegisterSpec registerToExpand ) { boolean replace = ( ( compatRegs ) == null ) ? true : ! ( compatRegs.get ( regIdx ) ) ; com.android.jack.dx.rop.code.RegisterSpec expandedReg ; if ( replace ) { expandedReg = registerToExpand.withReg ( base ) ; if ( ! ( duplicateFirst ) ) { base += expandedReg.getCategory ( ) ; } } else { expandedReg = registerToExpand ; } duplicateFirst = false ; result.set0 ( regIdx , expandedReg ) ; }
Source:
public static int $noinline$runSmaliTest ( java.lang.String name , boolean input ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , new java.lang.Class [ ] { boolean . class } ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }

Target:
public static int $noinline$runSmaliTest ( java.lang.String name , boolean input ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , boolean . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }
Source:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.lookupUri ( ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.lettertile.LetterTileDrawable defaultDrawable = getDefaultDrawable ( photoInfo ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) . placeholder ( defaultDrawable ) . fallback ( defaultDrawable ) ; if ( photoInfo.isCircular ( ) ) { request.circleCrop ( ) ; } request.into ( badge ) ; }

Target:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.lookupUri ( ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }
Source:
void test ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( result.size ( ) ) == 0 ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }

Target:
protected void test ( ) { if ( ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) ) == null ) { status = PASS ; } else { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( result.size ( ) ) == 0 ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } } next ( ) ; }
Source:
public static android.renderscript.Element I16_4 ( android.renderscript.RenderScript rs ) { if ( ( rs.mElement_SHORT_4 ) == null ) { rs.mElement_SHORT_4 = android.renderscript.Element.createVector ( rs , android.renderscript.Element.DataType.SIGNED_16 , 4 ) ; } return rs.mElement_SHORT_4 ; }

Target:
public static android.renderscript.Element I16_4 ( android.renderscript.RenderScript rs ) { if ( ( rs.mElement_SHORT_4 ) == null ) { synchronized ( rs ) { if ( ( rs.mElement_SHORT_4 ) == null ) { rs.mElement_SHORT_4 = android.renderscript.Element.createVector ( rs , android.renderscript.Element.DataType.SIGNED_16 , 4 ) ; } } } return rs.mElement_SHORT_4 ; }
Source:
public java.lang.String substring ( int beginIndex ) { if ( beginIndex < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } int subLen = ( count ) - beginIndex ; if ( subLen < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } return beginIndex == 0 ? this : fastSubstring ( beginIndex , subLen ) ; }

Target:
public java.lang.String substring ( int beginIndex ) { if ( beginIndex < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } int subLen = ( length ( ) ) - beginIndex ; if ( subLen < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } return beginIndex == 0 ? this : fastSubstring ( beginIndex , subLen ) ; }
Source:
public void testParseICMPv6NS ( ) { final java.lang.String packet = "807ABF6F48F3 100E7E263FC1 86DD" + ( ( ( ( ( ( "6C0000000020 3A FF" + "FE80000000000000FA000004FD000001" ) + "FF0200000000000000000001FF01C146" ) + "87 00 8AD4" ) + "00000000" ) + "2401FA000004FD0015EA6A5C7B01C146" ) + "01 01 00005E000265" ) ; final java.lang.String expected = "RX 10:0e:7e:26:3f:c1 > 80:7a:bf:6f:48:f3 ipv6" + ( " fe80::fa00:4:fd00:1 > ff02::1:ff01:c146 icmp6" + " ns 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 slla 00:00:5e:00:02:65" ) ; assertEquals ( expected , getSummary ( packet ) ) ; }

Target:
public void testParseICMPv6NS ( ) { final java.lang.String packet = "807ABF6F48F3 100E7E263FC1 86DD" + ( ( ( ( ( ( "6C0000000020 3A FF" + "FE80000000000000FA000004FD000001" ) + "FF0200000000000000000001FF01C146" ) + "87 00 8AD4" ) + "00000000" ) + "2401FA000004FD0015EA6A5C7B01C146" ) + "01 01 00005E000265" ) ; final java.lang.String expected = "RX 10:0e:7e:26:3f:c1 > 80:7a:bf:6f:48:f3 ipv6" + ( " fe80::fa00:4:fd00:1 > ff02::1:ff01:c146 icmp6" + " ns 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 slla 00:00:5e:00:02:65" ) ; org.junit.Assert.assertEquals ( expected , getSummary ( packet ) ) ; }
Source:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ! ( mEnforcingState.equals ( com.android.tradefed.targetprep.VtsCoveragePreparer.SELINUX_DISABLED ) ) ) { device.executeShellCommand ( ( "setenforce " + ( mEnforcingState ) ) ) ; } if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; } device.executeShellCommand ( "rm -rf /data/misc/trace/*" ) ; }

Target:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ( ( mEnforcingState ) != null ) && ( ! ( mEnforcingState.equals ( com.android.tradefed.targetprep.VtsCoveragePreparer.SELINUX_DISABLED ) ) ) ) { device.executeShellCommand ( ( "setenforce " + ( mEnforcingState ) ) ) ; } if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; } device.executeShellCommand ( "rm -rf /data/misc/trace/*" ) ; }
Source:
protected < DST extends com.android.sched.item.Component > java.util.Iterator < DST > adaptWithLog ( @ javax.annotation.Nonnull com.android.sched.schedulable.AdapterSchedulable < T , DST > adapter , @ javax.annotation.Nonnull T data ) throws java.lang.Exception { com.android.sched.scheduler.ManagedSchedulable managedSchedulable = schedulableManager.getManagedSchedulable ( adapter.getClass ( ) ) ; com.android.sched.util.log.Event event = logAndTrace ( adapter , managedSchedulable ) ; try { return adapter.adapt ( data ) ; } finally { event.end ( ) ; } }

Target:
protected < DST extends com.android.sched.item.Component > java.util.Iterator < DST > adaptWithLog ( @ javax.annotation.Nonnull com.android.sched.schedulable.AdapterSchedulable < T , DST > adapter , @ javax.annotation.Nonnull T data ) throws java.lang.Exception { com.android.sched.scheduler.ManagedSchedulable managedSchedulable = schedulableManager.getManagedSchedulable ( adapter.getClass ( ) ) ; com.android.sched.util.log.Event event = logAndTrace ( adapter , managedSchedulable , data ) ; try { return adapter.adapt ( data ) ; } finally { event.end ( ) ; } }
Source:
public void run ( final com.android.cts.TestDevice device , android.annotation.cts.Profile profile ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { mTestStop = false ; java.util.Iterator < com.android.cts.Test > tests = getTests ( ) . iterator ( ) ; while ( ( tests.hasNext ( ) ) && ( ! ( mTestStop ) ) ) { mCurrentTest = tests.next ( ) ; if ( mCurrentTest.getResult ( ) . isNotExecuted ( ) ) { mCurrentTest.run ( device , profile ) ; } } }

Target:
public void run ( final com.android.cts.TestDevice device ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { mTestStop = false ; java.util.Iterator < com.android.cts.Test > tests = getTests ( ) . iterator ( ) ; while ( ( tests.hasNext ( ) ) && ( ! ( mTestStop ) ) ) { mCurrentTest = tests.next ( ) ; if ( mCurrentTest.getResult ( ) . isNotExecuted ( ) ) { mCurrentTest.run ( device ) ; } } }
Source:
public static android.net.wifi.WifiConfiguration generateWifiConfig ( int networkId , int uid , java.lang.String ssid , boolean shared , boolean enabled , java.lang.String fqdn , java.lang.String providerFriendlyName ) { final android.net.wifi.WifiConfiguration config = new android.net.wifi.WifiConfiguration ( ) ; config.SSID = ssid ; config.networkId = networkId ; config.creatorUid = uid ; config.shared = shared ; config.status = ( enabled ) ? WifiConfiguration.Status.ENABLED : WifiConfiguration.Status.DISABLED ; if ( fqdn != null ) { config.FQDN = fqdn ; config.providerFriendlyName = providerFriendlyName ; config.enterpriseConfig.setEapMethod ( WifiEnterpriseConfig.Eap.SIM ) ; } return config ; }

Target:
public static android.net.wifi.WifiConfiguration generateWifiConfig ( int networkId , int uid , java.lang.String ssid , boolean shared , boolean enabled , java.lang.String fqdn , java.lang.String providerFriendlyName ) { final android.net.wifi.WifiConfiguration config = new android.net.wifi.WifiConfiguration ( ) ; config.SSID = ssid ; config.networkId = networkId ; config.creatorUid = uid ; config.shared = shared ; config.status = ( enabled ) ? WifiConfiguration.Status.ENABLED : WifiConfiguration.Status.DISABLED ; config.FQDN = fqdn ; config.providerFriendlyName = providerFriendlyName ; return config ; }
Source:
public void test_group ( ) throws java.lang.Throwable { java.nio.channels.spi.AsynchronousChannelProvider provider = java.nio.channels.spi.AsynchronousChannelProvider.provider ( ) ; java.nio.channels.AsynchronousChannelGroup group = provider.openAsynchronousChannelGroup ( 2 , java.util.concurrent.Executors.defaultThreadFactory ( ) ) ; java.nio.channels.AsynchronousServerSocketChannel assc = java.nio.channels.AsynchronousServerSocketChannel.open ( group ) ; assertNull ( assc.getLocalAddress ( ) ) ; assc.bind ( new java.net.InetSocketAddress ( 0 ) ) ; assertNotNull ( assc.getLocalAddress ( ) ) ; assc.close ( ) ; }

Target:
public void test_group ( ) throws java.lang.Throwable { java.nio.channels.spi.AsynchronousChannelProvider provider = java.nio.channels.spi.AsynchronousChannelProvider.provider ( ) ; java.nio.channels.AsynchronousChannelGroup group = provider.openAsynchronousChannelGroup ( 2 , java.util.concurrent.Executors.defaultThreadFactory ( ) ) ; java.nio.channels.AsynchronousServerSocketChannel assc = java.nio.channels.AsynchronousServerSocketChannel.open ( group ) ; assertNull ( assc.getLocalAddress ( ) ) ; assc.bind ( new java.net.InetSocketAddress ( 0 ) ) ; assertNotNull ( assc.getLocalAddress ( ) ) ; assertEquals ( provider , assc.provider ( ) ) ; assc.close ( ) ; }
Source:
protected void engineInit ( java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { if ( ( params != null ) && ( ! ( ( params instanceof org.bouncycastle.jcajce.spec.MQVParameterSpec ) || ( params instanceof org.bouncycastle.jcajce.spec.UserKeyingMaterialSpec ) ) ) ) { throw new java.security.InvalidAlgorithmParameterException ( "No algorithm parameters supported" ) ; } initFromKey ( key , params ) ; }

Target:
protected void engineInit ( java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { if ( ( params != null ) && ( ! ( params instanceof org.bouncycastle.jcajce.spec.UserKeyingMaterialSpec ) ) ) { throw new java.security.InvalidAlgorithmParameterException ( "No algorithm parameters supported" ) ; } initFromKey ( key , params ) ; }
Source:
public com.google.common.util.concurrent.ListenableFuture < com.android.dialer.phonelookup.PhoneLookupInfo.SystemBlockedNumberInfo > lookup ( @ android.support.annotation.NonNull com.android.dialer.DialerPhoneNumber number ) { if ( ! ( com.android.dialer.blocking.FilteredNumberCompat.useNewFiltering ( appContext ) ) ) { return com.google.common.util.concurrent.Futures.immediateFuture ( com.android.dialer.phonelookup.PhoneLookupInfo.SystemBlockedNumberInfo.getDefaultInstance ( ) ) ; } return executorService.submit ( ( ) -> { return queryNumbers ( com.google.common.collect.ImmutableSet.of ( number ) ) . get ( number ) ; } ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < com.android.dialer.phonelookup.PhoneLookupInfo.SystemBlockedNumberInfo > lookup ( @ android.support.annotation.NonNull com.android.dialer.DialerPhoneNumber number ) { if ( ! ( com.android.dialer.blocking.FilteredNumberCompat.useNewFiltering ( appContext ) ) ) { return com.google.common.util.concurrent.Futures.immediateFuture ( com.android.dialer.phonelookup.PhoneLookupInfo.SystemBlockedNumberInfo.getDefaultInstance ( ) ) ; } return executorService.submit ( ( ) -> queryNumbers ( com.google.common.collect.ImmutableSet.of ( number ) ) . get ( number ) ) ; }
Source:
public boolean setP2pGroupIdle ( java.lang.String iface , int time ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setGroupIdle ( iface , time ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " SET p2p_group_idle " ) + time ) ) ; } } }

Target:
public boolean setP2pGroupIdle ( java.lang.String iface , int time ) { return mSupplicantP2pIfaceHal.setGroupIdle ( iface , time ) ; }
Source:
private com.android.jack.ir.ast.JDefinedClassOrInterface getAccessorClassForSuperCall ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaringType ) { com.android.jack.ir.ast.JDefinedClass enclosing = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) ; while ( ! ( com.android.jack.transformations.ast.inner.InnerAccessorGenerator.isSuperClassOf ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( declaringType ) ) , enclosing ) ) ) { enclosing = ( ( com.android.jack.ir.ast.JDefinedClass ) ( enclosing.getEnclosingType ( ) ) ) ; } return enclosing ; }

Target:
private com.android.jack.ir.ast.JDefinedClassOrInterface getAccessorClassForSuperCall ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaringType ) { assert ( currentType ) != null ; com.android.jack.ir.ast.JDefinedClass enclosing = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) ; while ( ! ( com.android.jack.transformations.ast.inner.InnerAccessorGenerator.isSuperClassOf ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( declaringType ) ) , enclosing ) ) ) { enclosing = ( ( com.android.jack.ir.ast.JDefinedClass ) ( enclosing.getEnclosingType ( ) ) ) ; } return enclosing ; }
Source:
public com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult getContrastResultForNormalText ( ) { if ( ( mIsBold ) && ( ( mTextSize ) >= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.NORMAL_TEXT_BOLD_SZ_PTS ) ) ) { return getContrastResultForLargeText ( ) ; } return ( mContrastRatio ) >= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.CONTRAST_RATIO_NORMAL_TEXT ) ? com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.PASS : com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.FAIL ; }

Target:
public com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult getContrastResultForNormalText ( ) { if ( ( ( mIsBold ) && ( ( mTextSize ) != null ) ) && ( ( mTextSize ) >= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.NORMAL_TEXT_BOLD_SZ_PTS ) ) ) { return getContrastResultForLargeText ( ) ; } return ( mContrastRatio ) >= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.CONTRAST_RATIO_NORMAL_TEXT ) ? com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.PASS : com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.FAIL ; }
Source:
public void test_socket_accept_Blocking_Bound ( ) throws java.io.IOException { serverChannel.configureBlocking ( true ) ; serverChannel.bind ( null ) ; serverChannel.close ( ) ; try { serverChannel.socket ( ) . accept ( ) ; fail ( "Should throw a ClosedChannelException" ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }

Target:
public void test_socket_accept_Blocking_Bound ( ) throws java.io.IOException { serverChannel.configureBlocking ( true ) ; serverChannel.socket ( ) . bind ( null ) ; serverChannel.close ( ) ; try { serverChannel.socket ( ) . accept ( ) ; fail ( "Should throw a ClosedChannelException" ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }
Source:
public int getModifiers ( ) { if ( isArray ( ) ) { int componentModifiers = getComponentType ( ) . getModifiers ( ) ; if ( ( componentModifiers & ( java.lang.reflect.Modifier.INTERFACE ) ) != 0 ) { componentModifiers &= ~ ( ( java.lang.reflect.Modifier.INTERFACE ) | ( java.lang.reflect.Modifier.STATIC ) ) ; } return ( ( java.lang.reflect.Modifier.ABSTRACT ) | ( java.lang.reflect.Modifier.FINAL ) ) | componentModifiers ; } int JAVA_FLAGS_MASK = 65535 ; int modifiers = libcore.reflect.AnnotationAccess.getInnerClassFlags ( this , ( ( accessFlags ) & JAVA_FLAGS_MASK ) ) ; return modifiers & JAVA_FLAGS_MASK ; }

Target:
public int getModifiers ( ) { if ( isArray ( ) ) { int componentModifiers = getComponentType ( ) . getModifiers ( ) ; if ( ( componentModifiers & ( java.lang.reflect.Modifier.INTERFACE ) ) != 0 ) { componentModifiers &= ~ ( ( java.lang.reflect.Modifier.INTERFACE ) | ( java.lang.reflect.Modifier.STATIC ) ) ; } return ( ( java.lang.reflect.Modifier.ABSTRACT ) | ( java.lang.reflect.Modifier.FINAL ) ) | componentModifiers ; } int JAVA_FLAGS_MASK = 65535 ; int modifiers = getInnerClassFlags ( ( ( accessFlags ) & JAVA_FLAGS_MASK ) ) ; return modifiers & JAVA_FLAGS_MASK ; }
Source:
public static java.lang.String hex ( char [ ] s ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; for ( int i = 0 ; i < ( s.length ) ; ++ i ) { if ( i != 0 ) result.append ( ',' ) ; result.append ( com.ibm.icu.dev.test.TestFmwk.hex ( s [ i ] ) ) ; } return result.toString ( ) ; }

Target:
protected static java.lang.String hex ( char [ ] s ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; for ( int i = 0 ; i < ( s.length ) ; ++ i ) { if ( i != 0 ) result.append ( ',' ) ; result.append ( com.ibm.icu.dev.test.TestFmwk.hex ( s [ i ] ) ) ; } return result.toString ( ) ; }
Source:
static void setInt ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , int value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertActualAndExpectedMatch ( exceptionThrown , expectFailure ) ; }

Target:
static void setInt ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , int value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }
Source:
public static java.lang.String toString ( java.util.Vector < android.hardware.tests.baz.V1_0.IBase.Foo.Bar > vec ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "[" ) ; for ( int i = 0 ; i < ( vec.size ( ) ) ; ++ i ) { if ( i > 0 ) { builder.append ( ", " ) ; } builder.append ( com.android.commands.hidl_test_java.HidlTestJava.toString ( vec.elementAt ( i ) ) ) ; } builder.append ( "]" ) ; return builder.toString ( ) ; }

Target:
public static java.lang.String toString ( java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo.Bar > vec ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "[" ) ; for ( int i = 0 ; i < ( vec.size ( ) ) ; ++ i ) { if ( i > 0 ) { builder.append ( ", " ) ; } builder.append ( com.android.commands.hidl_test_java.HidlTestJava.toString ( vec.get ( i ) ) ) ; } builder.append ( "]" ) ; return builder.toString ( ) ; }
Source:
public void testSortByApi_Empty ( ) { m.updateStart ( ) ; assertFalse ( m.updateSourcePackages ( true , null , new java.lang.Package [ 0 ] ) ) ; assertFalse ( m.updateEnd ( true ) ) ; assertEquals ( ( "PkgCategoryApi <API=TOOLS, label=Tools, #items=0>\n" + "PkgCategoryApi <API=EXTRAS, label=Extras, #items=0>\n" ) , getTree ( m , true ) ) ; }

Target:
public void testSortByApi_Empty ( ) { m.updateStart ( ) ; assertFalse ( m.updateSourcePackages ( null , new java.lang.Package [ 0 ] ) ) ; assertFalse ( m.updateEnd ( ) ) ; assertEquals ( ( "PkgCategoryApi <API=TOOLS, label=Tools, #items=0>\n" + "PkgCategoryApi <API=EXTRAS, label=Extras, #items=0>\n" ) , getTree ( m ) ) ; }
Source:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mLocation ) != null ) && ( ! ( mIgnore ) ) ) { java.lang.String message = ( ( "Potentially insecure random numbers on Android 4.3 and older. " + "Read " ) + ( com.android.tools.lint.checks.SecureRandomGeneratorDetector.BLOG_URL ) ) + " for more info." ; context.report ( com.android.tools.lint.checks.SecureRandomGeneratorDetector.ISSUE , mLocation , message , null ) ; } }

Target:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( ( mLocation ) != null ) && ( ! ( mIgnore ) ) ) { java.lang.String message = ( ( "Potentially insecure random numbers on Android 4.3 and older. " + "Read " ) + ( com.android.tools.lint.checks.SecureRandomGeneratorDetector.BLOG_URL ) ) + " for more info." ; context.report ( com.android.tools.lint.checks.SecureRandomGeneratorDetector.ISSUE , mLocation , message ) ; } }
Source:
public boolean isInCall ( android.content.Context context ) { if ( com.android.dialer.telecom.TelecomUtil.hasReadPhoneStatePermission ( context ) ) { if ( ( android.os.Build.VERSION.SDK_INT ) >= ( android.os.Build.VERSION_CODES.O ) ) { return com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . isInManagedCall ( ) ; } else { return com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . isInCall ( ) ; } } return false ; }

Target:
public boolean isInManagedCall ( android.content.Context context ) { if ( com.android.dialer.telecom.TelecomUtil.hasReadPhoneStatePermission ( context ) ) { if ( ( android.os.Build.VERSION.SDK_INT ) >= ( android.os.Build.VERSION_CODES.O ) ) { return com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . isInManagedCall ( ) ; } else { return com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . isInCall ( ) ; } } return false ; }
Source:
public final void testCreateDup ( ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ved = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( "xml" , "com.example.MyJavaClass" ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode uiv = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( ved ) ; com.android.ide.common.rendering.api.ViewInfo lvi = new com.android.ide.common.rendering.api.ViewInfo ( "name" , uiv , 10 , 12 , 110 , 120 ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo cvi = com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.create ( lvi ) . getFirst ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy1 = m.create ( cvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy2 = m.create ( cvi ) ; assertSame ( proxy2 , proxy1 ) ; }

Target:
public final void testCreateDup ( ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ved = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( "xml" , "com.example.MyJavaClass" ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode uiv = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( ved ) ; com.android.ide.common.rendering.api.ViewInfo lvi = new com.android.ide.common.rendering.api.ViewInfo ( "name" , uiv , 10 , 12 , 110 , 120 ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo cvi = com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo.create ( lvi , true ) . getFirst ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy1 = m.create ( cvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy2 = m.create ( cvi ) ; assertSame ( proxy2 , proxy1 ) ; }
Source:
private void processConnectionEvent ( int state , android.bluetooth.BluetoothDevice device ) { switch ( state ) { case HeadsetClientHalConstants.CONNECTION_STATE_DISCONNECTED : if ( mCurrentDevice.equals ( device ) ) { processAudioEvent ( HeadsetClientHalConstants.AUDIO_STATE_DISCONNECTED , device ) ; broadcastConnectionState ( mCurrentDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_CONNECTED ) ; transitionTo ( mDisconnected ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Disconnected from unknown device: " + device ) ) ; } break ; default : android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "Connection State Device: " + device ) + " bad state: " ) + state ) ) ; break ; } }

Target:
private void processConnectionEvent ( int state , android.bluetooth.BluetoothDevice device ) { switch ( state ) { case HeadsetClientHalConstants.CONNECTION_STATE_DISCONNECTED : if ( mCurrentDevice.equals ( device ) ) { processAudioEvent ( HeadsetClientHalConstants.AUDIO_STATE_DISCONNECTED , device ) ; transitionTo ( mDisconnected ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Disconnected from unknown device: " + device ) ) ; } break ; default : android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "Connection State Device: " + device ) + " bad state: " ) + state ) ) ; break ; } }
Source:
public java.lang.String wifiAwareCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ 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 ( role , 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.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 ) ; }
Source:
public static int Min2Print6 ( int a , int b , int c , int d , int e , int f ) { int [ ] values = new int [ ] { a , b , c , d , e , f } ; java.lang.System.err.println ( ( ( "Running Main.Min2Print6(" + ( java.util.Arrays.toString ( values ) ) ) + ")" ) ) ; return a > b ? a : b ; }

Target:
public static int Min2Print6 ( int a , int b , int c , int d , int e , int f ) { int [ ] values = new int [ ] { a , b , c , d , e , f } ; java.lang.System.out.println ( ( ( "Running Main.Min2Print6(" + ( java.util.Arrays.toString ( values ) ) ) + ")" ) ) ; return a > b ? a : b ; }
Source:
public T getDelegate ( int native_object ) { if ( native_object > 0 ) { T delegate = mDelegates.get ( native_object ) ; if ( com.android.layoutlib.bridge.util.Debug.DEBUG ) { if ( delegate == null ) { java.lang.System.out.println ( ( ( ( "Unknown " + ( mClass.getSimpleName ( ) ) ) + " with int " ) + native_object ) ) ; } } assert delegate != null ; return delegate ; } return null ; }

Target:
public T getDelegate ( long native_object ) { if ( native_object > 0 ) { T delegate = mDelegates.get ( native_object ) ; if ( com.android.layoutlib.bridge.util.Debug.DEBUG ) { if ( delegate == null ) { java.lang.System.out.println ( ( ( ( "Unknown " + ( mClass.getSimpleName ( ) ) ) + " with int " ) + native_object ) ) ; } } assert delegate != null ; return delegate ; } return null ; }