auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.jetbrains.jps.incremental.BinaryContent instrument ( org.jetbrains.jps.incremental.CompileContext context , org.jetbrains.jps.incremental.CompiledClass compiledClass , org.jetbrains.asm4.ClassReader reader , org.jetbrains.asm4.ClassWriter writer , com.intellij.compiler.instrumentation.InstrumentationClassFinder finder ) { try { if ( com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter.processClassFile ( reader , writer ) ) { return new org.jetbrains.jps.incremental.BinaryContent ( writer.toByteArray ( ) ) ; } } catch ( java.lang.Throwable e ) { final java.lang.StringBuilder msg = new java.lang.StringBuilder ( ) ; msg.append ( "@NotNull instrumentation failed " ) ; final java.io.File sourceFile = compiledClass.getSourceFile ( ) ; msg.append ( " for " ) . append ( sourceFile.getName ( ) ) ; msg.append ( ": " ) . append ( e.getMessage ( ) ) ; context.processMessage ( new org.jetbrains.jps.incremental.messages.CompilerMessage ( getPresentableName ( ) , BuildMessage.Kind.ERROR , msg.toString ( ) , sourceFile.getPath ( ) ) ) ; } return null ; }

Target:
protected org.jetbrains.jps.incremental.BinaryContent instrument ( org.jetbrains.jps.incremental.CompileContext context , org.jetbrains.jps.incremental.CompiledClass compiledClass , org.jetbrains.org.objectweb.asm.ClassReader reader , org.jetbrains.org.objectweb.asm.ClassWriter writer , com.intellij.compiler.instrumentation.InstrumentationClassFinder finder ) { try { if ( com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter.processClassFile ( reader , writer ) ) { return new org.jetbrains.jps.incremental.BinaryContent ( writer.toByteArray ( ) ) ; } } catch ( java.lang.Throwable e ) { final java.lang.StringBuilder msg = new java.lang.StringBuilder ( ) ; msg.append ( "@NotNull instrumentation failed " ) ; final java.io.File sourceFile = compiledClass.getSourceFile ( ) ; msg.append ( " for " ) . append ( sourceFile.getName ( ) ) ; msg.append ( ": " ) . append ( e.getMessage ( ) ) ; context.processMessage ( new org.jetbrains.jps.incremental.messages.CompilerMessage ( getPresentableName ( ) , BuildMessage.Kind.ERROR , msg.toString ( ) , sourceFile.getPath ( ) ) ) ; } return null ; }
Source:
public void run ( ) { for ( com.android.ide.common.api.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.common.api.MenuAction.Action ) { try { ( ( com.android.ide.common.api.MenuAction.Action ) ( a2 ) ) . getCallback ( ) . action ( a2 , key , ( ! isChecked ) ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine gre = mCanvas.getRulesEngine ( ) ; gre.logError ( "XML edit operation failed: %s" , e.toString ( ) ) ; } } } }

Target:
public void run ( ) { for ( com.android.ide.common.api.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.common.api.MenuAction.Action ) { try { ( ( com.android.ide.common.api.MenuAction.Action ) ( a2 ) ) . getCallback ( ) . action ( a2 , key , ( ! isChecked ) ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "XML edit operation failed: %s" , e.toString ( ) ) ; } } } }
Source:
private void invokeInsn ( final int opcode , final org.objectweb.asm.Type type , final org.objectweb.asm.commons.Method method ) { java.lang.String owner = ( ( type.getSort ( ) ) == ( org.objectweb.asm.Type.ARRAY ) ) ? type.getDescriptor ( ) : type.getInternalName ( ) ; mv.visitMethodInsn ( opcode , owner , method.getName ( ) , method.getDescriptor ( ) ) ; }

Target:
private void invokeInsn ( final int opcode , final org.objectweb.asm.Type type , final org.objectweb.asm.commons.Method method , final boolean itf ) { java.lang.String owner = ( ( type.getSort ( ) ) == ( org.objectweb.asm.Type.ARRAY ) ) ? type.getDescriptor ( ) : type.getInternalName ( ) ; mv.visitMethodInsn ( opcode , owner , method.getName ( ) , method.getDescriptor ( ) , itf ) ; }
Source:
public void TestNordic ( ) { if ( logKnownIssue ( "cldrbug:9465" , "CDF(12,000) for no_NO shouldn't be 12 (12K or similar)" ) ) { return ; } java.lang.String result = android.icu.text.CompactDecimalFormat.getInstance ( new android.icu.util.ULocale ( "no_NO" ) , CompactDecimalFormat.CompactStyle.SHORT ) . format ( 12000 ) ; assertNotEquals ( "CDF(12,000) for no_NO shouldn't be 12 (12K or similar)" , "12" , result ) ; }

Target:
public void TestBug11319 ( ) { if ( logKnownIssue ( "11319" , "CDF does not fall back from zh-Hant-HK to zh-Hant" ) ) { return ; } android.icu.text.CompactDecimalFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( new android.icu.util.ULocale ( "zh-Hant-HK" ) , CompactStyle.SHORT ) ; java.lang.String result = cdf.format ( 958000000L ) ; assertEquals ( "CDF should correctly format 958 million in zh-Hant-HK" , "9.6億" , result ) ; }
Source:
private void stageFile ( int rawId , java.io.File file ) throws java.lang.Exception { new java.io.File ( file.getParent ( ) ) . mkdirs ( ) ; java.io.InputStream in = null ; java.io.OutputStream out = null ; try { in = getContext ( ) . getResources ( ) . openRawResource ( rawId ) ; out = new java.io.FileOutputStream ( file ) ; libcore.io.Streams.copy ( in , out ) ; } finally { libcore.io.IoUtils.closeQuietly ( in ) ; libcore.io.IoUtils.closeQuietly ( out ) ; } }

Target:
private void stageFile ( int rawId , java.io.File file ) throws java.lang.Exception { new java.io.File ( file.getParent ( ) ) . mkdirs ( ) ; java.io.InputStream in = null ; java.io.OutputStream out = null ; try { in = android.support.test.InstrumentationRegistry.getContext ( ) . getResources ( ) . openRawResource ( rawId ) ; out = new java.io.FileOutputStream ( file ) ; libcore.io.Streams.copy ( in , out ) ; } finally { libcore.io.IoUtils.closeQuietly ( in ) ; libcore.io.IoUtils.closeQuietly ( out ) ; } }
Source:
public void notifyFocusChanged ( ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.ImageChangeListener [ ] listeners = getImageChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . focusChanged ( ) ; } } }

Target:
public void notifyTreeChanged ( ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.ImageChangeListener [ ] listeners = getImageChangeListenerList ( ) ; if ( listeners != null ) { for ( int i = 0 ; i < ( listeners.length ) ; i ++ ) { listeners [ i ] . treeChanged ( ) ; } } }
Source:
public void testKill ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testKill" ) ; fail ( "Expected remote failure" ) ; } catch ( java.lang.AssertionError expected ) { } }

Target:
public void testCompatDefault22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatDefault" ) ; }
Source:
public static void recordSparseSlowlyHistogram ( java.lang.String name , int sample ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordSparseHistogram ( name , key , sample ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordLinearCountHistogram ( java.lang.String name , int sample , int min , int max , int numBuckets ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordLinearCountHistogram ( name , key , sample , min , max , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public void TestStringSymbols ( ) { android.icu.text.DecimalFormatSymbols symbols = new android.icu.text.DecimalFormatSymbols ( android.icu.util.ULocale.US ) ; java.lang.String [ ] customDigits = new java.lang.String [ ] { "(0)" , "(1)" , "(2)" , "(3)" , "(4)" , "(5)" , "(6)" , "(7)" , "(8)" , "(9)" } ; symbols.setDigitStrings ( customDigits ) ; symbols.setDecimalSeparatorString ( "~~" ) ; symbols.setGroupingSeparatorString ( "^^" ) ; android.icu.text.DecimalFormat fmt = new android.icu.text.DecimalFormat ( "#,##0.0#" , symbols ) ; expect2 ( fmt , 1234567.89 , "(1)^^(2)(3)(4)^^(5)(6)(7)~~(8)(9)" ) ; }

Target:
public void Test10436 ( ) { android.icu.text.DecimalFormat df = ( ( android.icu.text.DecimalFormat ) ( android.icu.text.NumberFormat.getInstance ( java.util.Locale.ENGLISH ) ) ) ; df.setRoundingMode ( MathContext.ROUND_CEILING ) ; df.setMinimumFractionDigits ( 0 ) ; df.setMaximumFractionDigits ( 0 ) ; assertEquals ( "-.99 should round toward infinity" , "-0" , df.format ( ( - 0.99 ) ) ) ; }
Source:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( tzData ) ) ; assertTzDataInstalled ( tzData ) ; }

Target:
public void testSuccessfulFirstUpdate ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertTrue ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData ) ; }
Source:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }

Target:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "maxSdkVersion not found in badging output for <foo>" ) ; }
Source:
public android.os.UserHandle createUser ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String name ) { return null ; }

Target:
public android.content.Intent createAdminSupportIntent ( @ android.annotation.NonNull java.lang.String restriction ) { throwIfParentInstance ( "createAdminSupportIntent" ) ; if ( ( mService ) != null ) { try { return mService.createAdminSupportIntent ( restriction ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
private void handleDumpService ( android.app.ActivityThread.DumpComponentInfo info ) { final android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskWrites ( ) ; try { android.app.Service s = mServices.get ( info.token ) ; if ( s != null ) { java.io.PrintWriter pw = new java.io.PrintWriter ( new java.io.FileOutputStream ( info.fd.getFileDescriptor ( ) ) ) ; s.dump ( info.fd.getFileDescriptor ( ) , pw , info.args ) ; pw.flush ( ) ; } } finally { libcore.io.IoUtils.closeQuietly ( info.fd ) ; android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } }

Target:
private void handleDumpService ( android.app.ActivityThread.DumpComponentInfo info ) { final android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskWrites ( ) ; try { android.app.Service s = mServices.get ( info.token ) ; if ( s != null ) { java.io.PrintWriter pw = new com.android.internal.util.FastPrintWriter ( new java.io.FileOutputStream ( info.fd.getFileDescriptor ( ) ) ) ; s.dump ( info.fd.getFileDescriptor ( ) , pw , info.args ) ; pw.flush ( ) ; } } finally { libcore.io.IoUtils.closeQuietly ( info.fd ) ; android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } }
Source:
public void testRegistrationConfigParcel ( ) { android.telephony.ims.internal.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.internal.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . addFeature ( ImsFeature.FEATURE_RCS ) . build ( ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; testConfig.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.ims.internal.stub.ImsFeatureConfiguration result = ImsFeatureConfiguration.CREATOR.createFromParcel ( p ) ; p.recycle ( ) ; junit.framework.Assert.assertEquals ( testConfig , result ) ; }

Target:
public void testRegistrationConfigParcel ( ) { android.telephony.ims.stub.ImsFeatureConfiguration testConfig = new android.telephony.ims.stub.ImsFeatureConfiguration.Builder ( ) . addFeature ( ImsFeature.FEATURE_MMTEL ) . addFeature ( ImsFeature.FEATURE_RCS ) . build ( ) ; android.os.Parcel p = android.os.Parcel.obtain ( ) ; testConfig.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.ims.stub.ImsFeatureConfiguration result = ImsFeatureConfiguration.CREATOR.createFromParcel ( p ) ; p.recycle ( ) ; junit.framework.Assert.assertEquals ( testConfig , result ) ; }
Source:
public void testGetOutputStreamOnGetFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; try { connection.getOutputStream ( ) ; fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }

Target:
public void testGetOutputStreamOnGetFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; try { connection.getOutputStream ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }
Source:
public void testDefaultValue ( ) { assertEquals ( java.nio.charset.CodingErrorAction.REPORT , encoder.malformedInputAction ( ) ) ; assertEquals ( java.nio.charset.CodingErrorAction.REPORT , encoder.unmappableCharacterAction ( ) ) ; assertSame ( encoder , encoder.onMalformedInput ( java.nio.charset.CodingErrorAction.IGNORE ) ) ; assertSame ( encoder , encoder.onUnmappableCharacter ( java.nio.charset.CodingErrorAction.IGNORE ) ) ; if ( ( encoder ) instanceof tests.api.java.nio.charset.CharsetEncoderTest.MockCharsetEncoder ) { assertTrue ( java.util.Arrays.equals ( encoder.replacement ( ) , defaultReplacement ) ) ; } else { assertTrue ( java.util.Arrays.equals ( encoder.replacement ( ) , specifiedReplacement ) ) ; } }

Target:
public void testDefaultValue ( ) { assertEquals ( java.nio.charset.CodingErrorAction.REPORT , encoder.malformedInputAction ( ) ) ; assertEquals ( java.nio.charset.CodingErrorAction.REPORT , encoder.unmappableCharacterAction ( ) ) ; assertSame ( encoder , encoder.onMalformedInput ( java.nio.charset.CodingErrorAction.IGNORE ) ) ; assertSame ( encoder , encoder.onUnmappableCharacter ( java.nio.charset.CodingErrorAction.IGNORE ) ) ; if ( ( encoder ) instanceof org.apache.harmony.tests.java.nio.charset.CharsetEncoderTest.MockCharsetEncoder ) { assertTrue ( java.util.Arrays.equals ( encoder.replacement ( ) , defaultReplacement ) ) ; } else { assertTrue ( java.util.Arrays.equals ( encoder.replacement ( ) , specifiedReplacement ) ) ; } }
Source:
protected com.android.jack.ir.ast.JVariableRef getNewVarRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode defExpr ) { assert defExpr instanceof com.android.jack.ir.ast.JVariableRef ; com.android.jack.ir.ast.JVariableRef newVarRef = ( ( com.android.jack.ir.ast.JVariableRef ) ( defExpr ) ) . getTarget ( ) . makeRef ( defExpr.getSourceInfo ( ) ) ; com.android.jack.debug.DebugVariableInfoMarker debugInfo = defExpr.getMarker ( com.android.jack.debug.DebugVariableInfoMarker.class ) ; if ( debugInfo != null ) { newVarRef.addMarker ( debugInfo ) ; } return newVarRef ; }

Target:
protected com.android.jack.ir.ast.JVariableRef getNewVarRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode defExpr , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo sourceInfo ) { assert defExpr instanceof com.android.jack.ir.ast.JVariableRef ; com.android.jack.ir.ast.JVariableRef newVarRef = ( ( com.android.jack.ir.ast.JVariableRef ) ( defExpr ) ) . getTarget ( ) . makeRef ( sourceInfo ) ; com.android.jack.debug.DebugVariableInfoMarker debugInfo = defExpr.getMarker ( com.android.jack.debug.DebugVariableInfoMarker.class ) ; if ( debugInfo != null ) { newVarRef.addMarker ( debugInfo ) ; } return newVarRef ; }
Source:
public void terminate ( int reason ) throws com.android.ims.ImsException { logi ( ( "terminate :: reason=" + reason ) ) ; synchronized ( mLockObj ) { mHold = false ; mInCall = false ; mTerminationRequestPending = true ; if ( ( mSession ) != null ) { mSession.terminate ( reason ) ; } } }

Target:
public void reject ( int reason ) throws com.android.ims.ImsException { logi ( ( "reject :: reason=" + reason ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) != null ) { mSession.reject ( reason ) ; } if ( ( mInCall ) && ( ( mProposedCallProfile ) != null ) ) { if ( com.android.ims.ImsCall.DBG ) { logi ( "reject :: call profile is not updated; destroy it..." ) ; } mProposedCallProfile = null ; } if ( ( mInCall ) && ( ( mUpdateRequest ) == ( com.android.ims.ImsCall.UPDATE_UNSPECIFIED ) ) ) { mUpdateRequest = com.android.ims.ImsCall.UPDATE_NONE ; } } }
Source:
public com.ibm.icu.text.QuantityFormatter.Builder add ( java.lang.String variant , java.lang.String template ) { int idx = com.ibm.icu.text.QuantityFormatter.getPluralIndex ( variant ) ; if ( idx < 0 ) { throw new java.lang.IllegalArgumentException ( variant ) ; } com.ibm.icu.impl.SimplePatternFormatter newT = com.ibm.icu.impl.SimplePatternFormatter.compile ( template ) ; if ( ( newT.getPlaceholderCount ( ) ) > 1 ) { throw new java.lang.IllegalArgumentException ( ( "Extra placeholders: " + template ) ) ; } ensureCapacity ( ) ; templates [ idx ] = newT ; return this ; }

Target:
public com.ibm.icu.text.QuantityFormatter.Builder add ( java.lang.CharSequence variant , java.lang.String template ) { int idx = com.ibm.icu.text.QuantityFormatter.getPluralIndex ( variant ) ; if ( idx < 0 ) { throw new java.lang.IllegalArgumentException ( variant.toString ( ) ) ; } com.ibm.icu.impl.SimplePatternFormatter newT = com.ibm.icu.impl.SimplePatternFormatter.compile ( template ) ; if ( ( newT.getPlaceholderCount ( ) ) > 1 ) { throw new java.lang.IllegalArgumentException ( ( "Extra placeholders: " + template ) ) ; } ensureCapacity ( ) ; templates [ idx ] = newT ; return this ; }
Source:
public void testRemoveAll ( ) { java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.util.Vector v = new java.util.Vector ( ) ; v.add ( one ) ; v.add ( two ) ; full.removeAll ( v ) ; assertEquals ( 1 , full.size ( ) ) ; }

Target:
public void testToString ( ) { assertEquals ( "[]" , new java.util.concurrent.CopyOnWriteArraySet ( ) . toString ( ) ) ; java.util.Collection full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.lang.String s = full.toString ( ) ; for ( int i = 0 ; i < 3 ; ++ i ) assertTrue ( s.contains ( java.lang.String.valueOf ( i ) ) ) ; assertEquals ( new java.util.ArrayList ( full ) . toString ( ) , full.toString ( ) ) ; }
Source:
public void run ( ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasSelection cs : selection ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = cs.getViewInfo ( ) ; if ( ( vi != null ) && ( ! ( vi.isRoot ( ) ) ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ui = vi.getUiViewNode ( ) ; if ( ui != null ) { ui.deleteXmlNode ( ) ; } } } }

Target:
public void run ( ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem cs : selection ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = cs.getViewInfo ( ) ; if ( ( vi != null ) && ( ! ( vi.isRoot ( ) ) ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ui = vi.getUiViewNode ( ) ; if ( ui != null ) { ui.deleteXmlNode ( ) ; } } } }
Source:
private java.lang.StringBuffer subformat ( double number , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr ) { if ( ( currencySignCount ) == ( com.ibm.icu.text.DecimalFormat.CURRENCY_SIGN_COUNT_IN_PLURAL_FORMAT ) ) { return subformat ( currencyPluralInfo.select ( getFixedDecimal ( number ) ) , result , fieldPosition , isNegative , isInteger , parseAttr ) ; } else { return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr ) ; } }

Target:
private java.lang.StringBuffer subformat ( int number , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr , int maxIntDig ) { if ( ( currencySignCount ) == ( com.ibm.icu.text.DecimalFormat.CURRENCY_SIGN_COUNT_IN_PLURAL_FORMAT ) ) { return subformat ( currencyPluralInfo.select ( getFixedDecimal ( number ) ) , result , fieldPosition , isNegative , isInteger , parseAttr , maxIntDig ) ; } else { return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr , maxIntDig ) ; } }
Source:
public static boolean contains ( java.lang.Iterable < ? > iterable , @ javax.annotation.Nullable java.lang.Object element ) { if ( iterable instanceof java.util.Collection ) { java.util.Collection < ? > collection = ( ( java.util.Collection < ? > ) ( iterable ) ) ; try { return collection.contains ( element ) ; } catch ( java.lang.NullPointerException e ) { return false ; } catch ( java.lang.ClassCastException e ) { return false ; } } return com.google.common.collect.Iterators.contains ( iterable.iterator ( ) , element ) ; }

Target:
public static boolean contains ( java.lang.Iterable < ? > iterable , @ javax.annotation.Nullable java.lang.Object element ) { if ( iterable instanceof java.util.Collection ) { java.util.Collection < ? > collection = ( ( java.util.Collection < ? > ) ( iterable ) ) ; return com.google.common.collect.Collections2.safeContains ( collection , element ) ; } return com.google.common.collect.Iterators.contains ( iterable.iterator ( ) , element ) ; }
Source:
static int log10Floor ( long x ) { int y = com.google.common.math.LongMath.MAX_LOG10_FOR_LEADING_ZEROS [ java.lang.Long.numberOfLeadingZeros ( x ) ] ; long sgn = ( x - ( com.google.common.math.LongMath.POWERS_OF_10 [ y ] ) ) > > > ( ( java.lang.Long.SIZE ) - 1 ) ; return y - ( ( int ) ( sgn ) ) ; }

Target:
static int lessThanBranchFree ( long x , long y ) { return ( ( int ) ( ( ~ ( ~ ( x - y ) ) ) > > > ( ( java.lang.Long.SIZE ) - 1 ) ) ) ; }
Source:
public final void testTapLink_changeOrientationThenTapBack ( ) throws java.lang.Exception { sUiBot.setScreenOrientation ( UiBot.PORTRAIT ) ; try { saveUiRestoredAfterTappingLinkTest ( android.autofillservice.cts.CustomDescriptionWithLinkTestCase.PostSaveLinkTappedAction.ROTATE_THEN_TAP_BACK_BUTTON ) ; } finally { sUiBot.setScreenOrientation ( UiBot.PORTRAIT ) ; cleanUpAfterScreenOrientationIsBackToPortrait ( ) ; } }

Target:
public final void testTapLink_changeOrientationThenTapBack ( ) throws java.lang.Exception { sUiBot.setScreenOrientation ( UiBot.PORTRAIT ) ; try { android.autofillservice.cts.Helper.runShellCommand ( "wm density 420" ) ; saveUiRestoredAfterTappingLinkTest ( android.autofillservice.cts.CustomDescriptionWithLinkTestCase.PostSaveLinkTappedAction.ROTATE_THEN_TAP_BACK_BUTTON ) ; } finally { sUiBot.setScreenOrientation ( UiBot.PORTRAIT ) ; try { cleanUpAfterScreenOrientationIsBackToPortrait ( ) ; } finally { android.autofillservice.cts.Helper.runShellCommand ( "wm density reset" ) ; } } }
Source:
public void dexopt ( java.lang.String apkPath , int uid , java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , @ android.annotation.Nullable java.lang.String outputPath , int dexFlags , java.lang.String compilerFilter , java.lang.String volumeUuid , java.lang.String sharedLibraries ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; mInstaller.dexopt ( apkPath , uid , pkgName , instructionSet , dexoptNeeded , outputPath , dexFlags , compilerFilter , volumeUuid , sharedLibraries ) ; }

Target:
public void dexopt ( java.lang.String apkPath , int uid , @ android.annotation.Nullable java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , @ android.annotation.Nullable java.lang.String outputPath , int dexFlags , java.lang.String compilerFilter , @ android.annotation.Nullable java.lang.String volumeUuid , @ android.annotation.Nullable java.lang.String sharedLibraries ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; mInstaller.dexopt ( apkPath , uid , pkgName , instructionSet , dexoptNeeded , outputPath , dexFlags , compilerFilter , volumeUuid , sharedLibraries ) ; }
Source:
public int compare ( java.util.Map < java.lang.String , ? > item , java.util.Map < java.lang.String , ? > otherItem ) { java.lang.String title = ( ( java.lang.String ) ( item.get ( com.android.cts.verifier.TestListActivity.TestListAdapter.TITLE ) ) ) ; java.lang.String otherTitle = ( ( java.lang.String ) ( otherItem.get ( com.android.cts.verifier.TestListActivity.TestListAdapter.TITLE ) ) ) ; return title.compareTo ( otherTitle ) ; }

Target:
protected void onActivityResult ( int requestCode , int resultCode , android.content.Intent data ) { super . onActivityResult ( requestCode , resultCode , data ) ; switch ( requestCode ) { case com.android.cts.verifier.TestListActivity.LAUNCH_TEST_REQUEST_CODE : handleLaunchTestResult ( resultCode , data ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown request code: " + requestCode ) ) ; } }
Source:
static android.telephony.SignalStrength convertHalSignalStrength ( com.android.internal.telephony.V1_0.SignalStrength signalStrength ) { 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 , signalStrength.tdScdma.rscp ) ; }

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 sendBackgroundScanBandRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( WifiScanner.WIFI_BAND_BOTH , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.scanner.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithBand ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , WifiScanner.WIFI_BAND_BOTH ) . build ( ) ; doSuccessfulBackgroundScan ( requestSettings , nativeSettings ) ; assertEquals ( mWifiMetrics.getBackgroundScanCount ( ) , 1 ) ; }

Target:
private android.util.Pair < android.net.wifi.WifiScanner.ScanSettings , com.android.server.wifi.WifiNative.ScanSettings > createScanSettingsForHwPno ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( com.android.server.wifi.ScanTestUtil.channelsToSpec ( 0 , 2400 , 5150 , 5175 ) , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithChannels ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , 0 , 2400 , 5150 , 5175 ) . build ( ) ; return android.util.Pair.create ( requestSettings , nativeSettings ) ; }
Source:
public java.lang.String getPath ( ) { return null ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( '<' ) ; builder.append ( this . getClass ( ) . getSimpleName ( ) ) ; builder.append ( getDesc ( ) . toString ( ) . replace ( '<' , ':' ) ) ; return builder.toString ( ) ; }
Source:
void disableOptionalCodecs ( ) { android.bluetooth.BluetoothCodecConfig [ ] codecConfigArray = assignCodecConfigPriorities ( ) ; if ( codecConfigArray == null ) { return ; } for ( int i = 0 ; i < ( codecConfigArray.length ) ; i ++ ) { android.bluetooth.BluetoothCodecConfig codecConfig = codecConfigArray [ i ] ; if ( codecConfig.isMandatoryCodec ( ) ) { codecConfig.setCodecPriority ( BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST ) ; } else { codecConfigArray [ i ] = null ; } } setCodecConfigPreferenceNative ( codecConfigArray ) ; }

Target:
void disableOptionalCodecs ( ) { android.bluetooth.BluetoothCodecConfig [ ] codecConfigArray = assignCodecConfigPriorities ( ) ; if ( codecConfigArray == null ) { return ; } for ( int i = 0 ; i < ( codecConfigArray.length ) ; i ++ ) { android.bluetooth.BluetoothCodecConfig codecConfig = codecConfigArray [ i ] ; if ( codecConfig.isMandatoryCodec ( ) ) { codecConfig.setCodecPriority ( BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST ) ; } else { codecConfigArray [ i ] = null ; } } mA2dpNativeInterface.setCodecConfigPreference ( codecConfigArray ) ; }
Source:
public void registerArtifactType ( @ com.android.annotations.NonNull java.lang.String name , boolean isTest , int artifactType ) { if ( ( extraArtifactMap.get ( name ) ) != null ) { throw new java.lang.IllegalArgumentException ( "Artifact with name $name already registered." ) ; } extraArtifactMap.put ( name , new com.android.build.gradle.internal.model.ArtifactMetaDataImpl ( name , isTest , artifactType ) ) ; }

Target:
public void registerArtifactType ( @ com.android.annotations.NonNull java.lang.String name , boolean isTest , int artifactType ) { if ( ( extraArtifactMap.get ( name ) ) != null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "Artifact with name %1$s already registered." , name ) ) ; } extraArtifactMap.put ( name , new com.android.build.gradle.internal.model.ArtifactMetaDataImpl ( name , isTest , artifactType ) ) ; }
Source:
public void test_SSLContext_defaultConfiguration ( ) throws java.lang.Exception { libcore.javax.net.ssl.SSLDefaultConfigurationAsserts.assertSSLContext ( javax.net.ssl.SSLContext.getDefault ( ) ) ; for ( java.lang.String protocol : libcore.java.security.StandardNames.SSL_CONTEXT_PROTOCOLS ) { javax.net.ssl.SSLContext sslContext = javax.net.ssl.SSLContext.getInstance ( protocol ) ; if ( ! ( protocol.equals ( StandardNames.SSL_CONTEXT_PROTOCOLS_DEFAULT ) ) ) { sslContext.init ( null , null , null ) ; } libcore.javax.net.ssl.SSLDefaultConfigurationAsserts.assertSSLContext ( sslContext ) ; } }

Target:
public void test_SSLContext_defaultConfiguration ( ) throws java.lang.Exception { libcore.javax.net.ssl.SSLConfigurationAsserts.assertSSLContextDefaultConfiguration ( javax.net.ssl.SSLContext.getDefault ( ) ) ; for ( java.lang.String protocol : libcore.java.security.StandardNames.SSL_CONTEXT_PROTOCOLS ) { javax.net.ssl.SSLContext sslContext = javax.net.ssl.SSLContext.getInstance ( protocol ) ; if ( ! ( protocol.equals ( StandardNames.SSL_CONTEXT_PROTOCOLS_DEFAULT ) ) ) { sslContext.init ( null , null , null ) ; } libcore.javax.net.ssl.SSLConfigurationAsserts.assertSSLContextDefaultConfiguration ( sslContext ) ; } }
Source:
void stopBatchScan ( com.android.bluetooth.gatt.ScanClient client ) { mBatchClients.remove ( client ) ; removeScanFilters ( client.clientIf ) ; if ( ! ( isOpportunisticScanClient ( client ) ) ) { resetBatchScan ( client ) ; } }

Target:
void flushBatchResults ( int scannerId ) { logd ( ( "flushPendingBatchResults - scannerId = " + scannerId ) ) ; if ( ( mBatchScanParms.fullScanscannerId ) != ( - 1 ) ) { resetCountDownLatch ( ) ; gattClientReadScanReportsNative ( mBatchScanParms.fullScanscannerId , com.android.bluetooth.gatt.ScanManager.SCAN_RESULT_TYPE_FULL ) ; waitForCallback ( ) ; } if ( ( mBatchScanParms.truncatedScanscannerId ) != ( - 1 ) ) { resetCountDownLatch ( ) ; gattClientReadScanReportsNative ( mBatchScanParms.truncatedScanscannerId , com.android.bluetooth.gatt.ScanManager.SCAN_RESULT_TYPE_TRUNCATED ) ; waitForCallback ( ) ; } setBatchAlarm ( ) ; }
Source:
private com.android.server.wifi.ScanDetailCache getOrCreateScanDetailCacheForNetwork ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) return null ; com.android.server.wifi.ScanDetailCache cache = getScanDetailCacheForNetwork ( config.networkId ) ; if ( ( cache == null ) && ( ( config.networkId ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) ) { cache = new com.android.server.wifi.ScanDetailCache ( config , com.android.server.wifi.WifiConfigManagerNew.SCAN_CACHE_ENTRIES_MAX_SIZE , com.android.server.wifi.WifiConfigManagerNew.SCAN_CACHE_ENTRIES_TRIM_SIZE ) ; mScanDetailCaches.put ( config.networkId , cache ) ; } return cache ; }

Target:
private com.android.server.wifi.ScanDetailCache getOrCreateScanDetailCacheForNetwork ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) return null ; com.android.server.wifi.ScanDetailCache cache = getScanDetailCacheForNetwork ( config.networkId ) ; if ( ( cache == null ) && ( ( config.networkId ) != ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) ) { cache = new com.android.server.wifi.ScanDetailCache ( config , com.android.server.wifi.WifiConfigManager.SCAN_CACHE_ENTRIES_MAX_SIZE , com.android.server.wifi.WifiConfigManager.SCAN_CACHE_ENTRIES_TRIM_SIZE ) ; mScanDetailCaches.put ( config.networkId , cache ) ; } return cache ; }
Source:
private android.net.wifi.SupplicantState handleSupplicantStateChange ( android.os.Message message ) { com.android.server.wifi.StateChangeResult stateChangeResult = ( ( com.android.server.wifi.StateChangeResult ) ( message.obj ) ) ; android.net.wifi.SupplicantState state = stateChangeResult.state ; mWifiInfo.setSupplicantState ( state ) ; if ( android.net.wifi.SupplicantState.isConnecting ( state ) ) { mWifiInfo.setNetworkId ( stateChangeResult.networkId ) ; } else { mWifiInfo.setNetworkId ( WifiConfiguration.INVALID_NETWORK_ID ) ; } mWifiInfo.setBSSID ( stateChangeResult.BSSID ) ; mWifiInfo.setSSID ( stateChangeResult.wifiSsid ) ; mSupplicantStateTracker.sendMessage ( android.os.Message.obtain ( message ) ) ; return state ; }

Target:
private void updateCapabilities ( android.net.wifi.WifiConfiguration config ) { android.net.NetworkCapabilities networkCapabilities = new android.net.NetworkCapabilities ( mDfltNetworkCapabilities ) ; if ( config != null ) { if ( config.ephemeral ) { networkCapabilities.removeCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ; } else { networkCapabilities.addCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ; } networkCapabilities.setSignalStrength ( ( ( mWifiInfo.getRssi ( ) ) != ( android.net.wifi.WifiInfo.INVALID_RSSI ) ? mWifiInfo.getRssi ( ) : android.net.NetworkCapabilities.SIGNAL_STRENGTH_UNSPECIFIED ) ) ; } if ( mWifiInfo.getMeteredHint ( ) ) { networkCapabilities.removeCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED ) ; } mNetworkAgent.sendNetworkCapabilities ( networkCapabilities ) ; }
Source:
private void validateSensitivity ( int request , int result ) { int sensitivityDelta = request - result ; mCollector.expectTrue ( ( ( ( "Sensitivity is invalid for AE manaul control test, request: " + request ) + " result: " ) + result ) , ( ( sensitivityDelta < ( android.hardware.camera2.cts.CaptureRequestTest.SENSITIVITY_ERROR_MARGIN ) ) && ( sensitivityDelta >= 0 ) ) ) ; }

Target:
private void validateSensitivity ( int request , int result ) { float sensitivityDelta = ( ( float ) ( request - result ) ) ; float sensitivityErrorMargin = request * ( android.hardware.camera2.cts.CaptureRequestTest.SENSITIVITY_ERROR_MARGIN_RATE ) ; mCollector.expectTrue ( ( ( ( "Sensitivity is invalid for AE manaul control test, request: " + request ) + " result: " ) + result ) , ( ( sensitivityDelta < sensitivityErrorMargin ) && ( sensitivityDelta >= 0 ) ) ) ; }
Source:
public int lastIndexOf ( E e , int index ) { java.lang.Object [ ] elements = getArray ( ) ; return java.util.concurrent.CopyOnWriteArrayList.lastIndexOf ( e , elements , index ) ; }

Target:
public java.util.List < E > subList ( int from , int to ) { java.lang.Object [ ] snapshot = elements ; if ( ( ( from < 0 ) || ( from > to ) ) || ( to > ( snapshot.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( ( "from=" + from ) + ", to=" ) + to ) + ", list size=" ) + ( snapshot.length ) ) ) ; } return new CowSubList ( snapshot , from , to ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { logger.print ( ( "onReceive intent=" + intent ) ) ; if ( ImsManager.ACTION_IMS_SERVICE_UP.equalsIgnoreCase ( intent.getAction ( ) ) ) { handleImsServiceUp ( ) ; } else if ( ImsManager.ACTION_IMS_SERVICE_DOWN.equalsIgnoreCase ( intent.getAction ( ) ) ) { handleImsServiceDown ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { logger.print ( ( "onReceive intent=" + intent ) ) ; if ( ImsManager.ACTION_IMS_SERVICE_UP.equalsIgnoreCase ( intent.getAction ( ) ) ) { handleImsServiceUp ( ) ; } else if ( ImsManager.ACTION_IMS_SERVICE_DOWN.equalsIgnoreCase ( intent.getAction ( ) ) ) { handleImsServiceDown ( ) ; } else if ( TelephonyIntents.ACTION_SIM_STATE_CHANGED.equalsIgnoreCase ( intent.getAction ( ) ) ) { java.lang.String stateExtra = intent.getStringExtra ( IccCardConstants.INTENT_KEY_ICC_STATE ) ; handleSimStateChanged ( stateExtra ) ; } }
Source:
public K apply ( java.util.Map.Entry < K , java.util.Collection < V > > entry ) { return entry.getKey ( ) ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object instanceof java.util.Map.Entry ) { java.util.Map.Entry < ? , ? > entry = ( ( java.util.Map.Entry < ? , ? > ) ( object ) ) ; return multimap.containsEntry ( entry.getKey ( ) , entry.getValue ( ) ) ; } return false ; }
Source:
public android.os.StrictMode.VmPolicy.Builder detectAll ( ) { return enable ( ( ( ( ( ( android.os.StrictMode.DETECT_VM_ACTIVITY_LEAKS ) | ( android.os.StrictMode.DETECT_VM_CURSOR_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_CLOSABLE_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_REGISTRATION_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_FILE_URI_EXPOSURE ) ) ) ; }

Target:
public android.os.StrictMode.VmPolicy.Builder detectAll ( ) { int flags = ( ( ( ( android.os.StrictMode.DETECT_VM_ACTIVITY_LEAKS ) | ( android.os.StrictMode.DETECT_VM_CURSOR_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_CLOSABLE_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_REGISTRATION_LEAKS ) ) | ( android.os.StrictMode.DETECT_VM_FILE_URI_EXPOSURE ) ; if ( android.os.SystemProperties.getBoolean ( android.os.StrictMode.CLEARTEXT_PROPERTY , false ) ) { flags |= android.os.StrictMode.DETECT_VM_CLEARTEXT_NETWORK ; } return enable ( flags ) ; }
Source:
private boolean callsSuper ( lombok.ast.MethodDeclaration node , final java.lang.String methodName ) { final java.util.concurrent.atomic.AtomicBoolean result = new java.util.concurrent.atomic.AtomicBoolean ( ) ; node.accept ( new lombok.ast.ForwardingAstVisitor ( ) { @ java.lang.Override public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( ( node.astName ( ) . astValue ( ) . equals ( methodName ) ) && ( ( node.astOperand ( ) ) instanceof lombok.ast.Super ) ) { result.set ( true ) ; } return super . visitMethodInvocation ( node ) ; } } ) ; return result.get ( ) ; }

Target:
public boolean visitNode ( lombok.ast.Node node ) { return ( mCallsSuper ) || ( super . visitNode ( node ) ) ; }
Source:
public static com.google.devtools.common.options.OptionValueDescription createOptionValueDescription ( com.google.devtools.common.options.OptionDefinition option ) { if ( option.allowsMultiple ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.RepeatableOptionValueDescription ( option ) ; } else if ( option.isExpansionOption ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.ExpansionOptionValueDescription ( option ) ; } else if ( option.hasImplicitRequirements ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.OptionWithImplicitRequirementsValueDescription ( option ) ; } else if ( option.isWrapperOption ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.WrapperOptionValueDescription ( option ) ; } else { return new com.google.devtools.common.options.OptionValueDescription.SingleOptionValueDescription ( option ) ; } }

Target:
public static com.google.devtools.common.options.OptionValueDescription createOptionValueDescription ( com.google.devtools.common.options.OptionDefinition option , com.google.devtools.common.options.OptionsData optionsData ) { if ( option.isExpansionOption ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.ExpansionOptionValueDescription ( option , optionsData ) ; } else if ( option.allowsMultiple ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.RepeatableOptionValueDescription ( option ) ; } else if ( option.hasImplicitRequirements ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.OptionWithImplicitRequirementsValueDescription ( option ) ; } else if ( option.isWrapperOption ( ) ) { return new com.google.devtools.common.options.OptionValueDescription.WrapperOptionValueDescription ( option ) ; } else { return new com.google.devtools.common.options.OptionValueDescription.SingleOptionValueDescription ( option ) ; } }
Source:
private static java.io.File getWrittenResources ( ) throws com.android.ide.common.res2.DuplicateDataException , java.io.IOException , java.lang.InterruptedException , java.util.concurrent.ExecutionException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; resourceMerger.writeDataFolder ( folder , null ) ; return folder ; }

Target:
private static java.io.File getWrittenResources ( ) throws MergeConsumer.ConsumerException , com.android.ide.common.res2.DuplicateDataException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , null ) ; resourceMerger.mergeData ( writer ) ; return folder ; }
Source:
public void setTypeImportCollisionPolicy ( @ javax.annotation.Nonnull com.android.jack.api.v01.TypeCollisionPolicy arg0 ) throws com.android.jack.api.v01.ConfigurationException { }

Target:
public void setTypeImportCollisionPolicy ( @ javax.annotation.Nonnull com.android.jack.api.v01.TypeCollisionPolicy typeImportCollisionPolicy ) throws com.android.jack.api.v01.ConfigurationException { java.lang.String collissionPolicy = null ; switch ( typeImportCollisionPolicy ) { case FAIL : { collissionPolicy = "fail" ; break ; } case KEEP_FIRST : { collissionPolicy = "keep-first" ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Type collision policy '" + typeImportCollisionPolicy ) + "' is unsupported" ) ) ; } } options.addProperty ( ResourceImporter.RESOURCE_COLLISION_POLICY.getName ( ) , collissionPolicy ) ; }
Source:
static com.android.bluetooth.a2dp.A2dpStateMachine make ( com.android.bluetooth.a2dp.A2dpService svc , android.content.Context context , com.android.bluetooth.a2dp.A2dpNativeInterface a2dpNativeInterface , android.os.Looper looper ) { if ( com.android.bluetooth.a2dp.A2dpStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , "make" ) ; } com.android.bluetooth.a2dp.A2dpStateMachine a2dpSm = new com.android.bluetooth.a2dp.A2dpStateMachine ( svc , context , a2dpNativeInterface , looper ) ; a2dpSm.start ( ) ; return a2dpSm ; }

Target:
static com.android.bluetooth.a2dp.A2dpStateMachine make ( android.bluetooth.BluetoothDevice device , com.android.bluetooth.a2dp.A2dpService svc , android.content.Context context , com.android.bluetooth.a2dp.A2dpNativeInterface a2dpNativeInterface , android.os.Looper looper ) { if ( com.android.bluetooth.a2dp.A2dpStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , ( "make for device " + device ) ) ; } com.android.bluetooth.a2dp.A2dpStateMachine a2dpSm = new com.android.bluetooth.a2dp.A2dpStateMachine ( device , svc , context , a2dpNativeInterface , looper ) ; a2dpSm.start ( ) ; return a2dpSm ; }