<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import static NAMESPACE ;
 COMMENT
 public class LoggingConfigurationTests extends ElasticsearchTestCase {

 - @ awaitsfix ( bugUrl = STRING0 )
 + SINGLE
 @ test
 public void testMultipleConfigs ( ) throws Exception {
 File configDir = resolveConfigDir ( ) ;
 + logger . info ( STRING1 , configDir . getAbsolutePath ( ) ) ;
 Settings settings = ImmutableSettings . builder ( )
 . put ( STRING2 , configDir . getAbsolutePath ( ) )
 . build ( ) ;

TEST added additional logging to LoggingConfigurationTests


<nb> public class EditorWithProviderComposite extends EditorComposite {
 return new HistoryEntry ( getFile ( ) , providers , states , providers [ selectedProviderIndex ] ) ;
 }

 - void addEditor ( FileEditor editor , FileEditorProvider provider ) {
 + public void addEditor ( FileEditor editor , FileEditorProvider provider ) {
 addEditor ( editor ) ;
 myProviders = ArrayUtil . append ( myProviders , provider ) ;
 }

Convert CSV editor editor provider to explicit action


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;


<nb> public class DefaultGroupByTranslator implements GroupByTranslator {
 int groupBySize = groupBy . getSize ( ) ;

 if ( groupBySize == NUMBER0 ) {
 - groupBySize = end ;
 + groupBySize = end - start + NUMBER1 ;
 }

 topHitsBuilder . setSize ( groupBySize ) ;


<nb> public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
 exceptionHandlerMethod . invokeAndHandle ( webRequest , mavContainer , exception , handlerMethod ) ;
 }
 catch ( Exception invocationEx ) {
 - if ( logger . isErrorEnabled ( ) ) {
 - logger . error ( STRING0 + exceptionHandlerMethod , invocationEx ) ;
 + if ( logger . isDebugEnabled ( ) ) {
 + logger . debug ( STRING0 + exceptionHandlerMethod , invocationEx ) ;
 }
 return null ;
 }

Reduce log level for ExceptionHandler failure


<nb> public class RelaxedHtmlFromSchemaElementDescriptor extends XmlElementDescriptor
 }

 public static XmlAttributeDescriptor [ ] getCommonAttributeDescriptors ( XmlTag context ) {
 - final XmlNSDescriptor nsDescriptor = context != null ? context . getNSDescriptor ( STRING0 , false ) : null ;
 + final XmlNSDescriptor nsDescriptor = context != null ? context . getNSDescriptor ( context . getNamespace ( ) , false ) : null ;
 if ( nsDescriptor != null ) {
 for ( XmlElementDescriptor descriptor : nsDescriptor . getRootElementsDescriptors ( null ) ) {
 final String name = descriptor . getName ( ) ;


<nb> public class PlaybackService extends Service {
 }

 private void updateMediaSessionMetadata ( Playable p ) {
 - if ( p == null ) {
 + if ( p == null || mediaSession == null ) {
 return ;
 }
 MediaMetadataCompat . Builder builder = new MediaMetadataCompat . Builder ( ) ;
 <nb> public class PlaybackService extends Service {
 castManager . disconnect ( ) ;
 }
 }
 - } else if ( key . equals ( UserPreferences . PREF_LOCKSCREEN_BACKGROUND ) ) {
 + } else if ( UserPreferences . PREF_LOCKSCREEN_BACKGROUND . equals ( key ) ) {
 updateMediaSessionMetadata ( getPlayable ( ) ) ;
 }
 } ;

combine both preference listeners in PlaybackService


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class AbstractDatagramMulticastTest {

 int port = TestUtils . getFreePort ( ) ;

 - NetworkInterface iface = NetworkInterface . getByInetAddress ( InetAddress . getLoopbackAddress ( ) ) ;
 + NetworkInterface iface = NetworkInterface . getNetworkInterfaces ( ) . nextElement ( ) ;
 sb . setOption ( STRING0 , iface ) ;
 sb . setOption ( STRING1 , true ) ;

Fix a NPE in a testcase when running via ubuntu


<nb> public class ImageInfoIndex implements FileBasedIndexExtension {
 public Map < Integer , ImageInfo > map ( FileContent inputData ) {
 final ImageInfo info = fetchImageInfo ( inputData . getContent ( ) ) ;
 SINGLE
 - return info == null ? Collections . EMPTY_MAP : Collections . singletonMap ( FileBasedIndex . getFileId ( inputData . getFile ( ) ) , info ) ;
 + return info == null ? Collections . EMPTY_MAP : Collections . singletonMap ( Math . abs ( FileBasedIndex . getFileId ( inputData . getFile ( ) ) ) , info ) ;
 }
 } ;


<nb>
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 package NAMESPACE ;

 import NAMESPACE ;
 <nb>
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 package NAMESPACE ;

 import NAMESPACE ;


<nb> public class ZWaveController {
 transactionCompleted . release ( ) ;
 logger . trace ( STRING0 , transactionCompleted . availablePermits ( ) ) ;
 }
 +
 + SINGLE
 + ZWaveWakeUpCommandClass wakeUp = ( ZWaveWakeUpCommandClass ) node . getCommandClass ( ZWaveCommandClass . CommandClass . WAKE_UP ) ;
 + if ( wakeUp != null ) {
 + wakeUp . setAwake ( true ) ;
 + }
 break ;
 case NODE_INFO_REQ_FAILED :
 logger . debug ( STRING1 ) ;

Treat node information frame as a device wakeup


<nb> public class MessageView extends K9Activity implements OnClickListener
 SINGLE
 SINGLE
 if (
 - ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . FROYO )
 + ( Integer . parseInt ( Build . VERSION . SDK ) > Build . VERSION_CODES . ECLAIR )
 && K9 . mobileOptimizedLayout ( ) )
 {
 webSettings . setLayoutAlgorithm ( WebSettings . LayoutAlgorithm . SINGLE_COLUMN ) ;
 <nb> public class Prefs extends K9PreferenceActivity
 mZoomControlsEnabled . setChecked ( K9 . zoomControlsEnabled ( ) ) ;

 mMobileOptimizedLayout = ( CheckBoxPreference ) findPreference ( PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT ) ;
 - if ( Build . VERSION . SDK_INT < Build . VERSION_CODES . FROYO )
 + if ( Integer . parseInt ( Build . VERSION . SDK ) <= Build . VERSION_CODES . ECLAIR )
 {
 mMobileOptimizedLayout . setEnabled ( false ) ;
 }

Use a more backward compatible os version check since the current


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ClientCalls {
 throw Status . CANCELLED . withCause ( ie ) . asRuntimeException ( ) ;
 }
 }
 - if ( last instanceof Status ) {
 - throw ( ( Status ) last ) . asRuntimeException ( ) ;
 + if ( last instanceof StatusRuntimeException ) {
 + SINGLE
 + StatusRuntimeException e = ( StatusRuntimeException ) last ;
 + throw e . getStatus ( ) . asRuntimeException ( e . getTrailers ( ) ) ;
 }
 return last != this ;
 }
 <nb> public class ClientCalls {
 if ( status . isOk ( ) ) {
 buffer . add ( BlockingResponseStream . this ) ;
 } else {
 - buffer . add ( status ) ;
 + buffer . add ( status . asRuntimeException ( trailers ) ) ;
 }
 done = true ;
 }

Add trailers to Status for BlockingResponseStream


<nb> public class Sprite extends TextureRegion {
 }

 public void draw ( Batch batch , float alphaModulation ) {
 - Color color = getColor ( ) ;
 - float oldAlpha = color . a ;
 - color . a *= alphaModulation ;
 - setColor ( color ) ;
 + float oldAlpha = getColor ( ) . a ;
 + setAlpha ( oldAlpha * alphaModulation ) ;
 draw ( batch ) ;
 - color . a = oldAlpha ;
 - setColor ( color ) ;
 + setAlpha ( oldAlpha ) ;
 }

 public float getX ( ) {

Sprite draw alpha modulation optimization


<nb> public class Wallet extends BaseTaggableObject

 for ( Transaction tx : txns ) {
 try {
 - builder . append ( STRING0 ) ;
 + builder . append ( tx . getValue ( this ) . toFriendlyString ( ) ) ;
 + builder . append ( STRING1 ) ;
 builder . append ( tx . getValueSentFromMe ( this ) . toFriendlyString ( ) ) ;
 builder . append ( STRING2 ) ;
 builder . append ( tx . getValueSentToMe ( this ) . toFriendlyString ( ) ) ;
 - builder . append ( STRING3 ) ;
 - builder . append ( tx . getValue ( this ) . toFriendlyString ( ) ) ;
 - builder . append ( STRING4 ) ;
 + builder . append ( STRING5 ) ;
 } catch ( ScriptException e ) {
 SINGLE
 }

In wallet transactions dump reformat value line


<nb> public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
 @ override
 protected void onRefresh ( ) {
 super . onRefresh ( ) ;
 - registerShutdownHook ( ) ;
 try {
 createEmbeddedServletContainer ( ) ;
 }
 <nb> import NAMESPACE ;

 import static NAMESPACE ;
 import static NAMESPACE ;
 - import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 <nb> public class EmbeddedWebApplicationContextTests {
 }

 @ test
 - public void registersShutdownHook ( ) throws Exception {
 + public void doesNotRegistersShutdownHook ( ) throws Exception {
 + SINGLE
 + SINGLE
 + SINGLE
 addEmbeddedServletContainerFactoryBean ( ) ;
 this . context . refresh ( ) ;
 Field shutdownHookField = AbstractApplicationContext . class
 . getDeclaredField ( STRING0 ) ;
 shutdownHookField . setAccessible ( true ) ;
 Object shutdownHook = shutdownHookField . get ( this . context ) ;
 - assertThat ( shutdownHook , not ( nullValue ( ) ) ) ;
 + assertThat ( shutdownHook , nullValue ( ) ) ;
 }

 @ test

Don t register shutdown hook from embedded context


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class JDBCStore extends StoreBase {
 COMMENT
 COMMENT
 COMMENT
 - protected final String threadName = STRING0 ;
 + protected static final String threadName = STRING0 ;

 COMMENT
 COMMENT
 <nb> class PageInfo {
 private final HashMap < String , LinkedList < String > > xmlPrefixMapper ;
 private final HashMap < String , Mark > nonCustomTagPrefixMap ;
 private final String jspFile ;
 - private final String defaultLanguage = STRING1 ;
 + private static final String defaultLanguage = STRING1 ;
 private String language ;
 private final String defaultExtends = Constants . JSP_SERVLET_BASE ;
 private String xtends ;
 <nb> import NAMESPACE ;
 public class SendMailFactory implements ObjectFactory
 {
 SINGLE
 - protected final String DataSourceClassName =
 + protected static final String DataSourceClassName =
 STRING2 ;

 @ override


<nb> public class FutureWriter extends Writer {
 old . shutdown ( ) ;
 }

 + public static ExecutorService getExecutorService ( ) {
 + return es ;
 + }
 +
 public FutureWriter ( ) {
 }

add an accessor for the executor service


<nb> public class HelpPane extends WorkbenchPane

 public String getUrl ( )
 {
 - if ( getIFrameEx ( ) != null )
 - return getIFrameEx ( ) . getContentWindow ( ) . getLocationHref ( ) ;
 - else
 - return null ;
 + String url = null ;
 + try
 + {
 + if ( getIFrameEx ( ) != null )
 + url = getIFrameEx ( ) . getContentWindow ( ) . getLocationHref ( ) ;
 + }
 + catch ( Exception e )
 + {
 + SINGLE
 + SINGLE
 + SINGLE
 + }
 + return url ;
 }

 public String getDocTitle ( )


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public abstract class TitanBlueprintsGraph implements InternalTitanGraph {
 public Iterable < Vertex > getVertices ( ) {
 return getAutoStartTx ( ) . getVertices ( ) ;
 }
 +
 + public TypeMaker makeType ( ) {
 + return getAutoStartTx ( ) . makeType ( ) ;
 + }
 +
 + public TitanType getType ( String name ) {
 + return getAutoStartTx ( ) . getType ( name ) ;
 + }

 @ override
 public Iterable < Vertex > getVertices ( String key , Object value ) {

Made type access possible in graph by forwarding to tx


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public interface JavaLibrary extends BuildRule , HasClasspathEntries ,

 public AnnotationProcessingParams getAnnotationProcessingParams ( ) ;

 - public RuleKey . Builder appendDetailsToRuleKey ( RuleKey . Builder builder ) ;
 -
 COMMENT
 COMMENT
 COMMENT

Remove duplicated appendToRuleKey method from JavaLibrary


<nb> public class DRFTest extends TestUtil {

 Scope . enter ( ) ;
 try {
 - tfr = parse_test_file ( STRING0 ) ;
 + tfr = parse_test_file ( STRING1 ) ;
 for ( String s : new String [ ] {
 STRING2 ,
 } ) {
 <nb> public class DRFTest extends TestUtil {
 gbm = job . trainModel ( ) . get ( ) ;

 ModelMetricsRegression mm = ( ModelMetricsRegression ) gbm . _output . _training_metrics ;
 - assertEquals ( FLOAT0 , mm . mse ( ) , FLOAT1 ) ;
 + assertEquals ( FLOAT2 , mm . mse ( ) , FLOAT1 ) ;

 job . remove ( ) ;
 } finally {


<nb> public class SyncHttpHandler {
 }

 private ResponseStream handleResponse ( HttpResponse response ) throws HttpException , IOException {
 - if ( response != null ) return null ;
 + if ( response == null ) return null ;
 StatusLine status = response . getStatusLine ( ) ;
 if ( status . getStatusCode ( ) < NUMBER0 ) {
 return new ResponseStream ( response , charset , _getRequestUrl , expiry ) ;


<nb> public class DiskBasedCache implements Cache {
 private static final float HYSTERESIS_FACTOR = FLOAT0 ;

 COMMENT
 - private static final int CACHE_MAGIC = NUMBER0 ;
 + private static final int CACHE_MAGIC = NUMBER1 ;

 COMMENT
 COMMENT
 <nb> public class DiskBasedCache implements Cache {
 try {
 FileOutputStream fos = new FileOutputStream ( file ) ;
 CacheHeader e = new CacheHeader ( key , entry ) ;
 - e . writeHeader ( fos ) ;
 + boolean success = e . writeHeader ( fos ) ;
 + if ( ! success ) {
 + fos . close ( ) ;
 + VolleyLog . d ( STRING0 , file . getAbsolutePath ( ) ) ;
 + throw new IOException ( ) ;
 + }
 fos . write ( entry . data ) ;
 fos . close ( ) ;
 putEntry ( key , e ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PostUploadService extends Service {
 } else { SINGLE
 path = imageUri . toString ( ) . replace ( STRING0 , STRING1 ) ;
 jpeg = new File ( path ) ;
 + String extension = MimeTypeMap . getFileExtensionFromUrl ( path ) ;
 + if ( extension != null ) {
 + MimeTypeMap mime = MimeTypeMap . getSingleton ( ) ;
 + mimeType = mime . getMimeTypeFromExtension ( extension ) ;
 + if ( mimeType == null )
 + mimeType = STRING2 ;
 + }
 mf . setFilePath ( path ) ;
 }

Get the mime type for images outside of the media library


<nb> public class RemoteConnectionCredentialsWrapper {
 else if ( isWebDeploymentConnection ( ) ) {
 return getWebDeploymentCredentials ( ) ;
 }
 + else if ( isDockerConnection ( ) ) {
 + return getDockerCredentials ( ) ;
 + }
 else {
 throw unknownConnectionType ( ) ;
 }


<nb> public class MasterFaultDetection extends AbstractComponent {
 synchronized ( masterNodeMutex ) {
 SINGLE
 if ( masterToPing . equals ( MasterFaultDetection . this . masterNode ( ) ) ) {
 - if ( exp instanceof ConnectTransportException ) {
 + if ( exp instanceof ConnectTransportException || exp . getCause ( ) instanceof ConnectTransportException ) {
 handleTransportDisconnect ( masterToPing ) ;
 return ;
 } else if ( exp . getCause ( ) instanceof NoLongerMasterException ) {
 <nb> public class NodesFaultDetection extends AbstractComponent {
 if ( ! nodeFD . running ) {
 return ;
 }
 - if ( exp instanceof ConnectTransportException ) {
 + if ( exp instanceof ConnectTransportException || exp . getCause ( ) instanceof ConnectTransportException ) {
 handleTransportDisconnect ( node ) ;
 return ;
 }

Discovery Fault detection should also check cause exceptions for disconnects


<nb> import NAMESPACE ;

 public final class SqlUtils {

 - private static final Pattern ALPHANUMERIC = Pattern . compile ( STRING0 ) ;
 + private static final Pattern ALPHANUMERIC = Pattern . compile ( STRING1 ) ;

 COMMENT
 COMMENT
 <nb> public final class SqlUtils {
 }
 } else if ( ! ALPHANUMERIC . matcher ( identifier ) . matches ( ) ) {
 aptUtils . getMessager ( ) . printMessage ( Diagnostic . Kind . WARNING , type + STRING2 + identifier + STRING3
 - + STRING4
 - + STRING5 , element ) ;
 + + STRING6
 + + STRING7
 + + STRING8 , element ) ;
 }
 return result ;
 }

Add underscore to the list of alphanumeric characters that don t need a warning


<nb> public class MainActivity extends Activity {
 public void scanBarcodeCustomOptions ( View view ) {
 IntentIntegrator integrator = new IntentIntegrator ( this ) ;
 integrator . setDesiredBarcodeFormats ( IntentIntegrator . ONE_D_CODE_TYPES ) ;
 - integrator . autoWide ( ) ;
 integrator . initiateScan ( ) ;
 }


<nb> public class ProjectFileIndexImpl implements ProjectFileIndex {
 }

 public boolean isInSource ( @ notnull VirtualFile fileOrDir ) {
 - if ( fileOrDir . isDirectory ( ) ) {
 - DirectoryInfo info = getInfoForDirectory ( fileOrDir ) ;
 - return info != null && ( info . isInModuleSource || info . isInLibrarySource ) ;
 + DirectoryInfo info = getInfoForDirectory ( fileOrDir ) ;
 + if ( info != null ) {
 + return info . isInModuleSource || info . isInLibrarySource ;
 }
 else {
 VirtualFile parent = fileOrDir . getParent ( ) ;

Fix scope bugs in ProjectFileIndex for JS libraries


<nb> package NAMESPACE ;

 import static NAMESPACE ;
 import static NAMESPACE ;
 - import static NAMESPACE ;
 + import static NAMESPACE ;
 import static NAMESPACE ;

 import NAMESPACE ;
 <nb> import NAMESPACE ;
 name = STRING0 ,
 category = JDK ,
 summary = STRING1 ,
 - severity = WARNING ,
 + severity = ERROR ,
 maturity = MATURE
 )
 public class GetClassOnAnnotation extends BugChecker
 <nb> public class BuiltInCheckerSuppliers {
 EqualsNaN . class ,
 ForOverrideChecker . class ,
 FormatString . class ,
 + GetClassOnAnnotation . class ,
 GetClassOnClass . class ,
 GuardedByValidator . class ,
 GuardedByChecker . class ,
 <nb> public class BuiltInCheckerSuppliers {
 EqualsIncompatibleType . class ,
 Finally . class ,
 FragmentNotInstantiable . class ,
 - GetClassOnAnnotation . class ,
 GetClassOnEnum . class ,
 IncompatibleModifiersChecker . class ,
 JUnit3FloatingPointComparisonWithoutDelta . class ,


<nb> public class ZWaveConfiguration implements OpenHABConfigurationService , ZWaveEve
 record = new OpenHABConfigurationRecord ( STRING0 + STRING1 + node . getNodeId ( ) + STRING2 , STRING3 + node . getNodeId ( ) ) ;
 }
 else {
 - record = new OpenHABConfigurationRecord ( STRING0 + STRING1 + node . getNodeId ( ) + STRING2 , node . getName ( ) ) ;
 + record = new OpenHABConfigurationRecord ( STRING0 + STRING1 + node . getNodeId ( ) + STRING2 , node . getNodeId ( ) + STRING4 + node . getName ( ) ) ;
 }

 SINGLE


<nb> public class ApiClientImplementation implements ServiceConnection , Api , ApiMetho
 myInterface = null ;
 }

 + public synchronized boolean isConnected ( ) {
 + return myInterface != null ;
 + }
 +
 private synchronized void checkConnection ( ) throws ApiException {
 if ( myInterface == null ) {
 throw new ApiException ( STRING0 ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class DefaultHttpClientResponse implements HttpClientResponse {
 void handleChunk ( Buffer data ) {
 if ( paused ) {
 if ( pausedChunks == null ) {
 - pausedChunks = new LinkedList < > ( ) ;
 + pausedChunks = new ArrayDeque < > ( ) ;
 }
 pausedChunks . add ( data ) ;
 } else {

Replace LinkedList with ArrayDeque as ArrayDeque is faster


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public class GzipHandler extends HandlerWrapper
 <nb> public abstract class AbstractSession implements AbstractSessionManager . SessionI

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 protected void checkValid ( ) throws IllegalStateException
 {
 <nb> public class JDBCSessionManager extends AbstractSessionManager
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 @ override
 protected void addSession ( AbstractSession session )


<nb> final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
 @ servicethreadonly
 void deviceSelect ( int targetAddress , IHdmiControlCallback callback ) {
 assertRunOnServiceThread ( ) ;
 + ActiveSource active = getActiveSource ( ) ;
 + if ( active . isValid ( ) && targetAddress == active . logicalAddress ) {
 + invokeCallback ( callback , HdmiControlManager . RESULT_SUCCESS ) ;
 + return ;
 + }
 if ( targetAddress == Constants . ADDR_INTERNAL ) {
 handleSelectInternalSource ( ) ;
 SINGLE
 <nb> class TvInputHardwareManager implements TvInputHal . Callback {
 if ( inputId != null ) {
 Intent intent = new Intent ( Intent . ACTION_VIEW ) ;
 intent . setData ( TvContract . buildChannelUriForPassthroughTvInput ( inputId ) ) ;
 + intent . setFlags ( Intent . FLAG_ACTIVITY_NEW_TASK ) ;
 mContext . startActivity ( intent ) ;
 } else {
 Slog . w ( TAG , STRING0 + device ) ;

Make deviceSelect to active device a no op


<nb> final class HazelcastInstanceLoader {

 if ( ! isEmpty ( instanceName ) ) {
 config . setInstanceName ( instanceName ) ;
 - HazelcastInstance instance = Hazelcast . getHazelcastInstanceByName ( instanceName ) ;
 - if ( instance == null ) {
 - try {
 - instance = Hazelcast . newHazelcastInstance ( config ) ;
 - } catch ( DuplicateInstanceNameException ignored ) {
 - instance = Hazelcast . getHazelcastInstanceByName ( instanceName ) ;
 - }
 - }
 - return instance ;
 + return Hazelcast . getOrCreateHazelcastInstance ( config ) ;
 } else {
 return Hazelcast . newHazelcastInstance ( config ) ;
 }

HazelcastInstanceLoader now makes use of the new getOrCreateHazelcastInstance method


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PullToRefreshListActivity extends ListActivity {
 new GetDataTask ( ) . execute ( ) ;
 }
 } ) ;
 +
 + ListView actualListView = mPullRefreshListView . getRefreshableView ( ) ;

 mListItems = new LinkedList < String > ( ) ;
 mListItems . addAll ( Arrays . asList ( mStrings ) ) ;

 mAdapter = new ArrayAdapter < String > ( this , android . R . layout . simple_list_item_1 , mListItems ) ;
 - setListAdapter ( mAdapter ) ;
 +
 + SINGLE
 + actualListView . setAdapter ( mAdapter ) ;
 }

 private class GetDataTask extends AsyncTask < Void , Void , String [ ] > {

Make ListView sample use getRefreshableView to get ListView


<nb> public class RoutingRequest implements Cloneable , Serializable {
 if ( ! ( o instanceof RoutingRequest ) )
 return false ;
 RoutingRequest other = ( RoutingRequest ) o ;
 + if ( this . batch != other . batch )
 + return false ;
 boolean endpointsMatch ;
 if ( this . batch ) {
 if ( this . arriveBy ) {

check batch mode in routingrequest equals method


<nb> public class AndroidTableUtils {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public static < T > int dropTable ( ConnectionSource connectionSource , Class < T > dataClass , boolean ignoreErrors )
 <nb> public class AndroidTableUtils {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public static < T > int dropTable ( ConnectionSource connectionSource , DatabaseTableConfig < T > tableConfig ,


<nb> public class DefaultBroadcaster implements Broadcaster {
 COMMENT
 COMMENT
 public void destroy ( ) {
 + releaseExternalResources ( ) ;
 if ( notifierFuture != null ) {
 notifierFuture . cancel ( true ) ;
 }
 <nb> public class DefaultBroadcaster implements Broadcaster {
 SINGLE
 if ( resources . isEmpty ( ) ) {
 BroadcasterFactory . getDefault ( ) . remove ( this , name ) ;
 - this . releaseExternalResources ( ) ;
 }
 return r ;
 }

Do not release resources when there is no suspended connection


<nb> public class LazyTypeParameterDescriptor implements TypeParameterDescriptor {
 return upperBounds ;
 }

 - private JetTypeParameter resolveUpperBoundsFromWhereClause ( Set < JetType > upperBounds , boolean forClassObject ) {
 + private void resolveUpperBoundsFromWhereClause ( Set < JetType > upperBounds , boolean forClassObject ) {
 JetTypeParameter jetTypeParameter = getElement ( ) ;

 JetClassOrObject classOrObject = PsiTreeUtil . getParentOfType ( jetTypeParameter , JetClassOrObject . class ) ;
 if ( classOrObject instanceof JetClass ) {
 JetClass jetClass = ( JetClass ) classOrObject ;
 for ( JetTypeConstraint jetTypeConstraint : jetClass . getTypeConstaints ( ) ) {
 - if ( jetTypeConstraint . isClassObjectContraint ( ) == forClassObject ) continue ;
 + if ( jetTypeConstraint . isClassObjectContraint ( ) != forClassObject ) continue ;

 JetSimpleNameExpression constrainedParameterName = jetTypeConstraint . getSubjectTypeParameterName ( ) ;
 if ( constrainedParameterName != null ) {
 <nb> public class LazyTypeParameterDescriptor implements TypeParameterDescriptor {
 }
 }
 }
 - return jetTypeParameter ;
 +
 }

 private JetTypeParameter getElement ( ) {


<nb>
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 package NAMESPACE ;

 import NAMESPACE ;


<nb> public class TestRegistration extends TomcatBaseTest {
 assertTrue ( STRING0 + missing , missing . isEmpty ( ) ) ;

 SINGLE
 - List additional = found ;
 + List < String > additional = found ;
 additional . removeAll ( expected ) ;
 assertTrue ( STRING1 + additional , additional . isEmpty ( ) ) ;


<nb> public class RepositoryHelper {
 indicator . checkCanceled ( ) ;
 }

 - if ( connection . getResponseCode ( ) == NUMBER0 ) {
 + if ( connection . getResponseCode ( ) == HttpURLConnection . HTTP_NOT_MODIFIED ) {
 return loadPluginList ( pluginListFile ) ;
 }


<nb> public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase {
 SINGLE
 ownerClassDescriptor = DescriptorUtils . getClassDescriptorForType ( selectedReceiverType . getType ( ) ) ;
 JetType receiverType = ownerClassDescriptor . getDefaultType ( ) ;
 - PsiElement typeDeclaration = BindingContextUtils . classDescriptorToDeclaration ( currentFileContext , ownerClassDescriptor ) ;
 - if ( typeDeclaration != null && typeDeclaration instanceof JetClass ) {
 - ownerClass = ( JetClass ) typeDeclaration ;
 + PsiElement classDeclaration = BindingContextUtils . classDescriptorToDeclaration ( currentFileContext , ownerClassDescriptor ) ;
 + if ( classDeclaration != null && classDeclaration instanceof JetClass ) {
 + ownerClass = ( JetClass ) classDeclaration ;
 isExtension = ! ownerClass . isWritable ( ) ;
 } else {
 isExtension = true ;

Renamed typeDeclaration to classDeclaration


<nb> public class ApplicationPidFileWriter implements
 writePidFile ( event ) ;
 }
 catch ( Exception ex ) {
 - logger . warn ( String . format ( STRING0 , this . file ) ) ;
 + logger . warn ( String . format ( STRING0 , this . file ) , ex ) ;
 }
 }
 }

Include exception in warning message when pid file cannot be created


<nb> public class FilterListActivity extends ListFragment {

 getActivity ( ) . setDefaultKeyMode ( Activity . DEFAULT_KEYS_SEARCH_LOCAL ) ;
 SINGLE
 - newListButton = getView ( ) . findViewById ( R . id . new_list_button ) ;
 + newListButton = getView ( ) . findViewById ( R . id . lists_footer ) ;

 SINGLE
 SINGLE


<nb> public final class HttpMethod {

 public static boolean permitsRequestBody ( String method ) {
 return requiresRequestBody ( method )
 + || method . equals ( STRING0 )
 || method . equals ( STRING1 ) SINGLE
 || method . equals ( STRING2 ) SINGLE
 || method . equals ( STRING3 ) SINGLE


<nb> import NAMESPACE ;

 class StatusView {
 public static final int LOCK_ICON = NUMBER0 ; SINGLE
 - public static final int ALARM_ICON = NUMBER0 ; SINGLE
 + public static final int ALARM_ICON = R . drawable . ic_lock_idle_alarm ;
 public static final int CHARGING_ICON = NUMBER0 ; SINGLE
 public static final int BATTERY_LOW_ICON = NUMBER0 ; SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 - COMMENT
 + COMMENT
 public class Redactor < T extends Message > {
 private static final Redactor < ? > NOOP_REDACTOR = new Redactor < Message > ( null , null , null , null ) {
 @ override
 <nb> public class Redactor < T extends Message > {
 }
 }

 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ suppresswarnings ( STRING0 ) SINGLE
 public T redact ( T message ) {
 if ( message == null ) return null ;

Fix Redactor to mention that it returns a redacted copy


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 -
 + COMMENT
 + COMMENT
 + COMMENT
 public class BasicUltimateListView extends ListView {

 int currentFirstVisibleItem ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class UltimateListview extends LinearLayout {


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class IsDistinctFrom < T > extends AbstractCondition {
 + class IsDistinctFrom < T > extends AbstractCondition {

 COMMENT
 COMMENT


<nb> public class JmfDeviceDetector
 logger . debug ( STRING0 + exc . getMessage ( ) ) ;
 }

 + String disableVideoObj = ( String ) MediaActivator .
 + getConfigurationService ( ) . getProperty (
 + MediaServiceImpl . DISABLE_VIDEO_SUPPORT_PROPERTY_NAME ) ;
 +
 + SINGLE
 + boolean disableVideo = false ;
 + if ( disableVideoObj != null )
 + {
 + disableVideo = Boolean . valueOf ( disableVideoObj )
 + . booleanValue ( ) ;
 + }
 +
 + SINGLE
 + if ( disableVideo )
 + return ;
 +
 SINGLE
 SINGLE
 logger . info ( STRING1 ) ;
 <nb> public interface MediaService
 COMMENT
 COMMENT
 public static final int BIND_RETRIES_DEFAULT_VALUE = NUMBER0 ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String DISABLE_VIDEO_SUPPORT_PROPERTY_NAME
 + = STRING2 ;

 COMMENT
 COMMENT

Add property to media service to disable video support skip device detection


<nb> public class TestUpgrade extends TomcatBaseTest {
 SINGLE
 Assert . assertEquals ( MESSAGE , response ) ;
 Assert . assertEquals ( MESSAGE , response ) ;
 -
 - pw . close ( ) ;
 }


<nb> public abstract class AnnotationCodegen {
 public static final List < JvmFlagAnnotation > METHOD_FLAGS = Arrays . asList (
 new JvmFlagAnnotation ( STRING0 , Opcodes . ACC_STRICT ) ,
 new JvmFlagAnnotation ( STRING1 , Opcodes . ACC_SYNCHRONIZED ) ,
 - new JvmFlagAnnotation ( STRING2 , Opcodes . ACC_NATIVE ) ,
 - new JvmFlagAnnotation ( STRING3 , Opcodes . ACC_NATIVE )
 + new JvmFlagAnnotation ( STRING2 , Opcodes . ACC_NATIVE )
 ) ;

 private static final AnnotationVisitor NO_ANNOTATION_VISITOR = new AnnotationVisitor ( Opcodes . ASM5 ) { } ;
 <nb> public class AsmUtil {
 }
 }

 + if ( functionDescriptor . getOriginal ( ) . isExternal ( ) ) {
 + flags |= Opcodes . ACC_NATIVE ;
 + }
 +
 if ( AnnotationUtilKt . isPlatformStaticInCompanionObject ( functionDescriptor ) ) {
 SINGLE
 flags &= ~ Opcodes . ACC_NATIVE ;


<nb> public class Mesh extends BaseObj {

 sm . getVertexAllocation ( NUMBER0 ) . copy1DRangeFromUnchecked ( NUMBER0 , mMaxIndex , mVtxData ) ;
 if ( uploadToBufferObject ) {
 - if ( uploadToBufferObject ) {
 - sm . getVertexAllocation ( NUMBER0 ) . syncAll ( Allocation . USAGE_SCRIPT ) ;
 - }
 + sm . getVertexAllocation ( NUMBER0 ) . syncAll ( Allocation . USAGE_SCRIPT ) ;
 }

 sm . getIndexSetAllocation ( NUMBER0 ) . copy1DRangeFromUnchecked ( NUMBER0 , mIndexCount , mIndexData ) ;


<nb> public class Entity implements IEntity {
 } else {
 if ( this . mChildrenSortPending ) {
 ZIndexSorter . getInstance ( ) . sort ( this . mChildren ) ;
 + this . mChildrenSortPending = false ;
 }

 final int childCount = children . size ( ) ;


<nb> import NAMESPACE ;
 rebuffering = false ;
 setState ( ExoPlayer . STATE_BUFFERING ) ;

 - if ( positionUs == C . UNSET_TIME_US ) {
 - SINGLE
 + if ( positionUs == C . UNSET_TIME_US
 + || ( readingPeriod != playingPeriod && ( periodIndex == playingPeriod . index
 + || ( readingPeriod != null && periodIndex == readingPeriod . index ) ) ) ) {
 + SINGLE
 + SINGLE
 periodIndex = Timeline . NO_PERIOD_INDEX ;
 }

Clear the timeline on seeking if renderers are reading ahead


<nb> public class PushController implements Disposable {
 boolean isSelected ,
 boolean isSingleRepositoryProject ) {
 PushTarget target = support . getDefaultTarget ( repository ) ;
 - final MyRepoModel model = new MyRepoModel ( repository , support , isSelected , new PushSpec ( support . getSource ( repository ) , target ) ,
 + final MyRepoModel model = new MyRepoModel ( repository , support , isSingleRepositoryProject || isSelected ,
 + new PushSpec ( support . getSource ( repository ) , target ) ,
 DEFAULT_CHILDREN_PRESENTATION_NUMBER ) ;
 RepositoryWithBranchPanel repoPanel = new RepositoryWithBranchPanel ( myProject , DvcsUtil . getShortRepositoryName ( repository ) ,
 support . getSource ( repository ) . getPresentation ( ) ,

push Don t require preselected repositories if there is only one


<nb> public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon

 stopWatch . stop ( ) ;
 if ( log . isInfoEnabled ( ) ) {
 - log . info ( STRING0 + getVersion ( ) + STRING1 + getName ( ) + STRING2 + TimeUtils . printDuration ( stopWatch . taken ( ) ) + STRING3 + getUptime ( ) + STRING4 ) ;
 + log . info ( STRING5 , getUptime ( ) ) ;
 + log . info ( STRING0 + getVersion ( ) + STRING1 + getName ( ) + STRING2 + TimeUtils . printDuration ( stopWatch . taken ( ) ) ) ;
 }

 SINGLE

Made uptime when stopping Camel more easy to spot in its own log line


<nb> public abstract class PullToRefreshBase < T extends View > extends LinearLayout {
 return false ;
 }

 - if ( state == REFRESHING && disableScrollingWhileRefreshing ) {
 - return true ;
 + if ( state == REFRESHING ) {
 + return disableScrollingWhileRefreshing ;
 }

 final int action = event . getAction ( ) ;

Hopefully fix bug where manually calling setRefreshing and then scrolling would cause refresh pull


<nb> public class CodeStyleSettingPresentation {
 ApplicationBundle . message ( STRING0 ) )
 ) ) ;

 - result . put ( new SettingsGroup ( SPACES_IN_TYPE_ARGUMENTS ) , ContainerUtil . < CodeStyleSettingPresentation > immutableList ( ) ) ;
 + result . put ( new SettingsGroup ( SPACES_IN_TYPE_ARGUMENTS ) , ContainerUtil . immutableList (
 + new CodeStyleSettingPresentation ( STRING1 , ApplicationBundle . message ( STRING2 ) )
 + ) ) ;

 result . put ( new SettingsGroup ( SPACES_IN_TYPE_PARAMETERS ) , ContainerUtil . < CodeStyleSettingPresentation > immutableList ( ) ) ;

Added code style setting presentation to space settings


<nb> class WebViewRenderer extends WebRenderer {

 WebSettings webSettings = mWebView . getSettings ( ) ;
 webSettings . setJavaScriptEnabled ( true ) ;
 + webSettings . setDomStorageEnabled ( true ) ;
 webSettings . setGeolocationEnabled ( true ) ;
 webSettings . setSupportZoom ( true ) ;
 webSettings . setTextZoom ( Settings . get ( ) . getWebViewTextZoom ( ) ) ;


<nb> public class MessageCompose extends Activity implements OnClickListener , OnFocus
 return message ;
 }

 - private String appendSignature ( String text ) {
 + private String appendSignature ( String text ) {
 String mSignature ;
 mSignature = mAccount . getSignature ( ) ;
 -
 - if ( mSignature != null && ! mSignature . contentEquals ( STRING0 ) ) {
 - text += STRING1 + mAccount . getSignature ( ) ;
 +
 + if ( mSignature != null && ! mSignature . contentEquals ( STRING0 ) ) {
 + text += STRING2 + mAccount . getSignature ( ) ;
 }

 return text ;

Reverted signature formatting code that was not meant to be committed


<nb> public class ReaderRelatedPostsView extends LinearLayout {
 txtExcerpt . setVisibility ( View . GONE ) ;
 }

 - if ( relatedPost . hasFeaturedImageUrl ( ) ) {
 + if ( relatedPost . hasFeaturedImageUrl ( ) && relatedPost . hasExcerpt ( ) ) {
 String imageUrl = PhotonUtils . getPhotonImageUrl ( relatedPost . getFeaturedImageUrl ( ) , imageWidth , imageHeight ) ;
 imgFeatured . setImageUrl ( imageUrl , WPNetworkImageView . ImageType . PHOTO ) ;
 imgFeatured . setVisibility ( View . VISIBLE ) ;

Don t show featured image unless there s an excerpt


<nb> public class Main extends MainSupport {
 }

 COMMENT
 + COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public CamelContext getOrCreateCamelContext ( ) {
 SINGLE

Added a comment for the Main getOrCreateCamelContext


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class JavaConfigContextLoader implements ContextLoader {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public final class ActiveServices {
 EventLog . writeEvent ( EventLogTags . AM_SERVICE_CRASHED_TOO_MUCH ,
 sr . userId , sr . crashCount , sr . shortName , app . pid ) ;
 bringDownServiceLocked ( sr ) ;
 - } else if ( ! allowRestart ) {
 + } else if ( ! allowRestart || ! mAm . isUserRunningLocked ( sr . userId , false ) ) {
 bringDownServiceLocked ( sr ) ;
 } else {
 boolean canceled = scheduleServiceRestartLocked ( sr , true ) ;

ActivityManager Do not add service to reschedule after removing users


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 - import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb>
 COMMENT
 COMMENT

 - package NAMESPACE ;
 + package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb>
 COMMENT
 COMMENT

 - package NAMESPACE ;
 + package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb>
 COMMENT
 COMMENT

 - package NAMESPACE ;
 + package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;


<nb> public class Snackbar extends RelativeLayout {
 private EventListener mEventListener ;
 private boolean mIsShowing = false ;
 private boolean mCanSwipeToDismiss = false ;
 + private boolean mIsDismissing = false ;

 private Snackbar ( Context context ) {
 super ( context ) ;
 <nb> public class Snackbar extends RelativeLayout {
 return ;
 }

 + if ( mIsDismissing ) {
 + return ;
 + }
 +
 final Animation slideOut = AnimationUtils . loadAnimation ( getContext ( ) , R . anim . snackbar_out ) ;
 slideOut . setAnimationListener ( new Animation . AnimationListener ( ) {
 @ override
 public void onAnimationStart ( Animation animation ) {
 -
 + mIsDismissing = true ;
 }

 @ override

don t restart slideout if already dismissing


<nb> public interface InternalPartition {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 boolean isLocal ( ) ;


<nb> public class HttpArtifactCache implements ArtifactCache {
 StandardCharsets . UTF_8 ) ) ;
 os . write ( key . getBytes ( StandardCharsets . UTF_8 ) ) ;
 os . write ( ( STRING0 + BOUNDARY + STRING1 ) . getBytes ( StandardCharsets . UTF_8 ) ) ;
 - os . write ( STRING2
 + os . write ( STRING3
 . getBytes ( StandardCharsets . UTF_8 ) ) ;
 os . write ( STRING4 . getBytes ( StandardCharsets . UTF_8 ) ) ;

don t set filename in content disposition


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 public class FMLNetworkHandler
 {


<nb> import NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 public class TestShapefileStreetGraphBuilderImpl extends TestCase {

 + @ test
 public void testBasic ( ) throws Exception {
 Graph gg = new Graph ( ) ;

 - File file = new File ( STRING0 ) ;
 + File file = new File ( getClass ( ) . getResource ( STRING1 ) . getFile ( ) ) ;

 if ( ! file . exists ( ) ) {
 System . out . println ( STRING2 ) ;


<nb> public class DeterministicKeyChain implements EncryptableKeyChain {

 COMMENT
 protected DeterministicKey getKeyByPath ( ImmutableList < ChildNumber > path ) {
 - return hierarchy . get ( path , false , false ) ;
 + return getKeyByPath ( path , false ) ;
 + }
 +
 + COMMENT
 + public DeterministicKey getKeyByPath ( ImmutableList < ChildNumber > path , boolean create ) {
 + return hierarchy . get ( path , false , create ) ;
 }

 COMMENT

Add method to derive new keys when queried by path


<nb> public class WallpaperBackupHelper extends FileBackupHelperBase implements Backu
 if ( widthRatio > NUMBER0 && widthRatio < FLOAT0
 && heightRatio > NUMBER0 && heightRatio < FLOAT0 ) {
 SINGLE
 - if ( DEBUG ) Slog . d ( TAG , STRING0 ) ;
 + Slog . d ( TAG , STRING1 ) ;
 f . renameTo ( new File ( WALLPAPER_IMAGE ) ) ;
 SINGLE
 SINGLE
 SINGLE
 } else {
 - if ( DEBUG ) Slog . d ( TAG , STRING2 + widthRatio
 + Slog . i ( TAG , STRING3 + widthRatio
 + STRING4 + heightRatio ) ;
 f . delete ( ) ;
 }


<nb> package NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;

 public class SpongeEventManager implements EventManager {
 <nb> public class SpongeEventManager implements EventManager {
 }

 @ override
 - public boolean call ( org . spongepowered . api . event . Event spongeEvent ) {
 + public boolean call ( Event spongeEvent ) {
 return spongeBus . post ( new SpongeProxyEvent ( spongeEvent ) ) ;
 }
 }


<nb> final class GridLayoutManager extends RecyclerView . LayoutManager {
 }

 private void initScrollController ( ) {
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + int paddingPrimaryDiff , paddingSecondaryDiff ;
 + if ( mOrientation == HORIZONTAL ) {
 + paddingPrimaryDiff = getPaddingLeft ( ) - mWindowAlignment . horizontal . getPaddingLow ( ) ;
 + paddingSecondaryDiff = getPaddingTop ( ) - mWindowAlignment . vertical . getPaddingLow ( ) ;
 + } else {
 + paddingPrimaryDiff = getPaddingTop ( ) - mWindowAlignment . vertical . getPaddingLow ( ) ;
 + paddingSecondaryDiff = getPaddingLeft ( ) - mWindowAlignment . horizontal . getPaddingLow ( ) ;
 + }
 + mScrollOffsetPrimary -= paddingPrimaryDiff ;
 + mScrollOffsetSecondary -= paddingSecondaryDiff ;
 +
 mWindowAlignment . horizontal . setSize ( getWidth ( ) ) ;
 mWindowAlignment . horizontal . setPadding ( getPaddingLeft ( ) , getPaddingRight ( ) ) ;
 mWindowAlignment . vertical . setSize ( getHeight ( ) ) ;


<nb> public class GroupProperties {
 HOSTED_MANAGEMENT_ENABLED = new GroupProperty ( config , PROP_HOSTED_MANAGEMENT_ENABLED , STRING0 ) ;

 SINGLE
 - HOSTED_MANAGEMENT_URL = new GroupProperty ( config , PROP_HOSTED_MANAGEMENT_URL , STRING1 ) ;
 + HOSTED_MANAGEMENT_URL = new GroupProperty ( config , PROP_HOSTED_MANAGEMENT_URL , STRING2 ) ;

 HEALTH_MONITORING_LEVEL = new GroupProperty ( config , PROP_HEALTH_MONITORING_LEVEL , HealthMonitorLevel . SILENT . toString ( ) ) ;
 HEALTH_MONITORING_DELAY_SECONDS = new GroupProperty ( config , PROP_HEALTH_MONITORING_DELAY_SECONDS , STRING3 ) ;

change the url of the hosted management center


<nb> public class GoLanguage extends Language {
 public static final Language INSTANCE = new GoLanguage ( ) ;

 protected GoLanguage ( ) {
 - super ( STRING0 , STRING1 ) ;
 + super ( STRING0 , STRING2 , STRING3 , STRING4 ) ;
 }

 @ nullable


<nb> public class BuildCommand extends AbstractCommand {
 }

 public ConcurrencyLimit getConcurrencyLimit ( BuckConfig buckConfig ) {
 - return new ConcurrencyLimit ( buckConfig . getNumThreads ( ) , buckConfig . getLoadLimit ( ) ) ;
 + Double loadLimit = this . loadLimit ;
 + if ( loadLimit == null ) {
 + loadLimit = ( double ) buckConfig . getLoadLimit ( ) ;
 + }
 +
 + return new ConcurrencyLimit ( buckConfig . getNumThreads ( ) , loadLimit ) ;
 }

 COMMENT

Fix specifying load limit on command line


<nb> public abstract class CamelServletContextListener < R extends Registry > implements
 COMMENT
 COMMENT
 private void initCamelContext ( ServletCamelContext camelContext , Map < String , Object > parameters ) throws Exception {
 + String messageHistory = ( String ) parameters . remove ( STRING0 ) ;
 + if ( messageHistory != null ) {
 + camelContext . setMessageHistory ( CamelContextHelper . parseBoolean ( camelContext , messageHistory ) ) ;
 + }
 String streamCache = ( String ) parameters . remove ( STRING1 ) ;
 if ( streamCache != null ) {
 camelContext . setStreamCaching ( CamelContextHelper . parseBoolean ( camelContext , streamCache ) ) ;

servletlistener component Add messageHistory option


<nb> class Stats implements Cloneable {

 @ override
 public String toString ( ) {
 - return String . format ( STRING0 , avg / FLOAT0 , min / FLOAT0 , max / FLOAT0 ) ;
 + return String . format ( STRING1 , min / FLOAT0 , avg / FLOAT0 , max / FLOAT0 ) ;
 }
 }

change stats logging order to min avg max not avg min max


<nb> public class FileContentProvider extends ContentProvider {
 mFileProjectionMap . put ( ProviderTableMeta . FILE_ETAG ,
 ProviderTableMeta . FILE_ETAG ) ;
 mFileProjectionMap . put ( ProviderTableMeta . FILE_SHARE_BY_LINK ,
 + ProviderTableMeta . FILE_SHARE_BY_LINK ) ;
 + mFileProjectionMap . put ( ProviderTableMeta . FILE_PUBLIC_LINK ,
 ProviderTableMeta . FILE_PUBLIC_LINK ) ;
 }


<nb> public abstract class FileAsyncHttpResponseHandler extends AsyncHttpResponseHand
 COMMENT
 public FileAsyncHttpResponseHandler ( File file ) {
 super ( ) ;
 - assert ( file != null ) ;
 + AssertUtils . asserts ( file != null , STRING0 ) ;
 this . mFile = file ;
 }

 <nb> public abstract class FileAsyncHttpResponseHandler extends AsyncHttpResponseHand
 COMMENT
 COMMENT
 protected File getTemporaryFile ( Context context ) {
 - assert ( context != null ) ;
 + AssertUtils . asserts ( context != null , STRING1 ) ;
 try {
 + SINGLE
 + assert context != null ;
 return File . createTempFile ( STRING2 , STRING3 , context . getCacheDir ( ) ) ;
 } catch ( IOException e ) {
 Log . e ( LOG_TAG , STRING4 , e ) ;

Replaced assert calls with AssertUtils asserts which are handled properly in release mode


<nb> public class AudioTrack
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class AudioTrack
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class AudioTrack
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Fix API level in documentation to refer to MNC


<nb> public class WebImage implements SmartImage {
 conn . setReadTimeout ( READ_TIMEOUT ) ;
 BitmapFactory . Options options = new BitmapFactory . Options ( ) ;
 options . inSampleSize = NUMBER0 ;
 + options . purgeable = true ;
 Rect rect = new Rect ( - NUMBER1 , - NUMBER1 , - NUMBER1 , - NUMBER1 ) ;
 bitmap = BitmapFactory . decodeStream ( ( InputStream ) conn . getContent ( ) , rect , options ) ;
 } catch ( Exception e ) {

Add purgeable flag to recycle bitmaps when the memory gets full


<nb> public class PhotoViewerActivity extends SherlockFragmentActivity implements OnU
 mController . addPhotoSelectionListener ( this ) ;

 final Intent intent = getIntent ( ) ;
 - mViewPager . setCurrentItem ( intent . getIntExtra ( EXTRA_POSITION , NUMBER0 ) ) ;
 + final int requestedPosition = intent . getIntExtra ( EXTRA_POSITION , NUMBER0 ) ;
 + if ( mViewPager . getCurrentItem ( ) != requestedPosition ) {
 + mViewPager . setCurrentItem ( requestedPosition ) ;
 + } else {
 + onPageSelected ( requestedPosition ) ;
 + }

 mFriendsFragment = new FriendsListFragment ( ) ;
 }

Fix Caption not showing in Action Bar on relaunch


<nb> public class HqlParserTest extends QueryBaseWithDomain < HqlParserTest > {

 SINGLE
 from ( $ ( c ) ) . innerJoin ( $ ( c . getMate ( ) ) . as ( $ ( m ) ) )
 - . leftJoin ( $ ( c . getKittens ( ) ) . as ( $ ( k ) ) )
 - . parse ( ) ;
 + . leftJoin ( $ ( c . getKittens ( ) ) . as ( $ ( k ) ) ) . parse ( ) ;
 SINGLE
 from ( $ ( c ) ) . leftJoin ( $ ( c . getMate ( ) . getKittens ( ) ) . as ( $ ( k ) ) ) . parse ( ) ;
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 <nb> public class MasterInfoIntegrationTest {

 SINGLE
 SINGLE
 + @ ignore
 @ test
 public void concurrentCreateJournalTest ( ) throws Exception {
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> class TvInputHardwareManager implements TvInputHal . Callback {
 }
 int sinkDevice = mAudioManager . getDevicesForStream ( AudioManager . STREAM_MUSIC ) ;
 for ( AudioDevicePort port : devicePorts ) {
 - if ( ( port . type ( ) & sinkDevice ) != NUMBER0 ) {
 + if ( ( port . type ( ) & sinkDevice ) != NUMBER0 &&
 + ( port . type ( ) & AudioSystem . DEVICE_BIT_IN ) == NUMBER0 ) {
 sinks . add ( port ) ;
 }
 }

Exclude input devices when finding sinks from audio policy


<nb> public @ interface FieldProxy {
 COMMENT
 private final FieldResolver . Factory fieldResolverFactory ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 protected Binder ( MethodDescription . InDefinedShape getterMethod , MethodDescription . InDefinedShape setterMethod ) {
 this ( new FieldResolver . Factory . Simplex ( getterMethod , setterMethod ) ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 protected Binder ( TypeDescription proxyType , MethodDescription . InDefinedShape getterMethod , MethodDescription . InDefinedShape setterMethod ) {
 this ( new FieldResolver . Factory . Duplex ( proxyType , getterMethod , setterMethod ) ) ;
 }


<nb> public class MessageListFragment extends QKFragment implements ActivityLauncher ,
 SINGLE
 SINGLE

 - private long mLastMessageId ;
 private BackgroundQueryHandler mBackgroundQueryHandler ;

 private long mThreadId ;
 <nb> public class MessageListFragment extends QKFragment implements ActivityLauncher ,
 mConversation . setMessageCount ( NUMBER0 ) ;
 SINGLE
 case DELETE_MESSAGE_TOKEN :
 - if ( cookie instanceof Boolean && ( ( Boolean ) cookie ) . booleanValue ( ) ) {
 - SINGLE
 - mLastMessageId = NUMBER0 ;
 - }

 SINGLE
 NotificationManager . update ( mContext ) ;

Remove unused variable MessageListFragment mLastMessageId to prevent from confusing with mLastMessageId of the observer


<nb> public class TwitterException extends Exception implements TwitterResponse , Http

 @ override
 public String toString ( ) {
 - return getMessage ( ) + ( nested ? STRING0 : STRING1
 + return getMessage ( ) + ( nested ? STRING0 : STRING2
 + STRING3 + getExceptionDiagnosis ( ) . getStackLineHashAsHex ( )
 + STRING4 + getExceptionDiagnosis ( ) . getLineNumberHashAsHex ( ) )
 + STRING5 + ( nested ? STRING0 : STRING6 + getExceptionCode ( ) + STRING7 ) +

put line break after error message to improve exception message readability


<nb> public class WordPressDB {
 public static final String COLUMN_NAME_VIDEO_PRESS_SHORTCODE = STRING0 ;
 public static final String COLUMN_NAME_UPLOAD_STATE = STRING1 ;

 - private static final int DATABASE_VERSION = NUMBER0 ;
 + private static final int DATABASE_VERSION = NUMBER1 ;

 private static final String CREATE_TABLE_BLOGS = STRING2
 + STRING3 ;
 <nb> public class WordPressDB {
 SINGLE
 ctx . deleteDatabase ( STRING4 ) ;
 currentVersion ++ ;
 - case NUMBER2 :
 + case NUMBER0 :
 resetThemeTable ( ) ;
 currentVersion ++ ;
 }

Drop Simperium DB could contains invalid Note IDs


<nb> public class Strings {
 throw new ElasticsearchIllegalStateException ( STRING0 ) ;
 }
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + public static String substring ( String s , int beginIndex , int endIndex ) {
 + if ( s == null ) {
 + return s ;
 + }
 +
 + int realEndIndex = s . length ( ) > NUMBER0 ? s . length ( ) - NUMBER1 : NUMBER0 ;
 +
 + if ( endIndex > realEndIndex ) {
 + return s . substring ( beginIndex ) ;
 + } else {
 + return s . substring ( beginIndex , endIndex ) ;
 + }
 + }
 }

Add Strings substring that handles short strings


<nb> public class BottomBar extends FrameLayout implements View . OnClickListener {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class BottomBar extends FrameLayout implements View . OnClickListener {
 public void setFragmentItems ( FragmentManager fragmentManager , @ idres int containerResource ,
 BottomBarFragment . . . fragmentItems ) {
 clearItems ( ) ;
 -
 mFragmentManager = fragmentManager ;
 mFragmentContainer = containerResource ;
 mFragments = fragmentItems ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;

 COMMENT
 COMMENT
 <nb> public class SuperToast
 private Animations mAnimations = Animations . FADE ;
 private int mXOffset = NUMBER0 ;
 private int mYOffset = NUMBER0 ;
 - private OnToastDismissListener mOnToastDismissListener ;
 + private OnDismissListener mOnDismissListener ;

 COMMENT
 COMMENT
 <nb> public class SuperToast
 COMMENT
 COMMENT
 COMMENT
 - public void setOnDismissListener ( OnToastDismissListener onToastDismissListener ) {
 + public void setOnDismissListener ( OnDismissListener onToastDismissListener ) {

 - this . mOnToastDismissListener = onToastDismissListener ;
 + this . mOnDismissListener = onToastDismissListener ;

 }

 <nb> public class SuperToast
 COMMENT
 COMMENT
 COMMENT
 - public OnToastDismissListener getOnDismissListener ( ) {
 + public OnDismissListener getOnDismissListener ( ) {

 - return mOnToastDismissListener ;
 + return mOnDismissListener ;

 }


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OIndexManagerImpl extends ODocumentWrapperNoClass implements OIndex
 super . reload ( STRING0 ) ;

 SINGLE
 - for ( OClass c : getDatabase ( ) . getMetadata ( ) . getSchema ( ) . getClasses ( ) ) {
 + final Collection < OClass > classes = new ArrayList < OClass > ( getDatabase ( ) . getMetadata ( ) . getSchema ( ) . getClasses ( ) ) ;
 + for ( OClass c : classes ) {
 for ( OProperty p : c . properties ( ) ) {
 if ( p . getIndex ( ) != null ) {
 p . getIndex ( ) . delegate = indexes . get ( p . getIndex ( ) . delegate . getName ( ) . toLowerCase ( ) ) ;

Fixed concurrency problem by working on a copy of class list


<nb> public class EditShareFragment extends Fragment {
 boolean areEditOptionsAvailable = ! isFederated || isNotReshareableFederatedSupported ;

 if ( mFile . isFolder ( ) && areEditOptionsAvailable ) {
 - SINGLE
 + SINGLE
 SINGLE
 compound = ( CompoundButton ) editShareView . findViewById ( R . id . canEditCreateCheckBox ) ;
 compound . setChecked ( ( sharePermissions & OCShare . CREATE_PERMISSION_FLAG ) > NUMBER0 ) ;


<nb> public class WebView extends AbsoluteLayout
 df = mScrollFilter ;
 }
 canvas . setDrawFilter ( df ) ;
 - int content = nativeDraw ( canvas , color , extras , true ) ;
 + SINGLE
 + SINGLE
 + int content = nativeDraw ( canvas , color , extras , false ) ;
 canvas . setDrawFilter ( null ) ;
 if ( content != NUMBER0 ) {
 mWebViewCore . sendMessage ( EventHub . SPLIT_PICTURE_SET , content , NUMBER0 ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public class DropDownPreference extends ListPreference {

 private final Context mContext ;


<nb> public class AnnouncerTest extends CuratorTestBase

 announcer . stop ( ) ;

 - int count = NUMBER0 ;
 - while ( ( curator . checkExists ( ) . forPath ( testPath1 ) != null ) || ( curator . checkExists ( ) . forPath ( testPath1 ) != null ) ) {
 + while ( ( curator . checkExists ( ) . forPath ( testPath1 ) != null ) || ( curator . checkExists ( ) . forPath ( testPath2 ) != null ) ) {
 Thread . sleep ( NUMBER1 ) ;
 - if ( ++ count > NUMBER2 ) {
 - throw new ISE ( STRING0 ) ;
 - }
 }

 Assert . assertNull ( curator . checkExists ( ) . forPath ( testPath1 ) ) ;


<nb> public abstract class ManagerBase extends LifecycleMBeanBase
 COMMENT
 COMMENT
 COMMENT
 - protected int maxInactiveInterval = NUMBER0 ;
 + protected int maxInactiveInterval = NUMBER1 * NUMBER0 ;

 COMMENT


<nb> public class ChunkOutputWidget extends Composite
 host_ . onOutputHeightChanged ( NUMBER0 , ensureVisible ) ;
 }

 - state_ = CHUNK_READY ;
 + state_ = root_ . getWidgetCount ( ) == NUMBER0 ? CHUNK_EMPTY : CHUNK_READY ;
 lastOutputType_ = RmdChunkOutputUnit . TYPE_NONE ;
 setOverflowStyle ( ) ;
 showReadyState ( ) ;

keep empty chunks hidden in editor when saving notebooks


<nb> final class SettingsState {
 private void skipEmptyTextTags ( XmlPullParser parser )
 throws IOException , XmlPullParserException {
 while ( accept ( parser , XmlPullParser . TEXT , null )
 - && STRING0 . equals ( parser . getText ( ) ) ) {
 + && parser . isWhitespace ( ) ) {
 parser . next ( ) ;
 }
 }

Fix XML parsing crash in SettingsProvider


<nb> public class ClientInterceptor implements Interceptor {
 Request originalRequest = chain . request ( ) ;
 Request requestWithUserAgent = originalRequest . newBuilder ( )
 . removeHeader ( STRING0 )
 - . addHeader ( STRING0 , STRING1 )
 + . addHeader ( STRING0 , STRING2 )
 . build ( ) ;

 return chain . proceed ( requestWithUserAgent ) ;
 }
 - }
 + }


<nb> public class MediaSessionService extends SystemService implements Monitor {
 SINGLE
 int userId = ActivityManager . getCurrentUser ( ) ;
 UserRecord user = mUserRecords . get ( userId ) ;
 - if ( user . mLastMediaButtonReceiver != null
 - || user . mRestoredMediaButtonReceiver != null ) {
 + if ( user != null && ( user . mLastMediaButtonReceiver != null
 + || user . mRestoredMediaButtonReceiver != null ) ) {
 if ( DEBUG ) {
 Log . d ( TAG , STRING0
 + user . mLastMediaButtonReceiver + STRING1


<nb> public class KTXTextureData implements TextureData , CubemapData {
 numberOfArrayElements = compressedData . getInt ( ) ;
 numberOfFaces = compressedData . getInt ( ) ;
 numberOfMipmapLevels = compressedData . getInt ( ) ;
 + if ( numberOfMipmapLevels == NUMBER0 ) {
 + numberOfMipmapLevels = NUMBER1 ;
 + useMipMaps = true ;
 + }
 int bytesOfKeyValueData = compressedData . getInt ( ) ;
 imagePos = compressedData . position ( ) + bytesOfKeyValueData ;
 if ( ! compressedData . isDirect ( ) ) {
 <nb> public class KTXTextureData implements TextureData , CubemapData {
 }
 }
 if ( previousUnpackAlignment != NUMBER2 ) Gdx . gl . glPixelStorei ( GL20 . GL_UNPACK_ALIGNMENT , previousUnpackAlignment ) ;
 - if ( useMipMaps && numberOfMipmapLevels == NUMBER1 ) Gdx . gl . glGenerateMipmap ( target ) ;
 + if ( useMipMaps ( ) ) Gdx . gl . glGenerateMipmap ( target ) ;

 SINGLE
 disposePreparedData ( ) ;


<nb> public class OFetchHelper {

 public static Map < String , Integer > buildFetchPlan ( final String iFetchPlan ) {
 final Map < String , Integer > fetchPlan = new HashMap < String , Integer > ( ) ;
 -
 + fetchPlan . put ( ROOT_FETCH , NUMBER0 ) ;
 if ( iFetchPlan != null ) {
 SINGLE
 final List < String > planParts = OStringSerializerHelper . split ( iFetchPlan , STRING0 ) ;
 <nb> public class OFetchHelper {
 parts = OStringSerializerHelper . split ( planPart , STRING1 ) ;
 fetchPlan . put ( parts . get ( NUMBER0 ) , Integer . parseInt ( parts . get ( NUMBER1 ) ) ) ;
 }
 - } else {
 - fetchPlan . put ( ROOT_FETCH , NUMBER0 ) ;
 }
 - } else
 - fetchPlan . put ( ROOT_FETCH , NUMBER0 ) ;
 -
 + }
 return fetchPlan ;
 }


<nb> public class JavaClientTest extends TestCase {
 c . update ( new BasicDBObject ( STRING0 , NUMBER0 ) , new BasicDBObject ( STRING1 , new BasicDBObject ( STRING2 , NUMBER0 ) ) ) ;
 }

 + @ test
 + public void testAllTypes ( ) {
 + DBCollection c = _db . getCollectionFromString ( STRING3 ) ;
 + c . drop ( ) ;
 + String json = STRING4 ;
 + BasicDBObject a = ( BasicDBObject ) JSON . parse ( json ) ;
 + c . insert ( a ) ;
 + DBObject b = c . findOne ( ) ;
 + assertTrue ( a . equals ( b ) ) ;
 + }
 +
 final Mongo _mongo ;
 final DB _db ;

added test to make sure all types are correctly encoded with BSON to from db


<nb> public class RPCBlockReadRequest extends RPCRequest {
 private final long mOffset ;
 private final long mLength ;

 - SINGLE
 public RPCBlockReadRequest ( long blockId , long offset , long length ) {
 mBlockId = blockId ;
 mOffset = offset ;
 <nb> public class RPCBlockReadResponse extends RPCResponse {
 private final DataBuffer mData ;
 private final Status mStatus ;

 - SINGLE
 public RPCBlockReadResponse ( long blockId , long offset , long length , DataBuffer data , Status status ) {
 mBlockId = blockId ;
 mOffset = offset ;
 <nb> public abstract class RPCMessage implements EncodedMessage {
 SINGLE
 public enum Type implements EncodedMessage {
 RPC_ERROR_RESPONSE ( NUMBER0 ) ,
 - SINGLE
 RPC_BLOCK_READ_REQUEST ( NUMBER1 ) ,
 RPC_BLOCK_READ_RESPONSE ( NUMBER2 ) ,
 RPC_BLOCK_WRITE_REQUEST ( NUMBER3 ) ,

Remove TODO comments related to this change


<nb> public class DBCursorOldTest extends DatabaseTestCase {
 } ) . start ( ) ;

 - Thread . sleep ( NUMBER0 ) ;
 + Thread . sleep ( NUMBER1 ) ;
 SINGLE
 c . save ( new BasicDBObject ( STRING0 , NUMBER2 ) ) ;
 latch . await ( ) ;

Decreasing sleep in test to try to make it faster


<nb> public class InferenceSession {
 if ( lub != null ) {
 inferenceVariable . setInstantiation ( lub instanceof PsiCapturedWildcardType ? ( ( PsiCapturedWildcardType ) lub ) . getWildcard ( ) : lub ) ;
 }
 - else if ( acceptObject || upperBounds . size ( ) > NUMBER0 || ! upperBounds . get ( NUMBER1 ) . equalsToText ( CommonClassNames . JAVA_LANG_OBJECT ) ) {
 + else {
 PsiType glb = null ;
 if ( isThrowable ( upperBounds ) ) {
 glb = PsiType . getJavaLangRuntimeException ( myManager , GlobalSearchScope . allScope ( myManager . getProject ( ) ) ) ;
 <nb> public class InferenceSession {
 }
 }
 }
 - if ( glb != null ) {
 + if ( glb != null && ( acceptObject || ! glb . equalsToText ( CommonClassNames . JAVA_LANG_OBJECT ) ) ) {
 inferenceVariable . setInstantiation ( glb ) ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;


<nb> public class ActiveMQComponent extends JmsComponent {
 return ( ActiveMQConfiguration ) super . getConfiguration ( ) ;
 }

 + public void setBrokerURL ( String brokerURL ) {
 + getConfiguration ( ) . setBrokerURL ( brokerURL ) ;
 + }
 +
 +
 @ override
 protected JmsConfiguration createConfiguration ( ) {
 return new ActiveMQConfiguration ( ) ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import static NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT

allow the brokerURL to be configured on the ActiveMQComponent


<nb> import NAMESPACE ;

 public class TesterAccessLogValve extends ValveBase implements AccessLog {

 - private static boolean RELAX_TIMING = Boolean . getBoolean ( STRING0 ) ;
 + private static final boolean RELAX_TIMING = Boolean . getBoolean ( STRING0 ) ;

 SINGLE
 private static final long ERROR_MARGIN = RELAX_TIMING ? NUMBER0 : NUMBER1 ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Fix typo in code sample for ForwardingWrapperTester


<nb> public class XMPPTCPConnection extends AbstractXMPPConnection {
 }
 String id = ackedStanza . getStanzaId ( ) ;
 if ( StringUtils . isNullOrEmpty ( id ) ) {
 - return ;
 + continue ;
 }
 PacketListener listener = stanzaIdAcknowledgedListeners . remove ( id ) ;
 if ( listener != null ) {

Fix Stream Management ack listner invocation


<nb> public class GroovyTestCase extends TestCase {
 COMMENT
 COMMENT
 protected void assertScript ( final String script ) throws Exception {
 - log . info ( STRING0 ) ;
 - SINGLE
 -
 - SINGLE
 - SINGLE
 - SINGLE
 - String testClassName = getTestClassName ( ) ;
 -
 - File dir = new File ( STRING1 ) ;
 - dir . mkdirs ( ) ;
 - File file = new File ( dir , testClassName ) ;
 -
 - log . info ( STRING2 + file ) ;
 -
 - DefaultGroovyMethods . withPrintWriter ( file , new Closure ( null ) {
 - protected void doCall ( PrintWriter writer ) {
 - writer . println ( script ) ;
 - }
 - } ) ;
 -
 GroovyShell shell = new GroovyShell ( ) ;
 - shell . evaluate ( new GroovyCodeSource ( file ) ) ;
 + shell . evaluate ( script , getTestClassName ( ) ) ;
 }

 protected String getTestClassName ( ) {

Simplified the assertScript method to avoid having to create directories and files


<nb> public class NearCacheTest extends HazelcastTestSupport {
 @ override
 public void run ( ) throws Exception {
 final MapProxyImpl mapProxy = ( MapProxyImpl ) map ;
 - final MapService mapService = mapProxy . getService ( ) ;
 + final MapService mapService = ( MapService ) mapProxy . getService ( ) ;
 final MapServiceContext mapServiceContext = mapService . getMapServiceContext ( ) ;
 final NearCacheProvider nearCacheProvider = mapServiceContext . getNearCacheProvider ( ) ;
 final NearCache nearCache = nearCacheProvider . getNearCache ( mapName ) ;


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 +
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class RoutePolicySupport extends ServiceSupport implements Route
 route . getRouteContext ( ) . getCamelContext ( ) . stopRoute ( route . getId ( ) ) ;
 }

 + protected void stopRoute ( Route route , long timeout , TimeUnit timeUnit ) throws Exception {
 + route . getRouteContext ( ) . getCamelContext ( ) . stopRoute ( route . getId ( ) , timeout , timeUnit ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT

Added an API to RoutePolicySupport for stopRoute to control timeout for graceful shutdown


<nb> public class Notifications extends BroadcastReceiver {
 notification . audioStreamType = AudioManager . STREAM_ALARM ;
 audioManager . setStreamVolume ( AudioManager . STREAM_ALARM ,
 audioManager . getStreamMaxVolume ( AudioManager . STREAM_ALARM ) , NUMBER0 ) ;
 + } else {
 + notification . audioStreamType = AudioManager . STREAM_NOTIFICATION ;
 }

 SINGLE

Explicitly set notification audio stream


<nb> public class GeoDistanceFacetCollectorParser implements FacetCollectorParser {
 throw new FacetPhaseExecutionException ( facetName , STRING0 ) ;
 }

 + if ( entries . isEmpty ( ) ) {
 + throw new FacetPhaseExecutionException ( facetName , STRING1 ) ;
 + }
 +
 if ( valueFieldName != null ) {
 return new ValueGeoDistanceFacetCollector ( facetName , fieldName , lat , lon , unit , geoDistance , entries . toArray ( new GeoDistanceFacet . Entry [ entries . size ( ) ] ) ,
 context . fieldDataCache ( ) , context . mapperService ( ) , valueFieldName ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BlueprintCamelContext extends DefaultCamelContext implements Servic
 setLanguageResolver ( new BlueprintLanguageResolver ( bundleContext ) ) ;
 setDataFormatResolver ( new BlueprintDataFormatResolver ( bundleContext ) ) ;
 setApplicationContextClassLoader ( new BundleDelegatingClassLoader ( bundleContext . getBundle ( ) ) ) ;
 + }
 +
 + @ override
 + protected ModelJAXBContextFactory createModelJAXBContextFactory ( ) {
 SINGLE
 - setModelJAXBContextFactory ( new BlueprintModelJAXBContextFactory ( CamelNamespaceHandler . class . getClassLoader ( ) ) ) ;
 + return new BlueprintModelJAXBContextFactory ( CamelNamespaceHandler . class . getClassLoader ( ) ) ;
 }

 public BundleContext getBundleContext ( ) {


<nb> public class TruncatedLocation extends Location {
 String s = String . format ( STRING0 + Integer . toString ( numDecimal ) + STRING1 , d ) ;
 try {
 Number number = format . parse ( s ) ;
 - double td = number . doubleValue ( ) ;
 + td = number . doubleValue ( ) ;
 } catch ( ParseException e ) {
 e . printStackTrace ( ) ;
 }


<nb> public class QueryState
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class QueryTaskResource
 try {
 List < Page > pages = queryTaskManager . getQueryTaskResults ( taskId , outputId , DEFAULT_MAX_PAGE_COUNT , DEFAULT_MAX_WAIT_TIME ) ;
 if ( pages . isEmpty ( ) ) {
 + SINGLE
 if ( queryTaskManager . getQueryTaskInfo ( taskId ) . getState ( ) . isDone ( ) ) {
 return Response . status ( Status . GONE ) . build ( ) ;
 }


<nb> public class LoggingApplicationContextInitializerTests {
 String output = getOutput ( ) . trim ( ) ;
 assertTrue ( STRING0 + output , output . contains ( STRING1 ) ) ;
 assertFalse ( STRING0 + output , output . contains ( STRING2 ) ) ;
 - assertTrue ( STRING0 + output , output . startsWith ( STRING3 ) ) ;
 }

 @ test


<nb> public class GameRegistry
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public static Block registerBlock ( Block block , Class < ? extends ItemBlock > itemclass , String name , Object . . . itemCtorArgs )
 {

Fix itemCtorArgs javadoc in registerBlock


<nb> public class XContentFactory {
 COMMENT
 COMMENT
 public static XContentBuilder yamlBuilder ( ) throws IOException {
 - return contentBuilder ( XContentType . SMILE ) ;
 + return contentBuilder ( XContentType . YAML ) ;
 }

 COMMENT

Fix yamlBuilder to return YAML builder instead of SMILE


<nb> public class OAuthSignatureCalculator implements SignatureCalculator {
 private static final String OAUTH_VERSION_1_0 = STRING0 ;
 private static final String OAUTH_SIGNATURE_METHOD = STRING1 ;

 - protected final byte [ ] nonceBuffer = new byte [ NUMBER0 ] ;
 + protected static final ThreadLocal < byte [ ] > NONCE_BUFFER = new ThreadLocal < byte [ ] > ( ) {
 + protected byte [ ] initialValue ( ) {
 + return new byte [ NUMBER0 ] ;
 + }
 + } ;

 protected final ThreadSafeHMAC mac ;

 <nb> public class OAuthSignatureCalculator implements SignatureCalculator {
 }

 protected synchronized String generateNonce ( ) {
 + byte [ ] nonceBuffer = NONCE_BUFFER . get ( ) ;
 ThreadLocalRandom . current ( ) . nextBytes ( nonceBuffer ) ;
 SINGLE
 return Base64 . encode ( nonceBuffer ) ;

Fix OAuthSignatureCalculator buffer threadsafety


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class CodeMirrorEditor extends Composite
 SINGLE
 codeMirrorPanel_ = new SimplePanel ( ) ;
 initWidget ( codeMirrorPanel_ ) ;
 + getElement ( ) . getStyle ( ) . setPosition ( Position . RELATIVE ) ;
 }

 public CodeMirror getRawEditor ( )

Edit Dialog Save and Cancel buttons don t work


<nb> public class ManageDialog extends AlertActivity implements
 mHandler . removeMessages ( NUMBER0 ) ;

 if ( ! isFinishing ( ) ) {
 - if ( mConfig . startTime != NUMBER0 ) {
 + if ( mConfig . startTime != - NUMBER1 ) {
 long seconds = ( SystemClock . elapsedRealtime ( ) - mConfig . startTime ) / NUMBER2 ;
 mDuration . setText ( String . format ( STRING0 ,
 seconds / NUMBER3 , seconds / NUMBER4 % NUMBER4 , seconds % NUMBER4 ) ) ;
 <nb> public class Vpn extends BaseNetworkStateTracker {

 SINGLE
 synchronized ( Vpn . this ) {
 + SINGLE
 + mConfig . startTime = SystemClock . elapsedRealtime ( ) ;
 +
 SINGLE
 checkpoint ( false ) ;


<nb> public final class Metadata {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public synchronized void failedUpdate ( long now ) {
 + this . lastRefreshMs = now ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 public synchronized int version ( ) {
 <nb> public class NetworkClient implements KafkaClient {
 Cluster cluster = response . cluster ( ) ;
 SINGLE
 SINGLE
 - if ( cluster . nodes ( ) . size ( ) > NUMBER0 )
 + if ( cluster . nodes ( ) . size ( ) > NUMBER0 ) {
 this . metadata . update ( cluster , now ) ;
 - else
 + } else {
 log . trace ( STRING0 , header . correlationId ( ) ) ;
 + this . metadata . failedUpdate ( now ) ;
 + }
 }

 COMMENT

Always update the metadata when a metadata response is received to ensure we back off


<nb> final class GitRepositoryUpdater implements Disposable , BulkFileListener {

 VirtualFile gitDir = root . findChild ( STRING0 ) ;
 assert gitDir != null ;
 + gitDir . getChildren ( ) ;
 LocalFileSystem . getInstance ( ) . addRootToWatch ( gitDir . getPath ( ) , true ) ;

 myRepositoryFiles = GitRepositoryFiles . getInstance ( root ) ;

fixed git status refresh on external operation


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class SnapshotCommands {
 -
 private static Logger logger = Logger . getLogger ( STRING0 ) ;
 private static DateFormat dateFormat = new SimpleDateFormat ( STRING1 ) ;


<nb> public class ClassRenderer extends NodeRendererImpl {

 PsiElementFactory elementFactory = JavaPsiFacade . getInstance ( node . getProject ( ) ) . getElementFactory ( ) ;
 try {
 - return elementFactory . createExpressionFromText ( fieldDescriptor . getField ( ) . name ( ) , DebuggerUtils . findClass (
 + return elementFactory . createExpressionFromText ( STRING0 + fieldDescriptor . getField ( ) . name ( ) , DebuggerUtils . findClass (
 fieldDescriptor . getObject ( ) . referenceType ( ) . name ( ) , context . getProject ( ) , context . getDebugProcess ( ) . getSearchScope ( ) )
 ) ;
 }

corrected evaluation expression for private fields from base classes


<nb> public class GuideEntryLoader {
 JsonContents contents = loadContents ( loadable , mod ) ;

 if ( contents != null ) {
 - contents . printContents ( ) ;
 + if ( DEBUG ) {
 + contents . printContents ( ) ;
 + }
 contents = contents . inheritMissingTags ( ) ;
 - contents . printContents ( ) ;
 + if ( DEBUG ) {
 + contents . printContents ( ) ;
 + }
 for ( JsonEntry entry : contents . contents ) {
 allEntries . put ( entry , loadable ) ;
 }


<nb> public class Helper

 public static final double round2 ( double value )
 {
 - return Math . round ( value * NUMBER0 ) / NUMBER0 ;
 + return Math . round ( value * NUMBER0 ) / NUMBER0 d ;
 }
 }


<nb> public class AudioplayerActivity extends MediaplayerActivity {
 if ( AppConfig . DEBUG )
 Log . d ( TAG , STRING0
 + intent . getData ( ) . getPath ( ) ) ;
 - ExternalMedia media = new ExternalMedia ( intent . getData ( ) . getPath ( ) , MediaType . AUDIO ) ;
 + ExternalMedia media = new ExternalMedia ( intent . getData ( ) . getPath ( ) ,
 + MediaType . AUDIO ) ;
 Intent launchIntent = new Intent ( this , PlaybackService . class ) ;
 launchIntent . putExtra ( PlaybackService . EXTRA_PLAYABLE , media ) ;
 launchIntent . putExtra ( PlaybackService . EXTRA_START_WHEN_PREPARED ,
 <nb> public class AudioplayerActivity extends MediaplayerActivity {
 }

 @ override
 + protected void onNewIntent ( Intent intent ) {
 + super . onNewIntent ( intent ) ;
 + setIntent ( intent ) ;
 + }
 +
 + @ override
 protected void onAwaitingVideoSurface ( ) {
 startActivity ( new Intent ( this , VideoplayerActivity . class ) ) ;
 }

audio player didn t always play external files correctly


<nb> public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme
 DefaultChannelFuture . setUseDeadLockChecker ( false ) ;

 if ( asyncHttpProviderConfig != null ) {
 - if ( asyncHttpProviderConfig . getProperty ( NettyAsyncHttpProviderConfig . EXECUTE_ASYNC_CONNECT ) != null ) {
 - executeConnectAsync = true ;
 + Object value = asyncHttpProviderConfig . getProperty ( NettyAsyncHttpProviderConfig . EXECUTE_ASYNC_CONNECT ) ;
 + if ( value != null && Boolean . class . isAssignableFrom ( value . getClass ( ) ) ) {
 + executeConnectAsync = Boolean . class . cast ( value ) ;
 } else if ( asyncHttpProviderConfig . getProperty ( NettyAsyncHttpProviderConfig . DISABLE_NESTED_REQUEST ) != null ) {
 DefaultChannelFuture . setUseDeadLockChecker ( true ) ;
 }

Properly set the EXECUTE_ASYNC_CONNECT value


<nb> public class DefaultPayment extends EntityBase implements Payment {

 BigDecimal result = amount ;
 for ( RefundModelDao cur : refunds ) {
 - if ( cur . getRefundStatus ( ) != RefundStatus . CREATED ) {
 + if ( cur . getRefundStatus ( ) == RefundStatus . COMPLETED ) {
 result = result . subtract ( cur . getAmount ( ) ) ;
 }
 }

Fix an issue with how we report paidAmount when there were some incomplete refunds


<nb> public class HikariCPCollectorTest {
 config . setJdbcUrl ( STRING0 ) ;
 config . setMaximumPoolSize ( NUMBER0 ) ;

 - try ( HikariDataSource ds = new HikariDataSource ( config ) ;
 - Connection connection1 = ds . getConnection ( ) ) {
 + try ( HikariDataSource ds = new HikariDataSource ( config ) ) {
 + try ( Connection connection1 = ds . getConnection ( ) ) {
 + SINGLE
 + }

 assertThat ( getValue ( STRING1 , STRING2 ) , is ( FLOAT0 ) ) ;
 assertThat ( getValue ( STRING3 , STRING2 ) , is ( FLOAT1 ) ) ;

Fix test failure caused by reformatting code


<nb> public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
 case UPDATING :
 {
 SINGLE
 - setKeyInterests ( ) ;
 if ( ! _interestState . compareAndSet ( current , State . SELECTING ) )
 throw new IllegalStateException ( ) ;
 + SINGLE
 + SINGLE
 + setKeyInterests ( ) ;
 return ;
 }
 case CHANGING :

Fixed race where the key interests were set before updating the


<nb> public class DeepLearningMissingTest extends TestUtil {
 sumErr . put ( mvh , sumerr ) ;
 }
 Log . info ( sb . toString ( ) ) ;
 - Assert . assertTrue ( sumErr . get ( DeepLearningModel . DeepLearningParameters . MissingValuesHandling . Skip ) > FLOAT0 ) ;
 + Assert . assertTrue ( sumErr . get ( DeepLearningModel . DeepLearningParameters . MissingValuesHandling . Skip ) > FLOAT1 ) ;
 Assert . assertTrue ( sumErr . get ( DeepLearningModel . DeepLearningParameters . MissingValuesHandling . MeanImputation ) < FLOAT2 ) ;
 }
 }


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class BlockLockManager {
 private static final Logger LOG = LoggerFactory . getLogger ( Constants . LOGGER_TYPE ) ;


<nb> public class MediaDriverAdminThreadTest
 @ after
 public void cleanup ( ) throws IOException
 {
 - IoUtil . delete ( new File ( adminPath ) , false ) ;
 + IoUtil . delete ( new File ( adminPath ) , true ) ;
 }

 @ test


<nb> public class WebXml {
 }

 SINGLE
 - SINGLE
 + SINGLE
 private int majorVersion = NUMBER0 ;
 - private int minorVersion = NUMBER1 ;
 + private int minorVersion = NUMBER2 ;
 public int getMajorVersion ( ) { return majorVersion ; }
 public int getMinorVersion ( ) { return minorVersion ; }


<nb> public class ClassNode extends AnnotatedNode implements Opcodes {
 MethodNode method = ( MethodNode ) methIt . next ( ) ;
 SINGLE
 SINGLE
 - if ( abstractNodes . contains ( method . getDeclaringClass ( ) ) ) {
 + if ( abstractNodes . contains ( method . getDeclaringClass ( ) ) &&
 + ( method . getModifiers ( ) & Opcodes . ACC_ABSTRACT ) != NUMBER0
 + ) {
 result . add ( method ) ;
 }
 }

only use abstract methods when asking for abstract methods


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;

 public class DummyEntryPointsPresentation extends UnusedDeclarationPresentation {
 <nb> public class DummyEntryPointsPresentation extends UnusedDeclarationPresentation
 if ( permanentFound && nonPermanentFound ) {
 e . getPresentation ( ) . setText ( InspectionsBundle . message ( STRING0 ) ) ;
 }
 - else if ( nonPermanentFound ) {
 + else if ( nonPermanentFound || ! permanentFound ) {
 e . getPresentation ( ) . setEnabled ( false ) ;
 }
 }

disable remove from EP for predefined EPs


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public class BuildResult {
 <nb> public class DescribedRuleBuilder < T > implements BuildRuleBuilder < DescribedRule >
 Object value ) {

 if ( value instanceof Optional ) {
 - value = ( ( Optional ) value ) . orNull ( ) ;
 + value = ( ( Optional < ? > ) value ) . orNull ( ) ;
 }

 if ( value instanceof BuildTargetSourcePath ) {


<nb> public class AprEndpoint extends AbstractEndpoint < Long > {

 private void doRun ( ) {
 SINGLE
 - if ( socket . getSocket ( ) == null ) {
 + if ( socket . getSocket ( ) == null || ! connections . containsKey ( socket ) ) {
 SINGLE
 return ;
 }
 <nb> public class TestUpgrade extends TomcatBaseTest {
 Socket socket =
 SocketFactory . getDefault ( ) . createSocket ( STRING0 , getPort ( ) ) ;

 - socket . setSoTimeout ( NUMBER0 ) ;
 + socket . setSoTimeout ( NUMBER1 ) ;

 UpgradeConnection uc = new UpgradeConnection ( socket ) ;

Fix a crash with testUpgrade and APR native


<nb> public class TokensRegexDemo {
 }

 pipeline . annotate ( annotation ) ;
 - SINGLE

 SINGLE
 - SINGLE
 out . println ( ) ;
 SINGLE
 SINGLE


<nb> public class Admin extends Controller {
 }

 public static void deleteUser ( long id ) {
 - TrinetUser user = TrinetUser . findById ( id ) ;
 - user . delete ( ) ;
 - getUsers ( ) ;
 + TrinetUser user = TrinetUser . findById ( id ) ;
 +
 + List < Session > sessions ;
 +
 + sessions = Session . find ( STRING0 , user ) . fetch ( ) ;
 + for ( Session sess : sessions ) {
 + sess . delete ( ) ;
 + }
 +
 + user . delete ( ) ;
 + getUsers ( ) ;
 }
 -
 +
 }


<nb> public class HaBeanIT
 }

 @ test
 + @ ignore ( STRING0 )
 public void testAfterGentleMasterSwitchClusterInfoIsCorrect ( ) throws Throwable
 {
 startCluster ( NUMBER0 ) ;
 <nb> public class HaBeanIT
 assertEquals ( STRING1 + info . getClusterId ( ) + STRING2 ,
 HighAvailabilityModeSwitcher . SLAVE , info . getHaRole ( ) ) ;
 }
 - for ( String uri : info . getUris ( ) )
 + for ( String uri : info . getUris ( ) )
 {
 assertTrue ( STRING3 , uri . startsWith ( STRING4 ) ) ;
 }

Temporarily ignore test in HaBeanIT pending investigation


<nb> public class CoberturaCoverageRunner extends JavaCoverageRunner {
 for ( VirtualFile sourceRoot : sourceRoots ) {
 javaParameters . getProgramParametersList ( ) . add ( FileUtil . toSystemDependentName ( sourceRoot . getPath ( ) ) ) ;
 }
 - javaParameters . setJdk ( projectRootManager . getProjectJdk ( ) ) ;
 + javaParameters . setJdk ( projectRootManager . getProjectSdk ( ) ) ;
 final DefaultJavaProcessHandler processHandler = new DefaultJavaProcessHandler ( javaParameters ) ;
 processHandler . startNotify ( ) ;
 processHandler . addProcessListener ( new ProcessAdapter ( ) {


<nb> public class JvmRouteBinderValve extends ValveBase implements ClusterValve {
 protected void sendSessionIDClusterBackup ( Request request , String sessionId ,
 String newSessionID ) {
 CatalinaCluster c = getCluster ( ) ;
 - if ( c != null ) {
 + if ( c != null && getManager ( request ) instanceof DeltaManager ) {
 SessionIDMessage msg = new SessionIDMessage ( ) ;
 msg . setOrignalSessionID ( sessionId ) ;
 msg . setBackupSessionID ( newSessionID ) ;

Avoid an unnecessary session ID change notice


<nb> public class SelectChannelEndPointSslTest extends SelectChannelEndPointTest
 filled = client . read ( sslIn ) ;
 Assert . assertEquals ( - NUMBER0 , filled ) ;

 + Thread . sleep ( NUMBER1 ) ; SINGLE
 Assert . assertFalse ( server . isOpen ( ) ) ;
 }

added delay to improve SSL tcpClose test


<nb> public class ShellProperties {
 return this . auth ;
 }

 - public void setAdditionalProperties ( CrshShellProperties [ ] additionalProperties ) {
 - Assert . notNull ( additionalProperties , STRING0 ) ;
 - this . additionalProperties = additionalProperties ;
 - }
 -
 public CrshShellProperties [ ] getAdditionalProperties ( ) {
 return this . additionalProperties ;
 }


<nb> public class SslHandler extends FrameDecoder
 engine . beginHandshake ( ) ;
 runDelegatedTasks ( ) ;
 handshakeFuture = this . handshakeFuture = future ( channel ) ;
 - } catch ( SSLException e ) {
 + } catch ( Exception e ) {
 handshakeFuture = this . handshakeFuture = failedFuture ( channel , e ) ;
 }
 }

SSLEngine beginHandshake can throw a RuntimeException


<nb> abstract class ModifierIntention extends Intention {
 }
 final MultiMap < PsiElement , String > conflicts = new MultiMap ( ) ;
 for ( PsiElement reference : problemReferences ) {
 - final PsiNameIdentifierOwner context = PsiTreeUtil . getParentOfType ( reference , PsiMethod . class , PsiField . class , PsiClass . class ) ;
 + final PsiElement context =
 + PsiTreeUtil . getParentOfType ( reference , PsiMethod . class , PsiField . class , PsiClass . class , PsiFile . class ) ;
 conflicts . putValue ( reference , RefactoringUIUtil . getDescription ( member , false ) +
 STRING0 + getModifier ( ) + STRING1 +
 RefactoringUIUtil . getDescription ( context , true ) ) ;

prevent NPE when presenting usage warning from import statement


<nb> public class GroovyFileImpl extends GroovyFileBaseImpl implements GroovyFile {
 }

 private boolean processChildrenScopes ( PsiScopeProcessor processor , ResolveState state , PsiElement lastParent , PsiElement place ) {
 + final StubElement < ? > stub = getStub ( ) ;
 + if ( stub != null ) {
 + return true ; SINGLE
 + }
 +
 PsiElement run = lastParent == null ? getLastChild ( ) : lastParent . getPrevSibling ( ) ;
 while ( run != null ) {
 if ( ! ( run instanceof GrTopLevelDefintion ) &&
 <nb> public class GroovyFileImpl extends GroovyFileBaseImpl implements GroovyFile {
 return true ;
 }

 +
 public GrImportStatement [ ] getImportStatements ( ) {
 return findChildrenByClass ( GrImportStatement . class ) ;
 }

don t process local script level declarations when only stub level info is needed


<nb> public abstract class JavaTestFrameworkRunnableState < T extends ModuleBasedConfig
 ext . updateJavaParameters ( getConfiguration ( ) , javaParameters , getRunnerSettings ( ) ) ;
 }

 - JavaParametersUtil . configureConfiguration ( javaParameters , getConfiguration ( ) ) ;
 + final String parameters = getConfiguration ( ) . getProgramParameters ( ) ;
 + getConfiguration ( ) . setProgramParameters ( null ) ;
 + try {
 + JavaParametersUtil . configureConfiguration ( javaParameters , getConfiguration ( ) ) ;
 + }
 + finally {
 + getConfiguration ( ) . setProgramParameters ( parameters ) ;
 + }
 JavaSdkUtil . addRtJar ( javaParameters . getClassPath ( ) ) ;

 configureClasspath ( javaParameters ) ;

do not pass unprocessed program params to tests process


<nb> public class EventTest {
 }

 @ test
 + @ ignore ( STRING0 )
 public void event_widget ( ) {
 SINGLE
 executeAnalysis ( STRING1 , STRING2 ) ;

Disable a test of EventTest which raises too many false positives


<nb> public class NauticalMapsPlugin extends OsmandPlugin {
 @ override
 public String getDescription ( ) {
 return STRING0
 - + STRING1
 - + STRING2 ;
 + + STRING3
 + + STRING4 ;
 }

 @ override
 <nb> public class SkiMapsPlugin extends OsmandPlugin {

 @ override
 public String getDescription ( ) {
 - return STRING5
 - + STRING6
 - + STRING7 ;
 + return STRING8
 + + STRING9
 + + STRING4 ;
 }

 @ override


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 - public class JsonUtil {
 + COMMENT
 + COMMENT
 + COMMENT
 + public final class JsonUtil {

 public static int getInt ( JsonObject object , String field ) {
 final JsonValue value = object . get ( field ) ;
 <nb> public class JsonUtil {
 throw new IllegalArgumentException ( STRING0 + field ) ;
 }
 }
 +
 + private JsonUtil ( ) { }
 }


<nb> public class HttpExchangeTest
 int size = NUMBER0 ;
 ContentExchange httpExchange = new ContentExchange ( )
 {
 + int total ;
 +
 @ override
 protected synchronized void onResponseStatus ( Buffer version , int status , Buffer reason ) throws IOException
 {
 if ( verbose )
 - super . onResponseStatus ( version , status , reason ) ;
 + System . err . println ( STRING0 + version + STRING1 + status + STRING1 + reason ) ;
 + super . onResponseStatus ( version , status , reason ) ;
 }

 @ override
 <nb> public class HttpExchangeTest
 protected synchronized void onResponseContent ( Buffer content ) throws IOException
 {
 if ( verbose )
 - System . err . println ( STRING0 + content . length ( ) ) ;
 + {
 + total += content . length ( ) ;
 + System . err . println ( STRING0 + content . length ( ) + STRING2 + total ) ;
 + }
 super . onResponseContent ( content ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class RemoteTransportException extends TransportException implements ElasticSearchWrapperException {

 <nb> public class SendRequestTransportException extends RemoteTransportException {

 public SendRequestTransportException ( DiscoveryNode node , String action , Throwable cause ) {
 super ( node == null ? null : node . name ( ) , node == null ? null : node . address ( ) , action , cause ) ;
 + fillStack ( ) ;
 }
 }
 <nb> public class TransportService extends AbstractLifecycleComponent < TransportServic
 }
 SINGLE
 SINGLE
 + final SendRequestTransportException sendRequestException = new SendRequestTransportException ( node , action , e ) ;
 threadPool . execute ( new Runnable ( ) {
 @ override public void run ( ) {
 - handler . handleException ( new SendRequestTransportException ( node , action , e ) ) ;
 + handler . handleException ( sendRequestException ) ;
 }
 } ) ;
 }

create a send transaction exception on the calling thread and fill its stack so we know where its coming from


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;

 import NAMESPACE ;

 <nb> public abstract class JvmSmartStepIntoHandler {
 }
 } ) ;
 final ListPopup popup = JBPopupFactory . getInstance ( ) . createListPopup ( popupStep ) ;
 - final RelativePoint point = DebuggerUIUtil . calcPopupLocation ( ( ( TextEditor ) fileEditor ) . getEditor ( ) , position . getLine ( ) ) ;
 + final RelativePoint point = DebuggerUIUtil . calcPopupLocation ( fileEditor . getEditor ( ) , position . getLine ( ) ) ;
 popup . show ( point ) ;
 }
 return true ;


<nb> public class ColorCodeBuilder {
 public String [ ] build ( StyledFragment message ) {
 StringBuilder builder = new StringBuilder ( ) ;
 buildFragment ( builder , message , message . getStyle ( ) , new StyleSet ( ) ) ;
 - return wordWrap ( builder . toString ( ) , GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH ) ;
 + return builder . toString ( ) . split ( STRING0 ) ;
 }

 COMMENT

Remove word wrapping in ColorCodeBuilder build


<nb> import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 COMMENT
 COMMENT
 <nb> public class MasterResource
 return resp ;
 }

 -
 + @ get
 + @ path ( STRING0 )
 + @ produces ( STRING1 )
 + public Map < String , Double > getLoadStatus ( )
 + {
 + return master . getLoadStatus ( ) ;
 + }
 }


<nb> public class JavadocGenerator implements Compiler < JavadocSpec > {
 try {
 execAction . execute ( ) ;
 } catch ( ExecException e ) {
 - throw new GradleException ( STRING0 , e ) ;
 + throw new GradleException ( String . format ( STRING1 , spec . getOptionsFile ( ) ) , e ) ;
 }

 return new SimpleWorkResult ( true ) ;

Added more context to the javadoc generation exception


<nb> public class UpdatesIndexFragment extends SherlockListFragment {
 return ;
 }

 - List < DownloadEntry > download = e . createDownloadEntry ( getMyApplication ( ) , getDownloadActivity ( ) . getDownloadType ( ) , new ArrayList < DownloadEntry > ( ) ) ;
 + List < DownloadEntry > download = e . createDownloadEntry ( getMyApplication ( ) , e . getType ( ) , new ArrayList < DownloadEntry > ( ) ) ;
 if ( download . size ( ) > NUMBER0 ) {
 getDownloadActivity ( ) . getEntriesToDownload ( ) . put ( e , download ) ;
 getDownloadActivity ( ) . updateDownloadButton ( true ) ;

Fixed issue with wrong type maps downloading roads only


<nb> public class BulkWriteError {
 result = NUMBER0 * result + details . hashCode ( ) ;
 return result ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return STRING0
 + + STRING1 + index
 + + STRING2 + code
 + + STRING3 + message + STRING4
 + + STRING5 + details
 + + STRING6 ;
 + }
 }

Add toString method to BulkWriteError as BulkWriteException relies on it to create its message


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import static NAMESPACE ;
 givenConnectionExceptionObtainingCharacters ( ) ;
 givenEmptyComicSeries ( ) ;

 - MainActivity mainActivity = startActivity ( ) ;
 + startActivity ( ) ;

 - ViewVisibilityIdlingResource viewVisibilityIdlingResource =
 - new ViewVisibilityIdlingResource ( mainActivity , android . support . design . R . id . snackbar_text ,
 - View . VISIBLE ) ;
 - Espresso . registerIdlingResources ( viewVisibilityIdlingResource ) ;
 onView ( allOf ( withId ( android . support . design . R . id . snackbar_text ) ,
 withText ( STRING0 ) ) ) . check (
 matches ( withEffectiveVisibility ( ViewMatchers . Visibility . VISIBLE ) ) ) ;
 - Espresso . unregisterIdlingResources ( viewVisibilityIdlingResource ) ;
 }

 @ test public void shouldHideLoadingWhenDataIsLoaded ( ) throws Exception {


<nb> public class XmlElementDescriptorImpl implements XmlElementDescriptor , PsiWritab

 if ( rootTag != null &&
 ( NONQUALIFIED_ATTR_VALUE . equals ( elementFormDefault = rootTag . getAttributeValue ( ELEMENT_FORM_DEFAULT ) ) || elementFormDefault == null COMMENT ) &&
 - tag . getNamespaceByPrefix ( STRING0 ) . length ( ) == NUMBER0
 + tag . getNamespaceByPrefix ( STRING0 ) . isEmpty ( )
 + && myDescriptorTag . getParentTag ( ) != rootTag
 ) {
 value = XmlUtil . findLocalNameByQualifiedName ( value ) ;
 } else {

code completion in xml suggest unprefixed constructor arg and property when beans namespace has been bound to prefix


<nb> public interface MockSettings extends Serializable {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 + @ incubating
 MockSettings useConstructor ( ) ;

 COMMENT
 <nb> public interface MockSettings extends Serializable {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 + @ incubating
 MockSettings outerInstance ( Object outerClassInstance ) ;
 }
 <nb> public class Mockito extends Matchers {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 + @ incubating
 public static < T > T spy ( Class < T > classToSpy ) {
 return MOCKITO_CORE . mock ( classToSpy , withSettings ( )
 . useConstructor ( )
 <nb> public interface MockCreationSettings < T > {

 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 + @ incubating
 boolean isUsingConstructor ( ) ;

 COMMENT
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 @ incubating
 Object getOuterClassInstance ( ) ;


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class DirectNoMultipleConsumersTest extends TestCase {

 try {
 container . start ( ) ;
 - fail ( STRING0 ) ;
 - } catch ( IllegalStateException e ) {
 + fail ( STRING1 ) ;
 + } catch ( FailedToStartRouteException e ) {
 SINGLE
 }
 }


<nb> public interface TestProgressListener {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 void statusChanged ( TestProgressEvent event ) ;


<nb> import NAMESPACE ;
 COMMENT
 public final class SipService extends ISipService . Stub {
 private static final String TAG = STRING0 ;
 + private static final boolean DEBUGV = false ;
 private static final boolean DEBUG = true ;
 private static final boolean DEBUG_TIMER = DEBUG && false ;
 private static final int EXPIRY_TIME = NUMBER0 ;
 <nb> public final class SipService extends ISipService . Stub {
 if ( notCurrentSession ( session ) ) return ;

 session = session . duplicate ( ) ;
 - if ( DEBUG ) Log . d ( TAG , STRING1 ) ;
 + if ( DEBUGV ) Log . v ( TAG , STRING1 ) ;
 mTimer . cancel ( this ) ;
 session . sendKeepAlive ( ) ;
 if ( session . isReRegisterRequired ( ) ) {


<nb> public class NumberedShardSpecTest
 {
 final ObjectMapper jsonMapper = new DefaultObjectMapper ( ) ;
 final ShardSpec spec = jsonMapper . readValue (
 - STRING0 ,
 + STRING1 ,
 ShardSpec . class
 ) ;
 Assert . assertEquals ( NUMBER0 , spec . getPartitionNum ( ) ) ;


<nb> public class AlfrescoContentUtil {

 HasPermissionsResult [ ] results =
 accessControlService . hasPermissions (
 - predicate , new String [ ] { Constants . WRITE } ) ;
 + predicate , new String [ ] { action } ) ;

 if ( ( results . length == NUMBER0 ) &&
 - ( results [ NUMBER1 ] . getPermission ( ) . equals ( Constants . WRITE ) ) &&
 + ( results [ NUMBER1 ] . getPermission ( ) . equals ( action ) ) &&
 ( results [ NUMBER1 ] . getAccessStatus ( ) . equals ( AccessStatus . acepted ) ) ) {

 return true ;

pass the correct permission to the alfresco ws


<nb> public class OPDSCustomNetworkLink extends OPDSNetworkLink implements ICustomNet
 if ( ! opensearchDescriptionURLs . isEmpty ( ) ) {
 LinkedList < ZLNetworkRequest > requests = new LinkedList < ZLNetworkRequest > ( ) ;
 for ( String url : opensearchDescriptionURLs ) {
 - requests . add ( new ZLNetworkRequest ( url ) {
 + requests . add ( new ZLNetworkRequest ( url , quietly ) {
 @ override
 public void handleStream ( InputStream inputStream , int length ) throws IOException , ZLNetworkException {
 new OpenSearchXMLReader ( getURL ( ) , descriptions ) . read ( inputStream ) ;


<nb> public abstract class Context {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
 LOG . debug ( STRING0 + expr ) ;
 }

 - if ( expr == null ) {
 + if ( expr == null || ! expr . isPhysical ( ) ) {
 if ( ReassignVariableUtil . reassign ( editor ) ) return false ;
 - String message = RefactoringBundle . getCannotRefactorMessage ( RefactoringBundle . message ( STRING1 ) ) ;
 - showErrorMessage ( project , editor , message ) ;
 - return false ;
 + if ( expr == null ) {
 + String message = RefactoringBundle . getCannotRefactorMessage ( RefactoringBundle . message ( STRING1 ) ) ;
 + showErrorMessage ( project , editor , message ) ;
 + return false ;
 + }
 }

enable reassign variable in anonymous class call parent expression exists


<nb> public class RCompletionManager implements CompletionManager
 {
 if ( string . matches ( STRING0 + chr + STRING1 ) )
 {
 - int ind = string . indexOf ( chr ) ;
 + int ind = string . lastIndexOf ( chr ) ;
 String before = string . substring ( NUMBER0 , ind + NUMBER1 ) ;
 String after = string . substring ( ind + NUMBER1 , string . length ( ) ) ;
 if ( after . length ( ) > NUMBER0 )

Use the last index for syntactic quoting