auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean sample ( long timeStamp ) { if ( timeStamp == ( java.lang.Long.MAX_VALUE ) ) { return true ; } else if ( timeStamp < ( mLatestSeen ) ) { return false ; } else if ( timeStamp == ( mLatestSeen ) ) { return true ; } else { mElapsedTimes.add ( ( timeStamp - ( mLatestSeen ) ) ) ; mLatestSeen = timeStamp ; return false ; } }

Target:
private boolean sample ( long timeStamp ) { if ( timeStamp == ( java.lang.Long.MAX_VALUE ) ) { return true ; } else if ( timeStamp < ( mLatestSeen ) ) { return false ; } else if ( timeStamp == ( mLatestSeen ) ) { return true ; } else { if ( ( mLatestSeen ) != 0 ) { mElapsedTimes.add ( ( timeStamp - ( mLatestSeen ) ) ) ; } mLatestSeen = timeStamp ; return false ; } }
Source:
public void test_EVP_get_digestbyname ( ) throws java.lang.Exception { assertTrue ( ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "sha256" ) ) != ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ) ) ; try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "" ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "foobar" ) ; fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertNoErrors ( ) ; }

Target:
public void test_EVP_get_digestbyname ( ) throws java.lang.Exception { assertTrue ( ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "sha256" ) ) != ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ) ) ; try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "" ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_digestbyname ( "foobar" ) ; fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } }
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.lang.String leaf ) { add ( id , new java.io.File ( mPath , leaf ) ) ; }
Source:
public static java.lang.String toString ( android.hardware.tests.baz.V1_0.IBase.StringMatrix5x3 M ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "[" ) ; for ( int i = 0 ; i < 5 ; ++ i ) { if ( i > 0 ) { builder.append ( ", " ) ; } builder.append ( com.android.commands.hidl_test_java.HidlTestJava.toString ( M.s [ i ] ) ) ; } builder.append ( "]" ) ; return builder.toString ( ) ; }

Target:
public static java.lang.String toString ( java.lang.String [ ] [ ] M ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "[" ) ; for ( int i = 0 ; i < ( M.length ) ; ++ i ) { if ( i > 0 ) { builder.append ( ", " ) ; } builder.append ( com.android.commands.hidl_test_java.HidlTestJava.toString ( M [ i ] ) ) ; } builder.append ( "]" ) ; return builder.toString ( ) ; }
Source:
public void exiting ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object result ) { if ( ( java.util.logging.Level.FINER.intValue ( ) ) < ( levelValue ) ) { return ; } java.lang.Object [ ] params = new java.lang.Object [ ] { result } ; logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "RETURN {0}" , result ) ; }

Target:
public void exiting ( java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Object result ) { logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "RETURN {0}" , result ) ; }
Source:
public void testGetSubscriberNumber ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createForegroundCall ( ) ; android.telecom.PhoneAccount fakePhoneAccount = makeQuickAccount ( "id0" , com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ; org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountOfCurrentUser ( org.mockito.ArgumentMatchers.nullable ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( fakePhoneAccount ) ; java.lang.String subscriberNumber = mBluetoothPhoneService.mBinder.getSubscriberNumber ( ) ; assertEquals ( subscriberNumber , ( ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_ADDRESS ) + ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ) ) ; }

Target:
public void testGetSubscriberNumber ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createForegroundCall ( ) ; android.telecom.PhoneAccount fakePhoneAccount = makeQuickAccount ( "id0" , com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ; org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountOfCurrentUser ( org.mockito.ArgumentMatchers.nullable ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( fakePhoneAccount ) ; java.lang.String subscriberNumber = mBluetoothPhoneService.mBinder.getSubscriberNumber ( ) ; org.junit.Assert.assertEquals ( subscriberNumber , ( ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_ADDRESS ) + ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_ACCOUNT_INDEX ) ) ) ; }
Source:
public static void check ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.DirectoryLocation location ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { assert file != null ; if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.NoSuchFileException ( location ) ; } if ( ! ( file.isDirectory ( ) ) ) { throw new com.android.sched.util.file.NotDirectoryException ( location ) ; } }

Target:
public static void check ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull com.android.sched.util.location.DirectoryLocation location ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.NoSuchFileException ( location ) ; } if ( ! ( file.isDirectory ( ) ) ) { throw new com.android.sched.util.file.NotDirectoryException ( location ) ; } }
Source:
public void testAfterLast ( ) throws java.sql.SQLException { target.afterLast ( ) ; assertTrue ( target.isAfterLast ( ) ) ; assertFalse ( target.next ( ) ) ; emptyTarget.afterLast ( ) ; assertFalse ( emptyTarget.isAfterLast ( ) ) ; try { target.close ( ) ; target.beforeFirst ( ) ; fail ( "Should get SQLException" ) ; } catch ( java.sql.SQLException e ) { } }

Target:
public void testAfterLast ( ) throws java.sql.SQLException { target.afterLast ( ) ; assertTrue ( target.isAfterLast ( ) ) ; assertFalse ( target.next ( ) ) ; emptyTarget.afterLast ( ) ; assertFalse ( emptyTarget.isAfterLast ( ) ) ; try { target.close ( ) ; target.afterLast ( ) ; fail ( "Should get SQLException" ) ; } catch ( java.sql.SQLException e ) { } }
Source:
public static int waitpid ( int pid , android.util.MutableInt status , int options ) throws android.system.ErrnoException { android.util.MutableInt internalStatus = new android.util.MutableInt ( status.value ) ; try { return Libcore.os.waitpid ( pid , internalStatus , options ) ; } finally { status.value = internalStatus.value ; } }

Target:
public static int waitpid ( int pid , android.util.MutableInt status , int options ) throws android.system.ErrnoException { if ( status == null ) { return Libcore.os.waitpid ( pid , null , options ) ; } else { android.util.MutableInt internalStatus = new android.util.MutableInt ( status.value ) ; try { return Libcore.os.waitpid ( pid , internalStatus , options ) ; } finally { status.value = internalStatus.value ; } } }
Source:
private final void shutdownIfNoPower ( ) { if ( ( ( ( ( mBatteryLevel ) == 0 ) && ( ! ( isPowered ( ) ) ) ) || ( ( mBatteryHealth ) == ( android.os.BatteryManager.BATTERY_HEALTH_DEAD ) ) ) && ( android.app.ActivityManagerNative.isSystemReady ( ) ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_REQUEST_SHUTDOWN ) ; intent.putExtra ( Intent.EXTRA_KEY_CONFIRM , false ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; } }

Target:
private final void shutdownIfNoPower ( ) { if ( ( ( ( mBatteryLevel ) == 0 ) && ( ! ( isPowered ( ) ) ) ) && ( android.app.ActivityManagerNative.isSystemReady ( ) ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_REQUEST_SHUTDOWN ) ; intent.putExtra ( Intent.EXTRA_KEY_CONFIRM , false ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; } }
Source:
public void checkCall ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.ClassContext context , @ com.android.annotations.NonNull org.objectweb.asm.tree.ClassNode classNode , @ com.android.annotations.NonNull org.objectweb.asm.tree.MethodNode method , @ com.android.annotations.NonNull org.objectweb.asm.tree.MethodInsnNode call ) { java.lang.String owner = call.owner ; if ( ( owner.equals ( "android/util/FloatMath" ) ) && ( ( context.getProject ( ) . getMinSdk ( ) ) >= 8 ) ) { java.lang.String message = java.lang.String.format ( ( "Use java.lang.Math#%1$s instead of android.util.FloatMath#%1$s() " + "since it is faster as of API 8" ) , call.name ) ; context.report ( com.android.tools.lint.checks.MathDetector.ISSUE , method , context.getLocation ( call ) , message , null ) ; } }

Target:
public void checkCall ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.ClassContext context , @ com.android.annotations.NonNull org.objectweb.asm.tree.ClassNode classNode , @ com.android.annotations.NonNull org.objectweb.asm.tree.MethodNode method , @ com.android.annotations.NonNull org.objectweb.asm.tree.MethodInsnNode call ) { java.lang.String owner = call.owner ; if ( ( owner.equals ( "android/util/FloatMath" ) ) && ( ( context.getProject ( ) . getMinSdk ( ) ) >= 8 ) ) { java.lang.String message = java.lang.String.format ( ( "Use java.lang.Math#%1$s instead of android.util.FloatMath#%1$s() " + "since it is faster as of API 8" ) , call.name ) ; context.report ( com.android.tools.lint.checks.MathDetector.ISSUE , method , call , context.getLocation ( call ) , message , null ) ; } }
Source:
public boolean onGenericMotionEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onGenericMotionEvent ( event ) ; } } ) ; return ret ; } return mAwContents.getAwContentsProxy ( ) . onGenericMotionEvent ( event ) ; }

Target:
public boolean onGenericMotionEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onGenericMotionEvent ( event ) ; } } ) ; return ret ; } return mAwContents.onGenericMotionEvent ( event ) ; }
Source:
public android.bluetooth.BluetoothSocket createRfcommSocket ( int channel ) throws java.io.IOException { if ( ( isBluetoothEnabled ( ) ) == false ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_RFCOMM , ( - 1 ) , true , true , this , channel , null ) ; }

Target:
public android.bluetooth.BluetoothSocket createRfcommSocket ( int channel ) throws java.io.IOException { if ( ! ( isBluetoothEnabled ( ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_RFCOMM , ( - 1 ) , true , true , this , channel , null ) ; }
Source:
public static int $noinline$intNecessaryShiftModifications ( int value , int shift ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } int c129 = 129 ; return ( ( ( value << ( shift | 33 ) ) + ( value > > ( shift ^ 65 ) ) ) + ( value > > > ( shift + 97 ) ) ) + ( value << ( shift - c129 ) ) ; }

Target:
public static int $noinline$intNecessaryShiftModifications ( int value , int shift ) { int c129 = 129 ; return ( ( ( value << ( shift | 33 ) ) + ( value > > ( shift ^ 65 ) ) ) + ( value > > > ( shift + 97 ) ) ) + ( value << ( shift - c129 ) ) ; }
Source:
public static void computeDegrees ( android.renderscript.cts.TestDegrees.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 3 , 3 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inValue ) ; android.renderscript.cts.Target.Floaty k = t.new32 ( ( ( float ) ( 180.0 / ( java.lang.Math.PI ) ) ) ) ; args.out = t.multiply ( in , k ) ; }

Target:
public static void computeDegrees ( android.renderscript.cts.TestDegrees.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 3 , 3 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; android.renderscript.cts.Target.Floaty k = t.new32 ( ( ( float ) ( 180.0 / ( java.lang.Math.PI ) ) ) ) ; args.out = t.multiply ( in , k ) ; }
Source:
public com.android.jack.ir.ast.JAnnotation exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( retentionPolicy ) != null ; assert ( sourceInfo ) != null ; assert ( annotationType ) != null ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JAnnotationType type = exportSession.getLookup ( ) . getAnnotationType ( annotationType ) ; com.android.jack.ir.ast.JAnnotation jAnnotation = new com.android.jack.ir.ast.JAnnotation ( jSourceInfo , retentionPolicy , type ) ; for ( com.android.jack.jayce.v0002.nodes.NNameValuePair valuePair : elements ) { jAnnotation.put ( valuePair.exportAsJast ( exportSession , type ) ) ; } return jAnnotation ; }

Target:
public com.android.jack.ir.ast.JAnnotation exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( retentionPolicy ) != null ; assert ( sourceInfo ) != null ; assert ( annotationType ) != null ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JAnnotationType type = exportSession.getLookup ( ) . getAnnotationType ( annotationType ) ; com.android.jack.ir.ast.JAnnotation jAnnotation = new com.android.jack.ir.ast.JAnnotation ( jSourceInfo , retentionPolicy , type ) ; for ( com.android.jack.jayce.v0002.nodes.NNameValuePair valuePair : elements ) { jAnnotation.put ( valuePair.exportAsJast ( exportSession ) ) ; } return jAnnotation ; }
Source:
protected final java.lang.String toStringWithInline ( java.lang.String extra ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( 80 ) ; sb.append ( "Insn{" ) ; sb.append ( position ) ; sb.append ( ' ' ) ; sb.append ( opcode ) ; if ( extra != null ) { sb.append ( ' ' ) ; sb.append ( extra ) ; } sb.append ( " :: " ) ; if ( ( result ) != null ) { sb.append ( result ) ; sb.append ( " <- " ) ; } sb.append ( sources ) ; sb.append ( '}' ) ; return sb.toString ( ) ; }

Target:
protected final java.lang.String toStringWithInline ( java.lang.String extra ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 80 ) ; sb.append ( "Insn{" ) ; sb.append ( position ) ; sb.append ( ' ' ) ; sb.append ( opcode ) ; if ( extra != null ) { sb.append ( ' ' ) ; sb.append ( extra ) ; } sb.append ( " :: " ) ; if ( ( result ) != null ) { sb.append ( result ) ; sb.append ( " <- " ) ; } sb.append ( sources ) ; sb.append ( '}' ) ; return sb.toString ( ) ; }
Source:
public boolean addAccountExplicitly ( android.accounts.Account account , java.lang.String password , android.os.Bundle userdata ) { if ( account == null ) throw new java.lang.IllegalArgumentException ( "account is null" ) ; try { return mService.addAccount ( account , password , userdata ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public boolean addAccountExplicitly ( android.accounts.Account account , java.lang.String password , android.os.Bundle userdata ) { if ( account == null ) throw new java.lang.IllegalArgumentException ( "account is null" ) ; try { return mService.addAccountExplicitly ( account , password , userdata ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
private java.lang.Object getValue ( com.intellij.designer.model.Property property ) throws java.lang.Exception { int size = myContainers.size ( ) ; if ( size == 0 ) { return null ; } java.lang.Object value = property.getValue ( myContainers.get ( 0 ) ) ; for ( int i = 1 ; i < size ; i ++ ) { if ( ! ( com.intellij.openapi.util.Comparing.equal ( value , property.getValue ( myContainers.get ( i ) ) ) ) ) { return null ; } } return value ; }

Target:
protected final java.lang.Object getValue ( com.intellij.designer.model.Property property ) throws java.lang.Exception { int size = myContainers.size ( ) ; if ( size == 0 ) { return null ; } java.lang.Object value = property.getValue ( myContainers.get ( 0 ) ) ; for ( int i = 1 ; i < size ; i ++ ) { if ( ! ( com.intellij.openapi.util.Comparing.equal ( value , property.getValue ( myContainers.get ( i ) ) ) ) ) { return null ; } } return value ; }
Source:
public void testBooleans ( ) throws java.lang.Exception { com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( true , "true" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( false , "false" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( false , "false && true" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( true , "false || true" ) ; com.android.tools.lint.detector.api.ConstantEvaluatorTest.checkExpression ( true , "!false" ) ; }

Target:
public void testBooleans ( ) throws java.lang.Exception { checkExpression ( true , "true" ) ; checkExpression ( false , "false" ) ; checkExpression ( false , "false && true" ) ; checkExpression ( true , "false || true" ) ; checkExpression ( true , "!false" ) ; }
Source:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int runtimeFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { runtimeFlags |= com.android.internal.os.Zygote.DISABLE_HIDDEN_API_CHECKS ; com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; com.android.internal.os.Zygote.resetNicePriority ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , runtimeFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true , runtimeFlags ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }

Target:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int runtimeFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; com.android.internal.os.Zygote.resetNicePriority ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , runtimeFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true , runtimeFlags ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }
Source:
static com.ibm.icu.text.DateIntervalInfo.PatternInfo genPatternInfo ( java.lang.String intervalPattern , boolean laterDateFirst ) { int splitPoint = com.ibm.icu.text.DateIntervalInfo.splitPatternInto2Part ( intervalPattern ) ; java.lang.String firstPart = intervalPattern.substring ( 0 , splitPoint ) ; java.lang.String secondPart = null ; if ( splitPoint < ( intervalPattern.length ( ) ) ) { secondPart = intervalPattern.substring ( splitPoint , intervalPattern.length ( ) ) ; } return new com.ibm.icu.text.DateIntervalInfo.PatternInfo ( firstPart , secondPart , laterDateFirst ) ; }

Target:
public static com.ibm.icu.text.DateIntervalInfo.PatternInfo genPatternInfo ( java.lang.String intervalPattern , boolean laterDateFirst ) { int splitPoint = com.ibm.icu.text.DateIntervalInfo.splitPatternInto2Part ( intervalPattern ) ; java.lang.String firstPart = intervalPattern.substring ( 0 , splitPoint ) ; java.lang.String secondPart = null ; if ( splitPoint < ( intervalPattern.length ( ) ) ) { secondPart = intervalPattern.substring ( splitPoint , intervalPattern.length ( ) ) ; } return new com.ibm.icu.text.DateIntervalInfo.PatternInfo ( firstPart , secondPart , laterDateFirst ) ; }
Source:
public vogar.target.TargetRunner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { if ( supports ( klass ) ) { java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( klass , qualification , args ) ; return new vogar.target.junit.JUnitTargetRunner ( monitor , skipPastReference , testEnvironment , timeoutSeconds , tests ) ; } else { return null ; } }

Target:
public vogar.target.TargetRunner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String qualification , java.lang.Class < ? > klass , java.util.concurrent.atomic.AtomicReference < java.lang.String > skipPastReference , vogar.target.TestEnvironment testEnvironment , int timeoutSeconds , boolean profile , java.lang.String [ ] args ) { if ( supports ( klass ) ) { return new vogar.target.junit.JUnitTargetRunner ( monitor , skipPastReference , testEnvironment , timeoutSeconds , klass , qualification , args ) ; } else { return null ; } }
Source:
public void testFailure ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { assertEquals ( '1' , parseAndClose ( is ) ) ; try { assertEquals ( '2' , parse ( is ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { is.close ( ) ; } }

Target:
public void testFailure ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { assertEquals ( '1' , parseAndClose ( is ) ) ; try { assertEquals ( '2' , parse ( is ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { if ( is != null ) { is.close ( ) ; } } }
Source:
protected static java.lang.String cstString ( com.android.jack.dx.dex.code.DalvInsn insn ) { com.android.jack.dx.dex.code.CstInsn ci = ( ( com.android.jack.dx.dex.code.CstInsn ) ( insn ) ) ; com.android.jack.dx.rop.cst.Constant cst = ci.getConstant ( ) ; return cst instanceof com.android.jack.dx.rop.cst.CstString ? ( ( com.android.jack.dx.rop.cst.CstString ) ( cst ) ) . toQuoted ( ) : cst.toHuman ( ) ; }

Target:
protected static java.lang.String cstString ( @ javax.annotation.Nonnull com.android.jack.dx.dex.code.CstInsn ci ) { com.android.jack.dx.rop.cst.Constant cst = ci.getConstant ( ) ; return cst instanceof com.android.jack.dx.rop.cst.CstString ? ( ( com.android.jack.dx.rop.cst.CstString ) ( cst ) ) . toQuoted ( ) : cst.toHuman ( ) ; }
Source:
private void loadViewServerInfoAndWindows ( final com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.DeviceBridge.ViewServerInfo viewServerInfo = com.android.hierarchyviewerlib.device.DeviceBridge.loadViewServerInfo ( device ) ; if ( viewServerInfo == null ) { return ; } com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . addDevice ( device , windows ) ; if ( ( viewServerInfo.protocolVersion ) >= 3 ) { com.android.hierarchyviewerlib.device.WindowUpdater.startListenForWindowChanges ( this , device ) ; focusChanged ( device ) ; } }

Target:
private void loadViewServerInfoAndWindows ( final com.android.ddmlib.IDevice device ) { com.android.hierarchyviewerlib.device.DeviceBridge.ViewServerInfo viewServerInfo = com.android.hierarchyviewerlib.device.DeviceBridge.loadViewServerInfo ( device ) ; if ( viewServerInfo == null ) { return ; } com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . addDevice ( device , windows , viewServerInfo ) ; if ( ( viewServerInfo.protocolVersion ) >= 3 ) { com.android.hierarchyviewerlib.device.WindowUpdater.startListenForWindowChanges ( this , device ) ; focusChanged ( device ) ; } }
Source:
public void test_ru_RU ( ) throws java.lang.Exception { libcore.icu.LocaleData l = libcore.icu.LocaleData.get ( new java.util.Locale ( "ru" , "RU" ) ) ; assertEquals ( "воскресенье" , l.longWeekdayNames [ 1 ] ) ; assertEquals ( "вс" , l.shortWeekdayNames [ 1 ] ) ; assertEquals ( "В" , l.tinyWeekdayNames [ 1 ] ) ; assertEquals ( "Воскресенье" , l.longStandAloneWeekdayNames [ 1 ] ) ; assertEquals ( "Вс" , l.shortStandAloneWeekdayNames [ 1 ] ) ; assertEquals ( "В" , l.tinyStandAloneWeekdayNames [ 1 ] ) ; }

Target:
public void test_ru_RU ( ) throws java.lang.Exception { libcore.icu.LocaleData l = libcore.icu.LocaleData.get ( new java.util.Locale ( "ru" , "RU" ) ) ; assertEquals ( "воскресенье" , l.longWeekdayNames [ 1 ] ) ; assertEquals ( "вс" , l.shortWeekdayNames [ 1 ] ) ; assertEquals ( "вс" , l.tinyWeekdayNames [ 1 ] ) ; assertEquals ( "Воскресенье" , l.longStandAloneWeekdayNames [ 1 ] ) ; assertEquals ( "Вс" , l.shortStandAloneWeekdayNames [ 1 ] ) ; assertEquals ( "В" , l.tinyStandAloneWeekdayNames [ 1 ] ) ; }
Source:
public void test_useRadix_I ( ) { s = new java.util.Scanner ( "test" ) ; try { s.useRadix ( ( ( java.lang.Character.MIN_RADIX ) - 1 ) ) ; fail ( "Should throw IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException e ) { } try { s.useRadix ( ( ( java.lang.Character.MAX_RADIX ) + 1 ) ) ; fail ( "Should throw IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException e ) { } s.useRadix ( 11 ) ; assertEquals ( 11 , s.radix ( ) ) ; }

Target:
public void test_useRadix_I ( ) { s = new java.util.Scanner ( "test" ) ; try { s.useRadix ( ( ( java.lang.Character.MIN_RADIX ) - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { s.useRadix ( ( ( java.lang.Character.MAX_RADIX ) + 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } s.useRadix ( 11 ) ; assertEquals ( 11 , s.radix ( ) ) ; }
Source:
private static android.app.PendingIntent newVoicemailIntent ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.Nullable com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall voicemail ) { android.content.Intent intent ; if ( com.android.dialer.app.MainComponent.isNuiComponentEnabled ( context ) ) { intent = com.android.dialer.app.MainComponent.getShowVoicemailIntent ( context ) ; } else { intent = com.android.dialer.app.DialtactsActivity.getShowTabIntent ( context , DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL ) ; } if ( voicemail != null ) { intent.setData ( voicemail.voicemailUri ) ; } intent.putExtra ( DialtactsActivity.EXTRA_CLEAR_NEW_VOICEMAILS , true ) ; return android.app.PendingIntent.getActivity ( context , 0 , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }

Target:
private static android.app.PendingIntent newVoicemailIntent ( @ android.support.annotation.NonNull android.content.Context context , @ android.support.annotation.Nullable com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall voicemail ) { android.content.Intent intent = com.android.dialer.app.MainComponent.getShowVoicemailIntent ( context ) ; if ( voicemail != null ) { intent.setData ( voicemail.voicemailUri ) ; } intent.putExtra ( DialtactsActivity.EXTRA_CLEAR_NEW_VOICEMAILS , true ) ; return android.app.PendingIntent.getActivity ( context , 0 , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }
Source:
private static java.lang.reflect.Method getDumpHprofDataMethod ( ) { java.lang.ClassLoader myLoader = Main.class . getClassLoader ( ) ; java.lang.Class < ? > vmdClass ; try { vmdClass = myLoader.loadClass ( "dalvik.system.VMDebug" ) ; } catch ( java.lang.ClassNotFoundException cnfe ) { return null ; } java.lang.reflect.Method meth ; try { meth = vmdClass.getMethod ( "dumpHprofData" , java.lang.String.class ) ; } catch ( java.lang.NoSuchMethodException nsme ) { java.lang.System.err.println ( "Found VMDebug but not dumpHprofData method" ) ; return null ; } return meth ; }

Target:
private static java.lang.reflect.Method getDumpHprofDataMethod ( ) { java.lang.ClassLoader myLoader = Main.class . getClassLoader ( ) ; java.lang.Class < ? > vmdClass ; try { vmdClass = myLoader.loadClass ( "dalvik.system.VMDebug" ) ; } catch ( java.lang.ClassNotFoundException cnfe ) { return null ; } java.lang.reflect.Method meth ; try { meth = vmdClass.getMethod ( "dumpHprofData" , java.lang.String.class ) ; } catch ( java.lang.NoSuchMethodException nsme ) { java.lang.System.out.println ( "Found VMDebug but not dumpHprofData method" ) ; return null ; } return meth ; }
Source:
public static void checkStructure ( @ javax.annotation.CheckForNull java.io.File [ ] bootclasspath , @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourceList , boolean withDebugInfo , boolean compareInstructionNumber , float instructionNumberTolerance ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( bootclasspath , classpath , fileOrSourceList , withDebugInfo , compareInstructionNumber , instructionNumberTolerance , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }

Target:
public static void checkStructure ( @ javax.annotation.CheckForNull java.io.File [ ] classpath , @ javax.annotation.Nonnull java.io.File fileOrSourceList , boolean withDebugInfo , boolean compareInstructionNumber , float instructionNumberTolerance ) throws java.lang.Exception { com.android.jack.TestTools.checkStructure ( classpath , fileOrSourceList , withDebugInfo , compareInstructionNumber , instructionNumberTolerance , ( ( com.android.jack.JarJarRules ) ( null ) ) , ( ( com.android.jack.ProguardFlags [ ] ) ( null ) ) ) ; }
Source:
public static void checkContent ( @ com.android.annotations.NonNull java.io.File archive , @ com.android.annotations.NonNull java.lang.String path , @ com.android.annotations.NonNull java.lang.String content ) throws java.io.IOException { java.util.Map < java.lang.String , java.lang.String > pathToContent = java.util.Collections.singletonMap ( path , content ) ; com.android.build.gradle.integration.common.utils.ZipHelper.checkArchive ( archive , pathToContent , com.google.common.collect.ImmutableSet.< java.lang.String > of ( ) ) ; }

Target:
public static void checkContent ( @ com.android.annotations.NonNull java.io.File archive , @ com.android.annotations.NonNull java.lang.String path , @ com.android.annotations.NonNull byte [ ] content ) throws java.io.IOException { java.util.Map < java.lang.String , byte [ ] > pathToContent = java.util.Collections.singletonMap ( path , content ) ; com.android.build.gradle.integration.common.utils.ZipHelper.checkArchive ( archive , pathToContent , com.google.common.collect.ImmutableSet.< java.lang.String > of ( ) ) ; }
Source:
public void setBluetoothEnabled ( boolean enabled ) { boolean success = ( enabled ) ? mAdapter.enable ( ) : mAdapter.disable ( ) ; if ( success ) { setBluetoothStateInt ( ( enabled ? android.bluetooth.BluetoothAdapter.STATE_TURNING_ON : android.bluetooth.BluetoothAdapter.STATE_TURNING_OFF ) ) ; } else { if ( Utils.V ) { android.util.Log.v ( com.android.settingslib.bluetooth.LocalBluetoothAdapter.TAG , ( ( "setBluetoothEnabled call, manager didn't return " + "success for enabled: " ) + enabled ) ) ; } syncBluetoothState ( ) ; } }

Target:
public boolean setBluetoothEnabled ( boolean enabled ) { boolean success = ( enabled ) ? mAdapter.enable ( ) : mAdapter.disable ( ) ; if ( success ) { setBluetoothStateInt ( ( enabled ? android.bluetooth.BluetoothAdapter.STATE_TURNING_ON : android.bluetooth.BluetoothAdapter.STATE_TURNING_OFF ) ) ; } else { if ( Utils.V ) { android.util.Log.v ( com.android.settingslib.bluetooth.LocalBluetoothAdapter.TAG , ( ( "setBluetoothEnabled call, manager didn't return " + "success for enabled: " ) + enabled ) ) ; } syncBluetoothState ( ) ; } return success ; }
Source:
public void generateBuildConfig ( @ com.android.annotations.NonNull java.lang.String packageName , boolean debuggable , @ com.android.annotations.NonNull java.util.List < java.lang.String > javaLines , @ com.android.annotations.NonNull java.lang.String sourceOutputDir ) throws java.io.IOException { com.google.common.base.Preconditions.checkState ( ( ( mTarget ) != null ) , "Target not set." ) ; com.android.builder.internal.BuildConfigGenerator generator = new com.android.builder.internal.BuildConfigGenerator ( sourceOutputDir , packageName , debuggable ) ; generator.generate ( javaLines ) ; }

Target:
public void generateBuildConfig ( @ com.android.annotations.NonNull java.lang.String packageName , boolean debuggable , @ com.android.annotations.NonNull java.util.List < java.lang.String > javaLines , @ com.android.annotations.NonNull java.lang.String sourceOutputDir ) throws java.io.IOException { com.android.builder.internal.BuildConfigGenerator generator = new com.android.builder.internal.BuildConfigGenerator ( sourceOutputDir , packageName , debuggable ) ; generator.generate ( javaLines ) ; }
Source:
private static java.lang.String getDefaultSignatureAlgorithmForKeyType ( java.lang.String keyType ) { if ( "RSA" . equalsIgnoreCase ( keyType ) ) { return "sha256WithRSA" ; } else if ( "DSA" . equalsIgnoreCase ( keyType ) ) { return "sha1WithDSA" ; } else if ( "EC" . equalsIgnoreCase ( keyType ) ) { return "sha256WithECDSA" ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type " + keyType ) ) ; } }

Target:
private static java.lang.String getDefaultSignatureAlgorithmForKeyType ( java.lang.String keyType ) { if ( "RSA" . equalsIgnoreCase ( keyType ) ) { return "sha256WithRSA" ; } else if ( "EC" . equalsIgnoreCase ( keyType ) ) { return "sha256WithECDSA" ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported key type " + keyType ) ) ; } }
Source:
private static void checkOnTouchListener ( com.android.tools.lint.detector.api.ClassContext context , org.objectweb.asm.tree.ClassNode classNode ) { org.objectweb.asm.tree.MethodNode onTouchNode = com.android.tools.lint.checks.ClickableViewAccessibilityDetector.findMethod ( classNode.methods , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ON_TOUCH , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ON_TOUCH_SIG ) ; if ( onTouchNode != null ) { org.objectweb.asm.tree.AbstractInsnNode performClickInsnNode = com.android.tools.lint.checks.ClickableViewAccessibilityDetector.findMethodCallInstruction ( onTouchNode.instructions , com.android.SdkConstants.ANDROID_VIEW_VIEW , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.PERFORM_CLICK , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.PERFORM_CLICK_SIG ) ; if ( performClickInsnNode == null ) { java.lang.String message = java.lang.String.format ( "`%1$s#onTouch` should call `View#performClick` when a click is detected" , classNode.name ) ; context.report ( com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ISSUE , onTouchNode , null , context.getLocation ( onTouchNode , classNode ) , message , null ) ; } } }

Target:
private static void checkOnTouchListener ( com.android.tools.lint.detector.api.ClassContext context , org.objectweb.asm.tree.ClassNode classNode ) { org.objectweb.asm.tree.MethodNode onTouchNode = com.android.tools.lint.checks.ClickableViewAccessibilityDetector.findMethod ( classNode.methods , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ON_TOUCH , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ON_TOUCH_SIG ) ; if ( onTouchNode != null ) { org.objectweb.asm.tree.AbstractInsnNode performClickInsnNode = com.android.tools.lint.checks.ClickableViewAccessibilityDetector.findMethodCallInstruction ( onTouchNode.instructions , com.android.SdkConstants.ANDROID_VIEW_VIEW , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.PERFORM_CLICK , com.android.tools.lint.checks.ClickableViewAccessibilityDetector.PERFORM_CLICK_SIG ) ; if ( performClickInsnNode == null ) { java.lang.String message = java.lang.String.format ( "`%1$s#onTouch` should call `View#performClick` when a click is detected" , classNode.name ) ; context.report ( com.android.tools.lint.checks.ClickableViewAccessibilityDetector.ISSUE , onTouchNode , null , context.getLocation ( onTouchNode , classNode ) , message ) ; } } }
Source:
public boolean importKey ( java.lang.String keyName , byte [ ] key ) { try { return ( mBinder.import_key ( keyName , 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 ; } }

Target:
public boolean importKey ( java.lang.String keyName , byte [ ] key , int uid ) { try { return ( mBinder.import_key ( keyName , key , uid ) ) == ( 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:
private static void encodeSize ( com.android.jack.dx.dex.file.DexFile file , com.android.jack.dx.util.AnnotatedOutput out , java.lang.String label , int size ) { if ( out.annotates ( ) ) { out.annotate ( java.lang.String.format ( " %-21s %08x" , ( label + "_size:" ) , java.lang.Integer.valueOf ( size ) ) ) ; } out.writeUleb128 ( size ) ; }

Target:
private static void encodeSize ( com.android.jack.dx.util.AnnotatedOutput out , java.lang.String label , int size ) { if ( out.annotates ( ) ) { out.annotate ( java.lang.String.format ( " %-21s %08x" , ( label + "_size:" ) , java.lang.Integer.valueOf ( size ) ) ) ; } out.writeUleb128 ( size ) ; }
Source:
synchronized int nScriptGroupCreate ( int [ ] kernels , int [ ] src , int [ ] dstk , int [ ] dstf , int [ ] types ) { validate ( ) ; return rsnScriptGroupCreate ( mContext , kernels , src , dstk , dstf , types ) ; }

Target:
synchronized long nScriptGroupCreate ( long [ ] kernels , long [ ] src , long [ ] dstk , long [ ] dstf , long [ ] types ) { validate ( ) ; return rsnScriptGroupCreate ( mContext , kernels , src , dstk , dstf , types ) ; }
Source:
public void testEscapeStringShouldEscapeXmlSpecialCharacters ( ) throws java.lang.Exception { assertEquals ( "&lt;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "<" ) ) ; assertEquals ( "&amp;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "&" ) ) ; }

Target:
public void testEscapeStringShouldEscapeXmlSpecialCharacters ( ) throws java.lang.Exception { assertEquals ( "&lt;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "<" ) ) ; assertEquals ( "&amp;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "&" ) ) ; assertEquals ( "&lt;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "<" , true ) ) ; assertEquals ( "&amp;" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "&" , true ) ) ; assertEquals ( "<" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "<" , false ) ) ; assertEquals ( "&" , com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( "&" , false ) ) ; }
Source:
protected void printMethodHeader ( com.android.jack.ir.ast.JMethod x ) { printAnnotationLiterals ( x.getAnnotations ( ) ) ; print ( com.android.jack.ir.ast.JModifier.getStringMethodModifier ( x.getModifier ( ) ) ) ; printType ( x ) ; space ( ) ; printName ( x ) ; printParameterList ( x ) ; }

Target:
protected void printMethodHeader ( com.android.jack.ir.ast.JMethod x ) { print ( com.android.jack.ir.ast.JModifier.getStringMethodModifier ( x.getModifier ( ) ) ) ; printType ( x ) ; space ( ) ; printName ( x ) ; printParameterList ( x ) ; }
Source:
private static void setWifiCountryCodeFromMcc ( android.content.Context context , int mcc ) { java.lang.String country = com.android.internal.telephony.MccTable.countryCodeForMcc ( mcc ) ; android.util.Slog.d ( com.android.internal.telephony.MccTable.LOG_TAG , ( "WIFI_COUNTRY_CODE set to " + country ) ) ; android.net.wifi.WifiManager wM = ( ( android.net.wifi.WifiManager ) ( context.getSystemService ( Context.WIFI_SERVICE ) ) ) ; wM.setCountryCode ( country , true ) ; }

Target:
private static void setWifiCountryCodeFromMcc ( android.content.Context context , int mcc ) { java.lang.String country = com.android.internal.telephony.MccTable.countryCodeForMcc ( mcc ) ; android.util.Slog.d ( com.android.internal.telephony.MccTable.LOG_TAG , ( "WIFI_COUNTRY_CODE set to " + country ) ) ; android.net.wifi.WifiManager wM = ( ( android.net.wifi.WifiManager ) ( context.getSystemService ( Context.WIFI_SERVICE ) ) ) ; wM.setCountryCode ( country , false ) ; }
Source:
public boolean enterIf ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( enter ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } return satisfied ; }

Target:
public boolean enterIf ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } if ( ! ( enter ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
public int getCdmaEriIconIndexForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getCdmaEriIconIndexForSubscriber" ) ) ) { return - 1 ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getCdmaEriIconIndex ( ) ; } else { return - 1 ; } }

Target:
public int getCdmaEriIconIndexForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getCdmaEriIconIndexForSubscriber" ) ) ) { return - 1 ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getCdmaEriIconIndex ( ) ; } else { return - 1 ; } }
Source:
public void run ( ) { mFilterText = "" ; com.android.hierarchyviewerlib.device.IHvDevice hvDevice = window.getHvDevice ( ) ; com.android.hierarchyviewerlib.models.ViewNode viewNode = hvDevice.loadWindowData ( window ) ; if ( viewNode != null ) { hvDevice.loadProfileData ( window , viewNode ) ; viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } }

Target:
public void run ( ) { mFilterText = "" ; com.android.hierarchyviewerlib.device.IHvDevice hvDevice = window.getHvDevice ( ) ; com.android.hierarchyviewerlib.models.ViewNode viewNode = hvDevice.loadWindowData ( window ) ; if ( viewNode != null ) { viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } }
Source:
public com.android.ide.common.layoutlib.LayoutLibrary getLayoutLibrary ( ) { com.android.sdklib.IAndroidTarget target = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTarget ( mEditedFile.getProject ( ) ) ; if ( target != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTargetData ( target ) ; if ( data != null ) { com.android.ide.common.layoutlib.LayoutLibrary layoutLib = data.getLayoutLibrary ( ) ; return layoutLib ; } } return null ; }

Target:
public com.android.ide.common.layoutlib.LayoutLibrary getLayoutLibrary ( ) { com.android.sdklib.IAndroidTarget target = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTarget ( mEditedFile.getProject ( ) ) ; if ( target != null ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTargetData ( target ) ; if ( data != null ) { return data.getLayoutLibrary ( ) ; } } return null ; }
Source:
protected void onScrollChanged ( int l , int t , int oldl , int oldt ) { if ( android.view.accessibility.AccessibilityManager.getInstance ( mContext ) . isEnabled ( ) ) { postSendViewScrolledAccessibilityEventCallback ( ) ; } mBackgroundSizeChanged = true ; final android.view.View.AttachInfo ai = mAttachInfo ; if ( ai != null ) { ai.mViewScrollChanged = true ; } if ( ( ( mListenerInfo ) != null ) && ( ( mListenerInfo.mOnScrollChangeListener ) != null ) ) { mListenerInfo.mOnScrollChangeListener.onScrollChange ( this , l , t , oldl , oldt ) ; } }

Target:
protected void onScrollChanged ( int l , int t , int oldl , int oldt ) { if ( android.view.accessibility.AccessibilityManager.getInstance ( mContext ) . isEnabled ( ) ) { postSendViewScrolledAccessibilityEventCallback ( ) ; } mBackgroundSizeChanged = true ; final android.view.View.AttachInfo ai = mAttachInfo ; if ( ai != null ) { ai.mViewScrollChanged = true ; } }
Source:
private void checkTimeZoneParsingErrorIndex ( java.text.SimpleDateFormat dateFormat ) { java.text.ParsePosition pos = new java.text.ParsePosition ( 0 ) ; java.util.Date parsed ; parsed = dateFormat.parse ( "2000 foobar" , pos ) ; assertNull ( parsed ) ; assertEquals ( "Wrong error index" , 5 , pos.getErrorIndex ( ) ) ; BRANCH ( 8 ) ; libcore.java.text.a1bf8 Merge ; }

Target:
private void checkTimeZoneParsingErrorIndex ( java.text.SimpleDateFormat dateFormat ) { java.text.ParsePosition pos = new java.text.ParsePosition ( 0 ) ; java.util.Date parsed ; parsed = dateFormat.parse ( "2000 foobar" , pos ) ; assertNull ( parsed ) ; assertEquals ( "Wrong error index" , 5 , pos.getErrorIndex ( ) ) ; }