auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.tools.lint.detector.api.Location getLocation ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return null ; }

Target:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return com.android.tools.lint.detector.api.Location.create ( context.file ) ; }
Source:
public void removeTransportModeTransforms ( java.io.FileDescriptor socket , android.net.IpSecTransform transform ) throws java.io.IOException { try ( android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.dup ( socket ) ) { mService.removeTransportModeTransforms ( pfd , transform.getResourceId ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void removeTransportModeTransforms ( java.io.FileDescriptor socket ) throws java.io.IOException { try ( android.os.ParcelFileDescriptor pfd = android.os.ParcelFileDescriptor.dup ( socket ) ) { mService.removeTransportModeTransforms ( pfd ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean setDiscoverableTimeout ( int timeout ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setDiscoverableTimeout() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.setDiscoverableTimeout ( timeout ) ; }

Target:
public boolean setDiscoverableTimeout ( int timeout ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setDiscoverableTimeout() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.setDiscoverableTimeout ( timeout ) ; }
Source:
public void test_SSLSession_getValue ( ) { libcore.javax.net.ssl.TestSSLSessions s = libcore.javax.net.ssl.TestSSLSessions.create ( ) ; try { s.invalid.getValue ( null ) ; } catch ( java.lang.IllegalArgumentException expected ) { } assertNull ( s.invalid.getValue ( "BOGUS" ) ) ; s.close ( ) ; }

Target:
public void test_SSLSession_getValue ( ) { libcore.javax.net.ssl.TestSSLSessions s = libcore.javax.net.ssl.TestSSLSessions.create ( ) ; try { s.invalid.getValue ( null ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } assertNull ( s.invalid.getValue ( "BOGUS" ) ) ; s.close ( ) ; }
Source:
public void run ( ) { logWriter.println ( "--> CombinedEvents002Debuggee: Start..." ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Send SGNL_READY signal to test..." ) ; synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Wait for SGNL_CONTINUE signal from test..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; logWriter.println ( "--> CombinedEvents002Debuggee: OK - SGNL_CONTINUE signal received!" ) ; logWriter.println ( ( "--> CombinedEvents002Debuggee: " + "Call CombinedEvents002Debuggee_TestedClass.emptyTestedMethod()..." ) ) ; org.apache.harmony.jpda.tests.jdwp.Events.CombinedEvents002Debuggee_TestedClass.emptyTestedMethod ( ) ; logWriter.println ( ( "--> CombinedEvents002Debuggee: " + "CombinedEvents002Debuggee_TestedClass.emptyTestedMethod() returned." ) ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Finishing..." ) ; }

Target:
public void run ( ) { new org.apache.harmony.jpda.tests.jdwp.Events.CombinedEvents002Debuggee_TestedClass ( ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Start..." ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Send SGNL_READY signal to test..." ) ; synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Wait for SGNL_CONTINUE signal from test..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; logWriter.println ( "--> CombinedEvents002Debuggee: OK - SGNL_CONTINUE signal received!" ) ; logWriter.println ( ( "--> CombinedEvents002Debuggee: " + "Call CombinedEvents002Debuggee_TestedClass.emptyTestedMethod()..." ) ) ; org.apache.harmony.jpda.tests.jdwp.Events.CombinedEvents002Debuggee_TestedClass.emptyTestedMethod ( ) ; logWriter.println ( ( "--> CombinedEvents002Debuggee: " + "CombinedEvents002Debuggee_TestedClass.emptyTestedMethod() returned." ) ) ; logWriter.println ( "--> CombinedEvents002Debuggee: Finishing..." ) ; }
Source:
private void doSuccessfulSwPnoScanTest ( boolean isConnectedPno ) { com.android.server.wifi.WifiNative.PnoEventHandler pnoEventHandler = mock ( WifiNative.PnoEventHandler.class ) ; com.android.server.wifi.WifiNative.PnoSettings pnoSettings = createDummyPnoSettings ( isConnectedPno ) ; com.android.server.wifi.WifiNative.ScanEventHandler scanEventHandler = mock ( WifiNative.ScanEventHandler.class ) ; com.android.server.wifi.WifiNative.ScanSettings scanSettings = createDummyScanSettings ( ) ; com.android.server.wifi.ScanResults scanResults = createDummyScanResults ( ) ; org.mockito.InOrder order = inOrder ( scanEventHandler , mWifiNative ) ; startSuccessfulPnoScan ( scanSettings , pnoSettings , scanEventHandler , pnoEventHandler ) ; expectSuccessfulSwPnoScan ( order , scanEventHandler , scanResults ) ; verifyNoMoreInteractions ( pnoEventHandler ) ; }

Target:
private void doSuccessfulSwPnoScanTest ( boolean isConnectedPno ) { com.android.server.wifi.WifiNative.PnoEventHandler pnoEventHandler = mock ( WifiNative.PnoEventHandler.class ) ; com.android.server.wifi.WifiNative.PnoSettings pnoSettings = createDummyPnoSettings ( isConnectedPno ) ; com.android.server.wifi.WifiNative.ScanEventHandler scanEventHandler = mock ( WifiNative.ScanEventHandler.class ) ; com.android.server.wifi.WifiNative.ScanSettings scanSettings = createDummyScanSettings ( ) ; com.android.server.wifi.ScanResults scanResults = createDummyScanResults ( false ) ; org.mockito.InOrder order = inOrder ( scanEventHandler , mWifiNative ) ; startSuccessfulPnoScan ( scanSettings , pnoSettings , scanEventHandler , pnoEventHandler ) ; expectSuccessfulSwPnoScan ( order , scanEventHandler , scanResults ) ; verifyNoMoreInteractions ( pnoEventHandler ) ; }
Source:
private static final java.util.regex.Matcher getNextLineMatcher ( java.util.ArrayList < java.lang.String > lines , int nextIndex , java.util.regex.Pattern pattern ) { if ( nextIndex == ( lines.size ( ) ) ) { return null ; } java.util.regex.Matcher m = pattern.matcher ( lines.get ( nextIndex ) ) ; if ( m.matches ( ) ) { return m ; } return null ; }

Target:
private static final java.util.regex.Matcher getNextLineMatcher ( java.lang.String [ ] lines , int nextIndex , java.util.regex.Pattern pattern ) { if ( nextIndex == ( lines.length ) ) { return null ; } java.util.regex.Matcher m = pattern.matcher ( lines [ nextIndex ] ) ; if ( m.matches ( ) ) { return m ; } return null ; }
Source:
public void testTrustManagerAndTrustRootIndex_unusedForHttpConnection ( ) throws java.lang.Exception { com.android.okhttp.internal.Platform platform = com.android.okhttp.internal.Platform.getAndSetForTest ( new libcore.java.net.URLConnectionTest.PlatformWithoutTrustManager ( ) ) ; try { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) . setResponseCode ( 200 ) ) ; server.play ( ) ; java.net.HttpURLConnection urlConnection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; assertEquals ( 200 , urlConnection.getResponseCode ( ) ) ; } finally { com.android.okhttp.internal.Platform.getAndSetForTest ( platform ) ; } }

Target:
public void testTrustManagerAndTrustRootIndex_unusedForHttpConnection ( ) throws java.lang.Exception { com.android.okhttp.internal.Platform platform = com.android.okhttp.internal.Platform.getAndSetForTest ( new libcore.java.net.URLConnectionTest.PlatformWithoutTrustManager ( ) ) ; try { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) . setResponseCode ( 200 ) ) ; server.play ( ) ; java.net.HttpURLConnection urlConnection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( 200 , urlConnection.getResponseCode ( ) ) ; } finally { com.android.okhttp.internal.Platform.getAndSetForTest ( platform ) ; } }
Source:
private java.lang.reflect.Method getFinalizeReferentMethod ( ) throws com.google.common.base.internal.Finalizer.ShutDown { java.lang.Class < ? > finalizableReferenceClass = finalizableReferenceClassReference.get ( ) ; if ( finalizableReferenceClass == null ) { throw new com.google.common.base.internal.Finalizer.ShutDown ( ) ; } try { return finalizableReferenceClass.getMethod ( "finalizeReferent" ) ; } catch ( java.lang.NoSuchMethodException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
private java.lang.reflect.Method getFinalizeReferentMethod ( ) { java.lang.Class < ? > finalizableReferenceClass = finalizableReferenceClassReference.get ( ) ; if ( finalizableReferenceClass == null ) { return null ; } try { return finalizableReferenceClass.getMethod ( "finalizeReferent" ) ; } catch ( java.lang.NoSuchMethodException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , int [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , float [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }
Source:
static int hashCodeImpl ( java.util.Set < ? > s ) { int hashCode = 0 ; for ( java.lang.Object o : s ) { hashCode += ( o != null ) ? o.hashCode ( ) : 0 ; } return hashCode ; }

Target:
static int hashCodeImpl ( java.util.Set < ? > s ) { int hashCode = 0 ; for ( java.lang.Object o : s ) { hashCode += ( o != null ) ? o.hashCode ( ) : 0 ; hashCode = ~ ( ~ hashCode ) ; } return hashCode ; }
Source:
void showAllWindowsLocked ( ) { final int NW = allAppWindows.size ( ) ; for ( int i = 0 ; i < NW ; i ++ ) { com.android.server.WindowManagerService.WindowState w = allAppWindows.get ( i ) ; if ( com.android.server.WindowManagerService.DEBUG_VISIBILITY ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( "performing show on: " + w ) ) ; w.performShowLocked ( ) ; } }

Target:
void showAllWindowsLocked ( ) { final int NW = allAppWindows.size ( ) ; for ( int i = 0 ; i < NW ; i ++ ) { com.android.server.WindowManagerService.WindowState w = allAppWindows.get ( i ) ; if ( com.android.server.WindowManagerService.DEBUG_VISIBILITY ) android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( "performing show on: " + w ) ) ; w.performShowLocked ( ) ; } }
Source:
private static void checkExpression ( java.lang.Object expected , java.lang.String expressionSource ) { @ org.intellij.lang.annotations.Language ( value = "JAVA" ) java.lang.String source = ( ( ( ( ( ( ( "" + ( ( ( "package test.pkg;\n" + "public class Test {\n" ) + " public void test() {\n" ) + " Object expression = " ) ) + expressionSource ) + ";\n" ) + " }\n" ) + " public static final int MY_INT_FIELD = 5;\n" ) + " public static final boolean MY_BOOLEAN_FIELD = true;\n" ) + " public static final String MY_STRING_FIELD = \"test\";\n" ) + "}\n" ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.check ( expected , source , "expression" ) ; }

Target:
private void checkExpression ( java.lang.Object expected , java.lang.String expressionSource ) { @ org.intellij.lang.annotations.Language ( value = "JAVA" ) java.lang.String source = ( ( ( ( ( ( ( "" + ( ( ( "package test.pkg;\n" + "public class Test {\n" ) + " public void test() {\n" ) + " Object expression = " ) ) + expressionSource ) + ";\n" ) + " }\n" ) + " public static final int MY_INT_FIELD = 5;\n" ) + " public static final boolean MY_BOOLEAN_FIELD = true;\n" ) + " public static final String MY_STRING_FIELD = \"test\";\n" ) + "}\n" ; check ( expected , source , "expression" ) ; }
Source:
private void println ( java.lang.String format , java.lang.Object ... args ) { if ( ( mLevel ) != ( com.android.sdklib.internal.project.ProjectCreator.OutputLevel.SILENT ) ) { if ( ! ( format.endsWith ( "\n" ) ) ) { format += "\n" ; } mLog.printf ( format , args ) ; } }

Target:
private void println ( java.lang.String format , java.lang.Object ... args ) { if ( ( mLevel ) != ( com.android.sdklib.internal.project.ProjectCreator.OutputLevel.SILENT ) ) { if ( ! ( format.endsWith ( "\n" ) ) ) { format += "\n" ; } mLog.info ( format , args ) ; } }
Source:
public static java.lang.String getStringInternal ( int foo ) { try { java.lang.Class < ? > theClass = java.lang.Class.forName ( "com.android.tests.basic.StringProvider" ) ; java.lang.reflect.Method method = theClass.getDeclaredMethod ( "getString" , int . class ) ; return ( ( java.lang.String ) ( method.invoke ( null , foo ) ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public static java.lang.String getStringInternal ( int foo ) { return java.lang.Integer.toString ( foo ) ; }
Source:
private java.util.List < java.lang.String > getStringList ( java.lang.StringBuilder stringAccumulator ) { BRANCH ( ( 3.0E7 - 1.0 ) ) ; java.util.List < java.lang.String > filteredStrings = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String s : com.android.sdklib.devices.DeviceParser.DeviceHandler.sSpaceSplitter.split ( stringAccumulator ) ) { if ( ( s != null ) && ( ! ( s.isEmpty ( ) ) ) ) { filteredStrings.add ( s.trim ( ) ) ; } } return filteredStrings ; }

Target:
private static java.util.List < java.lang.String > getStringList ( java.lang.StringBuilder stringAccumulator ) { java.util.List < java.lang.String > filteredStrings = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String s : com.android.sdklib.devices.DeviceParser.DeviceHandler.sSpaceSplitter.split ( stringAccumulator ) ) { if ( ( s != null ) && ( ! ( s.isEmpty ( ) ) ) ) { filteredStrings.add ( s.trim ( ) ) ; } } return filteredStrings ; }
Source:
private void handleCdmaSubscriptionSource ( int newSubscriptionSource ) { log ( ( "Subscription Source : " + newSubscriptionSource ) ) ; isSubscriptionFromRuim = newSubscriptionSource == ( CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM ) ; saveCdmaSubscriptionSource ( newSubscriptionSource ) ; if ( ! ( isSubscriptionFromRuim ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.cdma.EVENT_NV_READY ) ) ; } else { phone.getIccCard ( ) . registerForReady ( this , com.android.internal.telephony.cdma.EVENT_RUIM_READY , null ) ; } }

Target:
private void handleCdmaSubscriptionSource ( int newSubscriptionSource ) { log ( ( "Subscription Source : " + newSubscriptionSource ) ) ; isSubscriptionFromRuim = newSubscriptionSource == ( CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM ) ; saveCdmaSubscriptionSource ( newSubscriptionSource ) ; if ( ! ( isSubscriptionFromRuim ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.cdma.EVENT_NV_READY ) ) ; } }
Source:
void setInsetsWindow ( com.android.server.WindowManagerService.Session session , android.view.IWindow client , int touchableInsets , android.graphics.Rect contentInsets , android.graphics.Rect visibleInsets ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState w = windowForClientLocked ( session , client ) ; if ( w != null ) { w.mGivenInsetsPending = false ; w.mGivenContentInsets.set ( contentInsets ) ; w.mGivenVisibleInsets.set ( visibleInsets ) ; w.mTouchableInsets = touchableInsets ; mLayoutNeeded = true ; performLayoutAndPlaceSurfacesLocked ( ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
void setInsetsWindow ( com.android.server.WindowManagerService.Session session , android.view.IWindow client , int touchableInsets , android.graphics.Rect contentInsets , android.graphics.Rect visibleInsets ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState w = windowForClientLocked ( session , client , false ) ; if ( w != null ) { w.mGivenInsetsPending = false ; w.mGivenContentInsets.set ( contentInsets ) ; w.mGivenVisibleInsets.set ( visibleInsets ) ; w.mTouchableInsets = touchableInsets ; mLayoutNeeded = true ; performLayoutAndPlaceSurfacesLocked ( ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public static void run ( ) throws java.lang.Exception { art.Main.bindAgentJNIForClass ( art.Test913.class ) ; art.Test913.doTest ( ) ; final java.util.concurrent.CountDownLatch cdl1 = new java.util.concurrent.CountDownLatch ( 1 ) ; java.lang.Thread t = new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { art.Test913.runFollowReferences ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } cdl1.countDown ( ) ; } } ; t.start ( ) ; cdl1.await ( ) ; }

Target:
public static void run ( ) throws java.lang.Exception { art.Test913.doTest ( ) ; final java.util.concurrent.CountDownLatch cdl1 = new java.util.concurrent.CountDownLatch ( 1 ) ; java.lang.Thread t = new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { art.Test913.runFollowReferences ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } cdl1.countDown ( ) ; } } ; t.start ( ) ; cdl1.await ( ) ; }
Source:
public void testStagingText ( ) { if ( "f1" . equals ( BuildConfig.FLAVOR ) ) { assertEquals ( "F1-Staging text" , mTextView.getText ( ) ) ; } else { assertEquals ( "default text" , mTextView.getText ( ) ) ; } }

Target:
public void testStagingText ( ) { if ( "f1" . equals ( BuildConfig.FLAVOR ) ) { assertEquals ( "F1-Staging text" , mTextView.getText ( ) . toString ( ) ) ; } else { assertEquals ( "default text" , mTextView.getText ( ) . toString ( ) ) ; } }
Source:
public boolean saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) { java.io.OutputStream fos = null ; try { fos = newFileOutputStream ( file ) ; props.store ( fos , comments ) ; return true ; } catch ( java.io.IOException ignore ) { } finally { com.google.common.io.Closeables.closeQuietly ( fos ) ; } return false ; }

Target:
public void saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) throws java.io.IOException { java.io.OutputStream fos = null ; try { fos = newFileOutputStream ( file ) ; props.store ( fos , comments ) ; } finally { com.google.common.io.Closeables.closeQuietly ( fos ) ; } }
Source:
protected com.android.jack.test.toolchain.JackBasedToolchain createToolchain ( ) throws org.junit.internal.AssumptionViolatedException { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 1 ) ; excludeList.add ( com.android.jack.test.toolchain.JillBasedToolchain.class ) ; excludeList.add ( com.android.jack.test.toolchain.JackApiV01.class ) ; com.android.jack.test.toolchain.JackBasedToolchain jackToolchain = null ; jackToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; java.io.File [ ] bootclasspath = jackToolchain.getDefaultBootClasspath ( ) ; jackToolchain.addToClasspath ( bootclasspath ) ; jackToolchain.setSourceLevel ( SourceLevel.JAVA_8 ) ; return jackToolchain ; }

Target:
protected com.android.jack.test.toolchain.JackBasedToolchain createToolchain ( @ javax.annotation.Nonnull java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludeList ) throws org.junit.internal.AssumptionViolatedException { com.android.jack.test.toolchain.JackBasedToolchain jackToolchain = null ; jackToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludeList ) ; java.io.File [ ] bootclasspath = jackToolchain.getDefaultBootClasspath ( ) ; jackToolchain.addToClasspath ( bootclasspath ) ; jackToolchain.setSourceLevel ( SourceLevel.JAVA_8 ) ; return jackToolchain ; }
Source:
public int match ( java.lang.String realm , com.android.server.wifi.hotspot2.anqp.eap.EAPMethod credMethod ) { if ( mRealmData.isEmpty ( ) ) return com.android.server.wifi.hotspot2.AuthMatch.Indeterminate ; java.util.List < java.lang.String > credLabels = com.android.server.wifi.hotspot2.Utils.splitDomain ( realm ) ; int best = com.android.server.wifi.hotspot2.AuthMatch.None ; for ( com.android.server.wifi.hotspot2.anqp.NAIRealmData realmData : mRealmData ) { int match = realmData.match ( credLabels , credMethod ) ; if ( match > best ) { best = match ; if ( best == ( com.android.server.wifi.hotspot2.AuthMatch.Exact ) ) { return best ; } } } return best ; }

Target:
public int match ( java.lang.String realm , com.android.server.wifi.hotspot2.anqp.eap.EAPMethod credMethod ) { if ( mRealmData.isEmpty ( ) ) return com.android.server.wifi.hotspot2.AuthMatch.Indeterminate ; int best = com.android.server.wifi.hotspot2.AuthMatch.None ; for ( com.android.server.wifi.hotspot2.anqp.NAIRealmData realmData : mRealmData ) { int match = realmData.match ( realm , credMethod ) ; if ( match > best ) { best = match ; if ( best == ( com.android.server.wifi.hotspot2.AuthMatch.Exact ) ) { return best ; } } } return best ; }
Source:
public static java.lang.String toCatchString ( com.android.dx.rop.type.TypeList catches ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( 100 ) ; sb.append ( "catch" ) ; int sz = catches.size ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { sb.append ( " " ) ; sb.append ( catches.getType ( i ) . toHuman ( ) ) ; } return sb.toString ( ) ; }

Target:
public static java.lang.String toCatchString ( com.android.dx.rop.type.TypeList catches ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 100 ) ; sb.append ( "catch" ) ; int sz = catches.size ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { sb.append ( " " ) ; sb.append ( catches.getType ( i ) . toHuman ( ) ) ; } return sb.toString ( ) ; }
Source:
private void verifyRemoveConnectionExtras ( ) { mOnExtrasChangedCounter.waitForCount ( 3 , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS ) ; android.os.Bundle extras = mCall.getDetails ( ) . getExtras ( ) ; assertEquals ( 1 , extras.size ( ) ) ; assertFalse ( extras.containsKey ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY ) ) ; assertTrue ( extras.containsKey ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY2 ) ) ; assertEquals ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_VALUE , extras.getInt ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY2 ) ) ; }

Target:
private void verifyRemoveConnectionExtras ( ) { mOnExtrasChangedCounter.waitForCount ( 3 , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS ) ; android.os.Bundle extras = mCall.getDetails ( ) . getExtras ( ) ; assertFalse ( extras.containsKey ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY ) ) ; assertTrue ( extras.containsKey ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY2 ) ) ; assertEquals ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_VALUE , extras.getInt ( android.telecom.cts.CallDetailsTest.TEST_EXTRA_KEY2 ) ) ; }
Source:
public static void writeUint16 ( int i , byte [ ] buf , int offset ) { buf [ offset ] = ( ( byte ) ( i > > 8 ) ) ; buf [ ( offset + 1 ) ] = ( ( byte ) ( i ) ) ; }

Target:
public static void writeUint16 ( int i , byte [ ] buf , int offset ) { buf [ offset ] = ( ( byte ) ( i > > > 8 ) ) ; buf [ ( offset + 1 ) ] = ( ( byte ) ( i ) ) ; }
Source:
public void testSelfManagedPhoneAccount ( ) throws java.lang.Exception { mComponentContextFixture.addConnectionService ( com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickConnectionServiceComponentName ( ) , org.mockito.Mockito.mock ( com.android.internal.telecom.IConnectionService.class ) ) ; android.telecom.PhoneAccountHandle selfManagedHandle = com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickAccountHandle ( new android.content.ComponentName ( "self" , "managed" ) , "selfie1" ) ; android.telecom.PhoneAccount selfManagedAccount = new android.telecom.PhoneAccount.Builder ( selfManagedHandle , "Wrong" ) . setCapabilities ( PhoneAccount.CAPABILITY_SELF_MANAGED ) . build ( ) ; mRegistrar.registerPhoneAccount ( selfManagedAccount ) ; android.telecom.PhoneAccount registeredAccount = mRegistrar.getPhoneAccountUnchecked ( selfManagedHandle ) ; assertEquals ( com.android.server.telecom.tests.PhoneAccountRegistrarTest.TEST_LABEL , registeredAccount.getLabel ( ) ) ; }

Target:
public void testSelfManagedPhoneAccount ( ) throws java.lang.Exception { mComponentContextFixture.addConnectionService ( com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickConnectionServiceComponentName ( ) , org.mockito.Mockito.mock ( com.android.internal.telecom.IConnectionService.class ) ) ; android.telecom.PhoneAccountHandle selfManagedHandle = com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickAccountHandle ( new android.content.ComponentName ( "self" , "managed" ) , "selfie1" ) ; android.telecom.PhoneAccount selfManagedAccount = new android.telecom.PhoneAccount.Builder ( selfManagedHandle , "Wrong" ) . setCapabilities ( PhoneAccount.CAPABILITY_SELF_MANAGED ) . build ( ) ; mRegistrar.registerPhoneAccount ( selfManagedAccount ) ; android.telecom.PhoneAccount registeredAccount = mRegistrar.getPhoneAccountUnchecked ( selfManagedHandle ) ; org.junit.Assert.assertEquals ( com.android.server.telecom.tests.PhoneAccountRegistrarTest.TEST_LABEL , registeredAccount.getLabel ( ) ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math_agree s = new com.android.rs.test.ScriptC_math_agree ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeValues ( s ) ; s.invoke_math_agree_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_math_agree s = new com.android.rs.test.ScriptC_math_agree ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeValues ( s ) ; s.invoke_math_agree_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public boolean generate ( java.lang.String key ) { try { return ( mBinder.generate ( key ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean generate ( java.lang.String key ) { try { return ( mBinder.generate ( key , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public android.bluetooth.BluetoothCodecStatus getCodecStatus ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.a2dp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , ( ( "getCodecStatus(" + device ) + ")" ) ) ; } if ( device == null ) { device = mActiveDevice ; } if ( device == null ) { return null ; } synchronized ( mStateMachines ) { com.android.bluetooth.a2dp.A2dpStateMachine sm = mStateMachines.get ( device ) ; if ( sm != null ) { return sm.getCodecStatus ( ) ; } return null ; } }

Target:
public android.bluetooth.BluetoothCodecStatus getCodecStatus ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.a2dp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , ( ( "getCodecStatus(" + device ) + ")" ) ) ; } synchronized ( mStateMachines ) { if ( device == null ) { device = mActiveDevice ; } if ( device == null ) { return null ; } com.android.bluetooth.a2dp.A2dpStateMachine sm = mStateMachines.get ( device ) ; if ( sm != null ) { return sm.getCodecStatus ( ) ; } return null ; } }
Source:
private void freeLoadedPrograms ( ) { synchronized ( installedJack ) { java.util.Collection < com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > > programs = getInstalledJacks ( ) ; for ( com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > program : programs ) { program.setLoadedProgram ( com.android.jack.server.JackHttpServer.Assertion.ENABLED , null ) ; program.setLoadedProgram ( com.android.jack.server.JackHttpServer.Assertion.DISABLED , null ) ; } } java.lang.System.gc ( ) ; }

Target:
private void freeLoadedPrograms ( ) { java.util.Collection < com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > > programs = getInstalledJacks ( ) ; for ( com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > program : programs ) { synchronized ( program ) { program.setLoadedProgram ( null ) ; } } java.lang.System.gc ( ) ; }
Source:
public java.lang.Boolean run ( ) { java.lang.Class [ ] cl = new java.lang.Class [ 2 ] ; cl [ 0 ] = java.net.SocketAddress.class ; cl [ 1 ] = java.lang.Integer.TYPE ; java.lang.Class clazz = impl.getClass ( ) ; while ( true ) { try { clazz.getDeclaredMethod ( "connect" , cl ) ; return java.lang.Boolean.FALSE ; } catch ( java.lang.NoSuchMethodException e ) { clazz = clazz.getSuperclass ( ) ; if ( clazz.equals ( java.net.SocketImpl.class ) ) { return java.lang.Boolean.TRUE ; } } } }

Target:
public java.lang.Boolean run ( ) { java.lang.Class < ? > clazz = impl.getClass ( ) ; while ( true ) { try { clazz.getDeclaredMethod ( "connect" , java.net.SocketAddress.class , int . class ) ; return java.lang.Boolean.FALSE ; } catch ( java.lang.NoSuchMethodException e ) { clazz = clazz.getSuperclass ( ) ; if ( clazz.equals ( java.net.SocketImpl.class ) ) { return java.lang.Boolean.TRUE ; } } } }
Source:
public boolean createBond ( android.bluetooth.BluetoothDevice device , int transport ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBond() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.createBond ( device , transport , null ) ; }

Target:
public boolean createBond ( android.bluetooth.BluetoothDevice device , int transport ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBond() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.createBond ( device , transport , null ) ; }
Source:
public java.util.List < com.android.vts.servlet.Page > getBreadcrumbLinks ( javax.servlet.http.HttpServletRequest request ) { java.util.List < com.android.vts.servlet.Page > links = new java.util.ArrayList < > ( ) ; java.lang.String planName = request.getParameter ( "plan" ) ; links.add ( new com.android.vts.servlet.Page ( PageType.PLAN_RELEASE , planName.toUpperCase ( ) , ( "?plan=" + planName ) ) ) ; java.lang.String time = request.getParameter ( "time" ) ; links.add ( new com.android.vts.servlet.Page ( PageType.PLAN_RUN , ( ( ( "?plan=" + planName ) + "&time=" ) + time ) ) ) ; return links ; }

Target:
public java.util.List < com.android.vts.servlet.Page > getBreadcrumbLinks ( javax.servlet.http.HttpServletRequest request ) { java.util.List < com.android.vts.servlet.Page > links = new java.util.ArrayList < > ( ) ; java.lang.String planName = request.getParameter ( "plan" ) ; links.add ( new com.android.vts.servlet.Page ( PageType.PLAN_RELEASE , planName , ( "?plan=" + planName ) ) ) ; java.lang.String time = request.getParameter ( "time" ) ; links.add ( new com.android.vts.servlet.Page ( PageType.PLAN_RUN , ( ( ( "?plan=" + planName ) + "&time=" ) + time ) ) ) ; return links ; }
Source:
private static void addModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules ) { boolean canReportInaccurateNumber = false ; boolean canSupportAssistedDialing = false ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( row ) , canReportInaccurateNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }

Target:
private static void addModuleForAccessingCallDetails ( android.content.Context context , java.util.List < com.android.dialer.contactactions.ContactActionModule > modules , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportInaccurateNumber = false ; boolean canSupportAssistedDialing = false ; modules.add ( new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( row ) , canReportInaccurateNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ) ; }
Source:
public void testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline ( ) throws java.lang.Exception { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 5 ) ; createSlowFinalizer ( 1 , latch ) ; createSlowFinalizer ( 1000 , latch ) ; createSlowFinalizer ( 2000 , latch ) ; createSlowFinalizer ( 4000 , latch ) ; createSlowFinalizer ( 8000 , latch ) ; libcore.java.lang.ref.FinalizationTester.induceFinalization ( ) ; latch.await ( ) ; }

Target:
public void testWatchdogDoesNotFailForObjectsThatAreNearTheDeadline ( ) throws java.lang.Exception { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 3 ) ; createSlowFinalizer ( 1 , latch ) ; createSlowFinalizer ( 1000 , latch ) ; createSlowFinalizer ( 8000 , latch ) ; libcore.java.lang.ref.FinalizationTester.induceFinalization ( ) ; latch.await ( ) ; }
Source:
public void removeRegistrationListener ( int slotId , int featureType , int sessionId , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( sessionId , listener ) ; } } }

Target:
public void removeRegistrationListener ( int slotId , int featureType , com.android.ims.internal.IImsRegistrationListener listener ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.removeRegistrationListener ( listener ) ; } } }
Source:
public int [ ] blend ( int [ ] src , int [ ] dst ) { return new int [ ] { src [ 0 ] , dst [ 1 ] , dst [ 2 ] , java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) } ; }

Target:
public int [ ] blend ( int [ ] src , int [ ] dst , int [ ] result ) { return new int [ ] { src [ 0 ] , dst [ 1 ] , dst [ 2 ] , java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) } ; }
Source:
public java.nio.ByteBuffer slice ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int pos = position ( ) ; int lim = limit ( ) ; assert pos <= lim ; int rem = ( pos <= lim ) ? lim - pos : 0 ; int off = pos + ( offset ) ; assert off >= 0 ; return new java.nio.DirectByteBuffer ( memoryRef , ( - 1 ) , 0 , rem , rem , off , isReadOnly ) ; }

Target:
public final java.nio.ByteBuffer slice ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int pos = position ( ) ; int lim = limit ( ) ; assert pos <= lim ; int rem = ( pos <= lim ) ? lim - pos : 0 ; int off = pos + ( offset ) ; assert off >= 0 ; return new java.nio.DirectByteBuffer ( memoryRef , ( - 1 ) , 0 , rem , rem , off , isReadOnly ) ; }
Source:
public byte [ ] getDriverStateDump ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getDriverStateDump ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getDriverStateDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }

Target:
public byte [ ] getDriverStateDump ( ) { return mWifiVendorHal.getDriverStateDump ( ) ; }
Source:
public E peek ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; E result ; try { result = ( ( size ) > 0 ) ? ( ( E ) ( queue [ 0 ] ) ) : null ; } finally { lock.unlock ( ) ; } return result ; }

Target:
public E peek ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; try { return ( size ) == 0 ? null : ( ( E ) ( queue [ 0 ] ) ) ; } finally { lock.unlock ( ) ; } }
Source:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res , densityDpi ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }

Target:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }
Source:
public void testCheckAccessLevel_deniedAppOpsBit_deniedPermission ( ) throws java.lang.Exception { setHasCarrierPrivileges ( false ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( false ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , false ) ; setHasReadHistoryPermission ( false ) ; assertEquals ( NetworkStatsAccess.Level.DEFAULT , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }

Target:
public void testCheckAccessLevel_deniedAppOpsBit_deniedPermission ( ) throws java.lang.Exception { setHasCarrierPrivileges ( false ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( false ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , false ) ; setHasReadHistoryPermission ( false ) ; org.junit.Assert.assertEquals ( NetworkStatsAccess.Level.DEFAULT , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }
Source:
public void afterHandshake ( int session , int s , int c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read ( s , fd , callback , new byte [ 1 ] , 0 , 1 , 1 ) ; fail ( ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read ( s , fd , callback , new byte [ 1 ] , 0 , 1 , 1 ) ; fail ( ) ; }
Source:
private void add ( com.android.sdklib.BuildToolInfo.PathId id , java.lang.String leaf ) { java.io.File f = new java.io.File ( mPath , leaf ) ; java.lang.String str = f.getAbsolutePath ( ) ; if ( ( f.isDirectory ( ) ) && ( ( str.charAt ( ( ( str.length ( ) ) - 1 ) ) ) != ( java.io.File.separatorChar ) ) ) { str += java.io.File.separatorChar ; } mPaths.put ( id , str ) ; }

Target:
private void add ( com.android.sdklib.BuildToolInfo.PathId id , java.io.File path ) { java.lang.String str = path.getAbsolutePath ( ) ; if ( ( path.isDirectory ( ) ) && ( ( str.charAt ( ( ( str.length ( ) ) - 1 ) ) ) != ( java.io.File.separatorChar ) ) ) { str += java.io.File.separatorChar ; } mPaths.put ( id , str ) ; }
Source:
public java.lang.String getNameByOid ( sun.security.util.ObjectIdentifier oid ) throws java.io.IOException { for ( java.lang.String name : map.keySet ( ) ) { if ( map.get ( name ) . getExtensionId ( ) . equals ( oid ) ) { return name ; } } return null ; }

Target:
public java.lang.String getNameByOid ( sun.security.util.ObjectIdentifier oid ) throws java.io.IOException { for ( java.lang.String name : map.keySet ( ) ) { if ( map.get ( name ) . getExtensionId ( ) . equals ( ( ( java.lang.Object ) ( oid ) ) ) ) { return name ; } } return null ; }
Source:
public static void sort ( long [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) ) ; }

Target:
public static void sort ( long [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) , null , 0 , 0 ) ; }
Source:
public void test_findResourceLjava_lang_String ( ) throws java.lang.Exception { int port = tests.support.Support_PortManager.getNextPort ( ) ; java.io.File tmp = java.io.File.createTempFile ( "test" , ".txt" ) ; tests.support.Support_TestWebServer server = new tests.support.Support_TestWebServer ( ) ; try { server.initServer ( port , tmp.getAbsolutePath ( ) , "text/html" ) ; java.net.URL [ ] urls = new java.net.URL [ ] { new java.net.URL ( ( ( "http://localhost:" + port ) + "/" ) ) } ; ucl = new java.net.URLClassLoader ( urls ) ; java.net.URL res = ucl.findResource ( "test1" ) ; assertNotNull ( "Failed to locate resource" , res ) ; java.lang.StringBuffer sb = getResContent ( res ) ; assertEquals ( "Returned incorrect resource" , new java.lang.String ( tests.support.Support_TestWebData.test1 ) , sb.toString ( ) ) ; } finally { server.close ( ) ; } }

Target:
public void test_findResourceLjava_lang_String ( ) throws java.lang.Exception { java.io.File tmp = java.io.File.createTempFile ( "test" , ".txt" ) ; tests.support.Support_TestWebServer server = new tests.support.Support_TestWebServer ( ) ; try { int port = server.initServer ( tmp.getAbsolutePath ( ) , "text/html" ) ; java.net.URL [ ] urls = new java.net.URL [ ] { new java.net.URL ( ( ( "http://localhost:" + port ) + "/" ) ) } ; ucl = new java.net.URLClassLoader ( urls ) ; java.net.URL res = ucl.findResource ( "test1" ) ; assertNotNull ( "Failed to locate resource" , res ) ; java.lang.StringBuffer sb = getResContent ( res ) ; assertEquals ( "Returned incorrect resource" , new java.lang.String ( tests.support.Support_TestWebData.test1 ) , sb.toString ( ) ) ; } finally { server.close ( ) ; } }
Source:
private com.android.jack.dx.rop.annotation.AnnotationsList readAnnotationSetRefList ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetRefListOffset , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { com.android.jack.dx.io.DexBuffer.Section annotationSetRefListIn = dex.open ( annotationSetRefListOffset ) ; int parameterCount = annotationSetRefListIn.readInt ( ) ; com.android.jack.dx.rop.annotation.AnnotationsList parameterAnnotationList = new com.android.jack.dx.rop.annotation.AnnotationsList ( parameterCount ) ; for ( int paramIdx = 0 ; paramIdx < parameterCount ; paramIdx ++ ) { com.android.jack.dx.rop.annotation.Annotations annotations = readAnnotationSet ( dex , annotationSetRefListIn.readInt ( ) , cstIndexMap ) ; annotations.setImmutable ( ) ; parameterAnnotationList.set ( paramIdx , annotations ) ; } return parameterAnnotationList ; }

Target:
private com.android.jack.dx.rop.annotation.AnnotationsList readAnnotationSetRefList ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetRefListOffset ) { com.android.jack.dx.io.DexBuffer.Section annotationSetRefListIn = dex.open ( annotationSetRefListOffset ) ; int parameterCount = annotationSetRefListIn.readInt ( ) ; com.android.jack.dx.rop.annotation.AnnotationsList parameterAnnotationList = new com.android.jack.dx.rop.annotation.AnnotationsList ( parameterCount ) ; for ( int paramIdx = 0 ; paramIdx < parameterCount ; paramIdx ++ ) { com.android.jack.dx.rop.annotation.Annotations annotations = readAnnotationSet ( dex , annotationSetRefListIn.readInt ( ) ) ; annotations.setImmutable ( ) ; parameterAnnotationList.set ( paramIdx , annotations ) ; } return parameterAnnotationList ; }
Source:
public void onWindowVisibilityChanged ( final int visibility ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onWindowVisibilityChanged ( visibility ) ; } } ) ; return ; } mAwContents.getAwContentsProxy ( ) . onWindowVisibilityChanged ( visibility ) ; }

Target:
public void onWindowVisibilityChanged ( final int visibility ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onWindowVisibilityChanged ( visibility ) ; } } ) ; return ; } mAwContents.onWindowVisibilityChanged ( visibility ) ; }