auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.io.File getJdtSettingsFile ( ) { return new java.io.File ( getWorkspaceLocation ( ) , ( ( ( ( ( ( ( ( ".metadata" + ( java.io.File.separator ) ) + ".plugins" ) + ( java.io.File.separator ) ) + "org.eclipse.core.runtime" ) + ( java.io.File.separator ) ) + ".settings" ) + ( java.io.File.separator ) ) + "org.eclipse.jdt.core.prefs" ) ) ; }

Target:
private void guessSdk ( @ com.android.annotations.NonNull java.io.File projectDir ) { if ( ( mSdkLocation ) == null ) { mSdkLocation = com.android.tools.gradle.eclipse.GradleImport.getDirFromLocalProperties ( projectDir , com.android.sdklib.internal.project.ProjectProperties.PROPERTY_SDK ) ; if ( ( ( mSdkLocation ) == null ) && ( ( mWorkspaceLocation ) != null ) ) { mSdkLocation = getDirFromWorkspaceSetting ( getAdtSettingsFile ( ) , "com.android.ide.eclipse.adt.sdk" ) ; } } }
Source:
protected void onRecordLoaded ( ) { recordsToLoad -= 1 ; if ( com.android.internal.telephony.cdma.RuimRecords.DBG ) log ( ( ( ( "RuimRecords:onRecordLoaded " + ( recordsToLoad ) ) + " requested: " ) + ( recordsRequested ) ) ) ; if ( ( ( recordsToLoad ) == 0 ) && ( ( recordsRequested ) == true ) ) { onAllRecordsLoaded ( ) ; } else if ( ( recordsToLoad ) < 0 ) { loge ( "RuimRecords: recordsToLoad <0, programmer error suspected" ) ; recordsToLoad = 0 ; } }

Target:
protected void onRecordLoaded ( ) { recordsToLoad -= 1 ; if ( com.android.internal.telephony.cdma.RuimRecords.DBG ) log ( ( ( ( "onRecordLoaded " + ( recordsToLoad ) ) + " requested: " ) + ( recordsRequested ) ) ) ; if ( ( ( recordsToLoad ) == 0 ) && ( ( recordsRequested ) == true ) ) { onAllRecordsLoaded ( ) ; } else if ( ( recordsToLoad ) < 0 ) { loge ( "recordsToLoad <0, programmer error suspected" ) ; recordsToLoad = 0 ; } }
Source:
void moveUserToForeground ( com.android.server.am.UserState uss , int oldUserId , int newUserId ) { boolean homeInFront = mStackSupervisor.switchUserLocked ( newUserId , uss ) ; if ( homeInFront ) { startHomeActivityLocked ( newUserId , "moveUserToFroreground" ) ; } else { mStackSupervisor.resumeTopActivitiesLocked ( ) ; } com.android.server.am.EventLogTags.writeAmSwitchUser ( newUserId ) ; getUserManagerLocked ( ) . onUserForeground ( newUserId ) ; sendUserSwitchBroadcastsLocked ( oldUserId , newUserId ) ; }

Target:
public void notifyAppTransitionFinished ( ) { synchronized ( this ) { mStackSupervisor.notifyAppTransitionDone ( ) ; } }
Source:
public java.lang.String getShortDescription ( ) { java.lang.String attr = getDescAttribute ( ) ; if ( attr != null ) { return java.lang.String.format ( "%1$s (%2$s)" , attr , mDescriptor.getUiName ( ) ) ; } return mDescriptor.getUiName ( ) ; }

Target:
public java.lang.String getShortDescription ( ) { java.lang.String name = mDescriptor.getUiName ( ) ; java.lang.String attr = getDescAttribute ( ) ; if ( attr != null ) { if ( attr.contains ( name ) ) { return attr ; } else { return java.lang.String.format ( "%1$s (%2$s)" , attr , name ) ; } } return name ; }
Source:
private com.android.builder.VariantConfiguration getVariantWithManifestVersion ( final java.lang.String versionName ) { 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 public java.lang.String getVersionNameFromManifest ( ) { return versionName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariantWithManifestVersion ( final java.lang.String versionName ) { 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 , "test" ) { @ java.lang.Override public java.lang.String getVersionNameFromManifest ( ) { return versionName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }
Source:
public static float min ( float a , float b ) { if ( a != a ) return a ; if ( ( ( a == 0.0F ) && ( b == 0.0F ) ) && ( ( java.lang.Float.floatToRawIntBits ( b ) ) == ( java.lang.StrictMath.negativeZeroFloatBits ) ) ) { return b ; } return a <= b ? a : b ; }

Target:
public static float max ( float a , float b ) { return java.lang.Math.max ( a , b ) ; }
Source:
protected void onStart ( ) { android.os.Trace.beginSection ( "InCallActivity.onStart" ) ; com.android.dialer.common.LogUtil.i ( "InCallActivity.onStart" , "" ) ; super . onStart ( ) ; isVisible = true ; showMainInCallFragment ( ) ; common.onStart ( ) ; if ( ( com.android.dialer.compat.ActivityCompat.isInMultiWindowMode ( this ) ) && ( ! ( getResources ( ) . getBoolean ( R.bool.incall_dialpad_allowed ) ) ) ) { showDialpadFragment ( false , false ) ; } android.os.Trace.endSection ( ) ; }

Target:
protected void onStart ( ) { android.os.Trace.beginSection ( "InCallActivity.onStart" ) ; com.android.dialer.common.LogUtil.i ( "InCallActivity.onStart" , "" ) ; android.os.Trace.beginSection ( "call super" ) ; super . onStart ( ) ; android.os.Trace.endSection ( ) ; isVisible = true ; showMainInCallFragment ( ) ; common.onStart ( ) ; if ( ( com.android.dialer.compat.ActivityCompat.isInMultiWindowMode ( this ) ) && ( ! ( getResources ( ) . getBoolean ( R.bool.incall_dialpad_allowed ) ) ) ) { showDialpadFragment ( false , false ) ; } android.os.Trace.endSection ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mContext = getInstrumentation ( ) . getContext ( ) ; mHandlerThread = new android.os.HandlerThread ( "EmbmsCtsTestWorker" ) ; mHandlerThread.start ( ) ; mCallbackHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; getControlBinder ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mContext = getInstrumentation ( ) . getContext ( ) ; mHandlerThread = new android.os.HandlerThread ( "EmbmsCtsTestWorker" ) ; mHandlerThread.start ( ) ; mCallbackHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; getControlBinder ( ) ; setupStreamingSession ( ) ; }
Source:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return com.android.tools.lint.detector.api.Location.create ( context.file ) ; }

Target:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node , int start , int end ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( mParser.getPosition ( node , start , end ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return com.android.tools.lint.detector.api.Location.create ( context.file ) ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSysImg ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final java.lang.String abi , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SYS_IMAGES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public java.lang.String getPath ( ) { return abi ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSysImg ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.descriptors.IdDisplay tag , @ com.android.annotations.NonNull final java.lang.String abi , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SYS_IMAGES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.descriptors.IdDisplay getTag ( ) { return tag ; } @ java.lang.Override public java.lang.String getPath ( ) { return abi ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }
Source:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.requestDownloadState ( request , CtsDownloadService.FILE_INFO ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }

Target:
public void testGetDownloadStatus ( ) throws java.lang.Exception { android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.requestDownloadState ( request , CtsDownloadService.FILE_INFO ) ; java.util.List < android.os.Bundle > getDownloadStatusCalls = getMiddlewareCalls ( CtsDownloadService.METHOD_GET_DOWNLOAD_STATUS ) ; assertEquals ( 1 , getDownloadStatusCalls.size ( ) ) ; assertEquals ( request , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_DOWNLOAD_REQUEST ) ) ; assertEquals ( CtsDownloadService.FILE_INFO , getDownloadStatusCalls.get ( 0 ) . getParcelable ( CtsDownloadService.ARGUMENT_FILE_INFO ) ) ; }
Source:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { return false ; } }

Target:
public boolean enableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.enableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to enable supplicant due to remote exception" ) ; } return false ; }
Source:
private javax.xml.validation.Validator getValidator ( int version , com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.sdklib.repository.SdkRepository.getXsdStream ( version ) ; 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 ) ) ; javax.xml.validation.Validator validator = schema.newValidator ( ) ; if ( handler != null ) { validator.setErrorHandler ( handler ) ; } return validator ; }

Target:
private javax.xml.validation.Validator getValidator ( int version , com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler ) throws org.xml.sax.SAXException { java.io.InputStream xsdStream = com.android.sdklib.repository.SdkRepoConstants.getXsdStream ( version ) ; 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 ) ) ; javax.xml.validation.Validator validator = schema.newValidator ( ) ; if ( handler != null ) { validator.setErrorHandler ( handler ) ; } return validator ; }
Source:
public static org.eclipse.ui.IEditorPart getActiveEditor ( ) { org.eclipse.ui.IWorkbench workbench = org.eclipse.ui.PlatformUI.getWorkbench ( ) ; org.eclipse.ui.IWorkbenchWindow window = workbench.getActiveWorkbenchWindow ( ) ; if ( window == null ) { org.eclipse.ui.IWorkbenchWindow [ ] windows = workbench.getWorkbenchWindows ( ) ; if ( ( windows.length ) > 0 ) { window = windows [ 0 ] ; } } 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 getActiveEditor ( ) { org.eclipse.ui.IWorkbenchWindow window = com.android.ide.eclipse.adt.AdtUtils.getActiveWorkbenchWindow ( ) ; if ( window != null ) { org.eclipse.ui.IWorkbenchPage page = window.getActivePage ( ) ; if ( page != null ) { return page.getActiveEditor ( ) ; } } return null ; }
Source:
private boolean handlePreload ( ) { try { if ( isPreloadComplete ( ) ) { mSocketOutStream.writeInt ( 1 ) ; } else { preload ( ) ; mSocketOutStream.writeInt ( 0 ) ; } return false ; } catch ( java.io.IOException ioe ) { android.util.Log.e ( com.android.internal.os.ZygoteConnection.TAG , "Error writing to command socket" , ioe ) ; return true ; } }

Target:
private void handleAbiListQuery ( ) { try { final byte [ ] abiListBytes = abiList.getBytes ( java.nio.charset.StandardCharsets.US_ASCII ) ; mSocketOutStream.writeInt ( abiListBytes.length ) ; mSocketOutStream.write ( abiListBytes ) ; } catch ( java.io.IOException ioe ) { throw new java.lang.IllegalStateException ( "Error writing to command socket" , ioe ) ; } }
Source:
public void testNoRuntimePrompt22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testNoRuntimePrompt" ) ; }

Target:
public void testCompatRevoked22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part2" ) ; }
Source:
private void insertData ( org.json.JSONObject payloadJson ) throws java.io.IOException { if ( ! ( payloadJson.has ( "value" ) ) ) { com.android.vts.api.BigtableLegacyJsonServlet.logger.log ( java.util.logging.Level.WARNING , "Missing attributes for datastore api insertRow()." ) ; return ; } try { byte [ ] value = org.apache.commons.codec.binary.Base64.decodeBase64 ( payloadJson.getString ( "value" ) ) ; com.android.vts.proto.VtsReportMessage.TestReportMessage testReportMessage = com.android.vts.proto.VtsReportMessage.TestReportMessage.parseFrom ( value ) ; com.android.vts.util.DatastoreHelper.insertData ( testReportMessage ) ; } catch ( com.google.protobuf.InvalidProtocolBufferException e ) { com.android.vts.api.BigtableLegacyJsonServlet.logger.log ( java.util.logging.Level.WARNING , "Invalid report posted to dashboard." ) ; } }

Target:
private void insertData ( org.json.JSONObject payloadJson ) throws java.io.IOException { if ( ! ( payloadJson.has ( "value" ) ) ) { com.android.vts.api.BigtableLegacyJsonServlet.logger.log ( java.util.logging.Level.WARNING , "Missing attributes for datastore api insertRow()." ) ; return ; } try { byte [ ] value = org.apache.commons.codec.binary.Base64.decodeBase64 ( payloadJson.getString ( "value" ) ) ; com.android.vts.proto.VtsReportMessage.TestReportMessage testReportMessage = com.android.vts.proto.VtsReportMessage.TestReportMessage.parseFrom ( value ) ; com.android.vts.util.DatastoreHelper.insertTestReport ( testReportMessage ) ; } catch ( com.google.protobuf.InvalidProtocolBufferException e ) { com.android.vts.api.BigtableLegacyJsonServlet.logger.log ( java.util.logging.Level.WARNING , "Invalid report posted to dashboard." ) ; } }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { return com.android.jack.dx.io.instructions.InstructionCodec.decodeRegisterList ( this , opcodeUnit , in ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int baseAddress = ( in.cursor ( ) ) - 1 ; int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int literal = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int target = in.readInt ( ) ; return new com.android.jack.dx.io.instructions.ZeroRegisterDecodedInstruction ( this , opcode , 0 , null , ( baseAddress + target ) , literal ) ; }
Source:
public void testStageUninstall_existingStagedDataDistro ( ) throws java.lang.Exception { byte [ ] installedDistroBytes = com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; simulateInstalledDistro ( installedDistroBytes ) ; java.io.File stagedDataDir = installer.getStagedTzDataDir ( ) ; assertTrue ( stagedDataDir.mkdir ( ) ) ; assertTrue ( installer.stageUninstall ( ) ) ; assertDistroUninstallStaged ( ) ; assertInstalledDistro ( installedDistroBytes ) ; }

Target:
public void testStageUninstall_noExistingDistro ( ) throws java.lang.Exception { assertEquals ( TimeZoneDistroInstaller.UNINSTALL_NOTHING_INSTALLED , installer.stageUninstall ( ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; }

Target:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; }
Source:
private void updateConnectionServiceFocus ( com.android.server.telecom.ConnectionServiceFocusManager.ConnectionServiceFocus connSvrFocus ) { if ( ! ( java.util.Objects.equals ( mCurrentFocus , connSvrFocus ) ) ) { if ( connSvrFocus != null ) { connSvrFocus.setConnectionServiceFocusListener ( mConnectionServiceFocusListener ) ; connSvrFocus.connectionServiceFocusGained ( ) ; } mCurrentFocus = connSvrFocus ; } }

Target:
private void updateConnectionServiceFocus ( com.android.server.telecom.ConnectionServiceFocusManager.ConnectionServiceFocus connSvrFocus ) { if ( ! ( java.util.Objects.equals ( mCurrentFocus , connSvrFocus ) ) ) { if ( connSvrFocus != null ) { connSvrFocus.setConnectionServiceFocusListener ( mConnectionServiceFocusListener ) ; connSvrFocus.connectionServiceFocusGained ( ) ; } mCurrentFocus = connSvrFocus ; android.telecom.Log.d ( this , "updateConnectionServiceFocus connSvr = %s" , connSvrFocus ) ; } }
Source:
private android.net.Uri insertMessage ( android.content.Context context , android.telephony.gsm.SmsMessage [ ] msgs ) { android.telephony.gsm.SmsMessage sms = msgs [ 0 ] ; if ( ( sms.getMessageClass ( ) ) == ( SmsMessage.MessageClass.CLASS_0 ) ) { displayClassZeroMessage ( context , sms ) ; return null ; } else if ( sms.isReplace ( ) ) { return replaceMessage ( context , msgs ) ; } else { return storeMessage ( context , msgs ) ; } }

Target:
private android.net.Uri insertMessage ( android.content.Context context , android.telephony.SmsMessage [ ] msgs ) { android.telephony.SmsMessage sms = msgs [ 0 ] ; if ( ( sms.getMessageClass ( ) ) == ( SmsMessage.MessageClass.CLASS_0 ) ) { displayClassZeroMessage ( context , sms ) ; return null ; } else if ( sms.isReplace ( ) ) { return replaceMessage ( context , msgs ) ; } else { return storeMessage ( context , msgs ) ; } }
Source:
public void testTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 5689 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "id" , transactionId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_TX_FAIL ) ; com.android.server.wifi.aware.WifiAwareHalMock.callTransmitFollowup ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onMessageSendFailNotification ( transactionId , WifiAwareNative.AWARE_STATUS_TX_FAIL ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testDisabled ( ) throws org.json.JSONException { android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callDisabled ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onAwareDownNotification ( WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public com.android.sdklib.internal.repository.SdkSource [ ] getSources ( ) { return mSources.toArray ( new com.android.sdklib.internal.repository.SdkSource [ mSources.size ( ) ] ) ; }

Target:
public com.android.sdklib.internal.repository.SdkSource [ ] getSources ( com.android.sdklib.internal.repository.SdkSourceCategory category ) { java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list = mSources.get ( category ) ; if ( list == null ) { return new com.android.sdklib.internal.repository.SdkSource [ 0 ] ; } else { return list.toArray ( new com.android.sdklib.internal.repository.SdkSource [ list.size ( ) ] ) ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.widget.LinearLayout group = new android.widget.LinearLayout ( this ) ; group.setOrientation ( LinearLayout.VERTICAL ) ; java.lang.Iterable < com.example.android.multiproject.person.Person > people = new com.example.android.multiproject.person.People ( ) ; for ( com.example.android.multiproject.person.Person person : people ) { group.addView ( new com.example.android.multiproject.library.PersonView ( this , person ) ) ; } setContentView ( group ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.widget.LinearLayout group = new android.widget.LinearLayout ( this ) ; group.setOrientation ( LinearLayout.VERTICAL ) ; java.lang.Iterable < com.example.android.multiproject.person.Person > people = new com.example.android.multiproject.person.People ( ) ; for ( com.example.android.multiproject.person.Person person : people ) { group.addView ( new com.sample.android.multiproject.library.PersonView ( this , person ) ) ; } setContentView ( group ) ; }
Source:
public void testMultiProject ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/TESTROOT/UnusedResourceDetectorTest_testMultiProject/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) + "" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }

Target:
public void testMultiProject ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/TESTROOT/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }
Source:
private void disableResourceFileChange ( org.eclipse.ltk.core.refactoring.Change change ) { if ( change instanceof org.eclipse.ltk.core.refactoring.CompositeChange ) { for ( org.eclipse.ltk.core.refactoring.Change outer : ( ( org.eclipse.ltk.core.refactoring.CompositeChange ) ( change ) ) . getChildren ( ) ) { if ( outer instanceof org.eclipse.ltk.core.refactoring.CompositeChange ) { for ( org.eclipse.ltk.core.refactoring.Change inner : ( ( org.eclipse.ltk.core.refactoring.CompositeChange ) ( outer ) ) . getChildren ( ) ) { if ( com.android.SdkConstants.FN_RESOURCE_CLASS.equals ( inner.getName ( ) ) ) { inner.setEnabled ( false ) ; } } } } } }

Target:
public static void disableRClassChanges ( org.eclipse.ltk.core.refactoring.Change change ) { if ( change.getName ( ) . equals ( com.android.SdkConstants.FN_RESOURCE_CLASS ) ) { change.setEnabled ( false ) ; } if ( change instanceof org.eclipse.ltk.core.refactoring.CompositeChange ) { for ( org.eclipse.ltk.core.refactoring.Change outer : ( ( org.eclipse.ltk.core.refactoring.CompositeChange ) ( change ) ) . getChildren ( ) ) { com.android.ide.eclipse.adt.internal.refactorings.core.RenameResourceParticipant.disableRClassChanges ( outer ) ; } } }
Source:
public void dumpShowsPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "--- Last failed" ) ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }
Source:
public com.android.jack.dx.rop.annotation.Annotations createAnnotations ( @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JAnnotation > annotations ) { com.android.jack.dx.rop.annotation.Annotations ropAnnotations = new com.android.jack.dx.rop.annotation.Annotations ( ) ; for ( com.android.jack.ir.ast.JAnnotation annotation : annotations ) { com.android.jack.dx.rop.annotation.Annotation ropAnnotation ; try { ropAnnotation = createAnnotation ( annotation ) ; } catch ( com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException e ) { continue ; } ropAnnotations.add ( ropAnnotation ) ; } ropAnnotations.setImmutable ( ) ; return ropAnnotations ; }

Target:
public com.android.jack.dx.rop.annotation.Annotations createAnnotations ( @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JAnnotation > annotations ) { com.android.jack.dx.rop.annotation.Annotations ropAnnotations = new com.android.jack.dx.rop.annotation.Annotations ( ) ; for ( com.android.jack.ir.ast.JAnnotation annotation : annotations ) { com.android.jack.dx.rop.annotation.Annotation ropAnnotation ; try { ropAnnotation = createAnnotation ( annotation ) ; } catch ( com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException e ) { continue ; } catch ( com.android.jack.backend.dex.AnnotationBuilder.BuildAnnotationException e ) { continue ; } ropAnnotations.add ( ropAnnotation ) ; } ropAnnotations.setImmutable ( ) ; return ropAnnotations ; }
Source:
public void destroyAppProfiles ( java.lang.String pkgName ) throws com.android.internal.os.InstallerConnection.InstallerException { mInstaller.execute ( "destroy_app_profiles" , pkgName ) ; }

Target:
public void rmdex ( java.lang.String codePath , java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; checkLock ( ) ; try { mInstalld.rmdex ( codePath , instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void test_parkUntil_1 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( true , 500 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( 1000 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 500 ) ; }

Target:
public void test_parkFor_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }
Source:
private void addDomain ( java.util.Iterator < java.lang.String > labels , com.android.server.wifi.hotspot2.pps.DomainMatcher.Match match ) { java.lang.String labelName = labels.next ( ) ; if ( labels.hasNext ( ) ) { com.android.server.wifi.hotspot2.pps.DomainMatcher.Label subLabel = new com.android.server.wifi.hotspot2.pps.DomainMatcher.Label ( com.android.server.wifi.hotspot2.pps.DomainMatcher.Match.None ) ; mSubDomains.put ( labelName , subLabel ) ; subLabel.addDomain ( labels , match ) ; } else { mSubDomains.put ( labelName , new com.android.server.wifi.hotspot2.pps.DomainMatcher.Label ( match ) ) ; } }

Target:
private void addDomain ( java.util.Iterator < java.lang.String > labels , com.android.server.wifi.hotspot2.DomainMatcher.Match match ) { java.lang.String labelName = labels.next ( ) ; if ( labels.hasNext ( ) ) { com.android.server.wifi.hotspot2.DomainMatcher.Label subLabel = new com.android.server.wifi.hotspot2.DomainMatcher.Label ( com.android.server.wifi.hotspot2.DomainMatcher.Match.None ) ; mSubDomains.put ( labelName , subLabel ) ; subLabel.addDomain ( labels , match ) ; } else { mSubDomains.put ( labelName , new com.android.server.wifi.hotspot2.DomainMatcher.Label ( match ) ) ; } }
Source:
public boolean createAndroidProjects ( ) { final com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.ProjectInfo mainData = collectMainPageInfo ( ) ; final com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.ProjectInfo testData = collectTestPageInfo ( ) ; org.eclipse.ui.actions.WorkspaceModifyOperation op = new org.eclipse.ui.actions.WorkspaceModifyOperation ( ) { @ java.lang.Override protected void execute ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.reflect.InvocationTargetException { createProjectAsync ( monitor , mainData , testData ) ; } } ; runAsyncOperation ( op ) ; return true ; }

Target:
public boolean createAndroidProjects ( ) { if ( ( ( mValues.importProjects ) != null ) && ( ! ( mValues.importProjects.isEmpty ( ) ) ) ) { return importProjects ( ) ; } final com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.ProjectInfo mainData = collectMainPageInfo ( ) ; final com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.ProjectInfo testData = collectTestPageInfo ( ) ; org.eclipse.ui.actions.WorkspaceModifyOperation op = new org.eclipse.ui.actions.WorkspaceModifyOperation ( ) { @ java.lang.Override protected void execute ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.reflect.InvocationTargetException { createProjectAsync ( monitor , mainData , testData , null ) ; } } ; runAsyncOperation ( op ) ; return true ; }
Source:
public void testPathDefaulting ( ) throws java.lang.Exception { libcore.java.net.CookiesTest.TestCookieStore cookieStore = new libcore.java.net.CookiesTest.TestCookieStore ( ) ; java.net.CookieManager cookieManager = new java.net.CookieManager ( cookieStore , java.net.CookiePolicy.ACCEPT_ORIGINAL_SERVER ) ; cookieManager.put ( new java.net.URI ( "http://android.com/foo/bar" ) , cookieHeaders ( "a=android" ) ) ; assertEquals ( "/foo/" , cookieStore.getCookie ( "a" ) . getPath ( ) ) ; cookieManager.put ( new java.net.URI ( "http://android.com/" ) , cookieHeaders ( "b=banana" ) ) ; assertEquals ( "/" , cookieStore.getCookie ( "b" ) . getPath ( ) ) ; cookieManager.put ( new java.net.URI ( "http://android.com/foo/" ) , cookieHeaders ( "c=carrot" ) ) ; assertEquals ( "/foo/" , cookieStore.getCookie ( "c" ) . getPath ( ) ) ; }

Target:
public void testCookieStoreGetWithPort ( ) throws java.lang.Exception { java.net.CookieStore cookieStore = new java.net.CookieManager ( ) . getCookieStore ( ) ; java.net.HttpCookie cookie = new java.net.HttpCookie ( "theme" , "light" ) ; cookieStore.add ( new java.net.URI ( "http://a.com:12345" ) , cookie ) ; assertEquals ( 1 , cookieStore.get ( new java.net.URI ( "http://a.com:12345/path1" ) ) . size ( ) ) ; assertEquals ( 1 , cookieStore.get ( new java.net.URI ( "http://a.com/path1" ) ) . size ( ) ) ; }
Source:
public void testFailListingEmptyWebviewPackages ( ) { android.webkit.WebViewProviderInfo [ ] packages = new android.webkit.WebViewProviderInfo [ 0 ] ; setupWithPackages ( packages ) ; setEnabledAndValidPackageInfos ( packages ) ; mWebViewUpdateServiceImpl.prepareWebViewInSystemServer ( ) ; org.mockito.Mockito.verify ( mTestSystemImpl , org.mockito.Mockito.never ( ) ) . onWebViewProviderChanged ( org.mockito.Matchers.anyObject ( ) ) ; android.webkit.WebViewProviderResponse response = mWebViewUpdateServiceImpl.waitForAndGetProvider ( ) ; assertEquals ( WebViewFactory.LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES , response.status ) ; }

Target:
public void testFailListingEmptyWebviewPackages ( ) { android.webkit.WebViewProviderInfo [ ] packages = new android.webkit.WebViewProviderInfo [ 0 ] ; setupWithPackages ( packages ) ; setEnabledAndValidPackageInfos ( packages ) ; runWebViewBootPreparationOnMainSync ( ) ; org.mockito.Mockito.verify ( mTestSystemImpl , org.mockito.Mockito.never ( ) ) . onWebViewProviderChanged ( org.mockito.Matchers.anyObject ( ) ) ; android.webkit.WebViewProviderResponse response = mWebViewUpdateServiceImpl.waitForAndGetProvider ( ) ; org.junit.Assert.assertEquals ( WebViewFactory.LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES , response.status ) ; }
Source:
static void deadManyInduction ( ) { int dead1 = 0 ; int dead2 = 1 ; int dead3 = 3 ; for ( int i = 0 ; i < ( Main.a.length ) ; i ++ ) { dead1 += 5 ; Main.a [ i ] = 2 ; dead2 += 10 ; dead3 += 100 ; } }

Target:
static void deadManyInduction ( ) { int dead1 = 0 ; int dead2 = 1 ; int dead3 = 3 ; for ( int i = 0 ; i < ( Main.a.length ) ; i ++ ) { dead1 += 5 ; Main.a [ i ] = ( Main.novec [ ( 2 * i ) ] ) + 2 ; dead2 += 10 ; dead3 += 100 ; } }
Source:
public void onAttached ( android.net.wifi.nan.WifiNanSession session ) { synchronized ( mLock ) { mSessions.put ( mSessionId , session ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mEventFacade.postEvent ( "WifiNanOnAttached" , mResults ) ; }

Target:
public void onAttached ( android.net.wifi.nan.WifiNanSession session ) { synchronized ( mLock ) { mSessions.put ( mSessionId , session ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mEventFacade.postEvent ( "WifiNanOnAttached" , mResults ) ; }
Source:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) android.os.Looper.prepare ( ) ; mDevice1 = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . getRemoteDevice ( com.android.bluetooth.btservice.RemoteDevicesTest.TEST_BT_ADDR_1 ) ; }

Target:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) android.os.Looper.prepare ( ) ; mDevice1 = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . getRemoteDevice ( com.android.bluetooth.btservice.RemoteDevicesTest.TEST_BT_ADDR_1 ) ; mRemoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mTelephonyProviderTestable = new com.android.providers.telephony.TelephonyProviderTestable ( ) ; mContext = new com.android.providers.telephony.TelephonyProviderTest.MockContextWithProvider ( mTelephonyProviderTestable ) ; mContentResolver = ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) ; notifyChangeCount = 0 ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mTelephonyProviderTestable = new com.android.providers.telephony.TelephonyProviderTestable ( ) ; mContext = new com.android.providers.telephony.TelephonyProviderTest.MockContextWithProvider ( mTelephonyProviderTestable ) ; mContentResolver = ( ( android.test.mock.MockContentResolver ) ( mContext.getContentResolver ( ) ) ) ; notifyChangeCount = 0 ; notifyChangeRestoreCount = 0 ; }
Source:
public java.util.Set < com.android.sdklib.repository.FullRevision > getBuildTools ( ) { com.android.sdklib.local.LocalPkgInfo [ ] pkgs = mLocalSdk.getPkgsInfos ( LocalSdk.PKG_BUILD_TOOLS ) ; java.util.TreeSet < com.android.sdklib.repository.FullRevision > bt = new java.util.TreeSet < com.android.sdklib.repository.FullRevision > ( ) ; for ( com.android.sdklib.local.LocalPkgInfo pkg : pkgs ) { if ( pkg.hasFullRevision ( ) ) { bt.add ( pkg.getFullRevision ( ) ) ; } } return java.util.Collections.unmodifiableSet ( bt ) ; }

Target:
public java.util.Set < com.android.sdklib.repository.FullRevision > getBuildTools ( ) { com.android.sdklib.repository.local.LocalPkgInfo [ ] pkgs = mLocalSdk.getPkgsInfos ( LocalSdk.PKG_BUILD_TOOLS ) ; java.util.TreeSet < com.android.sdklib.repository.FullRevision > bt = new java.util.TreeSet < com.android.sdklib.repository.FullRevision > ( ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : pkgs ) { if ( pkg.hasFullRevision ( ) ) { bt.add ( pkg.getFullRevision ( ) ) ; } } return java.util.Collections.unmodifiableSet ( bt ) ; }
Source:
public void test_setTrafficClass ( ) throws java.lang.Exception { try ( java.net.Socket s = new java.net.Socket ( ) ) { for ( int i = 0 ; i <= 255 ; ++ i ) { s.setTrafficClass ( i ) ; assertEquals ( ( i & ( ~ ( libcore.java.net.SocketTest.INET_ECN_MASK ) ) ) , s.getTrafficClass ( ) ) ; } } }

Target:
public void test_setTrafficClass ( ) throws java.lang.Exception { try ( java.net.Socket s = new java.net.Socket ( ) ) { for ( int i = 0 ; i <= 255 ; ++ i ) { s.setTrafficClass ( i ) ; int actual = s.getTrafficClass ( ) ; assertTrue ( ( ( i == actual ) || ( actual == ( i & ( ~ ( libcore.java.net.SocketTest.INET_ECN_MASK ) ) ) ) ) ) ; } } }
Source:
private static byte [ ] toByteArray ( java.io.InputStream in ) throws java.io.IOException { java.io.ByteArrayOutputStream result = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buf = new byte [ 16384 ] ; int chunkSize ; while ( ( chunkSize = in.read ( buf ) ) != ( - 1 ) ) { result.write ( buf , 0 , chunkSize ) ; } return result.toByteArray ( ) ; }

Target:
private void assertVerifiedForEachForMinSdkVersion ( java.lang.String apkFilenameInResources , java.lang.String [ ] args , int minSdkVersion ) throws java.lang.Exception { assertVerifiedForEach ( apkFilenameInResources , args , minSdkVersion , null ) ; }
Source:
public static < T > io.appium.droiddriver.finders.Predicate < T > anyOf ( final io.appium.droiddriver.finders.Predicate < ? super T > ... components ) { return new io.appium.droiddriver.finders.Predicate < T > ( ) { @ java.lang.Override public boolean apply ( T input ) { for ( io.appium.droiddriver.finders.Predicate < ? super T > each : components ) { if ( each.apply ( input ) ) { return true ; } } return false ; } @ java.lang.Override public java.lang.String toString ( ) { return ( "anyOf(" + ( android.text.TextUtils.join ( ", " , components ) ) ) + ")" ; } } ; }

Target:
public static < T > io.appium.droiddriver.finders.Predicate < T > allOf ( final io.appium.droiddriver.finders.Predicate < ? super T > ... components ) { return io.appium.droiddriver.finders.Predicates.< T > allOf ( java.util.Arrays.asList ( components ) ) ; }
Source:
public final javax.crypto.SecretKey generateSecret ( java.lang.String algorithm ) throws java.lang.IllegalStateException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException { return spiImpl.engineGenerateSecret ( algorithm ) ; }

Target:
private javax.crypto.KeyAgreementSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.KeyAgreement.tryAlgorithm ( key , specifiedProvider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( javax.crypto.KeyAgreementSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public void comment ( char [ ] chars , int start , int length ) throws org.xml.sax.SAXException { java.lang.String comment = new java.lang.String ( chars , start , length ) ; org.w3c.dom.Comment domComment = mDocument.createComment ( comment ) ; com.android.utils.PositionXmlParser.Position currentPosition = getCurrentPosition ( ) ; com.android.utils.PositionXmlParser.Position startPosition = findOpeningTag ( currentPosition ) ; startPosition.setEnd ( currentPosition ) ; domComment.setUserData ( com.android.utils.PositionXmlParser.POS_KEY , startPosition , null ) ; addNodeToParent ( domComment ) ; }

Target:
public void comment ( char [ ] chars , int start , int length ) throws org.xml.sax.SAXException { flushText ( ) ; java.lang.String comment = new java.lang.String ( chars , start , length ) ; org.w3c.dom.Comment domComment = mDocument.createComment ( comment ) ; com.android.utils.PositionXmlParser.Position currentPosition = getCurrentPosition ( ) ; com.android.utils.PositionXmlParser.Position startPosition = findOpeningTag ( currentPosition ) ; startPosition.setEnd ( currentPosition ) ; domComment.setUserData ( com.android.utils.PositionXmlParser.POS_KEY , startPosition , null ) ; addNodeToParent ( domComment ) ; }
Source:
public void compileBouncycastle ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.disableDxOptimizations ( ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.CLASSPATH ) , outDexFolder , false , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST ) ; }

Target:
public void compileBouncycastle ( ) throws java.lang.Exception { java.io.File outDexFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.disableDxOptimizations ( ) ; toolchain.addToClasspath ( com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.CLASSPATH ) . srcToExe ( outDexFolder , false , com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST ) ; }