auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void writeContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.JayceInternalWriterImpl out ) throws java.io.IOException { out.writeInt ( modifiers ) ; out.writeId ( signature ) ; out.writeId ( superClass ) ; out.writeIds ( superInterfaces ) ; out.writeId ( enclosingType ) ; out.writeId ( enclosingMethodClass ) ; out.writeId ( enclosingMethod ) ; out.writeIds ( inners ) ; out.writeNodes ( fields ) ; out.writeNodes ( methods ) ; out.writeNodes ( annotations ) ; out.writeNodes ( markers ) ; }

Target:
public void writeContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0004.io.JayceInternalWriterImpl out ) throws java.io.IOException { out.writeInt ( modifiers ) ; out.writeId ( signature ) ; out.writeId ( superClass ) ; out.writeIds ( superInterfaces ) ; out.writeId ( enclosingType ) ; out.writeId ( enclosingMethodClass ) ; out.writeId ( enclosingMethod ) ; out.writeIds ( inners ) ; out.writeNodes ( getFields ( ) ) ; out.writeNodes ( getMethods ( ) ) ; out.writeNodes ( annotations ) ; out.writeNodes ( markers ) ; }
Source:
public final void dumpSizes ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.mInstances.get ( getId ( ) ) ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }

Target:
public final void dumpSizes ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.getHeapInstances ( getId ( ) ) ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }
Source:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; getEditor ( ) . getSite ( ) . getSelectionProvider ( ) . setSelection ( selection ) ; if ( getEditor ( ) . getIgnoreXmlUpdate ( ) ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager manager = mGraphicalEditor.getCanvasControl ( ) . getSelectionManager ( ) ; manager.setSelection ( selection ) ; }

Target:
public void selectionChanged ( org.eclipse.ui.IWorkbenchPart part , org.eclipse.jface.viewers.ISelection selection ) { if ( getEditor ( ) . isEditorPageActive ( ) ) { mCheckOutlineAdapter = true ; } }
Source:
private void assertContainsNoneMatching ( java.util.List < java.lang.String > headers , java.lang.String pattern ) { for ( java.lang.String header : headers ) { if ( header.matches ( pattern ) ) { fail ( ( ( ( "Header " + header ) + " matches " ) + pattern ) ) ; } } }

Target:
private void assertContainsNoneMatching ( java.util.List < java.lang.String > list , java.lang.String pattern ) { for ( java.lang.String header : list ) { if ( header.matches ( pattern ) ) { fail ( ( ( ( "Header " + header ) + " matches " ) + pattern ) ) ; } } }
Source:
android.net.NetworkCapabilities expectCapabilitiesWith ( int capability , com.android.server.ConnectivityServiceTest.MockNetworkAgent agent ) { com.android.server.ConnectivityServiceTest.CallbackInfo cbi = expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.NETWORK_CAPABILITIES , agent ) ; android.net.NetworkCapabilities nc = ( ( android.net.NetworkCapabilities ) ( cbi.arg ) ) ; org.junit.Assert.assertTrue ( nc.hasCapability ( capability ) ) ; return nc ; }

Target:
android.net.NetworkCapabilities expectCapabilitiesWith ( int capability , com.android.server.ConnectivityServiceTest.MockNetworkAgent agent , int timeoutMs ) { com.android.server.ConnectivityServiceTest.CallbackInfo cbi = expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.NETWORK_CAPABILITIES , agent , timeoutMs ) ; android.net.NetworkCapabilities nc = ( ( android.net.NetworkCapabilities ) ( cbi.arg ) ) ; org.junit.Assert.assertTrue ( nc.hasCapability ( capability ) ) ; return nc ; }
Source:
private com.android.jack.dx.rop.type.TypeList getInterfacesList ( @ javax.annotation.Nonnull com.android.jack.dx.io.ClassDef classDefToMerge , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { int interfaceCount = classDefToMerge.getInterfaces ( ) . length ; if ( interfaceCount == 0 ) { return com.android.jack.dx.rop.type.StdTypeList.EMPTY ; } com.android.jack.dx.rop.type.StdTypeList interfaceList = new com.android.jack.dx.rop.type.StdTypeList ( interfaceCount ) ; int idx = 0 ; for ( int interfaceIdx : classDefToMerge.getInterfaces ( ) ) { interfaceList.set ( ( idx ++ ) , cstIndexMap.getCstType ( interfaceIdx ) . getClassType ( ) ) ; } return interfaceList ; }

Target:
private com.android.jack.dx.rop.type.TypeList getInterfacesList ( @ javax.annotation.Nonnull com.android.jack.dx.io.ClassDef classDefToMerge , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { int interfaceCount = classDefToMerge.getInterfaces ( ) . length ; if ( interfaceCount == 0 ) { return com.android.jack.dx.rop.type.StdTypeList.EMPTY ; } com.android.jack.dx.rop.type.StdTypeList interfaceList = new com.android.jack.dx.rop.type.StdTypeList ( interfaceCount ) ; int idx = 0 ; for ( int interfaceIdx : classDefToMerge.getInterfaces ( ) ) { interfaceList.set ( ( idx ++ ) , cstIndexMap.getType ( interfaceIdx ) ) ; } return interfaceList ; }
Source:
public static java.nio.ByteBuffer wrap ( byte [ ] array , int start , int byteCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , byteCount ) ; java.nio.ByteBuffer buf = new java.nio.ReadWriteHeapByteBuffer ( array ) ; buf.position = start ; buf.limit = start + byteCount ; return buf ; }

Target:
public static java.nio.ByteBuffer wrap ( byte [ ] array , int start , int byteCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , byteCount ) ; java.nio.ByteBuffer buf = new java.nio.ByteArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + byteCount ; return buf ; }
Source:
public void testStringFromCharset ( ) { java.nio.charset.Charset cs = java.nio.charset.Charset.forName ( "UTF-8" ) ; byte [ ] bytes = new byte [ ] { ( ( byte ) ( 'h' ) ) , ( ( byte ) ( 'i' ) ) } ; assertEquals ( "hi" , new java.lang.String ( bytes , cs ) ) ; }

Target:
public void testString_BIICharset ( ) throws java.lang.Exception { byte [ ] bytes = "xa٦bx" . getBytes ( "UTF-8" ) ; assertEquals ( "a٦b" , new java.lang.String ( bytes , 1 , ( ( bytes.length ) - 2 ) , java.nio.charset.Charset.forName ( "UTF-8" ) ) ) ; }
Source:
private void updateEnclosingType ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { com.android.jack.ir.ast.JClassOrInterface enclosingType = type.getEnclosingType ( ) ; while ( enclosingType instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { if ( ( ( ( com.android.jack.ir.ast.JNode ) ( enclosingType ) ) . containsMarker ( com.android.jack.shrob.shrink.KeepMarker.class ) ) || ( enclosingType.isExternal ( ) ) ) { break ; } enclosingType = ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( enclosingType ) ) . getEnclosingType ( ) ; } type.setEnclosingType ( enclosingType ) ; }

Target:
protected boolean isPlannedForRemoval ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { return ( ! ( method.isExternal ( ) ) ) && ( ! ( ( ( com.android.jack.ir.ast.JNode ) ( method ) ) . containsMarker ( com.android.jack.shrob.shrink.KeepMarker.class ) ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Klass" ) ; java.lang.Object o = c.newInstance ( ) ; java.lang.Class < ? > iface = java.lang.Class.forName ( "Iface2" ) ; java.lang.reflect.Method test = c.getMethod ( "testMe" , iface ) ; test.invoke ( null , o ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; java.lang.System.out.println ( "FAILED: could not run testMe!" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Klass" ) ; java.lang.Object o = c.newInstance ( ) ; java.lang.Class < ? > iface = java.lang.Class.forName ( "Iface2" ) ; java.lang.reflect.Method test = c.getMethod ( "testMe" , iface ) ; test.invoke ( null , o ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( java.lang.System.out ) ; java.lang.System.out.println ( "FAILED: could not run testMe!" ) ; } }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { init ( opmode , key , random ) ; initAlgorithmSpecificParameters ( params ) ; ensureKeystoreOperationInitialized ( ) ; }

Target:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { resetAll ( ) ; boolean success = false ; try { init ( opmode , key , random ) ; initAlgorithmSpecificParameters ( params ) ; ensureKeystoreOperationInitialized ( ) ; success = true ; } finally { if ( ! success ) { resetAll ( ) ; } } }
Source:
public static com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator create ( boolean allowXmlExtension , java.util.Set < java.lang.String > existing , com.android.resources.ResourceType type ) { boolean isFileType = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.isFileBasedResourceType ( type ) ; return new com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator ( allowXmlExtension , existing , isFileType , ( type == ( com.android.resources.ResourceType.DRAWABLE ) ) ) ; }

Target:
public static com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator create ( boolean allowXmlExtension , java.util.Set < java.lang.String > existing , com.android.resources.ResourceType type ) { boolean isFileType = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.isFileBasedResourceType ( type ) ; return new com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator ( allowXmlExtension , existing , isFileType , ( type == ( com.android.resources.ResourceType.DRAWABLE ) ) ) . unique ( ) ; }
Source:
public void sendCdmaSms ( byte [ ] pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SEND_SMS , result ) ; constructCdmaSendSmsRilRequest ( rr , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilSendSms ( mInstanceId , rr.mSerial , SmsSession.Event.Tech.SMS_CDMA , SmsSession.Event.Format.SMS_FORMAT_3GPP2 ) ; send ( rr ) ; }

Target:
public void sendCdmaSms ( byte [ ] pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SEND_SMS , result , mRILDefaultWorkSource ) ; constructCdmaSendSmsRilRequest ( rr , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilSendSms ( mInstanceId , rr.mSerial , SmsSession.Event.Tech.SMS_CDMA , SmsSession.Event.Format.SMS_FORMAT_3GPP2 ) ; send ( rr ) ; }
Source:
public void testHasBackground ( ) { android.view.View viewWithBackground = new android.view.View ( context ) ; viewWithBackground.setBackground ( context.getDrawable ( R.drawable.drawable_1 ) ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasBackground ( R.drawable.drawable_1 ) . matches ( viewWithBackground ) ) ; }

Target:
public void firstMatchesByGivenMatcher ( ) { android.view.View firstViewWithId1 = createViewWithId ( R.id.testId1 ) ; android.view.View secondViewWithId1 = createViewWithId ( R.id.testId1 ) ; org.hamcrest.Matcher < android.view.View > id1FirstOccurrenceMatcher = android.support.test.espresso.matcher.ViewMatchers.thatMatchesFirst ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.testId1 ) ) ; org.junit.Assert.assertTrue ( id1FirstOccurrenceMatcher.matches ( firstViewWithId1 ) ) ; org.junit.Assert.assertFalse ( id1FirstOccurrenceMatcher.matches ( secondViewWithId1 ) ) ; org.junit.Assert.assertTrue ( id1FirstOccurrenceMatcher.matches ( firstViewWithId1 ) ) ; }
Source:
private static int julianDay ( java.util.Calendar c ) { long utcMs = ( c.get ( java.util.Calendar.MILLISECOND ) ) + ( c.get ( java.util.Calendar.ZONE_OFFSET ) ) ; return ( ( int ) ( utcMs / ( libcore.icu.DateIntervalFormat.DAY_IN_MS ) ) ) + ( libcore.icu.DateIntervalFormat.EPOCH_JULIAN_DAY ) ; }

Target:
private static int julianDay ( java.util.Calendar c ) { long utcMs = ( ( c.getTimeInMillis ( ) ) + ( c.get ( java.util.Calendar.ZONE_OFFSET ) ) ) + ( c.get ( java.util.Calendar.DST_OFFSET ) ) ; return ( ( int ) ( utcMs / ( libcore.icu.DateIntervalFormat.DAY_IN_MS ) ) ) + ( libcore.icu.DateIntervalFormat.EPOCH_JULIAN_DAY ) ; }
Source:
public static android.renderscript.AllocationAdapter create2D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.AllocationAdapter aa = new android.renderscript.AllocationAdapter ( 0 , rs , a ) ; aa.mConstrainedLOD = true ; aa.mConstrainedFace = true ; aa.mConstrainedY = false ; aa.mConstrainedZ = true ; aa.initLOD ( 0 ) ; return aa ; }

Target:
public static android.renderscript.AllocationAdapter create1D ( android.renderscript.RenderScript rs , android.renderscript.Allocation a ) { rs.validate ( ) ; android.renderscript.Type t = android.renderscript.Type.createX ( rs , a.getElement ( ) , a.getType ( ) . getX ( ) ) ; return android.renderscript.AllocationAdapter.createTyped ( rs , a , t ) ; }
Source:
public void testCallVoicemail ( ) { try { android.content.Intent intent = new android.content.Intent ( "android.intent.action.CALL_PRIVILEGED" , android.net.Uri.fromParts ( "voicemail" , "" , null ) ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; fail ( "startActivity(Intent.ACTION_CALL_PRIVILEGED) did not throw SecurityException as expected" ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testCallVoicemail ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { try { android.content.Intent intent = new android.content.Intent ( "android.intent.action.CALL_PRIVILEGED" , android.net.Uri.fromParts ( "voicemail" , "" , null ) ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; fail ( "startActivity(Intent.ACTION_CALL_PRIVILEGED) did not throw SecurityException as expected" ) ; } catch ( java.lang.SecurityException e ) { } } }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String value = attribute.getValue ( ) ; if ( ( ( value.length ( ) ) > 0 ) && ( ( ( value.charAt ( 0 ) ) != '@' ) && ( ( value.charAt ( 0 ) ) != '?' ) ) ) { if ( ! ( com.android.SdkConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { return ; } context.report ( com.android.tools.lint.checks.HardcodedValuesDetector.ISSUE , attribute , context.getLocation ( attribute ) , java.lang.String.format ( "[I18N] Hardcoded string \"%1$s\", should use @string resource" , value ) , null ) ; } }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String value = attribute.getValue ( ) ; if ( ( ! ( value.isEmpty ( ) ) ) && ( ( ( value.charAt ( 0 ) ) != '@' ) && ( ( value.charAt ( 0 ) ) != '?' ) ) ) { if ( ! ( com.android.SdkConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { return ; } context.report ( com.android.tools.lint.checks.HardcodedValuesDetector.ISSUE , attribute , context.getLocation ( attribute ) , java.lang.String.format ( "[I18N] Hardcoded string \"%1$s\", should use @string resource" , value ) , null ) ; } }
Source:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.ERROR ) { android.util.Log.e ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }

Target:
public static void w ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.WARN ) { android.util.Slog.w ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }
Source:
public com.intellij.openapi.project.Project getProject ( com.intellij.psi.PsiElement element ) { com.intellij.openapi.project.Project project ; try { project = element.getContainingFile ( ) . getProject ( ) ; if ( project == null ) { return null ; } } catch ( com.intellij.psi.PsiInvalidElementAccessException e ) { com.google.gct.intellij.endpoints.validation.EndpointInspectionBase.LOG.error ( ( "Error getting project with annotation " + ( element.getText ( ) ) ) , e ) ; return null ; } return project ; }

Target:
public com.intellij.openapi.project.Project getProject ( com.intellij.psi.PsiElement element ) { com.intellij.openapi.project.Project project ; try { project = element.getContainingFile ( ) . getProject ( ) ; if ( project == null ) { return null ; } } catch ( com.intellij.psi.PsiInvalidElementAccessException e ) { com.google.gct.idea.appengine.validation.EndpointInspectionBase.LOG.error ( ( "Error getting project with annotation " + ( element.getText ( ) ) ) , e ) ; return null ; } return project ; }
Source:
public void iccOpenLogicalChannel ( java.lang.String AID , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_OPEN_CHANNEL , response ) ; rr.mParcel.writeString ( AID ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void iccOpenLogicalChannel ( java.lang.String AID , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SIM_OPEN_CHANNEL , response , mRILDefaultWorkSource ) ; rr.mParcel.writeString ( AID ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public void test_writeUTF_too_long ( ) throws java.lang.Exception { java.lang.String tooLong = new java.lang.String ( new char [ 65536 ] ) ; try { os.writeUTF ( tooLong ) ; fail ( "should throw UTFDataFormatException" ) ; } catch ( java.io.UTFDataFormatException expected ) { } assertEquals ( "" , libcore.util.HexEncoding.encodeToString ( bytes.toByteArray ( ) ) ) ; }

Target:
public void test_writeUTF_too_long ( ) throws java.lang.Exception { java.lang.String tooLong = new java.lang.String ( new char [ 65536 ] ) ; try { os.writeUTF ( tooLong ) ; fail ( "should throw UTFDataFormatException" ) ; } catch ( java.io.UTFDataFormatException expected ) { } assertEquals ( "[]" , libcore.java.io.DataOutputStreamTest.toHexString ( bytes.toByteArray ( ) ) ) ; }
Source:
public static android.hardware.cts.helpers.sensorverification.EventOrderingVerification getDefault ( android.hardware.Sensor sensor ) { switch ( sensor.getType ( ) ) { case android.hardware.Sensor.TYPE_ACCELEROMETER : case android.hardware.Sensor.TYPE_MAGNETIC_FIELD : case android.hardware.Sensor.TYPE_ORIENTATION : case android.hardware.Sensor.TYPE_GYROSCOPE : case android.hardware.Sensor.TYPE_PRESSURE : case android.hardware.Sensor.TYPE_GRAVITY : case android.hardware.Sensor.TYPE_LINEAR_ACCELERATION : case android.hardware.Sensor.TYPE_ROTATION_VECTOR : case android.hardware.Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED : case android.hardware.Sensor.TYPE_GAME_ROTATION_VECTOR : case android.hardware.Sensor.TYPE_GYROSCOPE_UNCALIBRATED : case android.hardware.Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR : return new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; default : return null ; } }

Target:
public static android.hardware.cts.helpers.sensorverification.EventOrderingVerification getDefault ( android.hardware.Sensor sensor ) { android.hardware.cts.helpers.SensorTestInformation.SensorReportingMode mode = android.hardware.cts.helpers.SensorTestInformation.getReportingMode ( sensor.getType ( ) ) ; if ( ( ! ( SensorReportingMode.CONTINUOUS.equals ( mode ) ) ) && ( ! ( SensorReportingMode.ON_CHANGE.equals ( mode ) ) ) ) { return null ; } return new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; }
Source:
com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt ( int x , int y ) { if ( ( mLastValidViewInfoRoot ) == null ) { return null ; } else { return findViewInfoAt ( x , y , mLastValidViewInfoRoot ) ; } }

Target:
private com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoKey ( java.lang.Object viewKey , com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { if ( canvasViewInfo == null ) { return null ; } if ( ( canvasViewInfo.getUiViewKey ( ) ) == viewKey ) { return canvasViewInfo ; } for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : canvasViewInfo.getChildren ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo v = findViewInfoKey ( viewKey , child ) ; if ( v != null ) { return v ; } } return null ; }
Source:
private static java.util.Collection < java.util.List < ? > > decodeGeneralNames ( org.apache.harmony.security.x509.Extension extension ) throws java.io.IOException { if ( extension == null ) { return null ; } java.util.Collection < java.util.List < ? > > collection = ( ( org.apache.harmony.security.x509.GeneralNames ) ( GeneralNames.ASN1.decode ( extension.getExtnValue ( ) ) ) ) . getPairsList ( ) ; if ( ( collection.size ( ) ) == 0 ) { return null ; } return java.util.Collections.unmodifiableCollection ( collection ) ; }

Target:
private static java.util.Collection < java.util.List < ? > > decodeGeneralNames ( org.apache.harmony.security.x509.Extension extension ) throws java.io.IOException { if ( extension == null ) { return null ; } java.util.Collection < java.util.List < ? > > collection = ( ( org.apache.harmony.security.x509.GeneralNames ) ( GeneralNames.ASN1.decode ( extension.getValue ( ) ) ) ) . getPairsList ( ) ; if ( ( collection.size ( ) ) == 0 ) { return null ; } return java.util.Collections.unmodifiableCollection ( collection ) ; }
Source:
public java.lang.String findLibrary ( java.lang.String libraryName ) { java.lang.String fileName = java.lang.System.mapLibraryName ( libraryName ) ; for ( java.io.File directory : nativeLibraryDirectories ) { java.lang.String path = new java.io.File ( directory , fileName ) . getPath ( ) ; if ( libcore.io.IoUtils.canOpenReadOnly ( path ) ) { return path ; } } return null ; }

Target:
public java.lang.String findLibrary ( java.lang.String libraryName ) { java.lang.String fileName = java.lang.System.mapLibraryName ( libraryName ) ; for ( dalvik.system.DexPathList.Element element : nativeLibraryPathElements ) { java.lang.String path = element.findNativeLibrary ( fileName ) ; if ( path != null ) { return path ; } } return null ; }
Source:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APPNAME , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; mLastUsedDevice = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , "" ) ; }

Target:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; mAppPackageToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , "" ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; mLastUsedDevice = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , "" ) ; }
Source:
public com.android.sched.vfs.OutputVFile getBinaryOutputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath , @ javax.annotation.Nonnull com.android.jack.library.BinaryKind binaryKind ) throws com.android.sched.util.file.CannotCreateFileException { if ( binaryKind == ( com.android.jack.library.BinaryKind.DEX ) ) { putProperty ( DexProperties.KEY_DEX , java.lang.String.valueOf ( true ) ) ; } return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( ( ( typePath.getPathAsString ( '/' ) ) + ( binaryKind.getFileExtension ( ) ) ) , '/' ) ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyName ( ) , java.lang.String.valueOf ( true ) ) ; return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( ( ( typePath.getPathAsString ( '/' ) ) + ( fileType.getFileExtension ( ) ) ) , '/' ) ) ; }
Source:
public java.util.concurrent.ScheduledFuture < ? > schedule ( java.lang.Runnable command , long delay , java.util.concurrent.TimeUnit unit ) { return delegate.schedule ( command , delay , unit ) ; }

Target:
public com.google.common.util.concurrent.ListenableScheduledFuture < ? > scheduleWithFixedDelay ( java.lang.Runnable command , long initialDelay , long delay , java.util.concurrent.TimeUnit unit ) { com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.NeverSuccessfulListenableFutureTask task = new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.NeverSuccessfulListenableFutureTask ( command ) ; java.util.concurrent.ScheduledFuture < ? > scheduled = delegate.scheduleWithFixedDelay ( task , initialDelay , delay , unit ) ; return new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.ListenableScheduledTask < java.lang.Void > ( task , scheduled ) ; }
Source:
public void publish ( @ android.annotation.Nullable android.os.Handler handler , @ android.annotation.NonNull android.net.wifi.nan.PublishConfig publishConfig , @ android.annotation.NonNull android.net.wifi.nan.WifiNanDiscoverySessionCallback callback ) { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.e ( android.net.wifi.nan.WifiNanSession.TAG , "publish: called post GC on WifiNanManager" ) ; return ; } if ( mTerminated ) { android.util.Log.e ( android.net.wifi.nan.WifiNanSession.TAG , "publish: called after termination" ) ; return ; } mgr.publish ( mClientId , ( handler == null ? android.os.Looper.getMainLooper ( ) : handler.getLooper ( ) ) , publishConfig , callback ) ; }

Target:
public void publish ( @ android.annotation.Nullable android.os.Handler handler , @ android.annotation.NonNull android.net.wifi.aware.PublishConfig publishConfig , @ android.annotation.NonNull android.net.wifi.aware.WifiAwareDiscoverySessionCallback callback ) { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "publish: called post GC on WifiAwareManager" ) ; return ; } if ( mTerminated ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "publish: called after termination" ) ; return ; } mgr.publish ( mClientId , ( handler == null ? android.os.Looper.getMainLooper ( ) : handler.getLooper ( ) ) , publishConfig , callback ) ; }
Source:
private void onCallEnteringState ( com.android.server.telecom.Call call , int state ) { switch ( state ) { case CallState.ACTIVE : case CallState.CONNECTING : onCallEnteringActiveDialingOrConnecting ( ) ; break ; case CallState.RINGING : onCallEnteringRinging ( ) ; break ; case CallState.ON_HOLD : onCallEnteringHold ( ) ; break ; case CallState.DIALING : onCallEnteringActiveDialingOrConnecting ( ) ; playRingbackForCall ( call ) ; break ; } }

Target:
private void onCallEnteringState ( com.android.server.telecom.Call call , int state ) { switch ( state ) { case CallState.ACTIVE : case CallState.CONNECTING : onCallEnteringActiveDialingOrConnecting ( ) ; break ; case CallState.RINGING : onCallEnteringRinging ( ) ; break ; case CallState.ON_HOLD : onCallEnteringHold ( ) ; break ; case CallState.PULLING : onCallEnteringActiveDialingOrConnecting ( ) ; break ; case CallState.DIALING : onCallEnteringActiveDialingOrConnecting ( ) ; playRingbackForCall ( call ) ; break ; } }
Source:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.dependency.AndroidDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; for ( com.android.builder.dependency.JarDependency jarDependency : lib.getLocalDependencies ( ) ) { classpath.add ( jarDependency.getJarFile ( ) ) ; } } for ( com.android.builder.dependency.JarDependency jar : mJars ) { if ( jar.isCompiled ( ) ) { classpath.add ( jar.getJarFile ( ) ) ; } } return classpath ; }

Target:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.dependency.LibraryDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; for ( com.android.builder.dependency.JarDependency jarDependency : lib.getLocalDependencies ( ) ) { classpath.add ( jarDependency.getJarFile ( ) ) ; } } for ( com.android.builder.dependency.JarDependency jar : mJars ) { if ( jar.isCompiled ( ) ) { classpath.add ( jar.getJarFile ( ) ) ; } } return classpath ; }
Source:
public java.lang.String toString ( ) { java.lang.String result ; if ( ( mListener ) != null ) { result = ( ( ( "Receiver{" + ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( this ) ) ) ) + " Listener " ) + ( mKey ) ) + "}" ; } else { result = ( ( ( "Receiver{" + ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( this ) ) ) ) + " Intent " ) + ( mKey ) ) + "}" ; } result += "mUpdateRecords: " + ( mUpdateRecords ) ; return result ; }

Target:
public boolean providerMeetsCriteria ( java.lang.String provider , android.location.Criteria criteria ) { com.android.server.location.LocationProviderInterface p = mProvidersByName.get ( provider ) ; if ( p == null ) { throw new java.lang.IllegalArgumentException ( ( "provider=" + provider ) ) ; } boolean result = android.location.LocationProvider.propertiesMeetCriteria ( p.getName ( ) , p.getProperties ( ) , criteria ) ; if ( com.android.server.LocationManagerService.D ) android.util.Log.d ( com.android.server.LocationManagerService.TAG , ( ( ( ( ( "providerMeetsCriteria(" + provider ) + ", " ) + criteria ) + ")=" ) + result ) ) ; return result ; }
Source:
public boolean p2pGroupRemove ( java.lang.String iface ) { if ( android.text.TextUtils.isEmpty ( iface ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.groupRemove ( iface ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " P2P_GROUP_REMOVE " ) + iface ) ) ; } } }

Target:
public boolean p2pGroupRemove ( java.lang.String iface ) { if ( android.text.TextUtils.isEmpty ( iface ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.groupRemove ( iface ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " P2P_GROUP_REMOVE " ) + iface ) ) ; } } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ! ( o instanceof org.conscrypt.OpenSSLECPointContext ) ) { return false ; } final org.conscrypt.OpenSSLECPointContext other = ( ( org.conscrypt.OpenSSLECPointContext ) ( o ) ) ; if ( ! ( org.conscrypt.NativeCrypto.EC_GROUP_cmp ( group.getContext ( ) , other.group.getContext ( ) ) ) ) { return false ; } return org.conscrypt.NativeCrypto.EC_POINT_cmp ( group.getContext ( ) , pointCtx , other.pointCtx ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ! ( o instanceof org.conscrypt.OpenSSLECPointContext ) ) { return false ; } final org.conscrypt.OpenSSLECPointContext other = ( ( org.conscrypt.OpenSSLECPointContext ) ( o ) ) ; if ( ! ( org.conscrypt.NativeCrypto.EC_GROUP_cmp ( group.getNativeRef ( ) , other.group.getNativeRef ( ) ) ) ) { return false ; } return org.conscrypt.NativeCrypto.EC_POINT_cmp ( group.getNativeRef ( ) , pointCtx , other.pointCtx ) ; }
Source:
public boolean startWpsPinKeypad ( java.lang.String iface , java.lang.String pin ) { if ( android.text.TextUtils.isEmpty ( pin ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPinKeypad ( iface , pin ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PIN any " ) + pin ) ) ; } } }

Target:
public boolean startWpsPinKeypad ( java.lang.String iface , java.lang.String pin ) { if ( android.text.TextUtils.isEmpty ( pin ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPinKeypad ( iface , pin ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PIN any " ) + pin ) ) ; } } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( ( type.containsMarker ( MultiDexLegacyTracerBrush.TracerMarker.class ) ) && ( ( ! ( isShrinkEnabled ) ) || ( type.containsMarker ( com.android.jack.shrob.shrink.KeepMarker.class ) ) ) ) { collect ( type ) ; accept ( type ) ; } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( ( type.containsMarker ( MultiDexLegacyTracerBrush.TracerMarker.class ) ) && ( ( ! ( isShrinkEnabled ) ) || ( type.containsMarker ( com.android.jack.shrob.shrink.KeepMarker.class ) ) ) ) { collect ( type ) ; accept ( type ) ; } else if ( type.containsMarker ( com.android.jack.backend.dex.ForceInMainDexMarker.class ) ) { collect ( type ) ; } }
Source:
public void systemReady ( ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onSystemReady ( ) ; } synchronized ( mLock ) { updateOrientationListenerLp ( ) ; mSystemReady = true ; mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { updateSettings ( ) ; } } ) ; } }

Target:
public void exitKeyguardSecurely ( com.android.internal.policy.impl.OnKeyguardExitResult callback ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.verifyUnlock ( callback ) ; } }
Source:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res , densityDpi ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }

Target:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final int densityDpi = mResources.getConfiguration ( ) . densityDpi ; try { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( mResources , densityDpi ) ; verifyPreloadDensityInner ( mResources , densityDpi ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( mResources , densityDpi ) ; } }
Source:
public void reject ( boolean rejectWithMessage , java.lang.String textMessage ) { com.android.internal.util.Preconditions.checkNotNull ( mConnectionService ) ; if ( isRinging ( "reject" ) ) { mVideoStateHistory |= mVideoState ; mConnectionService.reject ( this , rejectWithMessage , textMessage ) ; com.android.server.telecom.Log.event ( this , Log.Events.REQUEST_REJECT ) ; } }

Target:
public void answer ( int videoState ) { com.android.internal.util.Preconditions.checkNotNull ( mConnectionService ) ; if ( isRinging ( "answer" ) ) { mConnectionService.answer ( this , videoState ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_ACCEPT ) ; } }
Source:
private void fillBucketFromSummaryEntry ( android.app.usage.NetworkStats.Bucket bucketOut ) { bucketOut.mUid = android.app.usage.NetworkStats.Bucket.convertUid ( mRecycledSummaryEntry.uid ) ; bucketOut.mTag = android.app.usage.NetworkStats.Bucket.convertTag ( mRecycledSummaryEntry.tag ) ; bucketOut.mState = android.app.usage.NetworkStats.Bucket.convertState ( mRecycledSummaryEntry.set ) ; bucketOut.mMetered = android.app.usage.NetworkStats.Bucket.METERED_ALL ; bucketOut.mRoaming = android.app.usage.NetworkStats.Bucket.convertRoaming ( mRecycledSummaryEntry.roaming ) ; bucketOut.mBeginTimeStamp = mStartTimeStamp ; bucketOut.mEndTimeStamp = mEndTimeStamp ; bucketOut.mRxBytes = mRecycledSummaryEntry.rxBytes ; bucketOut.mRxPackets = mRecycledSummaryEntry.rxPackets ; bucketOut.mTxBytes = mRecycledSummaryEntry.txBytes ; bucketOut.mTxPackets = mRecycledSummaryEntry.txPackets ; }

Target:
private static int convertMetered ( int metered ) { switch ( metered ) { case android.app.usage.android.net.NetworkStats.METERED_ALL : return android.app.usage.NetworkStats.Bucket.METERED_ALL ; case android.app.usage.android.net.NetworkStats.METERED_NO : return android.app.usage.NetworkStats.Bucket.METERED_NO ; case android.app.usage.android.net.NetworkStats.METERED_YES : return android.app.usage.NetworkStats.Bucket.METERED_YES ; } return 0 ; }
Source:
public boolean isContextMethod ( @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; com.android.tools.lint.client.api.JavaParser.ResolvedClass containingClass = method.getContainingClass ( ) ; if ( containingClass.isSubclassOf ( "android.content.Context" , false ) ) { return true ; } } return false ; }

Target:
public boolean isContextMethod ( @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; com.android.tools.lint.client.api.JavaParser.ResolvedClass containingClass = method.getContainingClass ( ) ; if ( containingClass.isSubclassOf ( com.android.SdkConstants.CLASS_CONTEXT , false ) ) { return true ; } } return false ; }
Source:
public void isSystemVersionOlderThan ( ) { android.app.timezone.RulesState rulesState = new android.app.timezone.RulesState ( "2016b" , android.app.timezone.RulesStateTest.formatVersion ( 1 , 1 ) , false , RulesState.STAGED_OPERATION_NONE , null , RulesState.DISTRO_STATUS_INSTALLED , android.app.timezone.RulesStateTest.rulesVersion ( "2016b" , 3 ) ) ; org.junit.Assert.assertFalse ( rulesState.isSystemVersionOlderThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016a" , 1 ) ) ) ; org.junit.Assert.assertFalse ( rulesState.isSystemVersionOlderThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016b" , 1 ) ) ) ; org.junit.Assert.assertTrue ( rulesState.isSystemVersionOlderThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016c" , 1 ) ) ) ; }

Target:
public void isSystemVersionNewerThan ( ) { android.app.timezone.RulesState rulesState = new android.app.timezone.RulesState ( "2016b" , android.app.timezone.RulesStateTest.formatVersion ( 1 , 1 ) , false , RulesState.STAGED_OPERATION_NONE , null , RulesState.DISTRO_STATUS_INSTALLED , android.app.timezone.RulesStateTest.rulesVersion ( "2016b" , 3 ) ) ; org.junit.Assert.assertTrue ( rulesState.isSystemVersionNewerThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016a" , 1 ) ) ) ; org.junit.Assert.assertFalse ( rulesState.isSystemVersionNewerThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016b" , 1 ) ) ) ; org.junit.Assert.assertFalse ( rulesState.isSystemVersionNewerThan ( android.app.timezone.RulesStateTest.rulesVersion ( "2016c" , 1 ) ) ) ; }
Source:
public void setNetworkAvailable ( final boolean networkUp ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setNetworkAvailable ( networkUp ) ; } } ) ; return ; } mAwContents.setNetworkAvailable ( networkUp ) ; }

Target:
public android.webkit.WebBackForwardList saveState ( final android.os.Bundle outState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return saveState ( outState ) ; } } ) ; return ret ; } if ( outState == null ) return null ; if ( ! ( mAwContents.saveState ( outState ) ) ) return null ; return copyBackForwardList ( ) ; }
Source:
public void test_59383 ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "d. MMM yyyy H:mm" , java.util.Locale.GERMAN ) ; sdf.setTimeZone ( java.util.TimeZone.getTimeZone ( "America/Los_Angeles" ) ) ; assertEquals ( 1376927400000L , sdf.parse ( "19. Aug 2013 8:50" ) . getTime ( ) ) ; assertEquals ( 1376927400000L , sdf.parse ( "19. Aug. 2013 8:50" ) . getTime ( ) ) ; }

Target:
public void test_59383 ( ) throws java.lang.Exception { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( "d. MMM yyyy H:mm" , java.util.Locale.GERMAN ) ; sdf.setTimeZone ( libcore.java.text.SimpleDateFormatTest.AMERICA_LOS_ANGELES ) ; assertEquals ( 1376927400000L , sdf.parse ( "19. Aug 2013 8:50" ) . getTime ( ) ) ; assertEquals ( 1376927400000L , sdf.parse ( "19. Aug. 2013 8:50" ) . getTime ( ) ) ; }
Source:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "maxSdkVersion not found in badging output for <foo>" ) ; }

Target:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }
Source:
public void onStart ( ) { super . onStart ( ) ; mAuthenticatorHelper.listenToAccountUpdates ( ) ; final android.content.IntentFilter filter = new android.content.IntentFilter ( com.android.tv.settings.accessories.BluetoothConnectionsManager.ACTION_BLUETOOTH_UPDATE ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( getContext ( ) ) . registerReceiver ( mBCMReceiver , filter ) ; }

Target:
public void onStart ( ) { super . onStart ( ) ; mAuthenticatorHelper.listenToAccountUpdates ( ) ; final android.content.IntentFilter filter = new android.content.IntentFilter ( com.android.tv.settings.accessories.BluetoothConnectionsManager.ACTION_BLUETOOTH_UPDATE ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( getContext ( ) ) . registerReceiver ( mBCMReceiver , filter ) ; android.content.IntentFilter btChangeFilter = new android.content.IntentFilter ( ) ; btChangeFilter.addAction ( BluetoothDevice.ACTION_ACL_CONNECTED ) ; btChangeFilter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; btChangeFilter.addAction ( BluetoothAdapter.ACTION_STATE_CHANGED ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( getContext ( ) ) . registerReceiver ( mBtConnectionReceiver , btChangeFilter ) ; }
Source:
private static long sadShort2Long ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; long sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { long x = s1 [ i ] ; long y = s2 [ i ] ; sad += java.lang.Math.abs ( ( x - y ) ) ; } return sad ; }

Target:
private static long sadChar2Long ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; long sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { long x = s1 [ i ] ; long y = s2 [ i ] ; sad += java.lang.Math.abs ( ( x - y ) ) ; } return sad ; }
Source:
public void setProgressDrawable ( android.graphics.drawable.Drawable d ) { if ( d != null ) { d.setCallback ( this ) ; } mProgressDrawable = d ; if ( ! ( mIndeterminate ) ) { mCurrentDrawable = d ; postInvalidate ( ) ; } }

Target:
public void setProgressDrawable ( android.graphics.drawable.Drawable d ) { if ( d != null ) { d.setCallback ( this ) ; int drawableHeight = drawable.getMinimumHeight ( ) ; if ( ( mMaxHeight ) < drawableHeight ) { mMaxHeight = drawableHeight ; requestLayout ( ) ; } } mProgressDrawable = d ; if ( ! ( mIndeterminate ) ) { mCurrentDrawable = d ; postInvalidate ( ) ; } }