auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void mute ( boolean shouldMute ) { com.android.server.telecom.Log.v ( this , "mute, shouldMute: %b" , shouldMute ) ; if ( mCallsManager.hasEmergencyCall ( ) ) { shouldMute = false ; com.android.server.telecom.Log.v ( this , "ignoring mute for emergency call" ) ; } mCallAudioRouteStateMachine.sendMessageWithSessionInfo ( ( shouldMute ? CallAudioRouteStateMachine.MUTE_ON : CallAudioRouteStateMachine.MUTE_OFF ) ) ; }

Target:
void mute ( boolean shouldMute ) { android.telecom.Log.v ( this , "mute, shouldMute: %b" , shouldMute ) ; if ( mCallsManager.hasEmergencyCall ( ) ) { shouldMute = false ; android.telecom.Log.v ( this , "ignoring mute for emergency call" ) ; } mCallAudioRouteStateMachine.sendMessageWithSessionInfo ( ( shouldMute ? CallAudioRouteStateMachine.MUTE_ON : CallAudioRouteStateMachine.MUTE_OFF ) ) ; }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { final long nonRequestable = ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ; if ( nonRequestable != 0 ) { return android.net.NetworkCapabilities.capabilityNameOf ( com.android.internal.util.BitUtils.unpackBits ( nonRequestable ) [ 0 ] ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
public java.lang.String describeFirstNonRequestableCapability ( ) { final long nonRequestable = ( ( mNetworkCapabilities ) | ( mUnwantedNetworkCapabilities ) ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ; if ( nonRequestable != 0 ) { return android.net.NetworkCapabilities.capabilityNameOf ( com.android.internal.util.BitUtils.unpackBits ( nonRequestable ) [ 0 ] ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }
Source:
private java.lang.String getNewClassName ( java.lang.String className ) { int lastDot = className.lastIndexOf ( "." ) ; if ( lastDot < 0 ) { return mNewName ; } java.lang.String name = className.substring ( lastDot , className.length ( ) ) ; java.lang.String newClassName = ( mNewName ) + name ; return newClassName ; }

Target:
private boolean isInRenamedPackage ( java.lang.String fqcn ) { return ( ( fqcn.startsWith ( mOldPackage ) ) && ( ( fqcn.length ( ) ) > ( mOldPackage.length ( ) ) ) ) && ( ( fqcn.indexOf ( '.' , ( ( mOldPackage.length ( ) ) + 1 ) ) ) == ( - 1 ) ) ; }
Source:
public static < T > com.google.common.collect.UnmodifiableIterator < T > forArray ( final T ... array ) { com.google.common.base.Preconditions.checkNotNull ( array ) ; return new com.google.common.collect.AbstractIndexedListIterator < T > ( array.length ) { @ java.lang.Override protected T get ( int index ) { return array [ index ] ; } } ; }

Target:
static < T > T pollNext ( java.util.Iterator < T > iterator ) { if ( iterator.hasNext ( ) ) { T result = iterator.next ( ) ; iterator.remove ( ) ; return result ; } else { return null ; } }
Source:
public void testUnused ( ) throws java.lang.Exception { mEnableIds = false ; assertEquals ( ( "accessibility.xml: Warning: The resource R.layout.accessibility appears to be unused\n" + ( ( "main.xml: Warning: The resource R.layout.main appears to be unused\n" + "other.xml: Warning: The resource R.layout.other appears to be unused\n" ) + "strings2.xml:3: Warning: The resource R.string.hello appears to be unused" ) ) , lintProject ( "res/values/strings2.xml" , "res/layout/layout1.xml=>res/layout/main.xml" , "res/layout/layout1.xml=>res/layout/other.xml" , "src/my/pkg/Test.java.txt=>src/my/pkg/Test.java" , "gen/my/pkg/R.java.txt=>gen/my/pkg/R.java" , "AndroidManifest.xml" , "res/layout/accessibility.xml" ) ) ; }

Target:
public void testUnused ( ) throws java.lang.Exception { mEnableIds = false ; assertEquals ( ( "res/layout/accessibility.xml: Warning: The resource R.layout.accessibility appears to be unused [UnusedResources]\n" + ( ( ( ( ( ( "res/layout/main.xml: Warning: The resource R.layout.main appears to be unused [UnusedResources]\n" + "res/layout/other.xml: Warning: The resource R.layout.other appears to be unused [UnusedResources]\n" ) + "res/values/strings2.xml:3: Warning: The resource R.string.hello appears to be unused [UnusedResources]\n" ) + " <string name=\"hello\">Hello</string>\n" ) + " ~~~~~~~~~~~~\n" ) + "0 errors, 4 warnings\n" ) + "" ) ) , lintProject ( "res/values/strings2.xml" , "res/layout/layout1.xml=>res/layout/main.xml" , "res/layout/layout1.xml=>res/layout/other.xml" , "src/my/pkg/Test.java.txt=>src/my/pkg/Test.java" , "gen/my/pkg/R.java.txt=>gen/my/pkg/R.java" , "AndroidManifest.xml" , "res/layout/accessibility.xml" ) ) ; }
Source:
public void test_formatToCharacterIteratorLjava_lang_Object__ArithmeticException ( ) { java.text.DecimalFormat decimalFormat = ( ( java.text.DecimalFormat ) ( java.text.DecimalFormat.getInstance ( java.util.Locale.US ) ) ) ; decimalFormat.setRoundingMode ( java.math.RoundingMode.UNNECESSARY ) ; decimalFormat.setMaximumFractionDigits ( 0 ) ; try { decimalFormat.formatToCharacterIterator ( new java.lang.Double ( 1.5 ) ) ; fail ( "ArithmeticException expected" ) ; } catch ( java.lang.ArithmeticException e ) { } }

Target:
public void test_formatToCharacterIterator_roundingUnnecessaryArithmeticException ( ) { java.text.DecimalFormat decimalFormat = ( ( java.text.DecimalFormat ) ( java.text.DecimalFormat.getInstance ( java.util.Locale.US ) ) ) ; decimalFormat.setRoundingMode ( java.math.RoundingMode.UNNECESSARY ) ; decimalFormat.setMaximumFractionDigits ( 0 ) ; try { decimalFormat.formatToCharacterIterator ( new java.lang.Double ( 1.5 ) ) ; fail ( "ArithmeticException expected" ) ; } catch ( java.lang.ArithmeticException e ) { } }
Source:
public void run ( ) { runGlobalTools ( scope , inspectionManager , globalTools ) ; }

Target:
public void run ( ) { com.intellij.codeInspection.ex.GlobalInspectionContextImpl.LOG.info ( "Code inspection finished" ) ; if ( ( myView ) != null ) { if ( ( ! ( myView.update ( ) ) ) && ( ! ( getUIOptions ( ) . SHOW_ONLY_DIFF ) ) ) { com.intellij.codeInspection.ex.GlobalInspectionContextImpl.NOTIFICATION_GROUP.createNotification ( com.intellij.codeInspection.ex.InspectionsBundle.message ( "inspection.no.problems.message" ) , MessageType.INFO ) . notify ( getProject ( ) ) ; close ( true ) ; } else { addView ( myView ) ; } } }
Source:
public com.android.jack.frontend.VirtualMethodsMarker clone ( ) { com.android.jack.frontend.VirtualMethodsMarker clone ; try { clone = ( ( com.android.jack.frontend.VirtualMethodsMarker ) ( super . clone ( ) ) ) ; clone.virtualMethods = ( ( java.util.TreeSet < com.android.jack.ir.ast.JMethodId > ) ( virtualMethods.clone ( ) ) ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( ) ; } }

Target:
public com.android.jack.frontend.VirtualMethodsMarker clone ( ) { com.android.jack.frontend.VirtualMethodsMarker clone ; try { clone = ( ( com.android.jack.frontend.VirtualMethodsMarker ) ( super . clone ( ) ) ) ; clone.virtualMethods = ( ( java.util.HashMap < com.android.jack.frontend.VirtualMethodsMarker.ComparableMethodId , com.android.jack.frontend.VirtualMethodsMarker.ComparableMethodId > ) ( virtualMethods.clone ( ) ) ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( ) ; } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { setRadio ( true ) ; setEnableFailFastMobileData ( DctConstants.ENABLED ) ; enableMobileProvisioning ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { mProvisioningSpinner = new android.app.ProgressDialog ( context ) ; mProvisioningSpinner.setTitle ( mNetworkOperator ) ; mProvisioningSpinner.setMessage ( context.getText ( com.android.internal.R.string.media_route_status_connecting ) ) ; mProvisioningSpinner.setIndeterminate ( true ) ; mProvisioningSpinner.setCancelable ( true ) ; mProvisioningSpinner.getWindow ( ) . setType ( WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG ) ; mProvisioningSpinner.show ( ) ; sendMessageDelayed ( obtainMessage ( DctConstants.CMD_CLEAR_PROVISIONING_SPINNER , mProvisioningSpinner ) , com.android.internal.telephony.dataconnection.DcTracker.PROVISIONING_SPINNER_TIMEOUT_MILLIS ) ; setRadio ( true ) ; setEnableFailFastMobileData ( DctConstants.ENABLED ) ; enableMobileProvisioning ( ) ; }
Source:
public java.lang.String getPackageOverride ( ) { java.lang.String packageName = mMergedFlavor.getPackageName ( ) ; java.lang.String packageSuffix = mBuildType.getPackageNameSuffix ( ) ; if ( ( packageSuffix != null ) && ( ! ( packageSuffix.isEmpty ( ) ) ) ) { if ( packageName == null ) { packageName = getPackageFromManifest ( ) ; } if ( ( packageSuffix.charAt ( 0 ) ) == '.' ) { packageName = packageName + packageSuffix ; } else { packageName = ( packageName + '.' ) + packageSuffix ; } } return packageName ; }

Target:
public java.lang.String getIdOverride ( ) { java.lang.String idName = mMergedFlavor.getApplicationId ( ) ; java.lang.String idSuffix = mBuildType.getApplicationIdSuffix ( ) ; if ( ( idSuffix != null ) && ( ! ( idSuffix.isEmpty ( ) ) ) ) { if ( idName == null ) { idName = getPackageFromManifest ( ) ; } if ( ( idSuffix.charAt ( 0 ) ) == '.' ) { idName = idName + idSuffix ; } else { idName = ( idName + '.' ) + idSuffix ; } } return idName ; }
Source:
public com.android.dx.io.Annotation readAnnotation ( ) { byte visibility = readByte ( ) ; int typeIndex = readUleb128 ( ) ; int size = readUleb128 ( ) ; int [ ] names = new int [ size ] ; com.android.dx.io.EncodedValue [ ] values = new com.android.dx.io.EncodedValue [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { names [ i ] = readUleb128 ( ) ; values [ i ] = readEncodedValue ( ) ; } return new com.android.dx.io.Annotation ( this , visibility , typeIndex , names , values ) ; }

Target:
public com.android.dx.io.Annotation readAnnotation ( ) { byte visibility = readByte ( ) ; int start = position ; new com.android.dx.io.EncodedValueReader ( this , EncodedValueReader.ENCODED_ANNOTATION ) . skipValue ( ) ; int end = position ; return new com.android.dx.io.Annotation ( this , visibility , new com.android.dx.io.EncodedValue ( java.util.Arrays.copyOfRange ( data , start , end ) ) ) ; }
Source:
public void testIncomingRttCall ( ) throws java.lang.Exception { if ( ! ( mShouldTestTelecom ) ) { return ; } placeRttCall ( true ) ; final android.telecom.cts.MockConnection connection = verifyConnectionForIncomingCall ( ) ; final android.telecom.cts.MockInCallService inCallService = mInCallCallbacks.getService ( ) ; final android.telecom.Call call = inCallService.getLastCall ( ) ; android.telecom.cts.TestUtils.waitOnAllHandlers ( getInstrumentation ( ) ) ; verifyRttEnabled ( call , connection ) ; }

Target:
public void testIncomingRttCall ( ) throws java.lang.Exception { if ( ! ( mShouldTestTelecom ) ) { return ; } setRttMasterSwitch ( true ) ; placeRttCall ( true ) ; final android.telecom.cts.MockConnection connection = verifyConnectionForIncomingCall ( ) ; final android.telecom.cts.MockInCallService inCallService = mInCallCallbacks.getService ( ) ; final android.telecom.Call call = inCallService.getLastCall ( ) ; android.telecom.cts.TestUtils.waitOnAllHandlers ( getInstrumentation ( ) ) ; verifyRttEnabled ( call , connection ) ; }
Source:
public void testGetValues010_ArrayAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "ARRAY_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.ARRAY_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testGetValues009_ThisObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value thisValue = getStaticFieldValue ( classID , "THIS_OBJECT" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointObject" ) ; suspensionMethodInfo.addVariable ( "this" , thisValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "this" , thisValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public boolean containsAll ( java.util.Collection < ? > c ) { java.lang.Object [ ] elements = getArray ( ) ; int len = elements.length ; for ( java.lang.Object e : c ) { if ( ( java.util.concurrent.CopyOnWriteArrayList.indexOf ( e , elements , 0 , len ) ) < 0 ) return false ; } return true ; }

Target:
private void removeRange ( int from , int to ) { java.lang.Object [ ] newElements = new java.lang.Object [ ( elements.length ) - ( to - from ) ] ; java.lang.System.arraycopy ( elements , 0 , newElements , 0 , from ) ; java.lang.System.arraycopy ( elements , to , newElements , from , ( ( elements.length ) - to ) ) ; elements = newElements ; }
Source:
private boolean isSubroutineCaller ( com.android.dx.cf.code.BasicBlock bb ) { com.android.dx.util.IntList successors = bb.getSuccessors ( ) ; if ( ( successors.size ( ) ) < 2 ) return false ; int subLabel = successors.get ( 1 ) ; return ( subLabel < ( subroutines.length ) ) && ( ( subroutines [ subLabel ] ) != null ) ; }

Target:
private boolean isSubroutineCaller ( com.android.dx.rop.code.BasicBlock bb ) { com.android.dx.util.IntList successors = bb.getSuccessors ( ) ; if ( ( successors.size ( ) ) < 2 ) return false ; int subLabel = successors.get ( 1 ) ; return ( subLabel < ( subroutines.length ) ) && ( ( subroutines [ subLabel ] ) != null ) ; }
Source:
void start ( ) { stop ( ) ; mDefaultNetworkCallback = new com.android.server.connectivity.Tethering.UpstreamNetworkCallback ( ) ; getConnectivityManager ( ) . registerDefaultNetworkCallback ( mDefaultNetworkCallback ) ; final android.net.NetworkRequest dunTetheringRequest = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_CELLULAR ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_DUN ) . build ( ) ; mDunTetheringCallback = new com.android.server.connectivity.Tethering.UpstreamNetworkCallback ( ) ; getConnectivityManager ( ) . registerNetworkCallback ( dunTetheringRequest , mDunTetheringCallback ) ; }

Target:
public void start ( ) { stop ( ) ; mDefaultNetworkCallback = new com.android.server.connectivity.Tethering.UpstreamNetworkMonitor.UpstreamNetworkCallback ( ) ; cm ( ) . registerDefaultNetworkCallback ( mDefaultNetworkCallback ) ; final android.net.NetworkRequest dunTetheringRequest = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_CELLULAR ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_DUN ) . build ( ) ; mDunTetheringCallback = new com.android.server.connectivity.Tethering.UpstreamNetworkMonitor.UpstreamNetworkCallback ( ) ; cm ( ) . registerNetworkCallback ( dunTetheringRequest , mDunTetheringCallback ) ; }
Source:
public void testIsEmergencyNumberWithFormatting_US ( ) { assertTrue ( shortInfo.isEmergencyNumber ( "9-1-1" , RegionCode.US ) ) ; assertTrue ( shortInfo.isEmergencyNumber ( "*911" , RegionCode.US ) ) ; assertTrue ( shortInfo.isEmergencyNumber ( "1-1-2" , RegionCode.US ) ) ; assertTrue ( shortInfo.isEmergencyNumber ( "*112" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( "9-9-9" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( "*999" , RegionCode.US ) ) ; }

Target:
public void testIsEmergencyNumberWithFormatting_US ( ) { assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "9-1-1" , RegionCode.US ) ) ; assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "*911" , RegionCode.US ) ) ; assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "1-1-2" , RegionCode.US ) ) ; assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "*112" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "9-9-9" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "*999" , RegionCode.US ) ) ; }
Source:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL205 = null ; try { { LONG_LITERAL205 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3453 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL205 != null ? LONG_LITERAL205.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL210 = null ; try { { LONG_LITERAL210 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3510 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL210 != null ? LONG_LITERAL210.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public final int integer_literal ( ) throws org.jf.smali.RecognitionException { int value = 0 ; org.antlr.runtime.tree.CommonTree INTEGER_LITERAL204 = null ; try { { INTEGER_LITERAL204 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.INTEGER_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_INTEGER_LITERAL_in_integer_literal3438 ) ) ) ; value = org.jf.smali.LiteralTools.parseInt ( ( INTEGER_LITERAL204 != null ? INTEGER_LITERAL204.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final short short_literal ( ) throws org.jf.smali.RecognitionException { short value = 0 ; org.antlr.runtime.tree.CommonTree SHORT_LITERAL211 = null ; try { { SHORT_LITERAL211 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.SHORT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_SHORT_LITERAL_in_short_literal3525 ) ) ) ; value = org.jf.smali.LiteralTools.parseShort ( ( SHORT_LITERAL211 != null ? SHORT_LITERAL211.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public static void computeFabs ( android.renderscript.cts.TestFabs.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.in ) ; args.out = t.new32 ( java.lang.Math.abs ( args.in ) , java.lang.Math.abs ( in.min32 ( ) ) , java.lang.Math.abs ( in.max32 ( ) ) ) ; }

Target:
public static void computeFabs ( android.renderscript.cts.TestFabs.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inX ) ; args.out = t.new32 ( java.lang.Math.abs ( args.inX ) , java.lang.Math.abs ( in.min32 ( ) ) , java.lang.Math.abs ( in.max32 ( ) ) ) ; }
Source:
public void onError ( final int errorCode , final java.lang.String message ) { try { callback.onError ( errorCode , message ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , subscriptionId ) ; } }

Target:
public void onError ( final int errorCode , final java.lang.String message ) { try { if ( errorCode == ( android.telephony.mbms.MbmsErrors.UNKNOWN ) ) { throw new java.lang.IllegalArgumentException ( "Middleware cannot send an unknown error." ) ; } callback.onError ( errorCode , message ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , subscriptionId ) ; } }
Source:
public com.google.gson.JsonElement serialize ( com.android.manifmerger.Actions.ActionLocation src , java.lang.reflect.Type typeOfSrc , com.google.gson.JsonSerializationContext context ) { com.google.gson.JsonObject jsonObject = new com.google.gson.JsonObject ( ) ; jsonObject.add ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.POSITION_ELEMENT , context.serialize ( src.getSourceLocation ( ) ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.LINE_ATTRIBUTE , src.getPosition ( ) . getLine ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.COLUMN_ATTRIBUTE , src.getPosition ( ) . getColumn ( ) ) ; jsonObject.addProperty ( com.android.manifmerger.Actions.ActionLocation.ActionLocationAdapter.OFFSET_ATTRIBUTE , src.getPosition ( ) . getOffset ( ) ) ; return jsonObject ; }

Target:
private static org.w3c.dom.Element getFirstChildElement ( org.w3c.dom.Element element ) { org.w3c.dom.Node child = element.getFirstChild ( ) ; while ( ( child.getNodeType ( ) ) != ( org.w3c.dom.Node.ELEMENT_NODE ) ) { child = child.getNextSibling ( ) ; } return ( ( org.w3c.dom.Element ) ( child ) ) ; }
Source:
public void test_parse_h_z_2DigitOffsetFromGMT ( ) throws java.lang.Exception { assertParse ( "h z" , "14 GMT-24 " , new java.util.Date ( 51840000 ) , 0 , 9 ) ; assertParse ( "h z" , "14 GMT-23 " , new java.util.Date ( 133200000 ) , 0 , 9 ) ; assertParse ( "h z" , "14 GMT+24 " , new java.util.Date ( 48960000 ) , 0 , 9 ) ; assertParse ( "h z" , "14 GMT+23 " , new java.util.Date ( ( - 32400000 ) ) , 0 , 9 ) ; }

Target:
public void test_parse_h_z_4DigitOffsetFromGMT ( ) throws java.lang.Exception { assertParse ( "h z" , "14 GMT-0100 " , new java.util.Date ( 54000000 ) , 0 , 11 ) ; assertParse ( "h z" , "14 GMT+0100 " , new java.util.Date ( 46800000 ) , 0 , 11 ) ; pFormat.applyPattern ( "h z" ) ; try { pFormat.parse ( "14 GMT+24:00" ) ; fail ( ) ; } catch ( java.text.ParseException expected ) { } try { pFormat.parse ( "14 GMT-24:00" ) ; fail ( ) ; } catch ( java.text.ParseException expected ) { } }
Source:
private static java.io.Serializable getObject ( junit.framework.TestCase test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "/serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.io.InputStream in = org.apache.harmony.testframework.serialization.SerializationTest.class . getResourceAsStream ( path.toString ( ) ) ; assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }

Target:
private static java.io.Serializable getObject ( junit.framework.TestCase test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "/serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.lang.String pathString = path.toString ( ) ; java.io.InputStream in = org.apache.harmony.testframework.serialization.SerializationTest.class . getResourceAsStream ( pathString ) ; assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }
Source:
public static com.android.ims.ImsManager getInstance ( android.content.Context context , int phoneId ) { synchronized ( com.android.ims.ImsManager.sImsManagerInstances ) { if ( com.android.ims.ImsManager.sImsManagerInstances.containsKey ( phoneId ) ) { return com.android.ims.ImsManager.sImsManagerInstances.get ( phoneId ) ; } com.android.ims.ImsManager mgr = new com.android.ims.ImsManager ( context , phoneId ) ; com.android.ims.ImsManager.sImsManagerInstances.put ( phoneId , mgr ) ; return mgr ; } }

Target:
public static com.android.ims.ImsManager getInstance ( android.content.Context context , int phoneId ) { synchronized ( com.android.ims.ImsManager.sImsManagerInstances ) { if ( com.android.ims.ImsManager.sImsManagerInstances.containsKey ( phoneId ) ) { com.android.ims.ImsManager m = com.android.ims.ImsManager.sImsManagerInstances.get ( phoneId ) ; if ( m != null ) { m.connectIfServiceIsAvailable ( ) ; } return m ; } com.android.ims.ImsManager mgr = new com.android.ims.ImsManager ( context , phoneId ) ; com.android.ims.ImsManager.sImsManagerInstances.put ( phoneId , mgr ) ; return mgr ; } }
Source:
public void connectionForPatchWithBodyRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.PatchWithBody request = new com.android.volley.mock.TestRequest.PatchWithBody ( ) ; assertEquals ( request.getMethod ( ) , Method.PATCH ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "PATCH" , mMockConnection.getRequestMethod ( ) ) ; assertTrue ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void executeRequestClosesConnection_noResponseBody ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockConnection.getResponseCode ( ) ) . thenReturn ( java.net.HttpURLConnection.HTTP_NO_CONTENT ) ; mHurlStack.executeRequest ( new com.android.volley.mock.TestRequest.Get ( ) , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; org.mockito.Mockito.verify ( mMockConnection ) . disconnect ( ) ; }
Source:
public boolean onPreferenceChange ( android.preference.Preference pref , java.lang.Object newValue ) { com.android.cellbroadcastreceiver.CellBroadcastReceiver.startConfigService ( pref.getContext ( ) ) ; if ( mDisableSevereWhenExtremeDisabled ) { if ( pref.getKey ( ) . equals ( com.android.cellbroadcastreceiver.CellBroadcastSettings.KEY_ENABLE_CMAS_EXTREME_THREAT_ALERTS ) ) { boolean isExtremeAlertChecked = ( ( java.lang.Boolean ) ( newValue ) ) ; if ( ( mSevereCheckBox ) != null ) { mSevereCheckBox.setEnabled ( isExtremeAlertChecked ) ; mSevereCheckBox.setChecked ( false ) ; } } } return true ; }

Target:
public boolean onPreferenceChange ( android.preference.Preference pref , java.lang.Object newValue ) { com.android.cellbroadcastreceiver.CellBroadcastReceiver.startConfigService ( pref.getContext ( ) ) ; if ( mDisableSevereWhenExtremeDisabled ) { if ( pref.getKey ( ) . equals ( com.android.cellbroadcastreceiver.CellBroadcastSettings.KEY_ENABLE_CMAS_EXTREME_THREAT_ALERTS ) ) { boolean isExtremeAlertChecked = ( ( java.lang.Boolean ) ( newValue ) ) ; if ( ( mSevereCheckBox ) != null ) { mSevereCheckBox.setEnabled ( isExtremeAlertChecked ) ; mSevereCheckBox.setChecked ( false ) ; } } } new android.app.backup.BackupManager ( getContext ( ) ) . dataChanged ( ) ; return true ; }
Source:
private void createNewStore ( java.lang.String osKeyStorePath , java.lang.String storeType , com.android.sdklib.internal.build.DebugKeyProvider.IKeyGenOutput output ) throws com.android.sdklib.internal.build.DebugKeyProvider.KeytoolException , java.io.IOException , java.security.KeyStoreException , java.security.NoSuchAlgorithmException , java.security.UnrecoverableEntryException , java.security.cert.CertificateException { if ( com.android.sdklib.internal.build.KeystoreHelper.createNewStore ( osKeyStorePath , storeType , com.android.sdklib.internal.build.DebugKeyProvider.PASSWORD_STRING , com.android.sdklib.internal.build.DebugKeyProvider.DEBUG_ALIAS , com.android.sdklib.internal.build.DebugKeyProvider.PASSWORD_STRING , com.android.sdklib.internal.build.DebugKeyProvider.CERTIFICATE_DESC , 1 , output ) ) { loadKeyEntry ( osKeyStorePath , storeType ) ; } }

Target:
private void createNewStore ( java.lang.String osKeyStorePath , java.lang.String storeType , com.android.sdklib.internal.build.DebugKeyProvider.IKeyGenOutput output ) throws com.android.sdklib.internal.build.DebugKeyProvider.KeytoolException , java.io.IOException , java.security.KeyStoreException , java.security.NoSuchAlgorithmException , java.security.UnrecoverableEntryException , java.security.cert.CertificateException { if ( com.android.sdklib.internal.build.KeystoreHelper.createNewStore ( osKeyStorePath , storeType , com.android.sdklib.internal.build.DebugKeyProvider.PASSWORD_STRING , com.android.sdklib.internal.build.DebugKeyProvider.DEBUG_ALIAS , com.android.sdklib.internal.build.DebugKeyProvider.PASSWORD_STRING , com.android.sdklib.internal.build.DebugKeyProvider.CERTIFICATE_DESC , 30 , output ) ) { loadKeyEntry ( osKeyStorePath , storeType ) ; } }
Source:
public java.lang.String format ( double number , com.ibm.icu.text.NumberFormat numberFormat , com.ibm.icu.text.PluralRules pluralRules ) { java.lang.String formatStr = numberFormat.format ( number ) ; com.ibm.icu.impl.StandardPlural p = com.ibm.icu.text.QuantityFormatter.selectPlural ( number , numberFormat , pluralRules ) ; com.ibm.icu.impl.SimplePatternFormatter formatter = templates [ p.ordinal ( ) ] ; if ( formatter == null ) { formatter = templates [ com.ibm.icu.impl.StandardPlural.OTHER_INDEX ] ; assert formatter != null ; } return formatter.format ( formatStr ) ; }

Target:
public java.lang.String format ( double number , com.ibm.icu.text.NumberFormat numberFormat , com.ibm.icu.text.PluralRules pluralRules ) { java.lang.String formatStr = numberFormat.format ( number ) ; com.ibm.icu.impl.StandardPlural p = com.ibm.icu.text.QuantityFormatter.selectPlural ( number , numberFormat , pluralRules ) ; com.ibm.icu.text.SimpleFormatter formatter = templates [ p.ordinal ( ) ] ; if ( formatter == null ) { formatter = templates [ com.ibm.icu.impl.StandardPlural.OTHER_INDEX ] ; assert formatter != null ; } return formatter.format ( formatStr ) ; }
Source:
public void testWriteExternalStorage ( ) throws java.lang.Exception { assertExternalStorageMounted ( ) ; com.android.cts.externalstorageapp.CommonExternalStorageTest.writeInt ( com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE , 32 ) ; assertEquals ( com.android.cts.externalstorageapp.CommonExternalStorageTest.readInt ( com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE ) , 32 ) ; }

Target:
public void testWriteExternalStorage ( ) throws java.lang.Exception { final long testValue = 12345000 ; assertExternalStorageMounted ( ) ; com.android.cts.externalstorageapp.CommonExternalStorageTest.writeInt ( com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE , 32 ) ; assertEquals ( com.android.cts.externalstorageapp.CommonExternalStorageTest.readInt ( com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE ) , 32 ) ; assertTrue ( "Must be able to set last modified" , com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE.setLastModified ( testValue ) ) ; assertEquals ( testValue , com.android.cts.writeexternalstorageapp.WriteExternalStorageTest.TEST_FILE.lastModified ( ) ) ; }
Source:
public static java.lang.String createPathComment ( java.io.File file ) throws java.net.MalformedURLException { java.lang.String url = file.toURI ( ) . toURL ( ) . toString ( ) ; int dashes = url.indexOf ( "--" ) ; if ( dashes != ( - 1 ) ) { url = url.replace ( "--" , "%2D%2D" ) ; } return ( com.android.ide.common.res2.MergedResourceWriter.FILENAME_PREFIX ) + url ; }

Target:
public static java.lang.String createPathComment ( java.io.File file ) throws java.net.MalformedURLException { java.lang.String url = com.android.utils.SdkUtils.fileToUrlString ( file ) ; int dashes = url.indexOf ( "--" ) ; if ( dashes != ( - 1 ) ) { url = url.replace ( "--" , "%2D%2D" ) ; } return ( com.android.ide.common.res2.MergedResourceWriter.FILENAME_PREFIX ) + url ; }
Source:
public static java.lang.String getSyntheticSwitchMapFieldName ( com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String fullEnumName = com.android.jack.Jack.getLookupFormatter ( ) . getName ( enumType ) ; fullEnumName = fullEnumName.substring ( 1 , ( ( fullEnumName.length ( ) ) - 1 ) ) ; java.lang.String fieldName = ( ( com.android.jack.transformations.enums.OptimizationUtil.ShorterPrefix ) + ( fullEnumName.replace ( '/' , '_' ) ) ) + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ; return fieldName ; }

Target:
public static java.lang.String getSyntheticSwitchMapFieldName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedEnum enumType ) { java.lang.String enumName = com.android.jack.util.NamingTools.getValidName ( com.android.jack.ir.formatter.BinaryQualifiedNameFormatter.getFormatter ( ) . getName ( enumType ) ) ; java.lang.String fieldName = com.android.jack.util.NamingTools.getNonSourceConflictingName ( ( enumName + ( com.android.jack.transformations.enums.OptimizationUtil.Suffix ) ) ) ; return fieldName ; }
Source:
public void test_SSL_get_servername_null ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_get_servername ( org.conscrypt.NativeCryptoTest.NULL ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; assertNull ( org.conscrypt.NativeCrypto.SSL_get_servername ( s ) ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_get_servername_null ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_get_servername ( org.conscrypt.NativeCryptoTest.NULL ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.junit.Assert.assertNull ( org.conscrypt.NativeCrypto.SSL_get_servername ( s ) ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
protected void setPassState ( android.view.View item , boolean passed ) { android.widget.ImageView status = ( ( android.widget.ImageView ) ( item.findViewById ( R.id.status ) ) ) ; status.setImageResource ( ( passed ? R.drawable.fs_good : R.drawable.fs_error ) ) ; android.view.View button = item.findViewById ( R.id.user_action_button ) ; button.setClickable ( false ) ; button.setEnabled ( false ) ; status.invalidate ( ) ; }

Target:
protected void setPassState ( android.view.View item , boolean passed ) { android.widget.ImageView status = ( ( android.widget.ImageView ) ( item.findViewById ( R.id.status ) ) ) ; status.setImageResource ( ( passed ? R.drawable.fs_good : R.drawable.fs_error ) ) ; setButtonEnabled ( item , false ) ; status.invalidate ( ) ; }
Source:
public java.util.ArrayList < com.android.sdkuilib.internal.repository.ArchiveInfo > getResult ( ) { java.util.ArrayList < com.android.sdkuilib.internal.repository.ArchiveInfo > ais = new java.util.ArrayList < com.android.sdkuilib.internal.repository.ArchiveInfo > ( ) ; if ( ( getReturnCode ( ) ) == ( org.eclipse.jface.window.Window.OK ) ) { for ( com.android.sdkuilib.internal.repository.ArchiveInfo ai : mArchives ) { if ( ai.isAccepted ( ) ) { ais.add ( ai ) ; } } } return ais ; }

Target:
public java.util.ArrayList < com.android.sdklib.internal.repository.updater.ArchiveInfo > getResult ( ) { java.util.ArrayList < com.android.sdklib.internal.repository.updater.ArchiveInfo > ais = new java.util.ArrayList < com.android.sdklib.internal.repository.updater.ArchiveInfo > ( ) ; if ( ( getReturnCode ( ) ) == ( org.eclipse.jface.window.Window.OK ) ) { for ( com.android.sdklib.internal.repository.updater.ArchiveInfo ai : mArchives ) { if ( ai.isAccepted ( ) ) { ais.add ( ai ) ; } } } return ais ; }
Source:
private void markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node , @ javax.annotation.Nonnull com.android.jack.shrob.spec.KeepModifier modifier ) { com.android.jack.shrob.seed.SeedMarker marker = node.addMarkerIfAbsent ( new com.android.jack.shrob.seed.SeedMarker ( modifier ) ) ; if ( marker != null ) { marker.getModifier ( ) . mergeModifier ( modifier ) ; } }

Target:
private synchronized void markIfNecessary ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode node , @ javax.annotation.Nonnull com.android.jack.shrob.spec.KeepModifier modifier ) { com.android.jack.shrob.seed.SeedMarker marker = node.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( marker == null ) { node.addMarker ( new com.android.jack.shrob.seed.SeedMarker ( modifier ) ) ; } else { com.android.jack.shrob.spec.KeepModifier previousModifier = marker.getModifier ( ) ; if ( previousModifier != modifier ) { marker.setModifier ( new com.android.jack.shrob.spec.KeepModifier ( ) ) ; } } }
Source:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getAlternateFormatsForCountry ( int countryCallingCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.countryCodeSet.contains ( countryCallingCode ) ) ) { return null ; } synchronized ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.containsKey ( countryCallingCode ) ) ) { com.google.i18n.phonenumbers.MetadataManager.loadAlternateFormatsMetadataFromFile ( countryCallingCode ) ; } } return com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.get ( countryCallingCode ) ; }

Target:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getAlternateFormatsForCountry ( int countryCallingCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.alternateFormatsCountryCodes.contains ( countryCallingCode ) ) ) { return null ; } return com.google.i18n.phonenumbers.MetadataManager.getMetadataFromMultiFilePrefix ( countryCallingCode , com.google.i18n.phonenumbers.MetadataManager.alternateFormatsMap , com.google.i18n.phonenumbers.MetadataManager.ALTERNATE_FORMATS_FILE_PREFIX , com.google.i18n.phonenumbers.MetadataManager.DEFAULT_METADATA_LOADER ) ; }
Source:
public int compare ( java.io.File file , java.io.File file2 ) { if ( file.isDirectory ( ) ) { return - 1 ; } else if ( file2.isDirectory ( ) ) { return 1 ; } long diff = ( file.length ( ) ) - ( file2.length ( ) ) ; return diff > 0 ? 1 : diff < 0 ? - 1 : 0 ; }

Target:
public int compare ( java.io.File file , java.io.File file2 ) { boolean file2IsDir = file2.isDirectory ( ) ; if ( file.isDirectory ( ) ) { return file2IsDir ? 0 : - 1 ; } else if ( file2IsDir ) { return 1 ; } long diff = ( file.length ( ) ) - ( file2.length ( ) ) ; return diff > 0 ? 1 : diff < 0 ? - 1 : 0 ; }
Source:
public void testInvalidPropertyWrite ( ) throws java.lang.Exception { com.android.ide.common.rendering.RenderSecurityManager manager = new com.android.ide.common.rendering.RenderSecurityManager ( null , null ) ; try { manager.setActive ( true ) ; java.lang.String userHome = java.lang.System.getProperty ( "user.home" ) ; java.lang.System.setProperty ( "java.io.tmpdir" , userHome ) ; fail ( "Should have thrown security exception" ) ; } catch ( java.lang.SecurityException exception ) { assertEquals ( "Write access not allowed during rendering (java.io.tmpdir)" , exception.toString ( ) ) ; } finally { manager.dispose ( ) ; } }

Target:
public void testInvalidPropertyWrite ( ) throws java.lang.Exception { com.android.ide.common.rendering.RenderSecurityManager manager = new com.android.ide.common.rendering.RenderSecurityManager ( null , null ) ; try { manager.setActive ( true , myCredential ) ; java.lang.String userHome = java.lang.System.getProperty ( "user.home" ) ; java.lang.System.setProperty ( "java.io.tmpdir" , userHome ) ; fail ( "Should have thrown security exception" ) ; } catch ( java.lang.SecurityException exception ) { assertEquals ( "Write access not allowed during rendering (java.io.tmpdir)" , exception.toString ( ) ) ; } finally { manager.dispose ( myCredential ) ; } }
Source:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.io.File testAdapter = new java.io.File ( mTestDir , ( ( VTS_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ; testAdapter.createNewFile ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; verify ( mDevice , times ( 1 ) ) . pushFile ( eq ( testAdapter ) , eq ( ( ( TARGET_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }

Target:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.io.File testAdapter = new java.io.File ( mTestDir , ( ( VTS_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ; testAdapter.createNewFile ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . doReturn ( "" ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; verify ( mDevice , times ( 1 ) ) . pushFile ( eq ( testAdapter ) , eq ( ( ( TARGET_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }
Source:
public void verify ( ) { if ( ( mWarnings.length ( ) ) > 0 ) { java.lang.System.err.println ( mWarnings ) ; } if ( ( mErrors.length ( ) ) > 0 ) { java.lang.System.err.println ( mErrors ) ; junit.framework.Assert.fail ( mErrors ) ; } }

Target:
public void verify ( ) { if ( ! ( mWarnings.isEmpty ( ) ) ) { java.lang.System.err.println ( mWarnings ) ; } if ( ! ( mErrors.isEmpty ( ) ) ) { java.lang.System.err.println ( mErrors ) ; junit.framework.Assert.fail ( mErrors ) ; } }
Source:
public java.lang.String [ ] getIsimImpu ( ) { com.android.internal.telephony.Phone phone = getPhone ( getDefaultSubscription ( ) ) ; mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimImpu ( ) ; } else { return null ; } }

Target:
public java.lang.String getIsimDomain ( int subId ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; com.android.internal.telephony.uicc.IsimRecords isim = phone.getIsimRecords ( ) ; if ( isim != null ) { return isim.getIsimDomain ( ) ; } else { return null ; } } else { loge ( ( "getIsimDomain phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private void assertNoContentInstalled ( ) { java.io.File currentTzDataDir = installer.getCurrentTzDataDir ( ) ; assertFalse ( currentTzDataDir.exists ( ) ) ; java.io.File workingDir = installer.getWorkingDir ( ) ; assertFalse ( workingDir.exists ( ) ) ; java.io.File oldDataDir = installer.getOldTzDataDir ( ) ; assertFalse ( oldDataDir.exists ( ) ) ; }

Target:
private void assertNoContentInstalled ( ) throws java.lang.Exception { assertNull ( installer.getInstalledBundleVersion ( ) ) ; java.io.File currentTzDataDir = installer.getCurrentTzDataDir ( ) ; assertFalse ( currentTzDataDir.exists ( ) ) ; java.io.File workingDir = installer.getWorkingDir ( ) ; assertFalse ( workingDir.exists ( ) ) ; java.io.File oldDataDir = installer.getOldTzDataDir ( ) ; assertFalse ( oldDataDir.exists ( ) ) ; }
Source:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( forNameMethodId ) ) ) { assert call.getType ( ) . isSameType ( javaLangClass ) ; return true ; } return false ; }

Target:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.lookup.JMethodLookupException { if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodIdWide ( ) . equals ( forNameMethodId ) ) ) { assert call.getType ( ) . isSameType ( javaLangClass ) ; return true ; } return false ; }
Source:
public void testVload_ulong ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.I64 ( mRS ) , w ) ) ; long [ ] tmp = randomLongArray ( w ) ; long [ ] tmp2 = new long [ w ] ; script.forEach_copy2d_ulong ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch ulong: " ) ; }

Target:
public void testVload_ulong ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.U64 ( mRS ) , w ) ) ; long [ ] tmp = randomLongArray ( w ) ; long [ ] tmp2 = new long [ w ] ; script.forEach_copy2d_ulong ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch ulong: " ) ; }
Source:
public void testEmptyRootXml ( ) throws java.lang.Exception { java.lang.String document = ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }

Target:
public void testEmptyRootXml ( ) throws java.lang.Exception { java.lang.String document = ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }