auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void verifyValidExitPredecessor ( com.android.jack.dx.ssa.SsaBasicBlock b ) { java.util.ArrayList < com.android.jack.dx.ssa.SsaInsn > insns = b.getInsns ( ) ; com.android.jack.dx.ssa.SsaInsn lastInsn = insns.get ( ( ( insns.size ( ) ) - 1 ) ) ; com.android.jack.dx.rop.code.Rop opcode = lastInsn.getOpcode ( ) ; if ( ( ( opcode.getBranchingness ( ) ) != ( com.android.jack.dx.rop.code.Rop.BRANCH_RETURN ) ) && ( opcode != ( com.android.jack.dx.rop.code.Rops.THROW ) ) ) { throw new java.lang.RuntimeException ( ( "Exit predecessor must end" + " in valid exit statement." ) ) ; } }

Target:
private void verifyValidExitPredecessor ( com.android.jack.dx.ssa.SsaBasicBlock b ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > insns = b.getInsns ( ) ; com.android.jack.dx.ssa.SsaInsn lastInsn = insns.get ( ( ( insns.size ( ) ) - 1 ) ) ; com.android.jack.dx.rop.code.Rop opcode = lastInsn.getOpcode ( ) ; if ( ( ( opcode.getBranchingness ( ) ) != ( com.android.jack.dx.rop.code.Rop.BRANCH_RETURN ) ) && ( opcode != ( com.android.jack.dx.rop.code.Rops.THROW ) ) ) { throw new java.lang.RuntimeException ( ( "Exit predecessor must end" + " in valid exit statement." ) ) ; } }
Source:
public java.nio.ByteBuffer putLong ( int i , long x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putLong ( ix ( checkIndex ( i , SizeOf.LONG ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putLong ( int i , long x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putLong ( ix ( checkIndex ( i , SizeOf.LONG ) ) , x ) ; return this ; }
Source:
private java.io.InputStream createInputStream ( byte [ ] data , javax.crypto.Cipher cipher , boolean useBc ) { java.io.ByteArrayInputStream bytes = new java.io.ByteArrayInputStream ( data ) ; return useBc ? ( ( java.io.InputStream ) ( new org.bouncycastle.jcajce.io.CipherInputStream ( bytes , cipher ) ) ) : ( ( java.io.InputStream ) ( new javax.crypto.CipherInputStream ( bytes , cipher ) ) ) ; }

Target:
private java.io.InputStream createInputStream ( byte [ ] data , javax.crypto.Cipher cipher , boolean useBc ) { java.io.ByteArrayInputStream bytes = new java.io.ByteArrayInputStream ( data ) ; return useBc ? ( ( java.io.InputStream ) ( new javax.crypto.CipherInputStream ( bytes , cipher ) ) ) : ( ( java.io.InputStream ) ( new javax.crypto.CipherInputStream ( bytes , cipher ) ) ) ; }
Source:
private void setUsbFunction ( int mode ) { switch ( mode ) { case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_MTP : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_MTP ) ; mUsbManager.setUsbDataUnlocked ( true ) ; break ; case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_PTP : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_PTP ) ; mUsbManager.setUsbDataUnlocked ( true ) ; break ; case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_MIDI : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_MIDI ) ; mUsbManager.setUsbDataUnlocked ( true ) ; break ; default : mUsbManager.setCurrentFunction ( null ) ; mUsbManager.setUsbDataUnlocked ( false ) ; break ; } }

Target:
private void setUsbFunction ( int mode ) { switch ( mode ) { case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_MTP : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_MTP , true ) ; break ; case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_PTP : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_PTP , true ) ; break ; case com.android.settings.deviceinfo.UsbBackend.MODE_DATA_MIDI : mUsbManager.setCurrentFunction ( UsbManager.USB_FUNCTION_MIDI , true ) ; break ; default : mUsbManager.setCurrentFunction ( null , false ) ; break ; } }
Source:
public static < T > T [ ] copyOf ( T [ ] original , int newLength ) { if ( original == null ) { throw new java.lang.NullPointerException ( ) ; } if ( newLength < 0 ) { throw new java.lang.NegativeArraySizeException ( ) ; } return java.util.Arrays.copyOfRange ( original , 0 , newLength ) ; }

Target:
public static < T > T [ ] copyOf ( T [ ] original , int newLength ) { if ( original == null ) { throw new java.lang.NullPointerException ( ) ; } if ( newLength < 0 ) { throw new java.lang.NegativeArraySizeException ( java.lang.Integer.toString ( newLength ) ) ; } return java.util.Arrays.copyOfRange ( original , 0 , newLength ) ; }
Source:
public final java.lang.Class < E > getDeclaringClass ( ) { java.lang.Class clazz = getClass ( ) ; java.lang.Class zuper = clazz.getSuperclass ( ) ; return zuper == ( java.lang.Enum.class ) ? clazz : zuper ; }

Target:
public final java.lang.Class < E > getDeclaringClass ( ) { java.lang.Class < ? > clazz = getClass ( ) ; java.lang.Class < ? > zuper = clazz.getSuperclass ( ) ; return zuper == ( java.lang.Enum.class ) ? ( ( java.lang.Class < E > ) ( clazz ) ) : ( ( java.lang.Class < E > ) ( zuper ) ) ; }
Source:
public void systemReady ( ) { try { int menuState = mWindowManager.getKeycodeState ( KeyEvent.KEYCODE_MENU ) ; android.util.Log.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , ( "Menu key state: " + menuState ) ) ; if ( menuState > 0 ) { android.app.ActivityManagerNative.getDefault ( ) . enterSafeMode ( ) ; } else { mKeyguardMediator.onSystemReady ( ) ; android.os.SystemProperties.set ( "dev.bootcomplete" , "1" ) ; } } catch ( android.os.RemoteException e ) { } }

Target:
public void systemReady ( ) { try { int menuState = mWindowManager.getKeycodeState ( KeyEvent.KEYCODE_MENU ) ; android.util.Log.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , ( "Menu key state: " + menuState ) ) ; if ( menuState > 0 ) { android.app.ActivityManagerNative.getDefault ( ) . enterSafeMode ( ) ; } mKeyguardMediator.onSystemReady ( ) ; android.os.SystemProperties.set ( "dev.bootcomplete" , "1" ) ; } catch ( android.os.RemoteException e ) { } }
Source:
public RttManager.RttCapabilities getRttCapabilities ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getRttCapabilities ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRttCapabilitiesNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }

Target:
public RttManager.RttCapabilities getRttCapabilities ( ) { return mWifiVendorHal.getRttCapabilities ( ) ; }
Source:
static void testIso3 ( ) { java.util.Locale loc ; loc = new java.util.Locale ( "en" , "US" ) ; java.lang.System.out.println ( ( "loc: " + loc ) ) ; java.lang.System.out.println ( ( " iso3=" + ( loc.getISO3Language ( ) ) ) ) ; loc = new java.util.Locale ( "eng" , "USA" ) ; java.lang.System.out.println ( ( "loc: " + loc ) ) ; try { java.lang.System.out.println ( ( " iso3=" + ( loc.getISO3Language ( ) ) ) ) ; } catch ( java.util.MissingResourceException mre ) { java.lang.System.err.println ( "couldn't get iso3 language" ) ; } }

Target:
static void testIso3 ( ) { java.util.Locale loc ; loc = new java.util.Locale ( "en" , "US" ) ; java.lang.System.out.println ( ( "loc: " + loc ) ) ; java.lang.System.out.println ( ( " iso3=" + ( loc.getISO3Language ( ) ) ) ) ; loc = new java.util.Locale ( "eng" , "USA" ) ; java.lang.System.out.println ( ( "loc: " + loc ) ) ; try { java.lang.System.out.println ( ( " iso3=" + ( loc.getISO3Language ( ) ) ) ) ; } catch ( java.util.MissingResourceException mre ) { java.lang.System.out.println ( "couldn't get iso3 language" ) ; } }
Source:
public void fitWindow ( ) { myAllScreenshotsPanel.updateUI ( ) ; myWindow.pack ( ) ; int maxHeight = 0 ; for ( com.google.gct.testing.ScreenshotComparisonPanel panel : screenshotPanels ) { if ( ( panel.getPanel ( ) . getHeight ( ) ) > maxHeight ) { maxHeight = panel.getPanel ( ) . getHeight ( ) ; } } addScreenshotPanel.setHeight ( maxHeight ) ; myAllScreenshotsPanel.updateUI ( ) ; myWindow.pack ( ) ; }

Target:
public void fitWindow ( ) { if ( ( myWindow ) == null ) { return ; } myAllScreenshotsPanel.updateUI ( ) ; myWindow.pack ( ) ; int maxHeight = 0 ; for ( com.google.gct.testing.ScreenshotComparisonPanel panel : screenshotPanels ) { if ( ( panel.getPanel ( ) . getHeight ( ) ) > maxHeight ) { maxHeight = panel.getPanel ( ) . getHeight ( ) ; } } addScreenshotPanel.setHeight ( maxHeight ) ; myAllScreenshotsPanel.updateUI ( ) ; myWindow.pack ( ) ; }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { internalName = name ; isInterface = com.google.devtools.build.android.desugar.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ; super . visit ( java.lang.Math.min ( version , Opcodes.V1_7 ) , access , name , signature , superName , interfaces ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { internalName = name ; this . access = access ; this . signature = signature ; this . superName = superName ; this . interfaces = interfaces ; isInterface = com.google.devtools.build.android.desugar.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ; super . visit ( java.lang.Math.min ( version , Opcodes.V1_7 ) , access , name , signature , superName , interfaces ) ; }
Source:
public void testProcessChldReleaseActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldReleaseActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public android.net.LinkProperties.CompareResult < java.lang.String > compareAllInterfaceNames ( android.net.LinkProperties target ) { android.net.LinkProperties.CompareResult < java.lang.String > result = new android.net.LinkProperties.CompareResult < java.lang.String > ( ) ; result.removed = getAllInterfaceNames ( ) ; result.added.clear ( ) ; if ( target != null ) { for ( java.lang.String r : target.getAllInterfaceNames ( ) ) { if ( ! ( result.removed.remove ( r ) ) ) { result.added.add ( r ) ; } } } return result ; }

Target:
public android.net.LinkProperties.CompareResult < java.lang.String > compareAllInterfaceNames ( android.net.LinkProperties target ) { return new android.net.LinkProperties.CompareResult < > ( getAllInterfaceNames ( ) , ( target != null ? target.getAllInterfaceNames ( ) : null ) ) ; }
Source:
private void tryConnect ( java.net.InetSocketAddress dest , int timeout ) throws java.io.IOException { if ( isConnected ( ) ) { disconnect ( ) ; } server = doConnect ( dest , timeout ) ; try { out = new java.io.PrintStream ( new java.io.BufferedOutputStream ( server.getOutputStream ( ) ) , true , sun.net.ftp.impl.FtpClient.encoding ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.InternalError ( ( ( sun.net.ftp.impl.FtpClient.encoding ) + "encoding not found" ) ) ; } in = new java.io.BufferedInputStream ( server.getInputStream ( ) ) ; }

Target:
private void tryConnect ( java.net.InetSocketAddress dest , int timeout ) throws java.io.IOException { if ( isConnected ( ) ) { disconnect ( ) ; } server = doConnect ( dest , timeout ) ; try { out = new java.io.PrintStream ( new java.io.BufferedOutputStream ( server.getOutputStream ( ) ) , true , sun.net.ftp.impl.FtpClient.encoding ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.InternalError ( ( ( sun.net.ftp.impl.FtpClient.encoding ) + "encoding not found" ) , e ) ; } in = new java.io.BufferedInputStream ( server.getInputStream ( ) ) ; }
Source:
private static org.eclipse.ui.IEditorPart getEditor ( ) { org.eclipse.ui.IWorkbenchWindow window = org.eclipse.ui.PlatformUI.getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; if ( window != null ) { org.eclipse.ui.IWorkbenchPage page = window.getActivePage ( ) ; if ( page != null ) { return page.getActiveEditor ( ) ; } } return null ; }

Target:
public static org.eclipse.ui.IEditorPart getEditor ( ) { org.eclipse.ui.IWorkbenchWindow window = org.eclipse.ui.PlatformUI.getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; if ( window != null ) { org.eclipse.ui.IWorkbenchPage page = window.getActivePage ( ) ; if ( page != null ) { return page.getActiveEditor ( ) ; } } return null ; }
Source:
public static int exec ( com.android.jack.ir.ast.JExpression expression ) { com.android.jack.ir.impl.JavaPrecedenceVisitor visitor = new com.android.jack.ir.impl.JavaPrecedenceVisitor ( ) ; visitor.accept ( expression ) ; assert ( visitor.answer ) >= 0 : ( ( "Precedence must be >= 0 (" + expression ) + ") " ) + ( expression.getClass ( ) ) ; return visitor.answer ; }

Target:
public static int exec ( com.android.jack.ir.ast.JExpression expression ) { com.android.jack.ir.impl.JavaPrecedenceVisitor visitor = new com.android.jack.ir.impl.JavaPrecedenceVisitor ( ) ; visitor.accept ( expression ) ; assert ( visitor.answer ) >= 0 : ( ( "Precedence must be >= 0 (" + ( expression.toString ( ) ) ) + ") " ) + ( expression.getClass ( ) . toString ( ) ) ; return visitor.answer ; }
Source:
public int getRemoteClass ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getRemoteClass() - Not allowed for non-active user" ) ; return 0 ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return 0 ; return service.getRemoteClass ( device ) ; }

Target:
public int getRemoteClass ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getRemoteClass() - Not allowed for non-active user" ) ; return 0 ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return 0 ; } return service.getRemoteClass ( device ) ; }
Source:
private static java.lang.String getPathFromBaseDir ( @ javax.annotation.Nonnull java.lang.String baseDir , @ javax.annotation.Nonnull java.lang.String path ) { java.util.List < java.io.File > pathList = com.android.jack.shrob.proguard.GrammarActions.getPathFromBaseDirAsList ( baseDir , path ) ; java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; for ( java.util.Iterator < java.io.File > iter = pathList.iterator ( ) ; iter.hasNext ( ) ; ) { sb.append ( iter.next ( ) . getPath ( ) ) ; if ( iter.hasNext ( ) ) { sb.append ( java.io.File.pathSeparatorChar ) ; } } return sb.toString ( ) ; }

Target:
private static java.lang.String getPathFromBaseDir ( @ javax.annotation.Nonnull java.lang.String baseDir , @ javax.annotation.Nonnull java.lang.String path ) { java.util.List < java.io.File > pathList = com.android.jack.shrob.proguard.GrammarActions.getPathFromBaseDirAsList ( baseDir , path ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.util.Iterator < java.io.File > iter = pathList.iterator ( ) ; iter.hasNext ( ) ; ) { sb.append ( iter.next ( ) . getPath ( ) ) ; if ( iter.hasNext ( ) ) { sb.append ( java.io.File.pathSeparatorChar ) ; } } return sb.toString ( ) ; }
Source:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "VisualVoicemailCallLogFragment.onVisible" ) ; super . onVisible ( ) ; if ( ( getActivity ( ) ) != null ) { preSyncVoicemailStatusCheckExecutor.executeParallel ( getActivity ( ) ) ; com.android.dialer.logging.Logger.get ( getActivity ( ) ) . logImpression ( DialerImpression.Type.VVM_TAB_VIEWED ) ; getActivity ( ) . setVolumeControlStream ( VoicemailAudioManager.PLAYBACK_STREAM ) ; } }

Target:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "VisualVoicemailCallLogFragment.onVisible" ) ; super . onVisible ( ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( preSyncVoicemailStatusCheckExecutor ) != null ) ) { preSyncVoicemailStatusCheckExecutor.executeParallel ( getActivity ( ) ) ; com.android.dialer.logging.Logger.get ( getActivity ( ) ) . logImpression ( DialerImpression.Type.VVM_TAB_VIEWED ) ; getActivity ( ) . setVolumeControlStream ( VoicemailAudioManager.PLAYBACK_STREAM ) ; } }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , 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 java.util.List < android.content.PeriodicSync > getPeriodicSyncs ( android.accounts.Account account , java.lang.String providerName ) { java.util.ArrayList < android.content.PeriodicSync > syncs = new java.util.ArrayList < android.content.PeriodicSync > ( ) ; synchronized ( mAuthorities ) { android.content.SyncStorageEngine.AuthorityInfo authority = getAuthorityLocked ( account , providerName , "getPeriodicSyncs" ) ; if ( authority != null ) { for ( android.util.Pair < android.os.Bundle , java.lang.Long > item : authority.periodicSyncs ) { syncs.add ( new android.content.PeriodicSync ( account , providerName , item.first , item.second ) ) ; } } } return syncs ; }

Target:
public java.util.List < android.content.PeriodicSync > getPeriodicSyncs ( android.accounts.Account account , int userId , java.lang.String providerName ) { java.util.ArrayList < android.content.PeriodicSync > syncs = new java.util.ArrayList < android.content.PeriodicSync > ( ) ; synchronized ( mAuthorities ) { android.content.SyncStorageEngine.AuthorityInfo authority = getAuthorityLocked ( account , userId , providerName , "getPeriodicSyncs" ) ; if ( authority != null ) { for ( android.util.Pair < android.os.Bundle , java.lang.Long > item : authority.periodicSyncs ) { syncs.add ( new android.content.PeriodicSync ( account , providerName , item.first , item.second ) ) ; } } } return syncs ; }
Source:
private void createTypes ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage enclosingPackage , @ javax.annotation.Nonnull com.android.jack.ir.impl.ReferenceMapper refMap , @ javax.annotation.Nonnull org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration ) { if ( ( hasErrors ) || ( com.android.jack.ir.impl.JackIrBuilder.hasError ( typeDeclaration ) ) ) { hasErrors = true ; return ; } com.android.jack.ir.impl.EcjSourceTypeLoader.createType ( refMap , enclosingPackage , typeDeclaration.binding , typeDeclaration , new com.android.sched.util.location.FileLocation ( new java.io.File ( new java.lang.String ( typeDeclaration.compilationResult.fileName ) ) ) ) ; if ( ( typeDeclaration.memberTypes ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration memberType : typeDeclaration.memberTypes ) { createTypes ( enclosingPackage , refMap , memberType ) ; } } }

Target:
private void createTypes ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage enclosingPackage , @ javax.annotation.Nonnull com.android.jack.ir.impl.ReferenceMapper refMap , @ javax.annotation.Nonnull org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration ) { if ( ( hasErrors ) || ( com.android.jack.ir.impl.JackIrBuilder.hasError ( typeDeclaration ) ) ) { hasErrors = true ; return ; } com.android.jack.ir.impl.EcjSourceTypeLoader.createType ( refMap , enclosingPackage , typeDeclaration.binding , typeDeclaration , new com.android.sched.util.location.FileLocation ( new java.lang.String ( typeDeclaration.compilationResult.fileName ) ) ) ; if ( ( typeDeclaration.memberTypes ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration memberType : typeDeclaration.memberTypes ) { createTypes ( enclosingPackage , refMap , memberType ) ; } } }
Source:
org.xml.sax.Attributes cloneAttributes ( ) { if ( ! ( inStartElement ) ) { throw new java.lang.IllegalStateException ( org.apache.harmony.xml.ExpatParser.OUTSIDE_START_ELEMENT ) ; } if ( ( attributeCount ) == 0 ) { return org.apache.harmony.xml.ExpatParser.ClonedAttributes.EMPTY ; } int clonePointer = org.apache.harmony.xml.ExpatParser.cloneAttributes ( this . attributePointer , this . attributeCount ) ; return new org.apache.harmony.xml.ExpatParser.ClonedAttributes ( pointer , clonePointer , attributeCount ) ; }

Target:
org.xml.sax.Attributes cloneAttributes ( ) { if ( ! ( inStartElement ) ) { throw new java.lang.IllegalStateException ( org.apache.harmony.xml.ExpatParser.OUTSIDE_START_ELEMENT ) ; } if ( ( attributeCount ) == 0 ) { return org.apache.harmony.xml.ExpatParser.ClonedAttributes.EMPTY ; } long clonePointer = org.apache.harmony.xml.ExpatParser.cloneAttributes ( this . attributePointer , this . attributeCount ) ; return new org.apache.harmony.xml.ExpatParser.ClonedAttributes ( pointer , clonePointer , attributeCount ) ; }
Source:
public static int acquireFileContent ( int fileId ) { try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; int record = com.intellij.openapi.vfs.newvfs.persistent.FSRecords.getContentRecordId ( fileId ) ; if ( record > 0 ) com.intellij.openapi.vfs.newvfs.persistent.FSRecords.getContentStorage ( ) . acquireRecord ( record ) ; return record ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }

Target:
public static int acquireFileContent ( int fileId ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; try { int record = com.intellij.openapi.vfs.newvfs.persistent.FSRecords.getContentRecordId ( fileId ) ; if ( record > 0 ) com.intellij.openapi.vfs.newvfs.persistent.FSRecords.getContentStorage ( ) . acquireRecord ( record ) ; return record ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }
Source:
public void setStarts ( int index , com.android.jack.dx.rop.code.RegisterSpecSet specs ) { throwIfImmutable ( ) ; if ( specs == null ) { throw new java.lang.NullPointerException ( "specs == null" ) ; } try { blockStarts [ index ] = specs ; } catch ( java.lang.ArrayIndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "bogus index" ) ; } }

Target:
public void setStarts ( int index , com.android.jack.dx.rop.code.RegisterSpecSet specs ) { assert specs != null ; throwIfImmutable ( ) ; try { blockStarts [ index ] = specs ; } catch ( java.lang.ArrayIndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "bogus index" ) ; } }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.StringLiteral x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; push ( com.android.jack.ir.impl.JackIrBuilder.getStringLiteral ( info , x.constant.stringValue ( ) ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.StringLiteral x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; push ( com.android.jack.ir.impl.JackIrBuilder.getStringLiteral ( info , x.constant.stringValue ( ) ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public int getScanMode ( ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getScanMode() - Not allowed for non-active user" ) ; return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; return service.getScanMode ( ) ; }

Target:
public int getScanMode ( ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getScanMode() - Not allowed for non-active user" ) ; return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; } return service.getScanMode ( ) ; }
Source:
public boolean setWfdEnable ( boolean enable ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.enableWfd ( enable ) ; } else { return doBooleanCommand ( ( "SET wifi_display " + ( enable ? "1" : "0" ) ) ) ; } }

Target:
public boolean setWfdEnable ( boolean enable ) { return mSupplicantP2pIfaceHal.enableWfd ( enable ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
private static void createConfiguration ( @ com.android.annotations.NonNull org.gradle.api.artifacts.ConfigurationContainer configurations , @ com.android.annotations.NonNull java.lang.String configurationName , @ com.android.annotations.NonNull java.lang.String configurationDescription ) { org.gradle.api.artifacts.Configuration configuration = configurations.findByName ( configurationName ) ; if ( configuration == null ) { configuration = configurations.create ( configurationName ) ; } configuration.setVisible ( false ) ; configuration.setDescription ( configurationDescription ) ; }

Target:
private static void createConfiguration ( @ com.android.annotations.NonNull org.gradle.api.artifacts.ConfigurationContainer configurations , @ com.android.annotations.NonNull java.lang.String configurationName , @ com.android.annotations.NonNull java.lang.String configurationDescription ) { org.gradle.api.artifacts.Configuration configuration = configurations.findByName ( configurationName ) ; if ( configuration == null ) { configuration = configurations.create ( configurationName ) ; } }
Source:
boolean set ( int index ) { if ( ! ( get ( index ) ) ) { data [ ( index > > 6 ) ] |= 1L << index ; ( bitCount ) ++ ; return true ; } return false ; }

Target:
boolean set ( long index ) { if ( ! ( get ( index ) ) ) { data [ ( ( int ) ( index > > > 6 ) ) ] |= 1L << index ; ( bitCount ) ++ ; return true ; } return false ; }
Source:
public static com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute parseString ( java.lang.String value ) { java.util.regex.Matcher m = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute.REGEXP.matcher ( value ) ; if ( m.matches ( ) ) { return new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute ( m.group ( 2 ) , m.group ( 1 ) , m.group ( 3 ) ) ; } return null ; }

Target:
static com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute parseString ( java.lang.String value ) { java.util.regex.Matcher m = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute.REGEXP.matcher ( value ) ; if ( m.matches ( ) ) { return new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SimpleAttribute ( m.group ( 2 ) , m.group ( 1 ) , m.group ( 3 ) ) ; } return null ; }
Source:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.util.MutableLong inOffset , long byteCount ) throws android.system.ErrnoException { android.util.MutableLong internalInOffset = new android.util.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } }

Target:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.util.MutableLong inOffset , long byteCount ) throws android.system.ErrnoException { return Libcore.os.sendfile ( outFd , inFd , inOffset , byteCount ) ; }
Source:
public static java.util.List < java.lang.String > getTargetNames ( @ org.jetbrains.annotations.NotNull git4idea.repo.GitRepository repository ) { java.util.List < git4idea.GitRemoteBranch > remoteBranches = com.intellij.util.containers.ContainerUtil.sorted ( repository.getBranches ( ) . getRemoteBranches ( ) , git4idea.push.GitPushTargetPanel.REMOTE_BRANCH_COMPARATOR ) ; return com.intellij.util.containers.ContainerUtil.map ( remoteBranches , new com.intellij.util.Function < git4idea.GitRemoteBranch , java.lang.String > ( ) { @ java.lang.Override public java.lang.String fun ( git4idea.GitRemoteBranch branch ) { return branch.getNameForRemoteOperations ( ) ; } } ) ; }

Target:
private static java.util.List < java.lang.String > getTargetNames ( @ org.jetbrains.annotations.NotNull git4idea.repo.GitRepository repository ) { java.util.List < git4idea.GitRemoteBranch > remoteBranches = com.intellij.util.containers.ContainerUtil.sorted ( repository.getBranches ( ) . getRemoteBranches ( ) , git4idea.push.GitPushTargetPanel.REMOTE_BRANCH_COMPARATOR ) ; return com.intellij.util.containers.ContainerUtil.map ( remoteBranches , new com.intellij.util.Function < git4idea.GitRemoteBranch , java.lang.String > ( ) { @ java.lang.Override public java.lang.String fun ( git4idea.GitRemoteBranch branch ) { return branch.getNameForRemoteOperations ( ) ; } } ) ; }
Source:
protected void readSourceFolder ( java.io.File sourceFolder , com.android.utils.ILogger logger ) throws com.android.ide.common.res2.MergingException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( ( folder.isDirectory ( ) ) && ( ! ( isIgnored ( folder ) ) ) ) { com.android.ide.common.res2.ResourceSet.FolderData folderData = com.android.ide.common.res2.ResourceSet.getFolderData ( folder ) ; if ( folderData != null ) { parseFolder ( sourceFolder , folder , folderData , logger ) ; } } } } }

Target:
protected void readSourceFolder ( java.io.File sourceFolder , com.android.utils.ILogger logger ) throws com.android.ide.common.res2.MergingException { java.io.File [ ] folders = sourceFolder.listFiles ( ) ; if ( folders != null ) { for ( java.io.File folder : folders ) { if ( ( folder.isDirectory ( ) ) && ( ! ( isIgnored ( folder ) ) ) ) { com.android.ide.common.res2.ResourceSet.FolderData folderData = getFolderData ( folder ) ; if ( folderData != null ) { parseFolder ( sourceFolder , folder , folderData , logger ) ; } } } } }
Source:
public void testSendUuidIntent ( ) { mRemoteDevices.updateUuids ( mDevice1 ) ; android.os.Looper.myLooper ( ) . quitSafely ( ) ; android.os.Looper.loop ( ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testSendUuidIntent ( ) { mRemoteDevices.updateUuids ( mDevice1 ) ; if ( ( android.os.Looper.myLooper ( ) ) != null ) { android.os.Looper.myLooper ( ) . quitSafely ( ) ; } android.os.Looper.loop ( ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; packet.setPort ( srcAddress.getPort ( ) ) ; if ( ! ( srcAddress.getAddress ( ) . equals ( packet.getAddress ( ) ) ) ) { packet.setAddress ( srcAddress.getAddress ( ) ) ; } } return byteCount ; }

Target:
private static int postRecvfrom ( boolean isRead , java.net.DatagramPacket packet , java.net.InetSocketAddress srcAddress , int byteCount ) { if ( isRead && ( byteCount == 0 ) ) { return - 1 ; } if ( packet != null ) { packet.setReceivedLength ( byteCount ) ; packet.setAddress ( srcAddress.getAddress ( ) ) ; packet.setPort ( srcAddress.getPort ( ) ) ; } return byteCount ; }
Source:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariant ( ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
public void testKernelDomain ( ) throws java.io.FileNotFoundException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; assertNotNull ( procs ) ; for ( android.security.cts.SELinuxDomainTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + p ) + "\" found!" ) , p.isKernel ( ) ) ; } }

Target:
public void testKernelDomain ( ) throws java.io.FileNotFoundException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; if ( procs != null ) { for ( android.security.cts.SELinuxDomainTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + p ) + "\" found!" ) , p.isKernel ( ) ) ; } } }
Source:
public void testRenderingMaxResolutionLocally ( ) throws java.lang.Throwable { android.util.Log.i ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "testRenderingMaxResolutionLocally" ) ; android.util.Pair < java.lang.Integer , java.lang.Integer > maxRes = checkMaxConcurrentEncodingDecodingResolution ( ) ; android.util.Log.w ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , ( ( ( "Trying resolution w:" + ( maxRes.first ) ) + " h:" ) + ( maxRes.second ) ) ) ; runTestRenderingInSeparateThread ( maxRes.first , maxRes.second , false , false ) ; }

Target:
public void testRenderingMaxResolutionLocally ( ) throws java.lang.Throwable { android.util.Log.i ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "testRenderingMaxResolutionLocally" ) ; android.util.Pair < java.lang.Integer , java.lang.Integer > maxRes = checkMaxConcurrentEncodingDecodingResolution ( ) ; if ( maxRes == null ) return ; android.util.Log.w ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , ( ( ( "Trying resolution w:" + ( maxRes.first ) ) + " h:" ) + ( maxRes.second ) ) ) ; runTestRenderingInSeparateThread ( maxRes.first , maxRes.second , false , false ) ; }
Source:
void write ( java.io.PrintWriter writer ) { if ( ( ! ( isValid ( ) ) ) || ( annotations.isEmpty ( ) ) ) { return ; } writer.print ( " <item name=\"" ) ; writer.print ( getSignature ( ) ) ; writer.println ( "\">" ) ; for ( com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotation : annotations ) { annotation.write ( writer ) ; } writer.print ( " </item>" ) ; writer.println ( ) ; }

Target:
void write ( java.io.PrintWriter writer ) { if ( annotations.isEmpty ( ) ) { return ; } writer.print ( " <item name=\"" ) ; writer.print ( getSignature ( ) ) ; writer.println ( "\">" ) ; for ( com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotation : annotations ) { annotation.write ( writer ) ; } writer.print ( " </item>" ) ; writer.println ( ) ; }
Source:
public void send ( byte [ ] buf , int off , int len ) throws java.io.IOException { try { recordLayer.send ( buf , off , len ) ; } catch ( org.bouncycastle.crypto.tls.TlsFatalAlert fatalAlert ) { recordLayer.fail ( fatalAlert.getAlertDescription ( ) ) ; throw fatalAlert ; } catch ( java.io.IOException e ) { recordLayer.fail ( AlertDescription.internal_error ) ; throw e ; } catch ( java.lang.RuntimeException e ) { recordLayer.fail ( AlertDescription.internal_error ) ; throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.internal_error ) ; } }

Target:
public void send ( byte [ ] buf , int off , int len ) throws java.io.IOException { try { recordLayer.send ( buf , off , len ) ; } catch ( org.bouncycastle.crypto.tls.TlsFatalAlert fatalAlert ) { recordLayer.fail ( fatalAlert.getAlertDescription ( ) ) ; throw fatalAlert ; } catch ( java.io.IOException e ) { recordLayer.fail ( AlertDescription.internal_error ) ; throw e ; } catch ( java.lang.RuntimeException e ) { recordLayer.fail ( AlertDescription.internal_error ) ; throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.internal_error , e ) ; } }
Source:
public int getVoiceNetworkTypeForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getDataNetworkTypeForSubscriber" ) ) ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getServiceState ( ) . getVoiceNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }

Target:
public int getVoiceNetworkTypeForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getDataNetworkTypeForSubscriber" ) ) ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getServiceState ( ) . getVoiceNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }
Source:
public static final javax.net.ssl.SSLContext createSSLContext ( final java.lang.String protocol , final java.lang.String provider , final javax.net.ssl.KeyManager [ ] keyManagers , final javax.net.ssl.TrustManager [ ] trustManagers ) { try { javax.net.ssl.SSLContext context = javax.net.ssl.SSLContext.getInstance ( protocol , provider ) ; context.init ( keyManagers , trustManagers , new java.security.SecureRandom ( ) ) ; return context ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public static final javax.net.ssl.SSLContext createSSLContext ( final java.lang.String protocol , final javax.net.ssl.KeyManager [ ] keyManagers , final javax.net.ssl.TrustManager [ ] trustManagers ) { try { javax.net.ssl.SSLContext context = javax.net.ssl.SSLContext.getInstance ( protocol ) ; context.init ( keyManagers , trustManagers , new java.security.SecureRandom ( ) ) ; return context ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void enter ( ) { log ( ( ( ( "Enter Disconnected: " + ( getCurrentMessage ( ) . what ) ) + ", size: " ) + ( mConnectedDevicesList.size ( ) ) ) ) ; mPhonebook.resetAtState ( ) ; mPhoneState.listenForPhoneState ( false ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; mDialingOut = false ; }

Target:
public void enter ( ) { log ( ( ( ( "Enter Disconnected: " + ( getCurrentMessage ( ) . what ) ) + ", size: " ) + ( mConnectedDevicesList.size ( ) ) ) ) ; mPhonebook.resetAtState ( ) ; mPhoneState.listenForPhoneState ( false ) ; mVoiceRecognitionStarted = false ; mWaitingForVoiceRecognition = false ; }
Source:
private void acceptUpgradeRequest ( android.content.Context context ) { com.android.incallui.call.CallList callList = com.android.incallui.InCallPresenter.getInstance ( ) . getCallList ( ) ; if ( callList == null ) { com.android.incallui.StatusBarNotifier.clearAllCallNotifications ( context ) ; com.android.dialer.common.LogUtil.e ( "NotificationBroadcastReceiver.acceptUpgradeRequest" , "call list is empty" ) ; } else { com.android.incallui.call.DialerCall call = callList.getVideoUpgradeRequestCall ( ) ; if ( call != null ) { call.getVideoTech ( ) . acceptVideoRequest ( context ) ; } } }

Target:
private void acceptUpgradeRequest ( android.content.Context context ) { com.android.incallui.call.CallList callList = com.android.incallui.InCallPresenter.getInstance ( ) . getCallList ( ) ; if ( callList == null ) { com.android.incallui.StatusBarNotifier.clearAllCallNotifications ( ) ; com.android.dialer.common.LogUtil.e ( "NotificationBroadcastReceiver.acceptUpgradeRequest" , "call list is empty" ) ; } else { com.android.incallui.call.DialerCall call = callList.getVideoUpgradeRequestCall ( ) ; if ( call != null ) { call.getVideoTech ( ) . acceptVideoRequest ( context ) ; } } }
Source:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingTzLookupFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . setTzLookupXml ( null ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }
Source:
public void testConcurrentServerSocketCloseReliablyThrows ( ) { int numIterations = 100 ; for ( int i = 0 ; i < numIterations ; i ++ ) { checkConnectIterationAndCloseSocket ( ( ( ( "Iteration " + ( i + 1 ) ) + " of " ) + numIterations ) , 50 ) ; } }

Target:
public void testConcurrentServerSocketCloseReliablyThrows ( ) { int numIterations = 100 ; for ( int i = 0 ; i < numIterations ; i ++ ) { checkConnectIterationAndCloseSocket ( ( ( ( "Iteration " + ( i + 1 ) ) + " of " ) + numIterations ) , 50 , 3 ) ; } }
Source:
public static javax.xml.validation.Schema getSchema ( ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.dvlib.DeviceSchema.getXsdStream ( ) ; javax.xml.validation.SchemaFactory factory = javax.xml.validation.SchemaFactory.newInstance ( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ) ; javax.xml.validation.Schema schema = factory.newSchema ( new javax.xml.transform.stream.StreamSource ( xsdStream ) ) ; return schema ; }

Target:
public static javax.xml.validation.Schema getSchema ( ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.dvlib.DeviceSchema.getXsdStream ( ) ; if ( xsdStream == null ) { return null ; } javax.xml.validation.SchemaFactory factory = javax.xml.validation.SchemaFactory.newInstance ( javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ) ; javax.xml.validation.Schema schema = factory.newSchema ( new javax.xml.transform.stream.StreamSource ( xsdStream ) ) ; return schema ; }
Source:
public void run ( int i ) { android.net.Uri channelUri = channelUris.get ( i ) ; int j = 0 ; try ( android.database.Cursor cursor = mContentResolver.query ( android.media.tv.TvContract.buildProgramsUriForChannel ( channelUri , 0 , ( ( PROGRAM_DURATION_MS * TRANSACTION_SIZE ) / 2 ) ) , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { ++ j ; } } }

Target:
public void run ( int i ) { android.net.Uri channelUri = channelUris.get ( i ) ; try ( android.database.Cursor cursor = mContentResolver.query ( android.media.tv.TvContract.buildProgramsUriForChannel ( channelUri , 0 , ( ( PROGRAM_DURATION_MS * TRANSACTION_SIZE ) / 2 ) ) , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { } } }
Source:
private void compareReadLines ( @ javax.annotation.Nonnull java.io.BufferedReader referenceReader , @ javax.annotation.Nonnull java.io.BufferedReader candidateReader ) throws java.io.IOException { java.lang.String candidateLine = candidateReader.readLine ( ) ; while ( candidateLine != null ) { java.lang.String referenceLine = referenceReader.readLine ( ) ; junit.framework.Assert.assertEquals ( referenceLine , candidateLine ) ; candidateLine = candidateReader.readLine ( ) ; } junit.framework.Assert.assertNull ( referenceReader.readLine ( ) ) ; }

Target:
private void compareReadLines ( @ javax.annotation.Nonnull java.io.BufferedReader referenceReader , @ javax.annotation.Nonnull java.io.BufferedReader candidateReader ) throws java.io.IOException { java.lang.String referenceLine = referenceReader.readLine ( ) ; while ( referenceLine != null ) { java.lang.String candidateLine = candidateReader.readLine ( ) ; junit.framework.Assert.assertEquals ( referenceLine , candidateLine ) ; referenceLine = referenceReader.readLine ( ) ; } junit.framework.Assert.assertNull ( candidateReader.readLine ( ) ) ; }