auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void init ( ) { final android.os.Messenger messenger = getMessenger ( ) ; if ( messenger == null ) throw new java.lang.RuntimeException ( "Failed to initialize" ) ; android.os.HandlerThread t = new android.os.HandlerThread ( "NsdManager" ) ; t.start ( ) ; mHandler = new android.net.nsd.NsdManager.ServiceHandler ( t.getLooper ( ) ) ; mAsyncChannel.connect ( mContext , mHandler , messenger ) ; try { mConnected.await ( ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( android.net.nsd.NsdManager.TAG , "interrupted wait at init" ) ; } }

Target:
private void init ( ) { final android.os.Messenger messenger = getMessenger ( ) ; if ( messenger == null ) { android.net.nsd.NsdManager.fatal ( "Failed to obtain service Messenger" ) ; } android.os.HandlerThread t = new android.os.HandlerThread ( "NsdManager" ) ; t.start ( ) ; mHandler = new android.net.nsd.NsdManager.ServiceHandler ( t.getLooper ( ) ) ; mAsyncChannel.connect ( mContext , mHandler , messenger ) ; try { mConnected.await ( ) ; } catch ( java.lang.InterruptedException e ) { android.net.nsd.NsdManager.fatal ( "Interrupted wait at init" ) ; } }
Source:
public boolean process ( java.lang.String countryIso , java.lang.String defaultTimeZoneId , java.util.List < java.lang.String > countryTimeZoneIds , java.lang.String debugInfo ) { countryIso = libcore.util.TimeZoneFinder.normalizeCountryIso ( countryIso ) ; if ( ! ( countryCodeToMatch.equals ( countryIso ) ) ) { return libcore.util.TimeZoneFinder.CountryZonesProcessor.CONTINUE ; } validatedCountryTimeZones = libcore.util.CountryTimeZones.createValidated ( countryIso , defaultTimeZoneId , countryTimeZoneIds , debugInfo ) ; return libcore.util.TimeZoneFinder.CountryZonesProcessor.HALT ; }

Target:
public boolean process ( java.lang.String countryIso , java.lang.String defaultTimeZoneId , boolean everUsesUtc , java.util.List < java.lang.String > countryTimeZoneIds , java.lang.String debugInfo ) { countryIso = libcore.util.TimeZoneFinder.normalizeCountryIso ( countryIso ) ; if ( ! ( countryCodeToMatch.equals ( countryIso ) ) ) { return libcore.util.TimeZoneFinder.CountryZonesProcessor.CONTINUE ; } validatedCountryTimeZones = libcore.util.CountryTimeZones.createValidated ( countryIso , defaultTimeZoneId , everUsesUtc , countryTimeZoneIds , debugInfo ) ; return libcore.util.TimeZoneFinder.CountryZonesProcessor.HALT ; }
Source:
public void info ( java.lang.String msg ) { if ( ( java.util.logging.Level.INFO.intValue ( ) ) < ( levelValue ) ) { return ; } log ( java.util.logging.Level.INFO , msg ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.util.ResourceBundle bundle , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr , bundle ) ; }
Source:
public static < W extends java.lang.Appendable & java.io.Closeable > void write ( java.lang.CharSequence from , com.google.common.io.OutputSupplier < W > to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; boolean threw = true ; W out = to.getOutput ( ) ; try { out.append ( from ) ; threw = false ; } finally { com.google.common.io.Closeables.close ( out , threw ) ; } }

Target:
public static long copy ( java.lang.Readable from , java.lang.Appendable to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; com.google.common.base.Preconditions.checkNotNull ( to ) ; java.nio.CharBuffer buf = java.nio.CharBuffer.allocate ( com.google.common.io.CharStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; to.append ( buf ) ; total += buf.remaining ( ) ; buf.clear ( ) ; } return total ; }
Source:
public void testRightLocationsX ( ) { assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.TOP_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.CENTER_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.BOTTOM_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; }

Target:
public void rightLocationsX ( ) { assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.TOP_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.CENTER_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) ) - 1 ) , GeneralLocation.BOTTOM_RIGHT , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; }
Source:
private void runLocalEventLogService ( java.lang.String fileName , com.android.ddmlib.log.LogReceiver logReceiver ) throws java.io.IOException { byte [ ] buffer = new byte [ 256 ] ; java.io.FileInputStream fis = new java.io.FileInputStream ( fileName ) ; int count ; while ( ( count = fis.read ( buffer ) ) != ( - 1 ) ) { logReceiver.parseNewData ( buffer , 0 , count ) ; } }

Target:
private void runLocalEventLogService ( java.lang.String fileName , com.android.ddmlib.log.LogReceiver logReceiver ) throws java.io.IOException { byte [ ] buffer = new byte [ 256 ] ; java.io.FileInputStream fis = new java.io.FileInputStream ( fileName ) ; try { int count ; while ( ( count = fis.read ( buffer ) ) != ( - 1 ) ) { logReceiver.parseNewData ( buffer , 0 , count ) ; } } finally { fis.close ( ) ; } }
Source:
public void writeTo ( java.io.OutputStream out ) throws java.io.IOException { out.write ( data ) ; }

Target:
public void writeTo ( java.io.OutputStream out ) throws java.io.IOException { byte [ ] buffer = new byte [ 8192 ] ; java.nio.ByteBuffer data = this . data.duplicate ( ) ; data.clear ( ) ; while ( data.hasRemaining ( ) ) { int count = java.lang.Math.min ( buffer.length , data.remaining ( ) ) ; data.get ( buffer , 0 , count ) ; out.write ( buffer , 0 , count ) ; } }
Source:
public void testNewInstanceString_StringBuilderConstructor ( ) { runTestNewInstanceString ( "(Ljava/lang/StringBuilder;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBuilderValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUILDER" ) ; constructorArguments.add ( stringBuilderValue ) ; } } ) ; }

Target:
private void runTestNewInstanceString ( java.lang.String constructorSignature , org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider provider ) { checkNewInstanceTag ( "Ljava/lang/String;" , constructorSignature , provider , JDWPConstants.Tag.STRING_TAG ) ; }
Source:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( com.android.services.telephony.Log.ERROR ) { android.util.Log.e ( com.android.services.telephony.Log.TAG , com.android.services.telephony.Log.buildMessage ( com.android.services.telephony.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }

Target:
public static void wtf ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { android.telecom.Log.wtf ( objectPrefix , tr , format , args ) ; }
Source:
public static com.android.sdklib.resources.Keyboard getEnum ( java.lang.String value ) { for ( com.android.sdklib.resources.Keyboard kbrd : com.android.sdklib.resources.Keyboard.values ( ) ) { if ( ( kbrd.mValue.equals ( value ) ) || ( ( ( kbrd.mValue2 ) != null ) && ( kbrd.mValue2.equals ( value ) ) ) ) { return kbrd ; } } return null ; }

Target:
public static com.android.resources.Keyboard getEnum ( java.lang.String value ) { for ( com.android.resources.Keyboard kbrd : com.android.resources.Keyboard.values ( ) ) { if ( ( kbrd.mValue.equals ( value ) ) || ( ( ( kbrd.mValue2 ) != null ) && ( kbrd.mValue2.equals ( value ) ) ) ) { return kbrd ; } } return null ; }
Source:
protected void socketClose ( ) throws java.io.IOException { guard.close ( ) ; socketClose0 ( ) ; }

Target:
void releaseFD ( ) { synchronized ( fdLock ) { ( fdUseCount ) -- ; if ( ( fdUseCount ) == ( - 1 ) ) { if ( ( fd ) != null ) { try { socketClose ( ) ; } catch ( java.io.IOException e ) { } finally { fd = null ; } } } } }
Source:
public void callSessionUpdateFailed ( com.android.ims.internal.ImsCallSession session , com.android.ims.ImsReasonInfo reasonInfo ) { loge ( ( ( ( "callSessionUpdateFailed :: session=" + session ) + " reasonInfo=" ) + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( "callSessionUpdateFailed :: not supported for transient conference session=" + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; mUpdateRequest = com.android.ims.ImsCall.UPDATE_NONE ; } if ( listener != null ) { try { listener.onCallUpdateFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionUpdateFailed :: " , t ) ; } } }

Target:
public void callSessionUpdateFailed ( android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsReasonInfo reasonInfo ) { loge ( ( ( ( "callSessionUpdateFailed :: session=" + session ) + " reasonInfo=" ) + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( "callSessionUpdateFailed :: not supported for transient conference session=" + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; mUpdateRequest = com.android.ims.ImsCall.UPDATE_NONE ; } if ( listener != null ) { try { listener.onCallUpdateFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionUpdateFailed :: " , t ) ; } } }
Source:
private void initLocale ( @ com.android.annotations.NonNull java.lang.String parent ) { mLanguage = null ; mRegion = null ; if ( parent.equals ( com.android.SdkConstants.FD_RES_VALUES ) ) { return ; } com.android.utils.Pair < java.lang.String , java.lang.String > locale = com.android.tools.lint.checks.TypoDetector.getLocale ( parent ) ; if ( locale != null ) { mLanguage = locale.getFirst ( ) ; mRegion = locale.getSecond ( ) ; } }

Target:
private void initLocale ( @ com.android.annotations.NonNull java.lang.String parent ) { mLanguage = null ; mRegion = null ; if ( parent.equals ( com.android.SdkConstants.FD_RES_VALUES ) ) { return ; } com.android.ide.common.resources.configuration.LocaleQualifier locale = com.android.tools.lint.detector.api.LintUtils.getLocale ( parent ) ; if ( locale != null ) { mLanguage = locale.getLanguage ( ) ; mRegion = ( locale.hasRegion ( ) ) ? locale.getRegion ( ) : null ; } }
Source:
public static java.awt.image.BufferedImage cropBlank ( java.awt.image.BufferedImage image , com.android.ide.common.api.Rect initialCrop ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.CropFilter filter = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.CropFilter ( ) { @ java.lang.Override public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { int rgb = bufferedImage.getRGB ( x , y ) ; return ( rgb & - 16777216 ) == 0 ; } } ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.crop ( image , filter , initialCrop ) ; }

Target:
public static java.awt.image.BufferedImage cropBlank ( java.awt.image.BufferedImage image , com.android.ide.common.api.Rect initialCrop , int imageType ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.CropFilter filter = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.CropFilter ( ) { @ java.lang.Override public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { int rgb = bufferedImage.getRGB ( x , y ) ; return ( rgb & - 16777216 ) == 0 ; } } ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.ImageUtils.crop ( image , filter , initialCrop , imageType ) ; }
Source:
void select ( org.w3c.dom.Node xmlNode ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = mCanvas.getViewHierarchy ( ) . findViewInfoFor ( xmlNode ) ; if ( ( vi != null ) && ( ! ( vi.isRoot ( ) ) ) ) { selectSingle ( vi ) ; } }

Target:
void select ( org.w3c.dom.Node xmlNode ) { if ( xmlNode == null ) { return ; } else if ( ( xmlNode.getNodeType ( ) ) == ( org.w3c.dom.Node.TEXT_NODE ) ) { xmlNode = xmlNode.getParentNode ( ) ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = mCanvas.getViewHierarchy ( ) . findViewInfoFor ( xmlNode ) ; if ( ( vi != null ) && ( ! ( vi.isRoot ( ) ) ) ) { selectSingle ( vi ) ; } }
Source:
private void verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation verifyMeasurements = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyMeasurements.verifyMean ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ; verifyMeasurements.execute ( ) ; logSuccess ( ) ; }

Target:
private void verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.sensoroperations.VerifySensorOperation verifyMeasurements = new android.hardware.cts.helpers.sensoroperations.VerifySensorOperation ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyMeasurements.verifyMean ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ; verifyMeasurements.execute ( ) ; logSuccess ( ) ; }
Source:
public void TestWordMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( params.inclusion ) >= 9 ) { loopCount = 10000 ; } logln ( "Word Break Monkey Test" ) ; com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBIWordMonkey m = new com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBIWordMonkey ( ) ; com.ibm.icu.text.BreakIterator bi = com.ibm.icu.text.BreakIterator.getWordInstance ( java.util.Locale.US ) ; RunMonkey ( bi , m , "word" , seed , loopCount ) ; }

Target:
public void TestWordMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( com.ibm.icu.dev.test.TestFmwk.getExhaustiveness ( ) ) >= 9 ) { loopCount = 10000 ; } logln ( "Word Break Monkey Test" ) ; com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBIWordMonkey m = new com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBIWordMonkey ( ) ; com.ibm.icu.text.BreakIterator bi = com.ibm.icu.text.BreakIterator.getWordInstance ( java.util.Locale.US ) ; RunMonkey ( bi , m , "word" , seed , loopCount ) ; }
Source:
public void mergeConference ( ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "merging conference calls without a connection service." ) ; } else if ( can ( Connection.CAPABILITY_MERGE_CONFERENCE ) ) { com.android.server.telecom.Log.event ( this , Log.Events.CONFERENCE_WITH ) ; mConnectionService.mergeConference ( this ) ; mWasConferencePreviouslyMerged = true ; } }

Target:
void conferenceWith ( com.android.server.telecom.Call otherCall ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "conference requested on a call without a connection service." ) ; } else { android.telecom.Log.addEvent ( this , LogUtils.Events.CONFERENCE_WITH , otherCall ) ; mConnectionService.conference ( this , otherCall ) ; } }
Source:
public void testPownF32 ( ) { script_f32 = new android.renderscript.cts.ScriptC_pown_f32 ( mRS , mRes , R.raw.pown_f32 ) ; android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandom ( 305419896 , 32 , 1 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; script_f32 = new android.renderscript.cts.ScriptC_pown_f32 ( mRS ) ; }
Source:
public void TestEscape ( ) { expect ( android.icu.text.Transliterator.getInstance ( "Hex-Any" ) , "\\x{40}\\U00000031&#x32;&#81;" , "@12Q" ) ; expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/C" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\u0041\\U0010BEEF\\uFEED" ) ; expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/Java" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\u0041\\uDBEF\\uDEEF\\uFEED" ) ; expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/Perl" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\x{41}\\x{10BEEF}\\x{FEED}" ) ; }

Target:
public void TestEscape ( ) { android.icu.dev.test.translit.TransliteratorTest.expect ( android.icu.text.Transliterator.getInstance ( "Hex-Any" ) , "\\x{40}\\U00000031&#x32;&#81;" , "@12Q" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/C" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\u0041\\U0010BEEF\\uFEED" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/Java" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\u0041\\uDBEF\\uDEEF\\uFEED" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( android.icu.text.Transliterator.getInstance ( "Any-Hex/Perl" ) , android.icu.dev.test.translit.TransliteratorTest.CharsToUnicodeString ( "A\\U0010BEEF\\uFEED" ) , "\\x{41}\\x{10BEEF}\\x{FEED}" ) ; }
Source:
public boolean apply ( com.android.build.gradle.managed.SigningConfig signingConfig ) { return signingConfig.getName ( ) . equals ( com.android.builder.core.BuilderConstants.DEBUG ) ; }

Target:
public void initDebugBuildTypes ( @ org.gradle.model.Path ( value = "android.buildTypes" ) org.gradle.model.ModelMap < com.android.build.gradle.managed.BuildType > buildTypes , @ org.gradle.model.Path ( value = "android.signingConfigs" ) final org.gradle.model.ModelMap < com.android.build.gradle.managed.SigningConfig > signingConfigs ) { buildTypes.beforeEach ( new org.gradle.api.Action < com.android.build.gradle.managed.BuildType > ( ) { @ java.lang.Override public void execute ( com.android.build.gradle.managed.BuildType buildType ) { com.android.build.gradle.model.BaseComponentModelPlugin.Rules.initBuildType ( buildType ) ; } } ) ; buildTypes.named ( com.android.builder.core.BuilderConstants.DEBUG , new org.gradle.api.Action < com.android.build.gradle.managed.BuildType > ( ) { @ java.lang.Override public void execute ( com.android.build.gradle.managed.BuildType buildType ) { buildType.setSigningConfig ( signingConfigs.get ( com.android.builder.core.BuilderConstants.DEBUG ) ) ; } } ) ; }
Source:
public void addRepoNodeListener ( @ org.jetbrains.annotations.NotNull com.intellij.dvcs.push.RepositoryNodeListener < T > listener ) { myListeners.add ( listener ) ; }

Target:
public void addRepoNodeListener ( @ org.jetbrains.annotations.NotNull com.intellij.dvcs.push.RepositoryNodeListener < T > listener ) { myListeners.add ( listener ) ; myDestPushTargetPanelComponent.addTargetEditorListener ( new com.intellij.dvcs.push.ui.PushTargetEditorListener ( ) { public void onTargetInEditModeChanged ( @ org.jetbrains.annotations.NotNull java.lang.String value ) { for ( com.intellij.dvcs.push.RepositoryNodeListener listener : myListeners ) { listener.onTargetInEditMode ( value ) ; } } } ) ; }
Source:
public void testConstructor_IllegalAliases_Middle ( ) { try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22##ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22%%ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } }

Target:
public void testConstructor_IllegalAliases_Middle ( ) { try { new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22##ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } try { new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22%%ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } }
Source:
protected void visitString ( int type , int index ) { encounterString ( index ) ; }

Target:
private void readArray ( com.android.dx.io.EncodedValueReader reader ) { for ( int i = 0 , size = reader.readArray ( ) ; i < size ; i ++ ) { switch ( reader.peek ( ) ) { case com.android.dx.io.EncodedValueReader.ENCODED_STRING : encounterString ( reader.readString ( ) ) ; break ; case com.android.dx.io.EncodedValueReader.ENCODED_ARRAY : readArray ( reader ) ; break ; } } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( selection instanceof com.android.ddmlib.IDevice ) { mModel.setSelection ( ( ( com.android.ddmlib.IDevice ) ( selection ) ) , null ) ; } else if ( selection instanceof com.android.hierarchyviewerlib.device.Window ) { mModel.setSelection ( ( ( com.android.hierarchyviewerlib.device.Window ) ( selection ) ) . getDevice ( ) , ( ( com.android.hierarchyviewerlib.device.Window ) ( selection ) ) ) ; } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( selection instanceof com.android.hierarchyviewerlib.device.IHvDevice ) { mModel.setSelection ( ( ( com.android.hierarchyviewerlib.device.IHvDevice ) ( selection ) ) , null ) ; } else if ( selection instanceof com.android.hierarchyviewerlib.models.Window ) { mModel.setSelection ( ( ( com.android.hierarchyviewerlib.models.Window ) ( selection ) ) . getHvDevice ( ) , ( ( com.android.hierarchyviewerlib.models.Window ) ( selection ) ) ) ; } }
Source:
public void onCallAudioStateChanged ( java.lang.String callId , android.telecom.CallAudioState callAudioState ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = callAudioState ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ON_CALL_AUDIO_STATE_CHANGED , args ) . sendToTarget ( ) ; }

Target:
public void onCallAudioStateChanged ( java.lang.String callId , android.telecom.CallAudioState callAudioState , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_CALL_AUDIO_SC ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = callAudioState ; args.arg3 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ON_CALL_AUDIO_STATE_CHANGED , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void test1 ( ) throws java.lang.Exception { assertEquals ( ( "SecureRandomTest.java:14: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" + ( ( ( "SecureRandomTest.java:15: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" + "SecureRandomTest.java:16: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:17: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:18: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed()." ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "res/layout/onclick.xml=>res/layout/onclick.xml" , "bytecode/SecureRandomTest.java.txt=>src/test/pkg/SecureRandomTest.java" , "bytecode/SecureRandomTest.class.data=>bin/classes/test/pkg/SecureRandomTest.class" ) ) ; }

Target:
public void test1 ( ) throws java.lang.Exception { assertEquals ( ( "SecureRandomTest.java:12: Warning: It is dangerous to seed SecureRandom with the current time because that value is more predictable to an attacker than the default seed.\n" + ( ( ( ( ( "SecureRandomTest.java:14: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" + "SecureRandomTest.java:15: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:16: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:17: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:18: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed().\n" ) + "SecureRandomTest.java:28: Warning: Do not call setSeed() on a SecureRandom with a fixed seed: it is not secure. Use getSeed()." ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "res/layout/onclick.xml=>res/layout/onclick.xml" , "bytecode/SecureRandomTest.java.txt=>src/test/pkg/SecureRandomTest.java" , "bytecode/SecureRandomTest.class.data=>bin/classes/test/pkg/SecureRandomTest.class" ) ) ; }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:16: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" ) + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$WebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$WebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$NonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$NonWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class" ) ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:16: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" ) + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( manifest ( ) . minSdk ( 10 ) , mTestFile ) ) ; }
Source:
public com.android.manifmerger.MergingReport merge ( ) throws com.android.manifmerger.ManifestMerger2.MergeFailureException { com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver keyBasedValueResolver = ( ( mKeyBasedValueResolver ) != null ) ? mKeyBasedValueResolver : new com.android.manifmerger.PlaceholderHandler.KeyBasedValueResolver ( ) { @ com.android.annotations.Nullable @ java.lang.Override public java.lang.String getValue ( @ com.android.annotations.NonNull java.lang.String key ) { return null ; } } ; com.android.manifmerger.ManifestMerger2 manifestMerger = new com.android.manifmerger.ManifestMerger2 ( mLogger , mMainManifestFile , mLibraryFilesBuilder.build ( ) , mFlavorsAndBuildTypeFiles.build ( ) , mFeaturesBuilder.build ( ) , keyBasedValueResolver ) ; return manifestMerger.merge ( ) ; }

Target:
public java.lang.String getValue ( @ com.android.annotations.NonNull com.android.manifmerger.ManifestMerger2.Invoker.SystemProperty key ) { switch ( key ) { case PACKAGE : return packageOverride ; default : return null ; } }
Source:
public void testSetWifiDisabledNoToggle ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( false ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ) ; verify ( mWifiController , never ( ) ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiDisabledNoToggle ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_DISABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( false ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ) ; verify ( mWifiController , never ( ) ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
public java.util.List < java.lang.Class < ? extends lombok.ast.Node > > getApplicableNodeTypes ( ) { java.util.List < java.lang.Class < ? extends lombok.ast.Node > > types = new java.util.ArrayList < java.lang.Class < ? extends lombok.ast.Node > > ( 3 ) ; types.add ( lombok.ast.ConstructorInvocation.class ) ; types.add ( lombok.ast.MethodDeclaration.class ) ; types.add ( lombok.ast.MethodInvocation.class ) ; return types ; }

Target:
public java.util.List < java.lang.Class < ? extends com.intellij.psi.PsiElement > > getApplicablePsiTypes ( ) { java.util.List < java.lang.Class < ? extends com.intellij.psi.PsiElement > > types = new java.util.ArrayList < java.lang.Class < ? extends com.intellij.psi.PsiElement > > ( 3 ) ; types.add ( com.intellij.psi.PsiNewExpression.class ) ; types.add ( com.intellij.psi.PsiMethod.class ) ; types.add ( com.intellij.psi.PsiMethodCallExpression.class ) ; return types ; }
Source:
public void setPermissionPolicy ( @ android.annotation.NonNull android.content.ComponentName admin , int policy ) { throwIfParentInstance ( "setPermissionPolicy" ) ; try { mService.setPermissionPolicy ( admin , policy ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } }

Target:
public void enableSystemApp ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "enableSystemApp" ) ; if ( ( mService ) != null ) { try { mService.enableSystemApp ( admin , mContext.getPackageName ( ) , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public final void setResultLocal ( com.android.dx.ssa.LocalItem local ) { com.android.dx.ssa.LocalItem oldItem = result.getLocalItem ( ) ; if ( ( local != oldItem ) && ( ( local == null ) || ( ! ( local.equals ( result.getLocalItem ( ) ) ) ) ) ) { result = com.android.dx.ssa.RegisterSpec.makeLocalOptional ( result.getReg ( ) , result.getType ( ) , local ) ; } }

Target:
public final void setResultLocal ( com.android.dx.rop.code.LocalItem local ) { com.android.dx.rop.code.LocalItem oldItem = result.getLocalItem ( ) ; if ( ( local != oldItem ) && ( ( local == null ) || ( ! ( local.equals ( result.getLocalItem ( ) ) ) ) ) ) { result = com.android.dx.rop.code.RegisterSpec.makeLocalOptional ( result.getReg ( ) , result.getType ( ) , local ) ; } }
Source:
private java.lang.String tzIDFromKey ( android.icu.impl.ICUResource.Key key ) { sb.setLength ( 0 ) ; for ( int i = 0 ; i < ( key.length ( ) ) ; ++ i ) { char c = key.charAt ( i ) ; if ( c == ':' ) { c = '/' ; } sb.append ( c ) ; } return sb.toString ( ) ; }

Target:
private java.lang.String tzIDFromKey ( android.icu.impl.UResource.Key key ) { sb.setLength ( 0 ) ; for ( int i = 0 ; i < ( key.length ( ) ) ; ++ i ) { char c = key.charAt ( i ) ; if ( c == ':' ) { c = '/' ; } sb.append ( c ) ; } return sb.toString ( ) ; }
Source:
private void assertContentsEquals ( byte [ ] expected , android.net.Uri actual ) throws java.lang.Exception { final java.io.InputStream in = mResolver.openInputStream ( actual ) ; try { android.test.MoreAsserts.assertEquals ( expected , libcore.io.Streams.readFully ( in ) ) ; } finally { libcore.io.IoUtils.closeQuietly ( in ) ; } }

Target:
private void assertContentsEquals ( byte [ ] expected , android.net.Uri actual ) throws java.lang.Exception { final java.io.InputStream in = mResolver.openInputStream ( actual ) ; try { android.test.MoreAsserts.assertEquals ( expected , android.support.v4.content.FileProviderTest.readFully ( in ) ) ; } finally { android.support.v4.content.FileProviderTest.closeQuietly ( in ) ; } }
Source:
private static java.lang.String getMajorVersionAsString ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return com.android.jack.library.JackLibraryFactory.getVersionString ( java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.sched.util.location.Location location = vdir.getLocation ( ) ; com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Failed to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + ( location.getDescription ( ) ) ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( location ) ; } }

Target:
private static int getMajorVersion ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vdir , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) throws com.android.jack.library.LibraryFormatException { try { return java.lang.Integer.parseInt ( ( ( java.lang.String ) ( libraryProperties.get ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) ) ) ; } catch ( java.lang.NumberFormatException e ) { com.android.sched.util.location.Location location = vdir.getLocation ( ) ; com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Failed to parse the property " + ( JackLibrary.KEY_LIB_MAJOR_VERSION ) ) + " from the library " ) + ( location.getDescription ( ) ) ) , e ) ; throw new com.android.jack.library.LibraryFormatException ( location ) ; } }
Source:
private java.util.List < java.lang.String > buildCommandLine ( @ javax.annotation.Nonnull java.lang.String [ ] options , @ javax.annotation.Nonnull java.lang.String mainClass , @ javax.annotation.Nonnull java.io.File ... classpathFiles ) { java.util.List < java.lang.String > args = new java.util.ArrayList < java.lang.String > ( ) ; addStartOfCommandLine ( options , classpathFiles , args ) ; args.add ( mainClass ) ; return args ; }

Target:
private java.util.List < java.lang.String > buildCommandLine ( @ javax.annotation.Nonnull java.lang.String [ ] options , @ javax.annotation.Nonnull java.lang.String mainClass , @ javax.annotation.Nonnull java.io.File ... classpathFiles ) { java.util.List < java.lang.String > commandLine = new java.util.ArrayList < java.lang.String > ( ) ; addStartOfCommandLine ( options , classpathFiles , commandLine ) ; commandLine.add ( mainClass ) ; return commandLine ; }
Source:
public final byte [ ] update ( byte [ ] input ) { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == null ) { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } if ( ( input.length ) == 0 ) { return null ; } return spiImpl.engineUpdate ( input , 0 , input.length ) ; }

Target:
public final int doFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.Cipher.checkInputOffsetAndCount ( input.length , inputOffset , inputLen ) ; return getSpi ( ) . engineDoFinal ( input , inputOffset , inputLen , output , outputOffset ) ; }
Source:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; makeFakeAndroidHome ( ) ; makeFakeSdk ( ) ; mSdkManager = com.android.sdklib.SdkManager.createManager ( mFakeSdk.getAbsolutePath ( ) , mLog ) ; assertNotNull ( "SdkManager location was invalid" , mSdkManager ) ; mAvdManager = new com.android.sdklib.SdkManagerTestCase.TmpAvdManager ( mSdkManager , mLog ) ; }

Target:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; makeFakeAndroidHome ( ) ; makeFakeSdk ( ) ; mSdkManager = com.android.sdklib.SdkManager.createManager ( mFakeSdk.getAbsolutePath ( ) , mLog ) ; assertNotNull ( "SdkManager location was invalid" , mSdkManager ) ; mAvdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager , mLog ) ; }
Source:
public com.android.sdklib.repository.FullRevision getFullRevision ( ) { return revision ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newBuildTool ( @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_BUILD_TOOLS ) ; p.mFullRevision = revision ; p.mCustomIsUpdateFor = new com.android.sdklib.repository.descriptors.PkgDesc.IIsUpdateFor ( ) { @ java.lang.Override public boolean isUpdateFor ( com.android.sdklib.repository.descriptors.PkgDesc thisPkgDesc , com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return ( thisPkgDesc.isGenericUpdateFor ( existingDesc ) ) && ( ( thisPkgDesc.getFullRevision ( ) . compareTo ( existingDesc.getFullRevision ( ) , PreviewComparison.COMPARE_TYPE ) ) == 0 ) ; } } ; return p ; }
Source:
static java.lang.String checkForAar ( android.nfc.NdefRecord record ) { if ( ( ( record.getTnf ( ) ) == ( android.nfc.NdefRecord.TNF_EXTERNAL_TYPE ) ) && ( java.util.Arrays.equals ( record.getType ( ) , NdefRecord.RTD_ANDROID_APP ) ) ) { return new java.lang.String ( record.getPayload ( ) , java.nio.charset.Charsets.US_ASCII ) ; } return null ; }

Target:
static java.lang.String checkForAar ( android.nfc.NdefRecord record ) { if ( ( ( record.getTnf ( ) ) == ( android.nfc.NdefRecord.TNF_EXTERNAL_TYPE ) ) && ( java.util.Arrays.equals ( record.getType ( ) , NdefRecord.RTD_ANDROID_APP ) ) ) { return new java.lang.String ( record.getPayload ( ) , java.nio.charset.StandardCharsets.US_ASCII ) ; } return null ; }
Source:
public void testParcel ( ) { android.telephony.CellIdentityLte ci = new android.telephony.CellIdentityLte ( com.android.internal.telephony.CellIdentityLteTest.CI , com.android.internal.telephony.CellIdentityLteTest.PCI , com.android.internal.telephony.CellIdentityLteTest.TAC , com.android.internal.telephony.CellIdentityLteTest.EARFCN , com.android.internal.telephony.CellIdentityLteTest.MCC_STR , com.android.internal.telephony.CellIdentityLteTest.MNC_STR , com.android.internal.telephony.CellIdentityLteTest.ALPHA_LONG , com.android.internal.telephony.CellIdentityLteTest.ALPHA_SHORT ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; ci.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel ( p ) ; assertEquals ( ci , newCi ) ; }

Target:
public void testParcel ( ) { android.telephony.CellIdentityLte ci = new android.telephony.CellIdentityLte ( com.android.internal.telephony.CellIdentityLteTest.CI , com.android.internal.telephony.CellIdentityLteTest.PCI , com.android.internal.telephony.CellIdentityLteTest.TAC , com.android.internal.telephony.CellIdentityLteTest.EARFCN , com.android.internal.telephony.CellIdentityLteTest.BANDWIDTH , com.android.internal.telephony.CellIdentityLteTest.MCC_STR , com.android.internal.telephony.CellIdentityLteTest.MNC_STR , com.android.internal.telephony.CellIdentityLteTest.ALPHA_LONG , com.android.internal.telephony.CellIdentityLteTest.ALPHA_SHORT ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; ci.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel ( p ) ; assertEquals ( ci , newCi ) ; }
Source:
public void test_connect ( ) throws java.lang.Exception { tests.net.StuckServer ss = new tests.net.StuckServer ( false ) ; java.net.Socket s = new java.net.Socket ( ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( s ) . start ( ) ; try { java.lang.System.err.println ( "connect..." ) ; s.connect ( ss.getLocalSocketAddress ( ) ) ; fail ( ( ( "connect returned: " + s ) + "!" ) ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } finally { ss.close ( ) ; } }

Target:
public void test_connect ( ) throws java.lang.Exception { java.net.Socket s = new java.net.Socket ( ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( s ) . start ( ) ; try { java.lang.System.err.println ( "connect..." ) ; s.connect ( libcore.java.net.ConcurrentCloseTest.UNREACHABLE_ADDRESS ) ; fail ( ( ( "connect returned: " + s ) + "!" ) ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } }
Source:
public void setTarget ( @ com.android.annotations.NonNull java.lang.String target ) { com.google.common.base.Preconditions.checkNotNull ( target , "target cannot be null." ) ; mTarget = mSdkParser.resolveTarget ( target , mLogger ) ; if ( ( mTarget ) == null ) { throw new java.lang.RuntimeException ( ( "Unknown target: " + target ) ) ; } }

Target:
private void doMerge ( com.android.manifmerger.ManifestMerger merger , java.io.File output , java.io.File input , java.util.Map < java.lang.String , java.lang.String > injectionMap , java.lang.String packageOverride ) { java.util.List < java.io.File > list = java.util.Collections.emptyList ( ) ; doMerge ( merger , output , input , list , injectionMap , packageOverride ) ; }
Source:
public final void test_setSSLSocketFactory ( ) { javax.net.ssl.HttpsURLConnection con = new tests.api.javax.net.ssl.MyHttpsURLConnection ( null ) ; try { con.setSSLSocketFactory ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } javax.net.ssl.SSLSocketFactory ssf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; con.setSSLSocketFactory ( ssf ) ; }

Target:
public final void test_setSSLSocketFactory ( ) { javax.net.ssl.HttpsURLConnection con = new org.apache.harmony.tests.javax.net.ssl.MyHttpsURLConnection ( null ) ; try { con.setSSLSocketFactory ( null ) ; fail ( "No expected IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } javax.net.ssl.SSLSocketFactory ssf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; con.setSSLSocketFactory ( ssf ) ; }
Source:
public com.android.ims.ImsUtInterface getSupplementaryServiceConfiguration ( ) throws com.android.ims.ImsException { if ( ( ( mUt ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsUt iUt = mImsServiceProxy.getUtInterface ( ) ; if ( iUt == null ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , ImsReasonInfo.CODE_UT_NOT_SUPPORTED ) ; } mUt = new com.android.ims.ImsUt ( iUt ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } } return mUt ; }

Target:
public void connectIfServiceIsAvailable ( ) { if ( ( ( mImsServiceProxy ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { createImsService ( ) ; } }
Source:
public void testRootnF32_2_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_2 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 2 ] ; android.renderscript.cts.RSUtils.genRandom ( 11329265 , 32 , 1 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n2 ( nAlloc ) ; doF32_2_relaxed ( 11329265 , 16 ) ; }

Target:
public void testRootnF32_2_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_2 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ ( INPUTSIZE ) * 2 ] ; android.renderscript.cts.RSUtils.genRandomInts ( 11329265 , 32 , 1 , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n2 ( nAlloc ) ; doF32_2_relaxed ( 11329265 , 16 ) ; }