auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.DISCONNECT , device ) ; return true ; }

Target:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; android.util.Log.d ( com.android.bluetooth.hfp.HeadsetService.TAG , ( "disconnect: device=" + device ) ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( ( "disconnect: not connected/connecting, connectionState=" + connectionState ) + ", device=" ) + device ) ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.DISCONNECT , device ) ; return true ; }
Source:
public org.eclipse.swt.graphics.Image getPageImage ( ) { return com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getIcon ( "editor_page_design" ) ; }

Target:
public org.eclipse.swt.graphics.Image getPageImage ( ) { org.eclipse.core.resources.IFile file = mEditor.getInputFile ( ) ; if ( file != null ) { org.eclipse.core.resources.IContainer parent = file.getParent ( ) ; if ( parent != null ) { org.eclipse.swt.graphics.Image flag = com.android.ide.eclipse.adt.internal.editors.layout.configuration.LocaleManager.get ( ) . getFlagForFolderName ( parent.getName ( ) ) ; if ( flag != null ) { return flag ; } } } return com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getIcon ( "editor_page_design" ) ; }
Source:
public void dismissKeyguardLw ( ) { if ( ! ( mKeyguardMediator.isSecure ( ) ) ) { if ( mKeyguardMediator.isShowing ( ) ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { mKeyguardMediator.keyguardDone ( false , true ) ; } } ) ; } } }

Target:
public void dismissKeyguardLw ( ) { if ( mKeyguardMediator.isShowing ( ) ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { if ( mKeyguardMediator.isDismissable ( ) ) { mKeyguardMediator.keyguardDone ( false , true ) ; } else { mKeyguardMediator.dismiss ( ) ; } } } ) ; } }
Source:
boolean accept ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformPackage ) { com.android.sdklib.internal.repository.packages.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.packages.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getVersion ( ) ; return ( ! ( v.isPreview ( ) ) ) && ( ( v.getApiLevel ( ) ) == ( mApiLevel ) ) ; } return false ; }

Target:
boolean accept ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformPackage ) { com.android.sdklib.internal.repository.packages.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.packages.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getAndroidVersion ( ) ; return ( ! ( v.isPreview ( ) ) ) && ( ( v.getApiLevel ( ) ) == ( mApiLevel ) ) ; } return false ; }
Source:
com.google.common.collect.ImmutableCollection < V > createValues ( ) { return new com.google.common.collect.ImmutableMapValues < K , V > ( ) { @ java.lang.Override com.google.common.collect.ImmutableMap < K , V > map ( ) { return com.google.common.collect.ImmutableMap.this ; } } ; }

Target:
public java.util.Map.Entry < K , com.google.common.collect.ImmutableSet < V > > next ( ) { final java.util.Map.Entry < K , V > backingEntry = backingIterator.next ( ) ; return new com.google.common.collect.AbstractMapEntry < K , com.google.common.collect.ImmutableSet < V > > ( ) { @ java.lang.Override public K getKey ( ) { return backingEntry.getKey ( ) ; } @ java.lang.Override public com.google.common.collect.ImmutableSet < V > getValue ( ) { return com.google.common.collect.ImmutableSet.of ( backingEntry.getValue ( ) ) ; } } ; }
Source:
private boolean removeTaskByIdLocked ( int taskId , int flags ) { com.android.server.am.TaskRecord tr = recentTaskForIdLocked ( taskId ) ; if ( tr != null ) { tr.removeTaskActivitiesLocked ( ) ; cleanUpRemovedTaskLocked ( tr , flags ) ; if ( tr.isPersistable ) { notifyTaskPersisterLocked ( null , true ) ; } return true ; } return false ; }

Target:
public boolean removeTask ( int taskId ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.REMOVE_TASKS , "removeTask()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return removeTaskByIdLocked ( taskId , true ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
private void updateTtsSpans ( ) { for ( java.lang.Object o : mDigits.getText ( ) . getSpans ( 0 , mDigits.getText ( ) . length ( ) , android.text.style.TtsSpan.class ) ) { mDigits.getText ( ) . removeSpan ( o ) ; } android.telephony.PhoneNumberUtils.ttsSpanAsPhoneNumber ( mDigits.getText ( ) , 0 , mDigits.getText ( ) . length ( ) ) ; }

Target:
private void removePreviousDigitIfPossible ( ) { final int currentPosition = mDigits.getSelectionStart ( ) ; if ( currentPosition > 0 ) { mDigits.setSelection ( currentPosition ) ; mDigits.getText ( ) . delete ( ( currentPosition - 1 ) , currentPosition ) ; } }
Source:
public boolean onPreferenceChange ( android.support.v7.preference.Preference preference , java.lang.Object newValue ) { android.content.ComponentName name = new android.content.ComponentName ( getContext ( ) , com.android.traceur.QsService.class ) ; getContext ( ) . getPackageManager ( ) . setComponentEnabledSetting ( name , ( ( ( java.lang.Boolean ) ( newValue ) ) ? android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED : android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ) , PackageManager.DONT_KILL_APP ) ; return true ; }

Target:
public void onClick ( android.content.DialogInterface dialog , int which ) { com.android.traceur.AtraceUtils.clearSavedTraces ( ) ; }
Source:
public boolean setRoamingOverride ( int subId , java.util.List < java.lang.String > gsmRoamingList , java.util.List < java.lang.String > gsmNonRoamingList , java.util.List < java.lang.String > cdmaRoamingList , java.util.List < java.lang.String > cdmaNonRoamingList ) { enforceCarrierPrivilege ( subId ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone == null ) { return false ; } return phone.setRoamingOverride ( gsmRoamingList , gsmNonRoamingList , cdmaRoamingList , cdmaNonRoamingList ) ; }

Target:
public boolean setRoamingOverride ( int subId , java.util.List < java.lang.String > gsmRoamingList , java.util.List < java.lang.String > gsmNonRoamingList , java.util.List < java.lang.String > cdmaRoamingList , java.util.List < java.lang.String > cdmaNonRoamingList ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege ( subId , "setRoamingOverride" ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone == null ) { return false ; } return phone.setRoamingOverride ( gsmRoamingList , gsmNonRoamingList , cdmaRoamingList , cdmaNonRoamingList ) ; }
Source:
public com.google.common.hash.HashCode hashString ( java.lang.CharSequence input ) { int len = input.length ( ) ; com.google.common.hash.Hasher hasher = newHasher ( ( len * 2 ) ) ; for ( int i = 0 ; i < len ; i ++ ) { hasher.putChar ( input.charAt ( i ) ) ; } return hasher.hash ( ) ; }

Target:
public com.google.common.hash.HashCode hashUnencodedChars ( java.lang.CharSequence input ) { int len = input.length ( ) ; com.google.common.hash.Hasher hasher = newHasher ( ( len * 2 ) ) ; for ( int i = 0 ; i < len ; i ++ ) { hasher.putChar ( input.charAt ( i ) ) ; } return hasher.hash ( ) ; }
Source:
public void testSetupDriverForClientModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForClientMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupForClientMode ( ) ; org.junit.Assert.assertEquals ( null , returnedClientInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( true ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForClientMode ( ) ; }

Target:
public void testDisableSupplicant ( ) { org.mockito.Mockito.when ( mWificondControl.disableSupplicant ( ) ) . thenReturn ( true ) ; mWifiNative.disableSupplicant ( ) ; org.mockito.Mockito.verify ( mWificondControl ) . disableSupplicant ( ) ; }
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 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_NO_OTA_ACK ) ; 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_NO_OTA_ACK ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public void run ( ) { com.intellij.openapi.module.Module module = com.intellij.openapi.module.ModuleManager.getInstance ( project ) . findModuleByName ( moduleName ) ; com.android.tools.idea.templates.Parameter appEngineVersionParam = template.getMetadata ( ) . getParameter ( "appEngineVersion" ) ; java.lang.String appEngineVersion = ( appEngineVersionParam == null ) ? "unknown" : appEngineVersionParam.initial ; com.google.gct.idea.appengine.wizard.NewAppEngineModuleAction.createRunConfiguration ( project , module , moduleRoot , appEngineVersion ) ; com.google.gct.idea.appengine.wizard.NewAppEngineModuleAction.addAppEngineGradleFacet ( ) ; }

Target:
public void run ( ) { com.intellij.openapi.module.Module module = com.intellij.openapi.module.ModuleManager.getInstance ( project ) . findModuleByName ( moduleName ) ; com.google.gct.idea.appengine.wizard.Parameter appEngineVersionParam = template.getMetadata ( ) . getParameter ( "appEngineVersion" ) ; java.lang.String appEngineVersion = ( appEngineVersionParam == null ) ? "unknown" : appEngineVersionParam.initial ; com.google.gct.idea.appengine.wizard.NewAppEngineModuleAction.createRunConfiguration ( project , module , moduleRoot , appEngineVersion ) ; com.google.gct.idea.appengine.wizard.NewAppEngineModuleAction.addAppEngineGradleFacet ( ) ; }
Source:
public android.net.NetworkStatsHistory getHistoryForUid ( android.net.NetworkTemplate template , int uid , int set , int tag , int fields ) { @ com.android.server.net.NetworkStatsAccess.Level int accessLevel = checkAccessLevel ( mCallingPackage ) ; if ( tag == ( android.net.NetworkStats.TAG_NONE ) ) { return getUidComplete ( ) . getHistory ( template , uid , set , tag , fields , accessLevel ) ; } else { return getUidTagComplete ( ) . getHistory ( template , uid , set , tag , fields , accessLevel ) ; } }

Target:
public android.net.NetworkStatsHistory getHistoryForUid ( android.net.NetworkTemplate template , int uid , int set , int tag , int fields ) { if ( tag == ( android.net.NetworkStats.TAG_NONE ) ) { return getUidComplete ( ) . getHistory ( template , null , uid , set , tag , fields , java.lang.Long.MIN_VALUE , java.lang.Long.MAX_VALUE , mAccessLevel , mCallingUid ) ; } else { return getUidTagComplete ( ) . getHistory ( template , null , uid , set , tag , fields , java.lang.Long.MIN_VALUE , java.lang.Long.MAX_VALUE , mAccessLevel , mCallingUid ) ; } }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; }

Target:
public void copy3DRangeFrom ( int xoff , int yoff , int zoff , int w , int h , int d , java.lang.Object array ) { copy3DRangeFromUnchecked ( xoff , yoff , zoff , w , h , d , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public java.lang.String group ( java.lang.String name ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
private static int getMatchedGroupIndex ( long patternAddr , java.lang.String name ) { int result = java.util.regex.Matcher.getMatchedGroupIndex0 ( patternAddr , name ) ; if ( result < 0 ) { throw new java.lang.IllegalArgumentException ( ( ( "No capturing group in the pattern " + "with the name " ) + name ) ) ; } return result ; }
Source:
private void expandItem ( java.lang.Object elem ) { mTreeViewer.setExpandedState ( elem , true ) ; for ( java.lang.Object pkg : ( ( org.eclipse.jface.viewers.ITreeContentProvider ) ( mTreeViewer.getContentProvider ( ) ) ) . getChildren ( elem ) ) { mTreeViewer.setChecked ( pkg , true ) ; expandItem ( pkg ) ; } }

Target:
private void checkExpandItem ( java.lang.Object elem , org.eclipse.jface.viewers.ITreeContentProvider provider ) { if ( ( elem instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgCategory ) || ( elem instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ) { mTreeViewer.setExpandedState ( elem , true ) ; for ( java.lang.Object pkg : provider.getChildren ( elem ) ) { mTreeViewer.setChecked ( pkg , true ) ; checkExpandItem ( pkg , provider ) ; } } else if ( elem instanceof java.lang.Package ) { selectCompatibleArchives ( elem , provider ) ; } }
Source:
public void testSingleOutput ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testSingleOutput ( ) { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public void visitExceptionInfo ( proguard.optimize.peephole.Clazz clazz , proguard.optimize.peephole.Method method , proguard.optimize.peephole.CodeAttribute codeAttribute , proguard.optimize.peephole.ExceptionInfo exceptionInfo ) { instructionMarks [ exceptionInfo.u2startPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_START ; instructionMarks [ exceptionInfo.u2endPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_END ; instructionMarks [ exceptionInfo.u2handlerPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_HANDLER ; }

Target:
public void visitExceptionInfo ( proguard.optimize.peephole.Clazz clazz , proguard.optimize.peephole.Method method , proguard.optimize.peephole.CodeAttribute codeAttribute , proguard.optimize.peephole.ExceptionInfo exceptionInfo ) { int startPC = exceptionInfo.u2startPC ; int endPC = exceptionInfo.u2endPC ; int handlerPC = exceptionInfo.u2handlerPC ; instructionMarks [ startPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_START ; instructionMarks [ endPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_END ; instructionMarks [ handlerPC ] |= proguard.optimize.peephole.BranchTargetFinder.EXCEPTION_HANDLER ; if ( ( ( subroutineStarts [ handlerPC ] ) == ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) && ( ( subroutineStarts [ startPC ] ) != ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) ) { subroutineStarts [ handlerPC ] = subroutineStarts [ startPC ] ; repeat = true ; } }
Source:
public void dup2_x2 ( ) { super . dup2_x2 ( ) ; producerPop ( ) ; producerPop ( ) ; producerPop ( ) ; producerPop ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; }

Target:
public int hashCode ( ) { return ( ( super . hashCode ( ) ) ^ ( producerStack.hashCode ( ) ) ) ^ ( actualProducerStack.hashCode ( ) ) ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedPackage pkg , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findPackage ( pkg ) ; if ( c == null ) { return null ; } if ( ( c.annotations ) != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : c.annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }

Target:
public java.util.Collection < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method , int parameterIndex ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.getParameterAnnotations ( ) ) != null ) { return m.getParameterAnnotations ( ) . get ( parameterIndex ) ; } return null ; }
Source:
public void testModemSuggestNoRetry ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataCallResponse response = new com.android.internal.telephony.dataconnection.DataCallResponse ( ) ; response.suggestedRetryTime = java.lang.Integer.MAX_VALUE ; android.os.AsyncResult ar = new android.os.AsyncResult ( null , response , null ) ; org.junit.Assert.assertEquals ( RetryManager.NO_RETRY , getSuggestedRetryDelay ( ar ) ) ; }

Target:
public void testModemSuggestNoRetry ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataCallResponse response = new com.android.internal.telephony.dataconnection.DataCallResponse ( 0 , java.lang.Integer.MAX_VALUE , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS , 1440 ) ; android.os.AsyncResult ar = new android.os.AsyncResult ( null , response , null ) ; org.junit.Assert.assertEquals ( RetryManager.NO_RETRY , getSuggestedRetryDelay ( ar ) ) ; }
Source:
public void testLibraryProjects ( ) throws java.lang.Exception { mScopes = null ; java.io.File master = getProjectDir ( "MasterProject" , "bytecode/AndroidManifestWrongRegs.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "bytecode/.classpath=>.classpath" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" , "bytecode/TestService.java.txt=>src/test/pkg/TestService.java" , "bytecode/TestService.class.data=>bin/classes/test/pkg/TestService.class" , "bytecode/TestProvider.java.txt=>src/test/pkg/TestProvider.java" , "bytecode/TestProvider.class.data=>bin/classes/test/pkg/TestProvider.class" , "bytecode/TestProvider2.java.txt=>src/test/pkg/TestProvider2.java" , "bytecode/TestProvider2.class.data=>bin/classes/test/pkg/TestProvider2.class" ) ; assertEquals ( ( "MasterProject/AndroidManifest.xml:17: Error: Class referenced in the manifest, test.pkg.TestReceiver, was not found in the project or the libraries [MissingRegistered]\n" + ( ( " <service android:name=\"TestReceiver\" />\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }

Target:
public void testOkClasses ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING , com.android.tools.lint.checks.MissingClassDetector.INSTANTIATABLE , com.android.tools.lint.checks.MissingClassDetector.INNERCLASS ) ; assertEquals ( "No warnings." , lintProject ( "bytecode/AndroidManifestRegs.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "bytecode/OnClickActivity.java.txt=>src/test/pkg/OnClickActivity.java" , "bytecode/OnClickActivity.class.data=>bin/classes/test/pkg/OnClickActivity.class" , "bytecode/TestService.java.txt=>src/test/pkg/TestService.java" , "bytecode/TestService.class.data=>bin/classes/test/pkg/TestService.class" , "bytecode/TestProvider.java.txt=>src/test/pkg/TestProvider.java" , "bytecode/TestProvider.class.data=>bin/classes/test/pkg/TestProvider.class" , "bytecode/TestProvider2.java.txt=>src/test/pkg/TestProvider2.java" , "bytecode/TestProvider2.class.data=>bin/classes/test/pkg/TestProvider2.class" , "bytecode/TestReceiver.java.txt=>src/test/pkg/TestReceiver.java" , "bytecode/TestReceiver.class.data=>bin/classes/test/pkg/TestReceiver.class" ) ) ; }
Source:
public void replaceWith ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock block ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock pre : this . getPredecessorsSnapshot ( ) ) { pre.replaceAllSuccessors ( this , block ) ; } }

Target:
public com.android.jack.ir.ast.cfg.JBasicBlock detach ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock newBlock ) { if ( ! ( this . predecessors.isEmpty ( ) ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock pre : this . getPredecessorsSnapshot ( ) ) { pre.replaceAllSuccessors ( this , newBlock ) ; } } for ( com.android.jack.ir.ast.cfg.JBasicBlock successor : getSuccessors ( ) ) { replaceAllSuccessors ( successor , this ) ; } return newBlock ; }
Source:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier compareQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( reference ) ) ; if ( ( referenceQualifier.mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) { if ( ( ( compareQualifier.mValue ) == ( com.android.resources.KeyboardState.EXPOSED ) ) && ( ( mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) ) { return true ; } } return false ; }

Target:
public boolean isBetterMatchThan ( com.android.ide.common.resources.configuration.ResourceQualifier compareTo , com.android.ide.common.resources.configuration.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.common.resources.configuration.KeyboardStateQualifier compareQualifier = ( ( com.android.ide.common.resources.configuration.KeyboardStateQualifier ) ( compareTo ) ) ; com.android.ide.common.resources.configuration.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.common.resources.configuration.KeyboardStateQualifier ) ( reference ) ) ; if ( ( referenceQualifier.mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) { if ( ( ( compareQualifier.mValue ) == ( com.android.resources.KeyboardState.EXPOSED ) ) && ( ( mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) ) { return true ; } } return false ; }
Source:
public void test_JarFile_Modified_SF_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_EntryAttributes.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } }

Target:
public void test_JarFile_Modified_Manifest_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_Manifest_EntryAttributes.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } } }
Source:
public void reset ( ) { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = getSavedSettings ( ) . getState ( ) ; fakeBucketNameField.setText ( ( state == null ? "" : state.fakeBucketName ) ) ; useFakeBucketCheckbox.setSelected ( ( state == null ? false : state.shouldUseFakeBucket ) ) ; setUrlChoice ( ( state == null ? 0 : state.urlChoice ) ) ; customUrlField.setText ( ( state == null ? "" : state.customUrl ) ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTest ( getBackendUrl ( ) ) ; }

Target:
public void reset ( ) { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = getSavedSettings ( ) . getState ( ) ; fakeBucketNameField.setText ( ( state == null ? "" : state.fakeBucketName ) ) ; useFakeBucketCheckbox.setSelected ( ( state == null ? false : state.shouldUseFakeBucket ) ) ; setBackendOption ( com.google.gct.testing.config.GoogleCloudTestingConfigurable.BackendOption.values ( ) [ ( state == null ? 0 : state.backendOption ) ] ) ; customUrlField.setText ( ( state == null ? "" : state.customUrl ) ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTestAndToolResults ( getTestBackendUrl ( ) , getToolResultsBackendUrl ( ) ) ; }
Source:
public void changeIcon ( android.graphics.drawable.Drawable icon , java.lang.String description ) { if ( ( ( mFab.getDrawable ( ) ) != icon ) || ( ! ( mFab.getContentDescription ( ) . equals ( description ) ) ) ) { mFab.setImageDrawable ( icon ) ; mFab.setContentDescription ( description ) ; } }

Target:
public void changeIcon ( @ android.support.annotation.DrawableRes int iconId , java.lang.String description ) { if ( ( this . mFabIconId ) != iconId ) { mFab.setImageResource ( iconId ) ; this . mFabIconId = iconId ; } if ( ! ( mFab.getContentDescription ( ) . equals ( description ) ) ) { mFab.setContentDescription ( description ) ; } }
Source:
protected com.android.internal.telephony.SmsTracker getNewSubmitPduTracker ( java.lang.String destinationAddress , java.lang.String scAddress , java.lang.String message , com.android.internal.telephony.SmsHeader smsHeader , int format , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , boolean lastPart , java.util.concurrent.atomic.AtomicInteger unsentPartCount , java.util.concurrent.atomic.AtomicBoolean anyPartFailed , android.net.Uri messageUri , java.lang.String fullMessageText ) { android.telephony.Rlog.e ( com.android.internal.telephony.ImsSMSDispatcher.TAG , "Error! Not implemented for IMS." ) ; return null ; }

Target:
protected com.android.internal.telephony.SmsTracker getNewSubmitPduTracker ( java.lang.String destinationAddress , java.lang.String scAddress , java.lang.String message , com.android.internal.telephony.SmsHeader smsHeader , int format , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , boolean lastPart , java.util.concurrent.atomic.AtomicInteger unsentPartCount , java.util.concurrent.atomic.AtomicBoolean anyPartFailed , android.net.Uri messageUri , java.lang.String fullMessageText , int priority , boolean expectMore , int validityPeriod ) { android.telephony.Rlog.e ( com.android.internal.telephony.ImsSMSDispatcher.TAG , "Error! Not implemented for IMS." ) ; return null ; }
Source:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL209 = null ; try { { DOUBLE_LITERAL209 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3513 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL209 != null ? DOUBLE_LITERAL209.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL210 = null ; try { { LONG_LITERAL210 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3510 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL210 != null ? LONG_LITERAL210.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private int getPreviousDayGroup ( android.database.Cursor cursor ) { int startingPosition = cursor.getPosition ( ) ; moveToPreviousNonHiddenRow ( cursor ) ; if ( cursor.isBeforeFirst ( ) ) { cursor.moveToPosition ( startingPosition ) ; return CallLogGroupBuilder.DAY_GROUP_NONE ; } int result = getDayGroupForCall ( cursor.getLong ( CallLogQuery.ID ) ) ; cursor.moveToPosition ( startingPosition ) ; return result ; }

Target:
private int getPreviousDayGroup ( android.database.Cursor cursor ) { int startingPosition = cursor.getPosition ( ) ; moveToPreviousNonHiddenRow ( cursor ) ; if ( cursor.isBeforeFirst ( ) ) { cursor.moveToPosition ( startingPosition ) ; return CallLogGroupBuilder.DAY_GROUP_NONE ; } int result = getDayGroup ( cursor.getLong ( CallLogQuery.ID ) ) ; cursor.moveToPosition ( startingPosition ) ; return result ; }
Source:
public void packageApk ( java.io.File apk , java.io.File manifest ) { java.util.List < java.lang.String > aapt = new java.util.ArrayList < java.lang.String > ( java.util.Arrays.asList ( "aapt" , "package" , "-F" , apk.getPath ( ) , "-M" , manifest.getPath ( ) , "-I" , "prebuilts/sdk/current/android.jar" ) ) ; new vogar.commands.Command ( log , aapt ) . execute ( ) ; }

Target:
public void packageApk ( java.io.File apk , java.io.File manifest ) { java.util.List < java.lang.String > aapt = new java.util.ArrayList < java.lang.String > ( java.util.Arrays.asList ( "aapt" , "package" , "-F" , apk.getPath ( ) , "-M" , manifest.getPath ( ) , "-I" , androidJarPath ) ) ; new vogar.commands.Command ( log , aapt ) . execute ( ) ; }
Source:
public void testUndo_textWatcher ( ) { initTextViewForTyping ( ) ; mTextView.addTextChangedListener ( new android.widget.cts.TextViewTest.ConvertToSpacesTextWatcher ( ) ) ; mInstrumentation.sendStringSync ( "abc" ) ; mActivity.runOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { assertEquals ( " " , mTextView.getText ( ) . toString ( ) ) ; mTextView.onTextContextMenuItem ( android.R.id.undo ) ; assertEquals ( "" , mTextView.getText ( ) . toString ( ) ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }

Target:
public void testUndo_textWatcher ( ) { initTextViewForTyping ( ) ; mTextView.addTextChangedListener ( new android.widget.cts.TextViewTest.ConvertToSpacesTextWatcher ( ) ) ; mKeyEventUtil.sendString ( mTextView , "abc" ) ; mActivity.runOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { assertEquals ( " " , mTextView.getText ( ) . toString ( ) ) ; mTextView.onTextContextMenuItem ( android.R.id.undo ) ; assertEquals ( "" , mTextView.getText ( ) . toString ( ) ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }
Source:
public org.objectweb.asm.FieldVisitor visitField ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.Object value ) { if ( com.google.devtools.build.android.desugar.HeaderClassLoader.NonPrimitiveFieldCollector.isNonPrimitiveType ( desc ) ) { declaredNonPrimitiveFields.add ( new com.google.devtools.build.android.desugar.HeaderClassLoader.FieldInfo ( name , desc ) ) ; } return null ; }

Target:
public org.objectweb.asm.FieldVisitor visitField ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.Object value ) { if ( com.google.devtools.build.android.desugar.HeaderClassLoader.NonPrimitiveFieldCollector.isNonPrimitiveType ( desc ) ) { declaredNonPrimitiveFields.add ( com.google.devtools.build.android.desugar.FieldInfo.create ( internalName , name , desc ) ) ; } return null ; }
Source:
public void test_ConstructorI ( ) { java.net.InetSocketAddress isa = new java.net.InetSocketAddress ( 65535 ) ; assertEquals ( "0.0.0.0" , isa.getHostName ( ) ) ; assertEquals ( 65535 , isa.getPort ( ) ) ; try { new java.net.InetSocketAddress ( ( - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { new java.net.InetSocketAddress ( 65536 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void test_ConstructorI ( ) { java.net.InetSocketAddress isa = new java.net.InetSocketAddress ( 65535 ) ; assertEquals ( "::" , isa.getHostName ( ) ) ; assertEquals ( 65535 , isa.getPort ( ) ) ; try { new java.net.InetSocketAddress ( ( - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { new java.net.InetSocketAddress ( 65536 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ! ( o instanceof android.view.DisplayAdjustments ) ) { return false ; } android.view.DisplayAdjustments daj = ( ( android.view.DisplayAdjustments ) ( o ) ) ; return ( com.android.internal.util.Objects.equal ( daj.mCompatInfo , mCompatInfo ) ) && ( com.android.internal.util.Objects.equal ( daj.mActivityToken , mActivityToken ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ! ( o instanceof android.view.DisplayAdjustments ) ) { return false ; } android.view.DisplayAdjustments daj = ( ( android.view.DisplayAdjustments ) ( o ) ) ; return ( java.util.Objects.equals ( daj.mCompatInfo , mCompatInfo ) ) && ( java.util.Objects.equals ( daj.mActivityToken , mActivityToken ) ) ; }
Source:
static java.lang.String loadRules ( android.icu.util.ULocale locale , java.lang.String collationType ) { android.icu.util.UResourceBundle bundle = android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_COLLATION_BASE_NAME , locale ) ; android.icu.util.UResourceBundle data = ( ( android.icu.impl.ICUResourceBundle ) ( bundle ) ) . getWithFallback ( ( "collations/" + ( android.icu.impl.coll.CollationLoader.ASCII.toLowerCase ( collationType ) ) ) ) ; java.lang.String rules = data.getString ( "Sequence" ) ; return rules ; }

Target:
static java.lang.String loadRules ( android.icu.util.ULocale locale , java.lang.String collationType ) { android.icu.util.UResourceBundle bundle = android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_COLLATION_BASE_NAME , locale ) ; android.icu.util.UResourceBundle data = ( ( android.icu.impl.ICUResourceBundle ) ( bundle ) ) . getWithFallback ( ( "collations/" + ( android.icu.impl.coll.CollationLoader.ASCII.toLowerCase ( collationType ) ) ) ) ; java.lang.String rules = data.getString ( "Sequence" ) ; return rules ; }
Source:
public static synchronized void setupProjectNatures ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { if ( ( project == null ) || ( ! ( project.isOpen ( ) ) ) ) return ; if ( monitor == null ) monitor = new org.eclipse.core.runtime.NullProgressMonitor ( ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , org.eclipse.jdt.core.JavaCore.NATURE_ID , monitor ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , AdtConstants.NATURE_DEFAULT , monitor ) ; }

Target:
public static synchronized void setupProjectNatures ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor , boolean addAndroidNature ) throws org.eclipse.core.runtime.CoreException { if ( ( project == null ) || ( ! ( project.isOpen ( ) ) ) ) return ; if ( monitor == null ) monitor = new org.eclipse.core.runtime.NullProgressMonitor ( ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , org.eclipse.jdt.core.JavaCore.NATURE_ID , monitor ) ; if ( addAndroidNature ) { com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , AdtConstants.NATURE_DEFAULT , monitor ) ; } }
Source:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; byte [ ] distroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distroBytes ) ) ) ; assertInstallDistroStaged ( distroBytes ) ; assertNoInstalledDistro ( ) ; }
Source:
public static void testExceptionDetailMessages ( ) throws java.lang.Throwable { java.lang.invoke.MethodHandle handle = java.lang.invoke.MethodHandles.lookup ( ) . findVirtual ( java.lang.String.class , "concat" , java.lang.invoke.MethodType.methodType ( java.lang.String.class , java.lang.String.class ) ) ; try { handle.invokeExact ( "a" , new java.lang.Object ( ) ) ; java.lang.System.out.println ( "invokeExact(\"a\", new Object()) unexpectedly succeeded." ) ; } catch ( java.lang.invoke.WrongMethodTypeException ex ) { java.lang.System.out.println ( ( "Received exception: " + ( ex.getMessage ( ) ) ) ) ; } }

Target:
public static void testExceptionDetailMessages ( ) throws java.lang.Throwable { java.lang.invoke.MethodHandle handle = java.lang.invoke.MethodHandles.lookup ( ) . findVirtual ( java.lang.String.class , "concat" , java.lang.invoke.MethodType.methodType ( java.lang.String.class , java.lang.String.class ) ) ; try { handle.invokeExact ( "a" , new java.lang.Object ( ) ) ; java.lang.System.out.println ( "invokeExact(\"a\", new Object()) unexpectedly succeeded." ) ; } catch ( java.lang.invoke.WrongMethodTypeException ex ) { java.lang.System.out.println ( "Received WrongMethodTypeException exception" ) ; } }
Source:
public void run ( ) { try { java.lang.System.err.println ( "sleep..." ) ; java.lang.Thread.sleep ( 2000 ) ; java.lang.System.err.println ( ( ( "close " + ( s ) ) + "..." ) ) ; s.getClass ( ) . getMethod ( "close" ) . invoke ( s ) ; } catch ( java.lang.Exception ex ) { ex.printStackTrace ( ) ; } }

Target:
public void run ( ) { try { java.lang.System.err.println ( "sleep..." ) ; java.lang.Thread.sleep ( 2000 ) ; java.lang.System.err.println ( "close..." ) ; s.getClass ( ) . getMethod ( "close" ) . invoke ( s ) ; } catch ( java.lang.Exception ex ) { ex.printStackTrace ( ) ; } }
Source:
public static void v ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.VERBOSE ) { android.util.Log.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }

Target:
public static void v ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } else if ( android.telecom.Log.VERBOSE ) { android.util.Slog.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }
Source:
public void test_Jar_created_before_java_5 ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Created_by_1_4.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; } }

Target:
public void test_Jar_created_before_java_5 ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Created_by_1_4.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; } } }
Source:
public void setVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { telephony.setVisualVoicemailEnabled ( mContext.getOpPackageName ( ) , phoneAccountHandle , enabled ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public int getSimApplicationState ( ) { int simApplicationState = getSimStateIncludingLoaded ( ) ; switch ( simApplicationState ) { case android.telephony.TelephonyManager.SIM_STATE_UNKNOWN : case android.telephony.TelephonyManager.SIM_STATE_ABSENT : case android.telephony.TelephonyManager.SIM_STATE_CARD_IO_ERROR : case android.telephony.TelephonyManager.SIM_STATE_CARD_RESTRICTED : return android.telephony.TelephonyManager.SIM_STATE_UNKNOWN ; case android.telephony.TelephonyManager.SIM_STATE_READY : return android.telephony.TelephonyManager.SIM_STATE_NOT_READY ; default : return simApplicationState ; } }
Source:
synchronized void setLengthOnly ( int length ) { if ( ( length < 0 ) || ( ( ( offset ) + length ) > ( data.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( ( "length=" + length ) + ", offset=" ) + ( offset ) ) + ", buffer size=" ) + ( data.length ) ) ) ; } this . length = length ; }

Target:
public synchronized void setLength ( int length ) { if ( ( length < 0 ) || ( ( ( offset ) + length ) > ( data.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( ( "length=" + length ) + ", offset=" ) + ( offset ) ) + ", buffer size=" ) + ( data.length ) ) ) ; } this . length = length ; this . userSuppliedLength = length ; }
Source:
public java.lang.String toString ( ) { java.lang.String [ ] values = new java.lang.String [ this . getPlaceholderCount ( ) ] ; for ( int i = 0 ; i < ( values.length ) ; i ++ ) { values [ i ] = java.lang.String.format ( "{%d}" , i ) ; } return format ( new java.lang.StringBuilder ( ) , null , values ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.String [ ] values = new java.lang.String [ this . getPlaceholderCount ( ) ] ; for ( int i = 0 ; i < ( values.length ) ; i ++ ) { values [ i ] = java.lang.String.format ( "{%d}" , i ) ; } return formatAndAppend ( new java.lang.StringBuilder ( ) , null , values ) . toString ( ) ; }
Source:
protected boolean equal ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JType > a , @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JType > b ) { if ( ( a.size ( ) ) != ( b.size ( ) ) ) { return false ; } for ( int i = 0 ; i < ( a.size ( ) ) ; i ++ ) { if ( ! ( equal ( a.get ( i ) , b.get ( i ) ) ) ) { return false ; } } return true ; }

Target:
protected < T extends com.android.jack.ir.ast.JType > boolean equal ( @ javax.annotation.Nonnull java.util.List < T > a , @ javax.annotation.Nonnull java.util.List < T > b ) { if ( ( a.size ( ) ) != ( b.size ( ) ) ) { return false ; } for ( int i = 0 ; i < ( a.size ( ) ) ; i ++ ) { if ( ! ( equal ( a.get ( i ) , b.get ( i ) ) ) ) { return false ; } } return true ; }
Source:
public void TestGetRedundants ( ) { com.ibm.icu.text.DateTimePatternGenerator dtpg = com.ibm.icu.text.DateTimePatternGenerator.getInstance ( ) ; try { dtpg.getRedundants ( null ) ; } catch ( java.lang.Exception e ) { errln ( ( "DateTimeGenerator.getRedundants was not suppose to return " + "an exception when passing a null parameter." ) ) ; } try { java.util.Collection < java.lang.String > out = new java.util.LinkedHashSet < java.lang.String > ( ) ; dtpg.getRedundants ( out ) ; } catch ( java.lang.Exception e ) { errln ( ( "DateTimeGenerator.getRedundants was not suppose to return " + "an exception when passing a new LinkedHashSet<String>() parameter." ) ) ; } }

Target:
public void TestGetRedundants ( ) { com.ibm.icu.text.DateTimePatternGenerator dtpg = com.ibm.icu.text.DateTimePatternGenerator.getInstance ( ) ; try { dtpg.getRedundants ( null ) ; } catch ( java.lang.Exception e ) { errln ( ( ( "DateTimeGenerator.getRedundants was not supposed to return " + "an exception when passing a null parameter: " ) + e ) ) ; } try { java.util.Collection < java.lang.String > out = new java.util.LinkedHashSet < java.lang.String > ( ) ; dtpg.getRedundants ( out ) ; } catch ( java.lang.Exception e ) { errln ( ( ( "DateTimeGenerator.getRedundants was not supposed to return " + "an exception when passing a new LinkedHashSet<String>() parameter: " ) + e ) ) ; } }