auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void acceptVideoRequest ( @ android.support.annotation.NonNull android.content.Context context ) { int requestedVideoState = callback.getRequestedVideoState ( ) ; com.android.dialer.common.Assert.checkArgument ( ( requestedVideoState != ( android.telecom.VideoProfile.STATE_AUDIO_ONLY ) ) ) ; com.android.dialer.common.LogUtil.i ( "ImsVideoTech.acceptUpgradeRequest" , ( "videoState: " + requestedVideoState ) ) ; call.getVideoCall ( ) . sendSessionModifyResponse ( new android.telecom.VideoProfile ( requestedVideoState ) ) ; setSessionModificationState ( SessionModificationState.NO_REQUEST ) ; listener.onUpgradedToVideo ( false ) ; logger.logImpression ( DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED ) ; }

Target:
public void acceptVideoRequest ( @ android.support.annotation.NonNull android.content.Context context ) { int requestedVideoState = callback.getRequestedVideoState ( ) ; com.android.dialer.common.Assert.checkArgument ( ( requestedVideoState != ( android.telecom.VideoProfile.STATE_AUDIO_ONLY ) ) ) ; com.android.dialer.common.LogUtil.i ( "ImsVideoTech.acceptUpgradeRequest" , ( "videoState: " + requestedVideoState ) ) ; call.getVideoCall ( ) . sendSessionModifyResponse ( new android.telecom.VideoProfile ( requestedVideoState ) ) ; listener.onUpgradedToVideo ( false ) ; logger.logImpression ( DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED ) ; }
Source:
public java.lang.String toGenericString ( ) { int mod = getModifiers ( ) ; java.lang.reflect.Type fieldType = getGenericType ( ) ; return ( ( ( ( ( mod == 0 ? "" : ( java.lang.reflect.Modifier.toString ( mod ) ) + " " ) + ( fieldType instanceof java.lang.Class ? java.lang.reflect.Field.getTypeName ( ( ( java.lang.Class ) ( fieldType ) ) ) : fieldType.toString ( ) ) ) + " " ) + ( java.lang.reflect.Field.getTypeName ( getDeclaringClass ( ) ) ) ) + "." ) + ( getName ( ) ) ; }

Target:
public java.lang.String toGenericString ( ) { int mod = getModifiers ( ) ; java.lang.reflect.Type fieldType = getGenericType ( ) ; return ( ( ( ( ( mod == 0 ? "" : ( java.lang.reflect.Modifier.toString ( mod ) ) + " " ) + ( fieldType.getTypeName ( ) ) ) + " " ) + ( getDeclaringClass ( ) . getTypeName ( ) ) ) + "." ) + ( getName ( ) ) ; }
Source:
public static void setScanDone ( android.content.Context context ) { if ( com.android.tv.tuner.TunerPreferences.useContentProvider ( context ) ) { com.android.tv.tuner.TunerPreferences.setPreference ( context , com.android.tv.tuner.TunerPreferences.PREFS_KEY_SCAN_DONE , true ) ; } else { com.android.tv.tuner.TunerPreferences.getSharedPreferences ( context ) . edit ( ) . putBoolean ( com.android.tv.tuner.TunerPreferences.PREFS_KEY_SCAN_DONE , true ) . apply ( ) ; } }

Target:
public static synchronized void setScanDone ( android.content.Context context ) { if ( com.android.tv.tuner.TunerPreferences.useContentProvider ( context ) ) { com.android.tv.tuner.TunerPreferences.setPreference ( context , com.android.tv.tuner.TunerPreferences.PREFS_KEY_SCAN_DONE , true ) ; } else { com.android.tv.tuner.TunerPreferences.getSharedPreferences ( context ) . edit ( ) . putBoolean ( com.android.tv.tuner.TunerPreferences.PREFS_KEY_SCAN_DONE , true ) . apply ( ) ; } }
Source:
public int compare ( java.lang.Object o1 , java.lang.Object o2 ) { if ( o1 == null ) { return - 1 ; } return ( ( java.lang.String ) ( o1 ) ) . compareTo ( ( ( java.lang.String ) ( o2 ) ) ) ; }

Target:
public int compare ( java.lang.Object o1 , java.lang.Object o2 ) { if ( o1 == null ) { return - 1 ; } if ( o2 == null ) { return 1 ; } return ( ( java.lang.String ) ( o1 ) ) . compareTo ( ( ( java.lang.String ) ( o2 ) ) ) ; }
Source:
public boolean startInstrumentation ( android.content.ComponentName className , java.lang.String profileFile , android.os.Bundle arguments ) { try { if ( arguments != null ) { arguments.setAllowFds ( false ) ; } return android.app.ActivityManagerNative.getDefault ( ) . startInstrumentation ( className , profileFile , 0 , arguments , null , null , getUserId ( ) ) ; } catch ( android.os.RemoteException e ) { } return false ; }

Target:
public boolean startInstrumentation ( android.content.ComponentName className , java.lang.String profileFile , android.os.Bundle arguments ) { try { if ( arguments != null ) { arguments.setAllowFds ( false ) ; } return android.app.ActivityManagerNative.getDefault ( ) . startInstrumentation ( className , profileFile , 0 , arguments , null , null , getUserId ( ) , null ) ; } catch ( android.os.RemoteException e ) { } return false ; }
Source:
private java.lang.String quoteSsid ( android.net.wifi.ScanResult scanResult ) { if ( ( scanResult.wifiSsid ) != null ) { return ( "\"" + ( scanResult.wifiSsid.toString ( ) ) ) + "\"" ; } else if ( ( scanResult.SSID ) != null ) { return ( "\"" + ( scanResult.SSID ) ) + "\"" ; } else { throw new java.lang.IllegalArgumentException ( "ScanResult is missing an SSID." ) ; } }

Target:
private static java.lang.String quoteSsid ( android.net.wifi.ScanResult scanResult ) { if ( ( scanResult.wifiSsid ) != null ) { return ( "\"" + ( scanResult.wifiSsid.toString ( ) ) ) + "\"" ; } else if ( ( scanResult.SSID ) != null ) { return ( "\"" + ( scanResult.SSID ) ) + "\"" ; } else { throw new java.lang.IllegalArgumentException ( "ScanResult is missing an SSID." ) ; } }
Source:
static int bufferDeadLoop ( ) { java.lang.StringBuffer b = new java.lang.StringBuffer ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { int d = b.toString ( ) . indexOf ( "x" , 1 ) ; } return b.length ( ) ; }

Target:
static int bufferDeadLoop ( ) { java.lang.StringBuffer b = new java.lang.StringBuffer ( ) ; java.lang.String x = "x" ; for ( int i = 0 ; i < 10 ; i ++ ) { int d = b.toString ( ) . indexOf ( x , 1 ) ; } return b.length ( ) ; }
Source:
public static < E extends java.lang.Enum < E > > java.util.EnumSet < E > newEnumSet ( java.lang.Iterable < E > iterable , java.lang.Class < E > elementType ) { com.google.common.base.Preconditions.checkNotNull ( iterable ) ; java.util.EnumSet < E > set = java.util.EnumSet.noneOf ( elementType ) ; com.google.common.collect.Iterables.addAll ( set , iterable ) ; return set ; }

Target:
public static < E extends java.lang.Enum < E > > java.util.EnumSet < E > newEnumSet ( java.lang.Iterable < E > iterable , java.lang.Class < E > elementType ) { java.util.EnumSet < E > set = java.util.EnumSet.noneOf ( elementType ) ; com.google.common.collect.Iterables.addAll ( set , iterable ) ; return set ; }
Source:
public static com.android.sdklib.internal.project.ProjectProperties load ( com.android.sdklib.io.IAbstractFolder projectFolder , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { if ( projectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = projectFolder.getFile ( type.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.SdkManager.parsePropertyFile ( propFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolder , map , type ) ; } } } return null ; }

Target:
public static com.android.sdklib.internal.project.ProjectProperties load ( com.android.sdklib.io.IAbstractFolder projectFolder , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { if ( projectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = projectFolder.getFile ( type.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile ( propFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolder , map , type ) ; } } } return null ; }
Source:
private boolean haveArtifact ( java.lang.String groupId ) { for ( com.android.tools.gradle.eclipse.ImportModule module : mRootModules ) { for ( com.android.ide.common.repository.GradleCoordinate dependency : module.getDependencies ( ) ) { if ( groupId.equals ( dependency.getGroupId ( ) ) ) { return true ; } } } return false ; }

Target:
private boolean haveArtifact ( java.lang.String groupId ) { if ( ( mRootModules ) != null ) { for ( com.android.tools.gradle.eclipse.ImportModule module : mRootModules ) { for ( com.android.ide.common.repository.GradleCoordinate dependency : module.getDependencies ( ) ) { if ( groupId.equals ( dependency.getGroupId ( ) ) ) { return true ; } } } } return false ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , float [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length ) ; }
Source:
protected android.icu.util.UResourceBundle findTopLevel ( java.lang.String aKey ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( aKey , null , this ) ; if ( obj != null ) { ( ( android.icu.impl.ICUResourceBundle ) ( obj ) ) . setLoadingStatus ( getLocaleID ( ) ) ; return obj ; } } return null ; }

Target:
protected android.icu.util.UResourceBundle findTopLevel ( java.lang.String aKey ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( aKey , null , this ) ; if ( obj != null ) { return obj ; } } return null ; }
Source:
public void test_ConstructorILjava_net_InetAddress ( ) throws java.io.IOException { java.net.DatagramSocket ds = new java.net.DatagramSocket ( 0 , java.net.InetAddress.getLocalHost ( ) ) ; assertTrue ( "Created socket with incorrect port" , ( ( ds.getLocalPort ( ) ) != 0 ) ) ; assertEquals ( "Created socket with incorrect address" , java.net.InetAddress.getLocalHost ( ) , ds.getLocalAddress ( ) ) ; }

Target:
public void test_ConstructorILjava_net_InetAddress ( ) throws java.io.IOException { try ( java.net.DatagramSocket ds = new java.net.DatagramSocket ( 0 , java.net.InetAddress.getLocalHost ( ) ) ) { assertTrue ( "Created socket with incorrect port" , ( ( ds.getLocalPort ( ) ) != 0 ) ) ; assertEquals ( "Created socket with incorrect address" , java.net.InetAddress.getLocalHost ( ) , ds.getLocalAddress ( ) ) ; } }
Source:
public boolean getAnyDataEnabled ( ) { if ( ! ( mDataEnabledSettings.isDataEnabled ( true ) ) ) return false ; com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason failureReason = new com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason ( ) ; if ( ! ( isDataAllowed ( failureReason ) ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( failureReason.getDataAllowFailReason ( ) ) ; return false ; } for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( isDataAllowedForApn ( apnContext ) ) { return true ; } } return false ; }

Target:
public boolean getAnyDataEnabled ( ) { if ( ! ( mDataEnabledSettings.isDataEnabled ( ) ) ) return false ; com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason failureReason = new com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason ( ) ; if ( ! ( isDataAllowed ( failureReason ) ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( failureReason.getDataAllowFailReason ( ) ) ; return false ; } for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( isDataAllowedForApn ( apnContext ) ) { return true ; } } return false ; }
Source:
private android.text.Layout makeLayout ( java.lang.CharSequence text ) { final java.lang.CharSequence transformed = ( ( mSwitchTransformationMethod ) != null ) ? mSwitchTransformationMethod.getTransformation ( text , this ) : text ; return new android.text.StaticLayout ( transformed , mTextPaint , ( ( int ) ( java.lang.Math.ceil ( android.text.Layout.getDesiredWidth ( transformed , mTextPaint ) ) ) ) , Layout.Alignment.ALIGN_NORMAL , 1.0F , 0 , true ) ; }

Target:
private android.text.Layout makeLayout ( java.lang.CharSequence text ) { final java.lang.CharSequence transformed = ( ( mSwitchTransformationMethod ) != null ) ? mSwitchTransformationMethod.getTransformation ( text , this ) : text ; return new android.text.StaticLayout ( transformed , mTextPaint , ( transformed != null ? ( ( int ) ( java.lang.Math.ceil ( android.text.Layout.getDesiredWidth ( transformed , mTextPaint ) ) ) ) : 0 ) , Layout.Alignment.ALIGN_NORMAL , 1.0F , 0 , true ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( 100 ) ; sb.append ( getClass ( ) . getName ( ) ) ; sb.append ( '{' ) ; sb.append ( com.android.dx.util.Hex.u2 ( getAccessFlags ( ) ) ) ; sb.append ( ' ' ) ; sb.append ( method ) ; if ( ( code ) != null ) { sb.append ( ' ' ) ; sb.append ( code ) ; } sb.append ( '}' ) ; return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 100 ) ; sb.append ( getClass ( ) . getName ( ) ) ; sb.append ( '{' ) ; sb.append ( com.android.dx.util.Hex.u2 ( getAccessFlags ( ) ) ) ; sb.append ( ' ' ) ; sb.append ( method ) ; if ( ( code ) != null ) { sb.append ( ' ' ) ; sb.append ( code ) ; } sb.append ( '}' ) ; return sb.toString ( ) ; }
Source:
public void test_getDoInput ( ) throws java.io.IOException { assertTrue ( "Should be set to true by default" , uc.getDoInput ( ) ) ; fileURLCon.setDoInput ( true ) ; assertTrue ( "Should have been set to true" , fileURLCon.getDoInput ( ) ) ; uc2.setDoInput ( false ) ; assertFalse ( "Should have been set to false" , uc2.getDoInput ( ) ) ; fileURLCon.connect ( ) ; fileURLCon.getInputStream ( ) . close ( ) ; uc2.connect ( ) ; try { uc2.getInputStream ( ) ; } catch ( java.lang.Throwable expected ) { } }

Target:
public void test_getDoInput ( ) throws java.io.IOException { assertTrue ( "Should be set to true by default" , uc.getDoInput ( ) ) ; fileURLCon.setDoInput ( true ) ; assertTrue ( "Should have been set to true" , fileURLCon.getDoInput ( ) ) ; uc2.setDoInput ( false ) ; assertFalse ( "Should have been set to false" , uc2.getDoInput ( ) ) ; fileURLCon.connect ( ) ; fileURLCon.getInputStream ( ) . close ( ) ; uc2.connect ( ) ; try { uc2.getInputStream ( ) ; fail ( ) ; } catch ( java.lang.Throwable expected ) { } }
Source:
synchronized void setDebugSelectedPort ( int port ) throws java.lang.IllegalStateException { if ( ( com.android.ddmlib.MonitorThread.sInstance ) == null ) { return ; } if ( ( com.android.ddmlib.AndroidDebugBridge.getClientSupport ( ) ) == false ) { return ; } if ( ( mDebugSelectedChan ) != null ) { com.android.ddmlib.Log.d ( "ddms" , ( "Changing debug-selected port to " + port ) ) ; mNewDebugSelectedPort = port ; wakeup ( ) ; } else { mNewDebugSelectedPort = port ; } }

Target:
synchronized void setDebugSelectedPort ( int port ) throws java.lang.IllegalStateException { if ( ( com.android.ddmlib.MonitorThread.sInstance ) == null ) { return ; } if ( ! ( com.android.ddmlib.AndroidDebugBridge.getClientSupport ( ) ) ) { return ; } if ( ( mDebugSelectedChan ) != null ) { com.android.ddmlib.Log.d ( "ddms" , ( "Changing debug-selected port to " + port ) ) ; mNewDebugSelectedPort = port ; wakeup ( ) ; } else { mNewDebugSelectedPort = port ; } }
Source:
public void test_ConstructorI ( ) { java.util.ArrayList al = new java.util.ArrayList ( 5 ) ; assertEquals ( "Incorrect arrayList created" , 0 , al.size ( ) ) ; try { new java.util.ArrayList ( ( - 10 ) ) ; fail ( "IllegalArgumentException expected" ) ; } catch ( java.lang.IllegalArgumentException e ) { } }

Target:
public void test_ConstructorI ( ) { java.util.ArrayList al = new java.util.ArrayList ( 5 ) ; assertEquals ( "Incorrect arrayList created" , 0 , al.size ( ) ) ; al = new java.util.ArrayList ( 0 ) ; assertEquals ( "Incorrect arrayList created" , 0 , al.size ( ) ) ; try { new java.util.ArrayList ( ( - 1 ) ) ; fail ( "IllegalArgumentException expected" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
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.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 ; }

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.lang.String getDigestAlgName ( org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgOID ) { java.lang.String name = org.bouncycastle.jcajce.util.MessageDigestUtils.getDigestName ( digestAlgOID ) ; int dIndex = name.indexOf ( '-' ) ; if ( ( dIndex > 0 ) && ( ! ( name.startsWith ( "SHA3" ) ) ) ) { return ( name.substring ( 0 , dIndex ) ) + ( name.substring ( ( dIndex + 1 ) ) ) ; } }

Target:
private static java.lang.String getDigestAlgName ( org.bouncycastle.asn1.ASN1ObjectIdentifier digestAlgOID ) { java.lang.String name = org.bouncycastle.jcajce.util.MessageDigestUtils.getDigestName ( digestAlgOID ) ; int dIndex = name.indexOf ( '-' ) ; if ( ( dIndex > 0 ) && ( ! ( name.startsWith ( "SHA3" ) ) ) ) { return ( name.substring ( 0 , dIndex ) ) + ( name.substring ( ( dIndex + 1 ) ) ) ; } return org.bouncycastle.jcajce.util.MessageDigestUtils.getDigestName ( digestAlgOID ) ; }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding targetType = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( x.qualification.resolvedType ) ) ; push ( makeThisReference ( info , targetType , true , scope ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding targetType = ( ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding ) ( x.qualification.resolvedType ) ) ; push ( makeThisReference ( info , targetType , true , scope ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
com.android.jack.ir.JNodeInternalError translateException ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration , java.lang.Throwable e , com.android.jack.ir.sourceinfo.SourceInfo info ) { com.android.jack.ir.JNodeInternalError ice = translateException ( e ) ; if ( typeDeclaration != null ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; typeDeclaration.printHeader ( 0 , sb ) ; ice.addNode ( typeDeclaration.getClass ( ) . getName ( ) , sb.toString ( ) , info ) ; } return ice ; }

Target:
private com.android.jack.ir.JNodeInternalError translateException ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration , java.lang.Exception e , com.android.jack.ir.sourceinfo.SourceInfo info ) { com.android.jack.ir.JNodeInternalError ice = translateException ( e ) ; if ( typeDeclaration != null ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; typeDeclaration.printHeader ( 0 , sb ) ; ice.addNode ( typeDeclaration.getClass ( ) . getName ( ) , sb.toString ( ) , info ) ; } return ice ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , long [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 8 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }
Source:
public void enter ( ) { mPhone.mCi.registerForRilConnected ( getHandler ( ) , DataConnection.EVENT_RIL_CONNECTED , null ) ; mPhone.mCi.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED , null ) ; if ( android.os.Build.IS_DEBUGGABLE ) { mDcTesterDeactivateAll = new com.android.internal.telephony.dataconnection.DcTesterDeactivateAll ( mPhone , this , getHandler ( ) ) ; } }

Target:
public void enter ( ) { mPhone.mCi.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED , null ) ; if ( android.os.Build.IS_DEBUGGABLE ) { mDcTesterDeactivateAll = new com.android.internal.telephony.dataconnection.DcTesterDeactivateAll ( mPhone , this , getHandler ( ) ) ; } }
Source:
public vogar.target.Runner newRunner ( vogar.monitor.TargetMonitor monitor , java.lang.String actionName , 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 ) { if ( supports ( klass ) ) { return new vogar.target.junit.JUnitRunner ( monitor , actionName , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds ) ; } else { return null ; } }

Target:
public vogar.target.Runner 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 ) { if ( supports ( klass ) ) { return new vogar.target.junit.JUnitRunner ( monitor , qualification , klass , skipPastReference , testEnvironment , timeoutSeconds ) ; } else { return null ; } }
Source:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( ! ( transform ( fields , existingNode , ( ( com.android.jack.ir.ast.JField ) ( newNode ) ) , transformation ) ) ) { if ( ! ( transform ( methods , existingNode , ( ( com.android.jack.ir.ast.JMethod ) ( newNode ) ) , transformation ) ) ) { super . transform ( existingNode , newNode , transformation ) ; } } }

Target:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( existingNode instanceof com.android.jack.ir.ast.JMethod ) { if ( transform ( methods , existingNode , ( ( com.android.jack.ir.ast.JMethod ) ( newNode ) ) , transformation ) ) { return ; } } else if ( existingNode instanceof com.android.jack.ir.ast.JField ) { if ( transform ( fields , existingNode , ( ( com.android.jack.ir.ast.JField ) ( newNode ) ) , transformation ) ) { return ; } } super . transform ( existingNode , newNode , transformation ) ; }
Source:
private void displayPage ( int index ) { org.eclipse.swt.widgets.Composite page = mPages.get ( index ) ; if ( page != null ) { mStackLayout.topControl = page ; mPagesRootComposite.layout ( true ) ; if ( ! ( mInternalPageChange ) ) { mInternalPageChange = true ; mPageList.setSelection ( index ) ; mInternalPageChange = false ; } if ( page instanceof com.android.sdkuilib.internal.repository.IPageListener ) { ( ( com.android.sdkuilib.internal.repository.IPageListener ) ( page ) ) . onPageSelected ( ) ; } } }

Target:
private void displayPage ( int index ) { org.eclipse.swt.widgets.Composite page = mPages.get ( index ) ; if ( page != null ) { mStackLayout.topControl = page ; mPagesRootComposite.layout ( true ) ; if ( ( ! ( mInternalPageChange ) ) && ( ( mPageList ) != null ) ) { mInternalPageChange = true ; mPageList.setSelection ( index ) ; mInternalPageChange = false ; } if ( page instanceof com.android.sdkuilib.internal.repository.IPageListener ) { ( ( com.android.sdkuilib.internal.repository.IPageListener ) ( page ) ) . onPageSelected ( ) ; } } }
Source:
private void writeSuppressInfo ( ) throws java.io.IOException { mWriter.write ( "\n<a name=\"SuppressInfo\"></a>\n" ) ; mWriter.write ( "<div class=\"category\">" ) ; mWriter.write ( "Suppressing Warnings and Errors" ) ; mWriter.write ( "<div class=\"categorySeparator\"></div>\n" ) ; mWriter.write ( "</div>\n" ) ; appendEscapedText ( com.android.tools.lint.Main.getSuppressHelp ( ) , true ) ; mWriter.write ( '\n' ) ; }

Target:
private void writeSuppressInfo ( ) throws java.io.IOException { mWriter.write ( "\n<a name=\"SuppressInfo\"></a>\n" ) ; mWriter.write ( "<div class=\"category\">" ) ; mWriter.write ( "Suppressing Warnings and Errors" ) ; mWriter.write ( "<div class=\"categorySeparator\"></div>\n" ) ; mWriter.write ( "</div>\n" ) ; appendEscapedText ( com.android.tools.lint.Main.getSuppressHelp ( ) ) ; mWriter.write ( '\n' ) ; }
Source:
public void test_setDefaultLjava_util_TimeZone ( ) { java.util.TimeZone oldDefault = java.util.TimeZone.getDefault ( ) ; java.util.TimeZone zone = new java.util.SimpleTimeZone ( 45 , "TEST" ) ; java.util.TimeZone.setDefault ( zone ) ; assertEquals ( "timezone not set" , zone , java.util.TimeZone.getDefault ( ) ) ; java.util.TimeZone.setDefault ( null ) ; assertEquals ( "default not restored" , oldDefault , java.util.TimeZone.getDefault ( ) ) ; }

Target:
public void test_setDefaultLjava_util_TimeZone ( ) { java.util.TimeZone.setDefault ( null ) ; java.util.TimeZone oldDefault = java.util.TimeZone.getDefault ( ) ; java.util.TimeZone zone = new java.util.SimpleTimeZone ( 45 , "TEST" ) ; java.util.TimeZone.setDefault ( zone ) ; assertEquals ( "timezone not set" , zone , java.util.TimeZone.getDefault ( ) ) ; java.util.TimeZone.setDefault ( null ) ; assertEquals ( "default not restored" , oldDefault , java.util.TimeZone.getDefault ( ) ) ; }
Source:
public void destroyDrawingCache ( ) { if ( ( mDrawingCache ) != null ) { final android.graphics.Bitmap bitmap = mDrawingCache.get ( ) ; if ( bitmap != null ) bitmap.recycle ( ) ; mDrawingCache = null ; } if ( ( mUnscaledDrawingCache ) != null ) { final android.graphics.Bitmap bitmap = mUnscaledDrawingCache.get ( ) ; if ( bitmap != null ) bitmap.recycle ( ) ; mUnscaledDrawingCache = null ; } }

Target:
public void destroyDrawingCache ( ) { if ( ( mDrawingCache ) != null ) { mDrawingCache.recycle ( ) ; mDrawingCache = null ; } if ( ( mUnscaledDrawingCache ) != null ) { mUnscaledDrawingCache.recycle ( ) ; mUnscaledDrawingCache = null ; } }
Source:
protected void computeResult ( ) { java.lang.Object [ ] elements = getSelectedElements ( ) ; if ( ( ( elements.length ) == 1 ) && ( ( elements [ 0 ] ) instanceof com.android.ide.eclipse.adt.internal.resources.ResourceItem ) ) { com.android.ide.eclipse.adt.internal.resources.ResourceItem item = ( ( com.android.ide.eclipse.adt.internal.resources.ResourceItem ) ( elements [ 0 ] ) ) ; mCurrentResource = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getXmlString ( mResourceType , item , ( ( com.android.ide.eclipse.adt.internal.ui.ResourceChooser.SHOW_SYSTEM_RESOURCE ) && ( mSystemButton.getSelection ( ) ) ) ) ; } }

Target:
protected void computeResult ( ) { java.lang.Object [ ] elements = getSelectedElements ( ) ; if ( ( ( elements.length ) == 1 ) && ( ( elements [ 0 ] ) instanceof com.android.ide.eclipse.adt.internal.resources.ResourceItem ) ) { com.android.ide.eclipse.adt.internal.resources.ResourceItem item = ( ( com.android.ide.eclipse.adt.internal.resources.ResourceItem ) ( elements [ 0 ] ) ) ; mCurrentResource = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getXmlString ( mResourceType , item , mSystemButton.getSelection ( ) ) ; } }
Source:
public void testRemoveNetworksForApp ( ) throws java.lang.Exception { verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ) ; verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createPskNetwork ( ) ) ; verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createWepNetwork ( ) ) ; assertFalse ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; android.content.pm.ApplicationInfo app = new android.content.pm.ApplicationInfo ( ) ; app.uid = com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ; app.packageName = com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_NAME ; assertTrue ( mWifiConfigManager.removeNetworksForApp ( app ) ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; }

Target:
public void testRemoveNetworksForApp ( ) throws java.lang.Exception { verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ) ; verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createPskNetwork ( ) ) ; verifyAddNetworkToWifiConfigManager ( com.android.server.wifi.WifiConfigurationTestUtil.createWepNetwork ( ) ) ; assertFalse ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; android.content.pm.ApplicationInfo app = new android.content.pm.ApplicationInfo ( ) ; app.uid = com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ; app.packageName = com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_NAME ; assertEquals ( 3 , mWifiConfigManager.removeNetworksForApp ( app ) . size ( ) ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; }
Source:
private static boolean sameChars ( java.lang.String str , char [ ] chars ) { int length = str.length ( ) ; if ( ( chars.length ) != length ) { return false ; } for ( int i = 0 ; i < length ; i ++ ) { if ( ( chars [ i ] ) != ( str.charAt ( i ) ) ) { return false ; } } return true ; }

Target:
public static boolean sameChars ( java.lang.String str , char [ ] chars ) { int length = str.length ( ) ; if ( ( chars.length ) != length ) { return false ; } for ( int i = 0 ; i < length ; i ++ ) { if ( ( chars [ i ] ) != ( str.charAt ( i ) ) ) { return false ; } } return true ; }
Source:
public void createTest ( com.android.rs.image.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image.ScriptC_vignette_approx_relaxed ( mRS , res , R.raw.vignette_approx_relaxed ) ; else mScript_approx_full = new com.android.rs.image.ScriptC_vignette_approx_full ( mRS , res , R.raw.vignette_approx_full ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image.ScriptC_vignette_relaxed ( mRS , res , R.raw.vignette_relaxed ) ; else mScript_full = new com.android.rs.image.ScriptC_vignette_full ( mRS , res , R.raw.vignette_full ) ; do_init ( ) ; }

Target:
public void createTest ( com.android.rs.image.Resources res ) { if ( approx ) { if ( relaxed ) mScript_approx_relaxed = new com.android.rs.image.ScriptC_vignette_approx_relaxed ( mRS ) ; else mScript_approx_full = new com.android.rs.image.ScriptC_vignette_approx_full ( mRS ) ; } else if ( relaxed ) mScript_relaxed = new com.android.rs.image.ScriptC_vignette_relaxed ( mRS ) ; else mScript_full = new com.android.rs.image.ScriptC_vignette_full ( mRS ) ; do_init ( ) ; }
Source:
public void testBinarySearch_emptyCollection ( ) { assertEquals ( ( - 1 ) , java.util.Collections.binarySearch ( new java.util.ArrayList < java.lang.Integer > ( ) , 9 ) ) ; assertEquals ( ( - 1 ) , java.util.Collections.binarySearch ( new java.util.ArrayList < java.lang.Integer > ( ) , 9 , new java.util.Comparator < java.lang.Integer > ( ) { @ java.lang.Override public int compare ( java.lang.Integer lhs , java.lang.Integer rhs ) { return lhs.compareTo ( rhs ) ; } } ) ) ; }

Target:
public void testBinarySearch_emptyCollection ( ) { assertEquals ( ( - 1 ) , java.util.Collections.binarySearch ( new java.util.ArrayList < java.lang.Integer > ( ) , 9 ) ) ; assertEquals ( ( - 1 ) , java.util.Collections.binarySearch ( new java.util.ArrayList < > ( ) , 9 , java.lang.Integer :: compareTo ) ) ; }
Source:
public boolean setPairingConfirmation ( android.bluetooth.BluetoothDevice device , boolean accept ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setPairingConfirmation() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.setPairingConfirmation ( device , accept ) ; }

Target:
public boolean setPairingConfirmation ( android.bluetooth.BluetoothDevice device , boolean accept ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setPairingConfirmation() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.setPairingConfirmation ( device , accept ) ; }
Source:
private org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket makeCommand ( byte [ ] test_values ) { org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket packet = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( org.apache.harmony.jpda.tests.jdwp.DDM.DDMTest.DDMCommandSet.CommandSetID , org.apache.harmony.jpda.tests.jdwp.DDM.DDMTest.DDMCommandSet.ChunkCommand ) ; packet.setNextValueAsInt ( DDMDebuggee.DDM_TEST_TYPE ) ; packet.setNextValueAsInt ( test_values.length ) ; for ( byte b : test_values ) { packet.setNextValueAsByte ( b ) ; } return packet ; }

Target:
private org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket makeCommand ( int type , byte [ ] test_values ) { org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket packet = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( org.apache.harmony.jpda.tests.jdwp.DDM.DDMTest.DDMCommandSet.CommandSetID , org.apache.harmony.jpda.tests.jdwp.DDM.DDMTest.DDMCommandSet.ChunkCommand ) ; packet.setNextValueAsInt ( type ) ; packet.setNextValueAsInt ( test_values.length ) ; for ( byte b : test_values ) { packet.setNextValueAsByte ( b ) ; } return packet ; }
Source:
public void setFixedLengthStreamingMode ( int contentLength ) { if ( super . connected ) { throw new java.lang.IllegalStateException ( "Already connected" ) ; } if ( ( chunkLength ) > 0 ) { throw new java.lang.IllegalStateException ( "Already in chunked mode" ) ; } if ( contentLength < 0 ) { throw new java.lang.IllegalArgumentException ( "contentLength < 0" ) ; } this . fixedContentLength = contentLength ; }

Target:
public void setFixedLengthStreamingMode ( int contentLength ) { setFixedLengthStreamingMode ( ( ( long ) ( contentLength ) ) ) ; }
Source:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view ) ; mDialog = mBuilder.show ( ) ; mFrameLayout = ( ( android.widget.FrameLayout ) ( mDialog.getWindow ( ) . findViewById ( R.id.custom ) ) ) ; mView = mFrameLayout.getChildAt ( 0 ) ; }

Target:
public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setView ( view ) ; mDialog = mBuilder.show ( ) ; mView = mDialog.getWindow ( ) . findViewById ( 100 ) ; }
Source:
public void bindSampler ( android.renderscript.Sampler vs , int slot ) throws java.lang.IllegalArgumentException { mRS.validate ( ) ; if ( ( slot < 0 ) || ( slot >= ( mTextureCount ) ) ) { throw new java.lang.IllegalArgumentException ( "Slot ID out of range." ) ; } int id = ( vs != null ) ? vs.getID ( mRS ) : 0 ; mRS.nProgramBindSampler ( getID ( mRS ) , slot , id ) ; }

Target:
public void bindSampler ( android.renderscript.Sampler vs , int slot ) throws java.lang.IllegalArgumentException { mRS.validate ( ) ; if ( ( slot < 0 ) || ( slot >= ( mTextureCount ) ) ) { throw new java.lang.IllegalArgumentException ( "Slot ID out of range." ) ; } long id = ( vs != null ) ? vs.getID ( mRS ) : 0 ; mRS.nProgramBindSampler ( getID ( mRS ) , slot , id ) ; }
Source:
public void testJava7CompatibleInterface ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.ExtendsDefault.class . getName ( ) ) ; com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester tester = new com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester ( ) ; reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( tester , null ) , 0 ) ; com.google.common.truth.Truth.assertThat ( tester.version ) . isEqualTo ( Opcodes.V1_7 ) ; com.google.common.truth.Truth.assertThat ( tester.bridgeMethods ) . isEqualTo ( 0 ) ; com.google.common.truth.Truth.assertThat ( tester.clinitMethods ) . isEqualTo ( 1 ) ; }

Target:
public void testJava7CompatibleInterface ( ) throws java.lang.Exception { org.objectweb.asm.ClassReader reader = new org.objectweb.asm.ClassReader ( com.google.devtools.build.android.desugar.Java7CompatibilityTest.ExtendsDefault.class . getName ( ) ) ; com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester tester = new com.google.devtools.build.android.desugar.Java7CompatibilityTest.ClassTester ( ) ; reader.accept ( new com.google.devtools.build.android.desugar.Java7Compatibility ( tester , null , null ) , 0 ) ; com.google.common.truth.Truth.assertThat ( tester.version ) . isEqualTo ( Opcodes.V1_7 ) ; com.google.common.truth.Truth.assertThat ( tester.bridgeMethods ) . isEqualTo ( 0 ) ; com.google.common.truth.Truth.assertThat ( tester.clinitMethods ) . isEqualTo ( 1 ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; mSystemDpmi = com.android.server.LocalServices.getService ( android.app.admin.DevicePolicyManagerInternal.class ) ; com.android.server.LocalServices.removeServiceForTest ( android.app.admin.DevicePolicyManagerInternal.class ) ; com.android.server.LocalServices.addService ( android.app.admin.DevicePolicyManagerInternal.class , mDpmi ) ; org.mockito.Mockito.when ( mContext.getSystemService ( Context.TELEPHONY_SERVICE ) ) . thenReturn ( mTm ) ; org.mockito.Mockito.when ( mContext.getSystemService ( Context.APP_OPS_SERVICE ) ) . thenReturn ( mAppOps ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mSystemDpmi = com.android.server.LocalServices.getService ( android.app.admin.DevicePolicyManagerInternal.class ) ; com.android.server.LocalServices.removeServiceForTest ( android.app.admin.DevicePolicyManagerInternal.class ) ; com.android.server.LocalServices.addService ( android.app.admin.DevicePolicyManagerInternal.class , mDpmi ) ; org.mockito.Mockito.when ( mContext.getSystemService ( Context.TELEPHONY_SERVICE ) ) . thenReturn ( mTm ) ; org.mockito.Mockito.when ( mContext.getSystemService ( Context.APP_OPS_SERVICE ) ) . thenReturn ( mAppOps ) ; }
Source:
void hold ( ) { if ( ( mState ) == ( CallState.ACTIVE ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.hold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "hold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_HOLD ) ; } }

Target:
public void hold ( ) { if ( ( mState ) == ( CallState.ACTIVE ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.hold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "hold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_HOLD ) ; } }
Source:
public void onDisplayChanged ( int displayId ) { if ( displayId == ( android.view.Display.DEFAULT_DISPLAY ) ) { boolean screenOn = isScreenOn ( ) ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.DeviceStateMonitor.EVENT_SCREEN_STATE_CHANGED ) ; msg.arg1 = ( screenOn ) ? 1 : 0 ; log ( ( "Screen " + ( screenOn ? "on" : "off" ) ) , true ) ; sendMessage ( msg ) ; } }

Target:
public void onDisplayChanged ( int displayId ) { boolean screenOn = isScreenOn ( ) ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.DeviceStateMonitor.EVENT_SCREEN_STATE_CHANGED ) ; msg.arg1 = ( screenOn ) ? 1 : 0 ; sendMessage ( msg ) ; }
Source:
public int onConnect ( final javax.obex.HeaderSet request , javax.obex.HeaderSet reply ) { if ( com.android.bluetooth.mapclient.MnsObexServer.VDBG ) { android.util.Log.v ( com.android.bluetooth.mapclient.MnsObexServer.TAG , "onConnect" ) ; } mObexServerSockets.prepareForNewConnect ( ) ; try { byte [ ] uuid = ( ( byte [ ] ) ( request.getHeader ( HeaderSet.TARGET ) ) ) ; if ( ! ( java.util.Arrays.equals ( uuid , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ) ) { return javax.obex.ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE ; } } catch ( java.io.IOException e ) { return javax.obex.ResponseCodes.OBEX_HTTP_INTERNAL_ERROR ; } reply.setHeader ( HeaderSet.WHO , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ; return javax.obex.ResponseCodes.OBEX_HTTP_OK ; }

Target:
public int onConnect ( final javax.obex.HeaderSet request , javax.obex.HeaderSet reply ) { if ( com.android.bluetooth.mapclient.MnsObexServer.VDBG ) { android.util.Log.v ( com.android.bluetooth.mapclient.MnsObexServer.TAG , "onConnect" ) ; } try { byte [ ] uuid = ( ( byte [ ] ) ( request.getHeader ( HeaderSet.TARGET ) ) ) ; if ( ! ( java.util.Arrays.equals ( uuid , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ) ) { return javax.obex.ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE ; } } catch ( java.io.IOException e ) { return javax.obex.ResponseCodes.OBEX_HTTP_INTERNAL_ERROR ; } reply.setHeader ( HeaderSet.WHO , com.android.bluetooth.mapclient.MnsObexServer.MNS_TARGET ) ; return javax.obex.ResponseCodes.OBEX_HTTP_OK ; }
Source:
private static void alert ( java.lang.String message , java.lang.String title , java.lang.String okTitle ) { java.lang.Object [ ] options = new java.lang.Object [ ] { okTitle } ; javax.swing.JOptionPane.showOptionDialog ( null , message , title , javax.swing.JOptionPane.DEFAULT_OPTION , javax.swing.JOptionPane.INFORMATION_MESSAGE , null , options , options [ 0 ] ) ; }

Target:
public static void alert ( java.lang.String message , java.lang.String title , java.lang.String okTitle ) { java.lang.Object [ ] options = new java.lang.Object [ ] { okTitle } ; javax.swing.JOptionPane.showOptionDialog ( null , message , title , javax.swing.JOptionPane.DEFAULT_OPTION , javax.swing.JOptionPane.INFORMATION_MESSAGE , null , options , options [ 0 ] ) ; }
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 ) { if ( attribute.getNamespaceURI ( ) . equals ( com.android.SdkConstants.ANDROID_URI ) ) { context.report ( com.android.tools.lint.checks.HardcodedDebugModeDetector.ISSUE , attribute , context.getLocation ( attribute ) , ( "Avoid hardcoding the debug mode; leaving it out allows debug and " + "release builds to automatically assign one" ) , 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 ) { if ( attribute.getNamespaceURI ( ) . equals ( com.android.SdkConstants.ANDROID_URI ) ) { context.report ( com.android.tools.lint.checks.HardcodedDebugModeDetector.ISSUE , attribute , context.getLocation ( attribute ) , ( "Avoid hardcoding the debug mode; leaving it out allows debug and " + "release builds to automatically assign one" ) ) ; } }
Source:
private void loadClass ( ) throws java.io.IOException { java.io.DataInputStream in = mInput ; in.readInt ( ) ; long id = readId ( ) ; in.readInt ( ) ; java.lang.String name = mStrings.get ( readId ( ) ) ; mClassNames.put ( id , name ) ; }

Target:
private void loadClass ( ) throws java.io.IOException { mInput.readInt ( ) ; long id = readId ( ) ; mInput.readInt ( ) ; java.lang.String name = mStrings.get ( readId ( ) ) ; mClassNames.put ( id , name ) ; }
Source:
private void setAdvertisingParameters ( com.android.bluetooth.gatt.AdvertiseClient client ) { int advertiserId = client.advertiserId ; int minAdvertiseUnit = ( ( int ) ( getAdvertisingIntervalUnit ( client.settings ) ) ) ; int maxAdvertiseUnit = minAdvertiseUnit + ( com.android.bluetooth.gatt.AdvertiseManager.AdvertiseNative.ADVERTISING_INTERVAL_DELTA_UNIT ) ; int advertiseEventType = getAdvertisingEventType ( client ) ; int txPowerLevel = getTxPowerLevel ( client.settings ) ; if ( mAdapterService.isMultiAdvertisementSupported ( ) ) { gattClientSetParamsNative ( advertiserId , minAdvertiseUnit , maxAdvertiseUnit , advertiseEventType , com.android.bluetooth.gatt.AdvertiseManager.AdvertiseNative.ADVERTISING_CHANNEL_ALL , txPowerLevel ) ; } else { } }

Target:
private void setAdvertisingParameters ( com.android.bluetooth.gatt.AdvertiseClient client ) { int advertiserId = client.advertiserId ; int minAdvertiseUnit = ( ( int ) ( getAdvertisingIntervalUnit ( client.settings ) ) ) ; int maxAdvertiseUnit = minAdvertiseUnit + ( com.android.bluetooth.gatt.AdvertiseManager.AdvertiseNative.ADVERTISING_INTERVAL_DELTA_UNIT ) ; int advertiseEventType = getAdvertisingEventType ( client ) ; int txPowerLevel = getTxPowerLevel ( client.settings ) ; gattClientSetParamsNative ( advertiserId , minAdvertiseUnit , maxAdvertiseUnit , advertiseEventType , com.android.bluetooth.gatt.AdvertiseManager.AdvertiseNative.ADVERTISING_CHANNEL_ALL , txPowerLevel ) ; }
Source:
public void testFindBoundaryCases6 ( ) { java.lang.String [ ] res = new java.lang.String [ ] { "" , "a" , "" , "" } ; java.util.regex.Pattern pat = java.util.regex.Pattern.compile ( ".*" ) ; java.util.regex.Matcher mat = pat.matcher ( "\na\n" ) ; int k = 0 ; for ( ; mat.find ( ) ; k ++ ) { assertEquals ( res [ k ] , mat.group ( ) ) ; } }

Target:
public void testFindBoundaryCases6 ( ) { java.lang.String [ ] res = new java.lang.String [ ] { "" , "a" , "" , "" } ; java.util.regex.Pattern pat = java.util.regex.Pattern.compile ( ".*" ) ; java.util.regex.Matcher mat = pat.matcher ( "\na\n" ) ; int k = 0 ; for ( ; mat.find ( ) ; k ++ ) { assertEquals ( res [ k ] , mat.group ( ) ) ; } assertEquals ( 4 , k ) ; }
Source:
protected < T > void sort ( java.util.Comparator < T > comparator ) { if ( ! ( sorted ) ) { throwIfImmutable ( ) ; java.util.Arrays.< T > sort ( ( ( T [ ] ) ( arr ) ) , comparator ) ; setImmutable ( ) ; sorted = true ; } }

Target:
protected < T > void sort ( java.util.Comparator < T > comparator ) { throwIfImmutable ( ) ; java.util.Arrays.< T > sort ( ( ( T [ ] ) ( arr ) ) , comparator ) ; setImmutable ( ) ; sorted = true ; }