<nb> public abstract class DocumentHolder
 }

 SINGLE
 - Rect rect = new Rect ( ) ;
 - mSelectionHotspot . getGlobalVisibleRect ( rect ) ;
 + int [ ] coords = new int [ NUMBER0 ] ;
 + mSelectionHotspot . getLocationOnScreen ( coords ) ;
 + Rect rect = new Rect ( coords [ NUMBER1 ] , coords [ NUMBER2 ] , coords [ NUMBER1 ] + mSelectionHotspot . getWidth ( ) ,
 + coords [ NUMBER2 ] + mSelectionHotspot . getHeight ( ) ) ;

 SINGLE
 - if ( rect . contains ( ( int ) event . getRawX ( ) , ( int ) event . getRawY ( ) ) ) {
 + if ( rect . contains ( ( int ) event . getRawX ( ) , ( int ) event . getRawY ( ) ) ) {
 return mEventListener . onSelect ( this ) ;
 } else {
 return mEventListener . onActivate ( this ) ;

Fix selecting with touch in multi window


<nb> public class OsmandApplication extends Application {
 LOG . error ( STRING0 , e ) ;
 warnings . add ( STRING1 ) ;
 }
 - if ( ! Version . isBlackberry ( this ) ) {
 +
 + if ( ! Version . isBlackberry ( this ) || ! STRING2 . equals ( System . getProperty ( STRING3 ) ) ) {
 if ( osmandSettings . NATIVE_RENDERING_FAILED . get ( ) ) {
 osmandSettings . SAFE_MODE . set ( true ) ;
 osmandSettings . NATIVE_RENDERING_FAILED . set ( false ) ;


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

 COMMENT
 <nb> public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
 private volatile Settings settings ;

 private final ConcurrentMap < Channel , AtomicLong > channelCounters =
 - new ConcurrentHashMap < Channel , AtomicLong > ( ) ;
 + new ConcurrentIdentityHashMap < Channel , AtomicLong > ( ) ;
 private final AtomicLong totalCounter = new AtomicLong ( ) ;

 private final Semaphore semaphore = new Semaphore ( NUMBER0 ) ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;

 COMMENT
 COMMENT
 <nb> public class OrderedMemoryAwareThreadPoolExecutor extends
 MemoryAwareThreadPoolExecutor {

 private final ConcurrentMap < Channel , Executor > childExecutors =
 - new ConcurrentHashMap < Channel , Executor > ( ) ;
 + new ConcurrentIdentityHashMap < Channel , Executor > ( ) ;

 COMMENT
 COMMENT

Replaced ConcurrentHashMap with ConcurrentIdentityHashMap wherever possible


<nb> public class GoogleAppEngineCometSupport extends BlockingIOCometSupport {
 } else {
 latch . await ( NUMBER0 , TimeUnit . MILLISECONDS ) ;
 }
 - } catch ( InterruptedException ex ) {
 + } catch ( Throwable ex ) {
 LoggerUtils . getLogger ( ) . log ( Level . SEVERE , STRING0 ) ;
 } finally {
 timedout ( req , res ) ;


<nb> public class VoiceRouter {
 TURN_DISTANCE = NUMBER0 ; SINGLE
 DEFAULT_SPEED = NUMBER1 ; SINGLE
 } else {
 - PREPARE_DISTANCE = NUMBER2 ; SINGLE
 - PREPARE_DISTANCE_END = NUMBER3 ; SINGLE
 + PREPARE_DISTANCE = NUMBER4 ; SINGLE
 + PREPARE_DISTANCE_END = NUMBER5 ; SINGLE
 TURN_IN_DISTANCE = NUMBER6 ; SINGLE
 TURN_IN_DISTANCE_END = NUMBER7 ; SINGLE
 TURN_DISTANCE = NUMBER8 ; SINGLE
 <nb> public class VoiceRouter {
 protected void updateStatus ( Location currentLocation , boolean makeUturnWhenPossible ) {
 SINGLE
 SINGLE
 - SINGLE
 + SINGLE
 SINGLE
 SINGLE
 float speed = DEFAULT_SPEED ;


<nb> public class TerminalPane extends WorkbenchPane
 {
 terminalSessionsPanel_ . add ( event . getTerminalWidget ( ) ) ;
 terminalSessionsPanel_ . showWidget ( event . getTerminalWidget ( ) ) ;
 + terminalSessionsPanel_ . forceLayout ( ) ;

 SINGLE
 }
 <nb> public class TerminalPane extends WorkbenchPane
 SINGLE
 }
 terminalSessionsPanel_ . remove ( currentTerminal ) ;
 -
 +
 SINGLE
 }

set actual initial pty size when terminal is first displayed


<nb> public class ShapefileStreetLoader {
 coordinates [ NUMBER0 ] . toString ( ) ,
 coordinates [ NUMBER0 ] . x ,
 coordinates [ NUMBER0 ] . y ) ;
 - graph . addVertex ( startCorner ) ;
 + startCorner = graph . addVertex ( startCorner ) ;
 Vertex endCorner = new SpatialVertex (
 coordinates [ coordinates . length - NUMBER1 ] . toString ( ) ,
 coordinates [ coordinates . length - NUMBER1 ] . x ,
 coordinates [ coordinates . length - NUMBER1 ] . y ) ;
 - graph . addVertex ( endCorner ) ;
 + endCorner = graph . addVertex ( endCorner ) ;

 if ( trafDir . equals ( STRING0 ) ) {
 SINGLE

use existing graph vertices where possible


<nb> public class ContentView extends FrameLayout {

 metUrl . dismissDropDown ( ) ;

 + strUrl = strUrl . trim ( ) ;
 String strUrlWithPrefix = strUrl ;
 if ( ! strUrl . startsWith ( HTTP_PREFIX ) && ! strUrl . startsWith ( HTTPS_PREFIX ) )
 strUrlWithPrefix = HTTP_PREFIX + strUrl ;


<nb> public class ScriptIntrinsicBlend extends ScriptIntrinsic {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

add comment about xor not being porter duff


<nb> public class WebView extends AbsoluteLayout
 } else if ( mPreventDefault != PREVENT_DEFAULT_YES ) {
 mTouchMode = TOUCH_DONE_MODE ;
 performLongClick ( ) ;
 - rebuildWebTextView ( ) ;
 }
 break ;
 }
 <nb> public class WebView extends AbsoluteLayout
 if ( hitTest != null && hitTest . mType
 != HitTestResult . UNKNOWN_TYPE ) {
 performLongClick ( ) ;
 - rebuildWebTextView ( ) ;
 }
 mDeferTouchMode = TOUCH_DONE_MODE ;
 break ;

Remove unnecessary calls to rebuildWebTextView


<nb> public class DefaultBroadcaster implements Broadcaster {
 SINGLE
 SINGLE
 BroadcasterCache broadcasterCache = bc . getBroadcasterCache ( ) ;
 - if ( ! force || EventCacheBroadcasterCache . class . isAssignableFrom ( broadcasterCache . getClass ( ) ) ) {
 + if ( ! force && EventCacheBroadcasterCache . class . isAssignableFrom ( broadcasterCache . getClass ( ) ) ) {
 return ;
 }


<nb> public class PhotoViewAttacher implements IPhotoView , View . OnTouchListener ,

 @ override
 public void getDisplayMatrix ( Matrix matrix ) {
 - matrix . set ( getDisplayMatrix ( ) ) ;
 + matrix . set ( getDrawMatrix ( ) ) ;
 }

 public Matrix getDrawMatrix ( ) {

Updated getDisplayMatrix getDisplayMatrix Matrix to use getDrawMatrix directly avoiding an unncessary Matrix allocation


<nb> public static void loadResourceScript ( String name ) throws Exception {
 InputStream ins = RT . class . getResourceAsStream ( STRING0 + name ) ;
 if ( ins != null )
 {
 - Compiler . load ( new InputStreamReader ( ins ) , name , name ) ;
 + Compiler . load ( new InputStreamReader ( ins ) , RT . class . getResource ( STRING0 + name ) . toString ( ) , name ) ;
 ins . close ( ) ;
 }
 }

try uri of resource in sourcedebugextension when load from resource


<nb> public abstract class AbstractPrintElementsManager < CommitId > implements PrintEle

 CommitId headCommitId = myPrintedLinearGraph . getOneOfHeads ( upNodeIndex ) ;
 if ( upLayoutIndex != downLayoutIndex ) {
 - return myColorManager . getColorOfFragment ( headCommitId , upLayoutIndex * downLayoutIndex ) ;
 + return myColorManager . getColorOfFragment ( headCommitId , Math . max ( upLayoutIndex , downLayoutIndex ) ) ;
 }

 if ( upLayoutIndex == myPrintedLinearGraph . getHeadLayoutIndex ( upNodeIndex ) )


<nb> public class KeyguardViewMediator extends SystemUI {
 @ override
 public void onDeviceProvisioned ( ) {
 sendUserPresentBroadcast ( ) ;
 - updateInputRestricted ( ) ;
 }

 @ override
 <nb> public class KeyguardViewMediator extends SystemUI {
 COMMENT
 COMMENT
 public boolean isInputRestricted ( ) {
 - return mShowing || mNeedToReshowWhenReenabled || shouldWaitForProvisioning ( ) ;
 + return mShowing || mNeedToReshowWhenReenabled ;
 }

 private void updateInputRestricted ( ) {


<nb> public class CdiResolver extends ELResolver {
 context . setPropertyResolved ( result != null ) ;
 return result ;
 } catch ( IllegalStateException e ) {
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 -
 - SINGLE
 - SINGLE
 -
 - Object result = ProgrammaticBeanLookup . lookup ( property . toString ( ) ) ;
 + e . printStackTrace ( ) ;
 + SINGLE
 + Object result = ProgrammaticBeanLookup . lookup ( property . toString ( ) , getBeanManager ( ) ) ;
 context . setPropertyResolved ( result != null ) ;
 return result ;
 }

using right BeanManager to to perform the lookup


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

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

 - import NAMESPACE ;
 - import NAMESPACE ;
 -
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class WebSocketSslServerSslContext {
 COMMENT
 COMMENT
 COMMENT
 - private static class SingletonHolder {
 - public static final WebSocketSslServerSslContext INSTANCE = new WebSocketSslServerSslContext ( ) ;
 + private interface SingletonHolder {
 + WebSocketSslServerSslContext INSTANCE = new WebSocketSslServerSslContext ( ) ;
 }

 COMMENT

Simplify SingletonHolder by using interface instead of static class


<nb> public final class CheckpointLatestPlanner implements CheckpointPlanner {
 private static final Logger LOG = LoggerFactory . getLogger ( Constants . LOGGER_TYPE ) ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> final class FileWorkerMasterSyncExecutor implements HeartbeatExecutor {
 } catch ( ConnectionFailedException e ) {
 LOG . error ( STRING0 , e ) ;
 }
 - Preconditions . checkState ( command . commandType == CommandType . Persist ) ;
 +
 + if ( command == null ) {
 + LOG . error ( STRING1 ) ;
 + return ;
 + } else if ( command . commandType != CommandType . Persist ) {
 + LOG . error ( STRING2 ,
 + command . commandType ) ;
 + return ;
 + }

 for ( PersistFile persistFile : command . getCommandOptions ( ) . getPersistOptions ( ) . persistFiles ) {
 mFixedExecutionService


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

 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 -
 + @ ignore ( STRING0 )
 public class ProxyControllerTestCase extends AbstractProxyControllerTest {

 @ before

Disable ProxyControllerTestCase pending kabir s work


<nb> public abstract class AbstractVcsTestCase {
 } . execute ( ) . throwException ( ) ;
 }

 - protected void deleteFileInCommand ( final VirtualFile file ) {
 + public void deleteFileInCommand ( final VirtualFile file ) {
 deleteFileInCommand ( myProject , file ) ;
 }

 <nb> public abstract class AbstractVcsTestCase {
 } . execute ( ) ;
 }

 - protected void editFileInCommand ( final VirtualFile file , final String newContent ) {
 + public void editFileInCommand ( final VirtualFile file , final String newContent ) {
 editFileInCommand ( myProject , file , newContent ) ;
 }


<nb> import NAMESPACE ;
 public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig < String , Object > {

 public final static String USE_BLOCKING_IO = STRING0 ;
 + public final static String USE_DIRECT_BYTEBUFFER = STRING1 ;
 +

 private final ConcurrentHashMap < String , Object > properties = new ConcurrentHashMap < String , Object > ( ) ;

Add some well known Netty inernal configuration


<nb> public class Observable < T > {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class Observable < T > {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public final Observable < T > onErrorFlatMap ( final Func1 < OnErrorThrowable , ? extends Observable < ? extends T > > resumeFunction ) {
 return lift ( new OperatorOnErrorFlatMap < T > ( resumeFunction ) ) ;
 }

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

improve javadocs for onErrorFlatMap with link to wiki docs marble diagram


<nb> public class TextConverter extends Visitor {
 String ch = EntityReferences . resolve ( er . getName ( ) ) ;
 if ( STRING0 . equals ( er . getName ( ) ) ) {
 write ( STRING1 ) ;
 + } else if ( STRING2 . equals ( er . getName ( ) ) || STRING3 . equals ( er . getName ( ) ) ) {
 + write ( STRING4 ) ;
 } else if ( ch == null ) {
 write ( STRING5 ) ;
 write ( er . getName ( ) ) ;


<nb> public class LocalGatewayNodeAllocation extends NodeAllocation {
 continue ;
 }

 + SINGLE
 + if ( indexRoutingTable . shards ( ) . isEmpty ( ) ) {
 + continue ;
 + }
 +
 if ( indexRoutingTable . allPrimaryShardsUnassigned ( ) ) {
 SINGLE
 Set < String > nodesIds = Sets . newHashSet ( ) ;

add test in node allocation is there are no shards no need to do local gateway allocation


<nb> public final class NotificationRecord {
 }

 try {
 - final ApplicationInfo applicationInfo = mContext . getPackageManager ( ) . getApplicationInfo (
 - sbn . getPackageName ( ) , NUMBER0 ) ;
 + final ApplicationInfo applicationInfo =
 + mContext . getPackageManager ( ) . getApplicationInfoAsUser ( sbn . getPackageName ( ) ,
 + NUMBER0 , sbn . getUser ( ) . getIdentifier ( ) ) ;
 if ( applicationInfo . targetSdkVersion < Build . VERSION_CODES . N ) {
 if ( isNoisy ) {
 if ( importance >= IMPORTANCE_HIGH ) {


<nb> import NAMESPACE ;

 import NAMESPACE ;

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

 public class AgentBuilderListenerTest {
 <nb> public class AgentBuilderListenerTest {
 }

 @ test
 + public void testStreamWritingStandardOutput ( ) throws Exception {
 + assertThat ( AgentBuilder . Listener . StreamWriting . toSystemOut ( ) , is ( ( AgentBuilder . Listener ) new AgentBuilder . Listener . StreamWriting ( System . out ) ) ) ;
 + }
 +
 + @ test
 public void testObjectProperties ( ) throws Exception {
 ObjectPropertyAssertion . of ( AgentBuilder . Listener . NoOp . class ) . apply ( ) ;
 ObjectPropertyAssertion . of ( AgentBuilder . Listener . StreamWriting . class ) . apply ( ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class MapTransactionTest extends HazelcastTestSupport {
 }

 @ test
 + @ category ( NightlyTest . class )
 public void testTxnOwnerDies ( ) throws TransactionException , InterruptedException {
 final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory ( NUMBER0 ) ;
 final HazelcastInstance h1 = factory . newHazelcastInstance ( ) ;

Marked a slow MapTransactionTest testTxnOwnerDies as nightly test


<nb> public class AppWindowAnimator {
 public AppWindowAnimator ( final AppWindowToken atoken ) {
 mAppToken = atoken ;
 mService = atoken . service ;
 - mAnimator = atoken . mAnimator ;
 + mAnimator = mService . mAnimator ;
 }

 public void setAnimation ( Animation anim , int width , int height , boolean skipFirstFrame ) {
 <nb> import static NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> class AppWindowToken extends WindowToken {
 SINGLE
 SINGLE
 final WindowList allAppWindows = new WindowList ( ) ;
 - final AppWindowAnimator mAppAnimator ;
 -
 - final WindowAnimator mAnimator ;
 + @ nonnull final AppWindowAnimator mAppAnimator ;

 final boolean voiceInteraction ;

 <nb> class AppWindowToken extends WindowToken {
 appToken = _token ;
 voiceInteraction = _voiceInteraction ;
 mInputApplicationHandle = new InputApplicationHandle ( this ) ;
 - mAnimator = service . mAnimator ;
 mAppAnimator = new AppWindowAnimator ( this ) ;
 }

Remove unnecessary field from AppWindowToken


<nb> public class CacheContainerAdd extends AbstractAddStepHandler implements Descrip
 cacheBuilder . addAliases ( CacheService . getServiceName ( name , null ) ) ;
 }
 if ( configuration . isTransactionalCache ( ) ) {
 - cacheBuilder . addDependency ( TxnServices . JBOSS_TXN_TRANSACTION_MANAGER ) ;
 + builder . addDependency ( TxnServices . JBOSS_TXN_TRANSACTION_MANAGER ) ;
 if ( configuration . isUseSynchronizationForTransactions ( ) ) {
 - cacheBuilder . addDependency ( TxnServices . JBOSS_TXN_SYNCHRONIZATION_REGISTRY ) ;
 + builder . addDependency ( TxnServices . JBOSS_TXN_SYNCHRONIZATION_REGISTRY ) ;
 }
 if ( configuration . isTransactionRecoveryEnabled ( ) ) {
 - cacheBuilder . addDependencies ( TxnServices . JBOSS_TXN_ARJUNA_RECOVERY_MANAGER ) ;
 + builder . addDependencies ( TxnServices . JBOSS_TXN_ARJUNA_RECOVERY_MANAGER ) ;
 }
 }
 if ( startMode . getMode ( ) == ServiceController . Mode . ACTIVE ) {

Add the tx manager dependencies to the cachecontainer builder and not


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OTokenHandlerImpl implements OTokenHandler {
 mac . init ( getKeyProvider ( ) . getKey ( header ) ) ;
 mac . update ( base , baseOffset , baseLength ) ;
 final byte [ ] calculatedSignature = mac . doFinal ( ) ;
 - boolean valid = Arrays . equals ( calculatedSignature , signature ) ;
 + boolean valid = MessageDigest . isEqual ( calculatedSignature , signature ) ;
 if ( ! valid ) {
 OLogManager . instance ( ) . warn ( this , STRING0 , OBase64Utils . encodeBytes ( base ) ) ;
 }


<nb> public interface Config extends ConfigMergeable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface Config extends ConfigMergeable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Fix bad html in hasPathOrNull doc comment


<nb> import static NAMESPACE ;

 @ runwith ( HazelcastSerialClassRunner . class )
 @ category ( QuickTest . class )
 - public class EventPublishOrderWithEviction extends HazelcastTestSupport {
 + public class EventPublishOrderWithEvictionTest extends HazelcastTestSupport {

 @ test
 public void testEntryEvictEventsEmitted_afterAddEvents ( ) throws Exception {


<nb> public final class EpollDatagramChannel extends AbstractEpollChannel implements
 if ( exception != null ) {
 pipeline . fireExceptionCaught ( exception ) ;
 }
 -
 - pipeline . fireChannelReadComplete ( ) ;
 } finally {
 SINGLE
 SINGLE

Fix duplicate channelReadComplete in EpollDatagramChannel


<nb> public abstract class Command {
 COMMENT
 COMMENT
 public boolean testPermission ( CommandSender target ) {
 - if ( ( permission == null ) || ( permission . isEmpty ( ) ) || ( target . hasPermission ( permission ) ) ) {
 + if ( ( permission == null ) || ( permission . length ( ) == NUMBER0 ) || ( target . hasPermission ( permission ) ) ) {
 return true ;
 }


<nb> public class DynamicRequestMatcherFactory extends Dynamics implements RequestMat
 return not ( exist ( extractor ) ) ;
 }

 - throw new RuntimeException ( String . format ( STRING0 , text ) ) ;
 + throw new IllegalArgumentException ( String . format ( STRING0 , text ) ) ;
 }

 private static RequestMatcher wrapRequestMatcher ( final RequestSetting request ,

replaced exception with illegal argument exception in dynamic request matcher factory


<nb> public abstract class RajawaliRenderer implements IRajawaliSurfaceRenderer {

 final double [ ] in = new double [ NUMBER0 ] , out = new double [ NUMBER0 ] ;

 - Matrix4 MVPMatrix = getCurrentCamera ( ) . getProjectionMatrix ( ) . multiply ( getCurrentCamera ( ) . getViewMatrix ( ) ) ;
 + Matrix4 projectionMatrix = getCurrentCamera ( ) . getProjectionMatrix ( ) . clone ( ) ;
 + Matrix4 MVPMatrix = projectionMatrix . multiply ( getCurrentCamera ( ) . getViewMatrix ( ) ) ;
 MVPMatrix . inverse ( ) ;

 in [ NUMBER1 ] = ( x / mDefaultViewportWidth ) * NUMBER2 - NUMBER3 ;

creating a copy of the projection matrix so it s not altered by calling unproject function


<nb> public class SedaConsumer extends ServiceSupport implements Consumer , Runnable ,
 continue ;
 }

 - SINGLE
 - if ( isSuspending ( ) || isSuspended ( ) ) {
 + SINGLE
 + if ( isSuspending ( ) || isSuspended ( ) || isStarting ( ) ) {
 if ( shutdownPending && queue . isEmpty ( ) ) {
 LOG . trace ( STRING0 ) ;
 SINGLE
 <nb> public class SedaConsumer extends ServiceSupport implements Consumer , Runnable ,

 @ override
 protected void doResume ( ) throws Exception {
 - doStart ( ) ;
 + endpoint . onStarted ( this ) ;
 }

 protected void doStop ( ) throws Exception {

Seda suspend resume should not trigger start stop logic


<nb> public class DescriptorUtils {
 }

 public static Set < FqName > getPackagesFqNames ( ModuleDescriptor module ) {
 - return getSubPackagesFqNames ( module . getPackage ( FqName . ROOT ) ) ;
 + Set < FqName > result = getSubPackagesFqNames ( module . getPackage ( FqName . ROOT ) ) ;
 + result . add ( FqName . ROOT ) ;
 + return result ;
 }

 public static Set < FqName > getSubPackagesFqNames ( PackageViewDescriptor packageView ) {

add default package name to DescriptorUtils getPackageNames


<nb> public class ConfigResource
 final JsonNode tree = mapper . readTree ( mapper . getJsonFactory ( ) . createJsonParser ( newConfigJson ) ) ;

 String backupExtraValue = STRING0 ;
 - if ( tree . has ( STRING1 ) )
 + if ( tree . get ( STRING1 ) != null )
 {
 - Map < String , String > values = Maps . newHashMap ( ) ;
 + Map < String , String > values = Maps . newHashMap ( ) ;
 JsonNode backupExtra = tree . get ( STRING1 ) ;
 Iterator < String > fieldNames = backupExtra . getFieldNames ( ) ;
 while ( fieldNames . hasNext ( ) )

Was using a invalid Jackson API somehow the Netflix builder is bringing in a different Jackson JAR


<nb> public class RedisSessionModule extends ConfigurableModule < RedisSessionModule . Co
 private String password ;
 private String host ;
 private Integer port ;
 - private String sessionKeyPrefix = STRING0 ;
 -

 public Config ( ) {
 host = STRING1 ;
 <nb> public class RedisSessionModule extends ConfigurableModule < RedisSessionModule . Co
 public void setPort ( Integer port ) {
 this . port = port ;
 }
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public String getSessionKeyPrefix ( ) {
 - return sessionKeyPrefix ;
 - }
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public void setSessionKeyPrefix ( String sessionKeyPrefix ) {
 - this . sessionKeyPrefix = sessionKeyPrefix ;
 - }
 }
 }


<nb> public class IngestRestFilter extends RestFilter {

 @ override
 public void process ( RestRequest request , RestChannel channel , RestFilterChain filterChain ) throws Exception {
 - request . putInContext ( INGEST_PARAM_CONTEXT_KEY , request . param ( INGEST_PARAM ) ) ;
 + if ( request . hasParam ( INGEST_PARAM ) ) {
 + request . putInContext ( INGEST_PARAM_CONTEXT_KEY , request . param ( INGEST_PARAM ) ) ;
 + }
 filterChain . continueProcessing ( request , channel ) ;
 }
 }

Add the ingest param to the context only if present


<nb> final class RowSeq implements DataPoints {
 case NUMBER0 : return Bytes . getLong ( values , value_idx ) ;
 case NUMBER1 : return Bytes . getInt ( values , value_idx ) ;
 case NUMBER2 : return Bytes . getShort ( values , value_idx ) ;
 - case NUMBER3 : return values [ value_idx ] ;
 + case NUMBER3 : return values [ value_idx ] & NUMBER4 ;
 }
 throw new IllegalDataException ( STRING0 + value_idx
 + STRING1


<nb> public class IdeFrameImpl extends JFrame implements IdeFrame , DataProvider {
 @ override
 public void run ( ) {
 WindowManagerEx . getInstanceEx ( ) . setFullScreen ( IdeFrameImpl . this , true ) ;
 + if ( SystemInfo . isMacOSLion ) {
 + setBounds ( ScreenUtil . getScreenRectangle ( getLocationOnScreen ( ) ) ) ;
 + }
 myRestoreFullScreen = false ;
 }
 } ) ;

Restore two fullscreen project on startup Mac OS


<nb> public class GitLogParser {
 SINGLE
 SINGLE
 SINGLE
 - final String [ ] records = output . split ( RECORD_START ) ; SINGLE
 - final List < GitLogRecord > res = new ArrayList < GitLogRecord > ( records . length ) ;
 + final List < String > records = StringUtil . split ( output , RECORD_START ) ; SINGLE
 + final List < GitLogRecord > res = new ArrayList < GitLogRecord > ( records . size ( ) ) ;
 for ( String record : records ) {
 if ( ! record . trim ( ) . isEmpty ( ) ) { SINGLE
 res . add ( parseOneRecord ( record ) ) ;

git speed up parsing log records a bit use improved version of split


<nb> public class FreemarkerBodyAsDomainObjectTest extends CamelTestSupport {
 public void testWithObject ( ) throws Exception {
 MockEndpoint mock = getMockEndpoint ( STRING0 ) ;
 mock . expectedMessageCount ( NUMBER0 ) ;
 - mock . expectedBodiesReceived ( STRING1 ) ;
 + mock . message ( NUMBER1 ) . body ( ) . contains ( STRING2 ) ;

 MyPerson person = new MyPerson ( ) ;
 person . setFamilyName ( STRING3 ) ;
 <nb> public class FreemarkerLetterTest extends CamelTestSupport {
 public void testFreemarkerLetter ( ) throws Exception {
 MockEndpoint mock = getMockEndpoint ( STRING0 ) ;
 mock . expectedMessageCount ( NUMBER0 ) ;
 - mock . expectedBodiesReceived ( STRING4
 - + STRING5 ) ;
 + mock . message ( NUMBER1 ) . body ( ) . contains ( STRING6 ) ;
 + mock . message ( NUMBER1 ) . body ( ) . contains ( STRING7 ) ;

 template . send ( STRING8 , createLetter ( ) ) ;


<nb> public class KjcEngine extends PdeEngine {
 SINGLE
 if ( s . indexOf ( STRING0 ) != - NUMBER0 ) return ;

 - System . out . println ( messageMode + STRING1 + STRING2 + s ) ;
 + SINGLE

 if ( messageMode == COMPILING ) {
 SINGLE
 <nb> public class KjcEngine extends PdeEngine {
 }

 } else {
 - System . err . println ( STRING3 + s ) ;
 + SINGLE
 + exception = new PdeException ( STRING4 +
 + STRING5 ) ;
 + editor . error ( exception ) ;
 }
 } else if ( messageMode == RUNNING ) {
 SINGLE

spew out compiler error message when kopi dies


<nb> public class AsyncContextTest
 }

 @ test
 - SINGLE
 + @ ignore ( STRING0 )
 public void testSimpleAsyncContext ( ) throws Exception
 {
 String request = STRING1 + STRING2 + STRING3


<nb>
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 +
 SINGLE
 SINGLE
 SINGLE
 <nb>
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 +
 SINGLE
 SINGLE
 SINGLE


<nb> public class JsrSession extends WebSocketSession implements javax . websocket . Sess
 }

 @ override
 - public URI getRequestURI ( )
 - {
 - return getUpgradeRequest ( ) . getRequestURI ( ) ;
 - }
 -
 - @ override
 public Principal getUserPrincipal ( )
 {
 return getUpgradeRequest ( ) . getUserPrincipal ( ) ;

WebSocket Jsr Session getRequestURI is missing scheme host port query parameters


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

 public abstract class KotlinDebuggerTestCase extends DescriptorTestCase {
 <nb> public abstract class KotlinDebuggerTestCase extends DescriptorTestCase {

 for ( PsiClass psiClass : psiClasses ) {
 if ( psiClass instanceof KotlinLightClassForPackage ) {
 - PsiElement element = psiClass . getNavigationElement ( ) ;
 - if ( element instanceof JetFile ) {
 - createBreakpoints ( ( JetFile ) element ) ;
 + Collection < JetFile > files = ( ( KotlinLightClassForPackage ) psiClass ) . getFiles ( ) ;
 + for ( JetFile jetFile : files ) {
 + createBreakpoints ( jetFile ) ;
 }
 }
 + else if ( psiClass instanceof FakeLightClassForFileOfPackage ) {
 + SINGLE
 + }
 else {
 createBreakpoints ( psiClass . getContainingFile ( ) ) ;
 }

do not create breakpoints for FakeLightClassForFileOfPackage because we create them for KotlinLightClassForPackage


<nb> import NAMESPACE ;
 public class FluidRenderer {

 private static final ResourceLocation BLOCK_TEXTURE = TextureMap . locationBlocksTexture ;
 - private static final ResourceLocation ITEM_TEXTURE = TextureMap . locationItemsTexture ;
 private static Map < Fluid , int [ ] > flowingRenderCache = new HashMap < Fluid , int [ ] > ( ) ;
 private static Map < Fluid , int [ ] > stillRenderCache = new HashMap < Fluid , int [ ] > ( ) ;
 public static final int DISPLAY_STAGES = NUMBER0 ;
 <nb> public class FluidRenderer {
 }

 public static ResourceLocation getFluidSheet ( Fluid liquid ) {
 - if ( liquid . canBePlacedInWorld ( ) )
 return BLOCK_TEXTURE ;
 - else
 - return ITEM_TEXTURE ;
 }

 public static void setColorForFluidStack ( FluidStack fluidstack ) {


<nb>
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 @ contract
 @ constrainedto ( RuntimeType . SERVER )
 public interface MonitoringStatisticsListener {
 +
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public interface MaterialMenu {
 public void setColor ( int color ) ;

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setVisibility ( int visibility ) ;
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public abstract class MaterialMenuBase implements MaterialMenu {
 }

 @ override
 + public final void setVisibility ( int visibility ) {
 + if ( visibility == View . VISIBLE || visibility == View . INVISIBLE ) {
 + boolean visible = visibility == View . VISIBLE ? true : false ;
 + getDrawable ( ) . setVisible ( visible , false ) ;
 + }
 + }
 +
 + @ override
 public final void setTransformationDuration ( int duration ) {
 getDrawable ( ) . setTransformationDuration ( duration ) ;
 }

Added interface for setVisibility function


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public interface PyTargetExpression extends PyQualifiedExpression , PsiNamedElement , PsiNameIdentifierOwner , PyDocStringOwner ,
 - StubBasedPsiElement < PyTargetExpressionStub > {
 + PyQualifiedNameOwner , StubBasedPsiElement < PyTargetExpressionStub > {
 PyTargetExpression [ ] EMPTY_ARRAY = new PyTargetExpression [ NUMBER0 ] ;

 COMMENT
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PyTargetExpressionImpl extends PyPresentableElementImpl < PyTargetExp
 super . subtreeChanged ( ) ;
 myQualifiedName = null ;
 }
 +
 + @ nullable
 + @ override
 + public String getQualifiedName ( ) {
 + return QualifiedNameFinder . getQualifiedName ( this ) ;
 + }
 }

Made PyTargetExpression a PyQualifiedNameOwner


<nb> public class DrawHandler extends Handler {

 @ override
 public void onDanmakuAdd ( BaseDanmaku danmaku ) {
 - obtainMessage ( NOTIFY_RENDERING ) . sendToTarget ( ) ;
 + if ( danmaku . isTimeOut ( ) ) {
 + return ;
 + }
 + long delay = danmaku . time - timer . currMillisecond ;
 + if ( delay > NUMBER0 ) {
 + sendEmptyMessageDelayed ( NOTIFY_RENDERING , delay ) ;
 + } else if ( mInWaitingState ) {
 + notifyRendering ( ) ;
 + }
 }

 @ override


<nb> public class BookmarksAction extends AnAction implements DumbAware {
 }
 else {
 cleanup ( ) ;
 + repaint ( ) ;
 }

 revalidate ( ) ;

handle empty preview appearance correctly


<nb> class NewModelControllerImpl implements NewModelController {
 if ( prepareStep != null ) {
 context . addStep ( response , operation , prepareStep , NewOperationContext . Stage . MODEL ) ;
 }
 - context . addStep ( response , operation , new NewStepHandler ( ) {
 - public void execute ( final NewOperationContext context , final ModelNode operation ) {
 - if ( context . completeStep ( ) == NewOperationContext . ResultAction . KEEP && context . isModelAffected ( ) ) {
 - SINGLE
 - SINGLE
 - }
 - }
 - } , NewOperationContext . Stage . VERIFY ) ;
 PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ;
 String operationName = operation . require ( OP ) . asString ( ) ;
 NewStepHandler stepHandler = rootRegistration . getOperationHandler ( address , operationName ) ;


<nb> public class TextConverter

 public void visit ( ItemizationItem i )
 {
 - newline ( NUMBER0 ) ;
 + newline ( NUMBER1 ) ;
 iterate ( i . getContent ( ) ) ;
 }

 <nb> public class TextConverter

 public void visit ( EnumerationItem item )
 {
 - newline ( NUMBER0 ) ;
 + newline ( NUMBER1 ) ;
 iterate ( item . getContent ( ) ) ;
 }

 <nb> public class WikipediaTextFilterTest extends TestCase {

 public void testLists ( ) throws Exception {
 final String input1 = STRING0 ;
 - assertEquals ( STRING1 , swebleFilter . filter ( input1 ) ) ;
 + assertEquals ( STRING2 , swebleFilter . filter ( input1 ) ) ;
 final String input2 = STRING3 ;
 - assertEquals ( STRING1 , swebleFilter . filter ( input2 ) ) ;
 + assertEquals ( STRING2 , swebleFilter . filter ( input2 ) ) ;
 }

 }

use two newlines after a list item this will fix a few false alarms hopefully more than it creates


<nb> public final class NBTOutputStream implements Closeable {
 break ;
 case NBTConstants . TYPE_INT_ARRAY :
 writeIntArrayTagPayload ( ( IntArrayTag ) tag ) ;
 + break ;
 default :
 throw new IOException ( STRING0 + type + STRING1 ) ;
 }

Add missing break when writing IntArrayTag


<nb> public class JSError {
 return charno ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public int getNodeSourceOffset ( ) {
 + return node != null ? node . getSourceOffset ( ) : - NUMBER0 ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public int getNodeLength ( ) {
 + return node != null ? node . getLength ( ) : NUMBER1 ;
 + }
 +
 @ override
 public boolean equals ( Object o ) {
 SINGLE

Allow access to the Node of a JSError so absolute position and length information may be derrived by consuming applications


<nb> public abstract class FileBasedIndex implements BaseComponent {
 throw new IllegalArgumentException ( STRING0 + file + STRING1 + file . getClass ( ) . getName ( ) ) ;
 }

 + SINGLE
 + public abstract VirtualFile findFileById ( Project project , int id ) ;
 +
 public void requestRebuild ( ID < ? , ? > indexId ) {
 requestRebuild ( indexId , new Throwable ( ) ) ;
 }
 <nb> public class FileBasedIndexImpl extends FileBasedIndex {
 myIndexableSetToProjectMap . remove ( set ) ;
 }

 + @ override
 + public VirtualFile findFileById ( Project project , int id ) {
 + return IndexInfrastructure . findFileById ( ( PersistentFS ) ManagingFS . getInstance ( ) , id ) ;
 + }
 +
 @ nullable
 private static PsiFile findLatestKnownPsiForUncomittedDocument ( @ notnull Document doc , @ notnull Project project ) {
 return PsiDocumentManager . getInstance ( project ) . getCachedPsiFile ( doc ) ;

decouple JavaScriptIndex from ManagingFS PersistentFS


<nb> public class ForgeHooksClient
 int g = NUMBER0 ;
 int b = NUMBER0 ;

 + int divider = NUMBER0 ;
 for ( int x = - distance ; x <= distance ; ++ x )
 {
 for ( int z = - distance ; z <= distance ; ++ z )
 <nb> public class ForgeHooksClient
 r += ( colour & NUMBER1 ) > > NUMBER2 ;
 g += ( colour & NUMBER3 ) > > NUMBER4 ;
 b += colour & NUMBER5 ;
 + divider ++ ;
 }
 }

 - int multiplier = ( r / NUMBER6 & NUMBER7 ) < < NUMBER2 | ( g / NUMBER6 & NUMBER7 ) < < NUMBER4 | b / NUMBER6 & NUMBER7 ;
 + int multiplier = ( r / divider & NUMBER7 ) < < NUMBER2 | ( g / divider & NUMBER7 ) < < NUMBER4 | b / divider & NUMBER7 ;

 skyX = playerX ;
 skyZ = playerZ ;


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

 COMMENT
 <nb> import NAMESPACE ;
 @ singleton
 public abstract class AbstractDbBackend < Configuration extends DbBackendConfiguration >
 extends ThreadFactoryIdleService implements DbBackendService {
 +
 + private static final Logger LOGGER = LogManager . getLogger ( AbstractDbBackend . class ) ;
 +
 public static final int SYSTEM_DATABASE_CONNECTIONS = NUMBER0 ;
 public static final int MIN_READ_CONNECTIONS_DATABASE = NUMBER0 ;
 public static final int MIN_SESSION_CONNECTIONS_DATABASE = NUMBER1 ;
 <nb> public abstract class AbstractDbBackend < Configuration extends DbBackendConfigura
 COMMENT
 COMMENT

 + LOGGER . info ( STRING0 , poolName , poolSize , transactionIsolationLevel . name ( ) ) ;
 +
 return new HikariDataSource ( hikariConfig ) ;
 }


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

 <nb> public class OkResponseHandler extends SimpleChannelInboundHandler < Object > {

 @ override
 public void channelRead0 ( ChannelHandlerContext ctx , Object msg ) throws Exception {
 - final DefaultHttpResponse response = new DefaultHttpResponse ( HttpVersion . HTTP_1_1 , HttpResponseStatus . OK ) ;
 + final FullHttpResponse response = new DefaultFullHttpResponse ( HttpVersion . HTTP_1_1 , HttpResponseStatus . OK ) ;
 response . headers ( ) . set ( STRING0 , STRING1 ) ;
 ctx . writeAndFlush ( response ) . addListener ( ChannelFutureListener . CLOSE ) ;
 }

OkResponseHandler should return a FullHttpResponse


<nb>

 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PluginTestCaseBase {
 }

 private static Sdk getSdk ( String sdkHome ) {
 - Sdk sdk = new JavaSdkImpl ( ) . createJdk ( STRING0 , sdkHome , true ) ;
 + Sdk sdk = JavaSdk . getInstance ( ) . createJdk ( STRING0 , sdkHome , true ) ;
 SdkModificator modificator = sdk . getSdkModificator ( ) ;
 VirtualFile file = LocalFileSystem . getInstance ( ) . findFileByIoFile ( JetTestUtils . getJdkAnnotationsJar ( ) ) ;
 assert file != null ;

use API class instead of impl to create Java SDK


<nb> public final class ContentValues implements Parcelable {
 return ( ArrayList < String > ) mValues . get ( key ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ override
 public String toString ( ) {
 StringBuilder sb = new StringBuilder ( ) ;


<nb> public class FilterBasedLdapUserSearchTests extends AbstractLdapIntegrationTests
 assertEquals ( new DistinguishedName ( STRING0 ) , bob . getDn ( ) ) ;
 }

 + @ test
 + public void searchForNameWithCommaSucceeds ( ) {
 + FilterBasedLdapUserSearch locator = new FilterBasedLdapUserSearch ( STRING1 , STRING2 , dirCtxFactory ) ;
 + locator . setSearchSubtree ( false ) ;
 +
 + DirContextOperations jerry = locator . searchForUser ( STRING3 ) ;
 + assertEquals ( STRING3 , jerry . getStringAttribute ( STRING4 ) ) ;
 +
 + assertEquals ( new DistinguishedName ( STRING5 ) , jerry . getDn ( ) ) ;
 + }
 +
 SINGLE
 @ test
 public void extraFilterPartToExcludeBob ( ) throws Exception {

Added test to attempt to reproduce problem


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

 import NAMESPACE ;
 <nb> public class TestStreetMatcher {
 }

 @ override
 - public ElevationProfileSegment getElevationProfileSegment ( ) {
 - return null ;
 - }
 -
 - @ override
 public List < TurnRestriction > getTurnRestrictions ( ) {
 return Collections . emptyList ( ) ;
 }


<nb> public abstract class MixinEntityZombie extends EntityMob {
 public abstract void setVillager ( boolean villagerZombie ) ;

 @ shadow
 - public abstract boolean isChild ( ) ;
 -
 - @ shadow
 public abstract void setChild ( boolean childZombie ) ;

 @ shadow
 <nb> import NAMESPACE ;
 @ mixin ( ItemFishingRod . class )
 public abstract class MixinItemFishingRod extends Item implements IMixinEntityFishHook {

 + @ override
 @ overwrite
 public ItemStack onItemRightClick ( ItemStack itemStack , World world , EntityPlayer player ) {
 if ( player . fishEntity != null ) {


<nb> public class ProgramStore extends BaseObj {
 SRC_ALPHA ( NUMBER0 ) ,
 ONE_MINUS_SRC_ALPHA ( NUMBER1 ) ,
 DST_ALPHA ( NUMBER2 ) ,
 - ONE_MINUS_DST_ALPA ( NUMBER3 ) ,
 + ONE_MINUS_DST_ALPHA ( NUMBER3 ) ,
 SRC_ALPHA_SATURATE ( NUMBER4 ) ;

 int mID ;
 <nb> public class ProgramStore extends BaseObj {
 SRC_ALPHA ( NUMBER0 ) ,
 ONE_MINUS_SRC_ALPHA ( NUMBER1 ) ,
 DST_ALPHA ( NUMBER2 ) ,
 - ONE_MINUS_DST_ALPA ( NUMBER3 ) ;
 + ONE_MINUS_DST_ALPHA ( NUMBER3 ) ;

 int mID ;
 BlendDstFunc ( int id ) {


<nb> import NAMESPACE ;

 @ runwith ( WithTestDefaultsRunner . class )
 - public class RobolectricTestRunnerClassloaderSetup {
 + public class RobolectricTestRunnerClassLoaderSetup {

 @ test
 - public void testUsingClassloader ( ) throws ClassNotFoundException {
 + public void testUsingClassLoader ( ) throws ClassNotFoundException {
 ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
 Assert . assertEquals ( classLoader . getClass ( ) . getName ( ) , RobolectricClassLoader . class . getName ( ) ) ;
 -
 }
 }


<nb> public class ApacheDSContainer implements InitializingBean , DisposableBean , Life

 @ suppresswarnings ( STRING0 )
 public void stop ( ) {
 + if ( ! isRunning ( ) ) {
 + return ;
 + }
 +
 Properties env = new Properties ( ) ;
 env . setProperty ( Context . INITIAL_CONTEXT_FACTORY , ServerContextFactory . class . getName ( ) ) ;
 env . setProperty ( Context . SECURITY_AUTHENTICATION , STRING1 ) ;

Added check of running flag in stop method to prevent stopping twice


<nb> public abstract class Optional < T > implements Serializable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public abstract T or ( T defaultValue ) ;
 <nb> public final class InternetDomainName {

 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class MemLock implements Closeable {
 private Pointer pa ;
 private long length ;
 private File file ;
 - private FileDescriptor descriptor ;

 COMMENT
 COMMENT
 <nb> public class MemLock implements Closeable {
 if ( logger . isDebugEnabled ( ) )
 logger . debug ( STRING0 + file + STRING1 + length ) ;

 - this . setFile ( file ) ;
 - this . setDescriptor ( descriptor ) ;
 + this . file = file ;
 this . length = length ;
 pa = null ;

 <nb> public class MemLock implements Closeable {
 return file ;
 }

 - public void setFile ( File file ) {
 - this . file = file ;
 - }
 -
 - public FileDescriptor getDescriptor ( ) {
 - return descriptor ;
 - }
 -
 - public void setDescriptor ( FileDescriptor descriptor ) {
 - this . descriptor = descriptor ;
 - }
 -
 }

Remove unused members and methods from MemLock


<nb> public class XMPPServer {
 loadModule ( PresenceUpdateHandler . class . getName ( ) ) ;
 loadModule ( IQDiscoInfoHandler . class . getName ( ) ) ;
 loadModule ( IQDiscoItemsHandler . class . getName ( ) ) ;
 + loadModule ( IQOfflineMessagesHandler . class . getName ( ) ) ;
 loadModule ( MultiUserChatServerImpl . class . getName ( ) ) ;
 loadModule ( MulticastDNSService . class . getName ( ) ) ;
 SINGLE

Added new module IQOfflineMessagesHandler


<nb> public class RouterBean {
 @ consume ( uri = STRING0 )
 @ recipientlist
 public String [ ] route ( String body ) {
 - System . out . println ( STRING1 + body ) ;
 return new String [ ] { STRING2 , STRING3 } ;
 }
 }


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ViewOverlay {
 child . offsetTopAndBottom ( parentLocation [ NUMBER0 ] - hostViewLocation [ NUMBER0 ] ) ;
 }
 parent . removeView ( child ) ;
 + if ( parent . getLayoutTransition ( ) != null ) {
 + SINGLE
 + parent . getLayoutTransition ( ) . cancel ( LayoutTransition . DISAPPEARING ) ;
 + }
 + SINGLE
 + if ( child . getParent ( ) != null ) {
 + child . mParent = null ;
 + }
 }
 super . addView ( child ) ;
 }

Fix crash with LayoutTransition and ViewOverlay collision


<nb> public class MessagingAction extends JSONAction {
 String cmd = ParamUtil . getString ( req , Constants . CMD ) ;
 JSONObject jo = new JSONObject ( ) ;

 - if ( STRING0 . equals ( cmd ) ) {
 + if ( STRING1 . equals ( cmd ) ) {
 jo = getUpdates ( req ) ;
 }
 - else if ( STRING2 . equals ( cmd ) ) {
 + else if ( STRING0 . equals ( cmd ) ) {
 jo = getChatMessages ( req ) ;

 + COMMENT
 JSONArray jRoster = getRosterEntries ( req ) . getJSONArray ( STRING3 ) ;
 jo . put ( STRING3 , jRoster ) ;
 + COMMENT
 jo . put ( STRING4 , STRING5 ) ;
 }
 else if ( STRING6 . equals ( cmd ) ) {


<nb> public class HttpBindServlet extends HttpServlet {
 if ( async ) {
 response . getOutputStream ( ) . setWriteListener ( new WriteListenerImpl ( context , byteContent ) ) ;
 } else {
 + SINGLE
 + SINGLE
 + context . getResponse ( ) . setBufferSize ( byteContent . length ) ;
 context . getResponse ( ) . getOutputStream ( ) . write ( byteContent ) ;
 context . getResponse ( ) . getOutputStream ( ) . flush ( ) ;
 context . complete ( ) ;
 <nb> public class HttpBindServlet extends HttpServlet {
 Log . trace ( STRING0 + remoteAddress + STRING1 ) ;

 SINGLE
 - SINGLE
 - SINGLE
 + SINGLE
 context . getResponse ( ) . setBufferSize ( data . length ) ;
 - context . getResponse ( ) . setContentLength ( data . length ) ;

 context . getResponse ( ) . getOutputStream ( ) . write ( data ) ;
 context . complete ( ) ;

Removed explicit content length as it caused invalid values


<nb> public final class CellSignalStrengthLte extends CellSignalStrength implements P
 }

 COMMENT
 + COMMENT
 + COMMENT
 + public int getRsrq ( ) {
 + return mRsrq ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + public int getRssnr ( ) {
 + return mRssnr ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 @ override

Add hidden APIs for retrieving LTE RSRQ and RSSNR


<nb> public class ThumbImagePresenter < T > implements ImagePresenter . AssetPresenterCoor
 public boolean canSetPlaceholder ( ImagePresenter presenter ) {
 return presenter == fullPresenter ;
 }
 +
 + public void resetPlaceholder ( ) {
 + fullPresenter . resetPlaceHolder ( ) ;
 + }
 }

Add reset placeholder to thumb image presenter


<nb> public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
 public void projectOpened ( ) {
 initializeForNewProject ( ) ;

 - Notifications . Bus . notify ( new Notification ( STRING0 , STRING1 , STRING1 ,
 - NotificationType . ERROR ) , NotificationDisplayType . STICKY_BALLOON , myProject ) ;
 if ( ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
 myWorker . initialized ( ) ;
 myUpdater . initialized ( ) ;

remove accidentally committed diagnostics


<nb> public class IndexGraphQLSchema {
 . argument ( GraphQLArgument . newArgument ( )
 . name ( STRING0 )
 . description ( STRING1 )
 - . type ( Scalars . GraphQLFloat )
 + . type ( Scalars . GraphQLInt )
 . build ( ) )
 . argument ( GraphQLArgument . newArgument ( )
 . name ( STRING2 )


<nb> import NAMESPACE ;
 COMMENT
 public class OrientEdge extends OrientElement implements Edge {

 + public OrientEdge ( ) {
 + super ( null , new ODocument ( ) ) ;
 + }
 +
 public OrientEdge ( final OrientGraph rawGraph , final ODocument rawEdge , final String label ) {
 super ( rawGraph , rawEdge ) ;
 this . rawElement . field ( StringFactory . LABEL , label ) ;
 <nb> import NAMESPACE ;
 COMMENT
 public class OrientVertex extends OrientElement implements Vertex {

 + public OrientVertex ( ) {
 + super ( null , new ODocument ( ) ) ;
 + }
 +
 public OrientVertex ( final OrientGraph rawGraph , final ODocument rawVertex ) {
 super ( rawGraph , rawVertex ) ;
 }

added no arg constructors to OrientVertex Edge for Luca


<nb> public final class GtasksSyncService {

 public void triggerMoveForMetadata ( final Metadata metadata ) {
 + if ( metadata == null )
 + return ;
 if ( metadata . checkAndClearTransitory ( SyncFlags . GTASKS_SUPPRESS_SYNC ) )
 return ;
 if ( ! metadata . getValue ( Metadata . KEY ) . equals ( GtasksMetadata . METADATA_KEY ) ) SINGLE

Don t trigger moves for null metadata not that this should happen


<nb> public class J2ObjC {
 String [ ] files = null ;
 try {
 files = Options . load ( args ) ;
 - if ( nFiles == NUMBER0 ) {
 + if ( files . length == NUMBER0 ) {
 Options . help ( ) ; SINGLE
 }
 } catch ( IOException e ) {

Corrected previous options handling change


<nb> public class Api23RuntimeAdapter implements RuntimeAdapter {
 ClassParameter . from ( Rect . class , contentInsets ) ,
 ClassParameter . from ( Rect . class , visibleInsets ) ,
 ClassParameter . from ( Rect . class , stableInsets ) ,
 + ClassParameter . from ( Rect . class , outsets ) ,
 ClassParameter . from ( boolean . class , reportDraw ) ,
 ClassParameter . from ( Configuration . class , newConfig ) ) ;
 }

Corrected signature of callViewRootImplDispatchResized to add missing outsets parameter


<nb> public class LocalStore extends Store implements Serializable
 COMMENT
 COMMENT
 COMMENT
 + ( ( LocalFolder ) mFolder ) . deleteAttachments ( mId ) ;
 mDb . execSQL ( STRING0 ,
 new Object [ ]
 {
 mId
 } ) ;

 - ( ( LocalFolder ) mFolder ) . deleteAttachments ( mId ) ;
 ( ( LocalFolder ) mFolder ) . deleteHeaders ( mId ) ;

Delete the attachments from disk before we delete them from the database so we know what to delete


<nb> public final class TelecineActivity extends Activity {
 }

 @ onclick ( R . id . launch ) void onLaunchClicked ( ) {
 - longClickCount = NUMBER0 ;
 - Timber . d ( STRING0 ) ;
 + if ( longClickCount > NUMBER0 ) {
 + longClickCount = NUMBER0 ;
 + Timber . d ( STRING0 ) ;
 + }

 Timber . d ( STRING1 ) ;
 CaptureHelper . fireScreenCaptureIntent ( this , analytics ) ;

Don t log long click reset unless they have long clicked


<nb> public class OPropertyIndexDefinition extends OAbstractIndexDefinition {

 public Object getDocumentValueToIndex ( final ODocument iDocument ) {
 if ( OType . LINK . equals ( keyType ) ) {
 - final OIdentifiable identifiable = iDocument . field ( field ) ;
 + SINGLE
 + final OIdentifiable identifiable = iDocument . rawField ( field ) ;
 if ( identifiable != null )
 return createValue ( identifiable . getIdentity ( ) ) ;
 else

optimized indexing of property of type link avoinding lazy loading


<nb> public class JetLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti
 }

 @ override
 - public boolean usesSharedPreview ( ) {
 - return false ;
 - }
 -
 - @ override
 public CommonCodeStyleSettings getDefaultCommonSettings ( ) {
 CommonCodeStyleSettings commonCodeStyleSettings = new CommonCodeStyleSettings ( getLanguage ( ) ) ;
 commonCodeStyleSettings . initIndentOptions ( ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class TrainParser {
 SINGLE
 SINGLE
 Options op = new Options ( ) ;
 - CompositeTreeTransformer transformer = LexicalizedParser . buildTrainTransformer ( op ) ;
 + TreeBinarizer binarizer = new TreeBinarizer ( op . tlpParams . headFinder ( ) , op . tlpParams . treebankLanguagePack ( ) , false , false , NUMBER0 , false , false , FLOAT0 , false , true , true ) ;
 BasicCategoryTreeTransformer basicTransformer = new BasicCategoryTreeTransformer ( op . langpack ( ) ) ;
 + CompositeTreeTransformer transformer = new CompositeTreeTransformer ( ) ;
 + transformer . addTransformer ( binarizer ) ;
 transformer . addTransformer ( basicTransformer ) ;

 System . err . println ( STRING0 + trainTreebankPath ) ;

Use the TreeBinarizer directly giving the srparser more control over its options


<nb> public class IrcConnection

 SINGLE
 this . presence =
 - new PresenceManager ( irc , this . connectionState ,
 + new PresenceManager ( this . irc , this . connectionState ,
 this . provider . getPersistentPresence ( ) ) ;

 SINGLE
 <nb> public class IrcConnection
 COMMENT
 public boolean isConnected ( )
 {
 - return this . connectionState . isConnected ( ) ;
 + return this . connectionState != null
 + && this . connectionState . isConnected ( ) ;
 }

 COMMENT


<nb> public class HystrixMetricsPoller {
 json . writeNumberField ( STRING0 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FAILURE ) ) ;
 json . writeNumberField ( STRING1 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FALLBACK_EMIT ) ) ;
 json . writeNumberField ( STRING2 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FALLBACK_FAILURE ) ) ;
 + json . writeNumberField ( STRING3 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FALLBACK_MISSING ) ) ;
 json . writeNumberField ( STRING4 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FALLBACK_REJECTION ) ) ;
 json . writeNumberField ( STRING5 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . FALLBACK_SUCCESS ) ) ;
 json . writeNumberField ( STRING6 , commandMetrics . getRollingCount ( HystrixRollingNumberEvent . RESPONSE_FROM_CACHE ) ) ;

Added FALLBACK_MISSING to hystrix metrics event stream


<nb> public class OSMDatabase implements OpenStreetMapContentHandler {

 SINGLE
 processRelations ( ) ;
 -
 - SINGLE
 - SINGLE
 - HashSet < Long > _keep = new HashSet < Long > ( waysNodeIds ) ;
 - _keep . addAll ( areaNodeIds ) ;
 - nodesById . keySet ( ) . retainAll ( _keep ) ;
 }

 private void getLevelsForWay ( OSMWithTags way ) {


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public abstract class AbstractAtomFeedView extends AbstractFeedView < Feed > {


<nb> public final class ElementMatchers {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class SimpleTestCursor extends TestCursor {
 }

 @ override
 + public int getColumnIndexOrThrow ( String columnName ) throws IllegalArgumentException {
 + int col = getColumnIndex ( columnName ) ;
 + if ( col == - NUMBER0 ) {
 + throw new IllegalArgumentException ( STRING0 + columnName ) ;
 + }
 + return col ;
 + }
 +
 + @ override
 public int getColumnIndex ( String columnName ) {
 return columnNames . indexOf ( columnName ) ;
 }

Added getCoumnIndexOrThrow to SimpleTestCursor


<nb>

 package NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;

 - import static NAMESPACE ;
 + import static NAMESPACE ;

 public class SimpleDependency implements RenderableDependency {

 - private final ModuleVersionIdentifier id ;
 + private final ModuleComponentIdentifier id ;
 private final String name ;
 private final boolean resolvable ;
 private final String description ;
 <nb> public class SimpleDependency implements RenderableDependency {
 }

 public ModuleComponentIdentifier getId ( ) {
 - return DefaultModuleComponentIdentifier . newId ( id . getGroup ( ) , id . getName ( ) , id . getVersion ( ) ) ;
 + return id ;
 }

 public String getName ( ) {


<nb> public class XPackageManager extends XHook {
 Method mGetPackageUid = param . thisObject . getClass ( ) . getDeclaredMethod ( STRING0 , String . class ,
 int . class ) ;
 mGetPackageUid . setAccessible ( true ) ;
 - int uid = ( Integer ) mGetPackageUid . invoke ( param . thisObject , pkgName , NUMBER0 ) ;
 + int userId = Util . getUserId ( Binder . getCallingUid ( ) ) ;
 + int uid = ( Integer ) mGetPackageUid . invoke ( param . thisObject , pkgName , userId ) ;

 if ( resultOfCheck == PackageManager . PERMISSION_GRANTED ) {
 permName = permName . replace ( STRING1 , STRING2 ) ;


<nb> import NAMESPACE ;
 @ jsonsubtypes.type ( name = STRING0 , value = SearchQuerySpecDimExtractionFn . class ) ,
 @ jsonsubtypes.type ( name = STRING1 , value = JavascriptExtractionFn . class ) ,
 @ jsonsubtypes.type ( name = STRING2 , value = TimeFormatExtractionFn . class ) ,
 - @ jsonsubtypes.type ( name = STRING3 , value = LookupExtractionFn . class ) ,
 - @ jsonsubtypes.type ( name = STRING4 , value = IdentityExtractionFn . class )
 + @ jsonsubtypes.type ( name = STRING4 , value = IdentityExtractionFn . class ) ,
 + @ jsonsubtypes.type ( name = STRING3 , value = LookupExtractionFn . class )
 } )
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;

 public class LookupExtractionFn extends FunctionalExtraction
 {
 - private static final byte CACHE_TYPE_ID = NUMBER0 ;
 + private static final byte CACHE_TYPE_ID = NUMBER1 ;

 private final LookupExtractor lookup ;

Change LookupExtractionFn cache key to be unique


<nb> public class NsdService extends INsdManager . Stub {
 int keyId = clientInfo . mClientIds . indexOfValue ( id ) ;
 if ( keyId != - NUMBER0 ) {
 clientId = clientInfo . mClientIds . keyAt ( keyId ) ;
 + } else {
 + SINGLE
 + SINGLE
 + SINGLE
 + Slog . d ( TAG , STRING0 + id ) ;
 + handled = false ;
 + return handled ;
 }
 +
 switch ( code ) {
 case NativeResponseCode . SERVICE_FOUND :
 COMMENT


<nb> public class ConfigFileApplicationListener implements

 private void onApplicationEnvironmentPreparedEvent (
 ConfigurableEnvironment environment , SpringApplication application ) {
 - addProperySources ( environment ) ;
 + addPropertySources ( environment ) ;
 bindToSpringApplication ( environment , application ) ;
 }

 <nb> public class ConfigFileApplicationListener implements
 COMMENT
 COMMENT
 COMMENT
 - protected void addProperySources ( ConfigurableEnvironment environment ) {
 + protected void addPropertySources ( ConfigurableEnvironment environment ) {
 RandomValuePropertySource . addToEnvironment ( environment ) ;
 try {
 PropertySource < ? > defaultProperties = environment . getPropertySources ( )
 <nb> public class ConfigFileApplicationContextInitializer implements
 public void initialize ( final ConfigurableApplicationContext applicationContext ) {
 new ConfigFileApplicationListener ( ) {
 public void apply ( ) {
 - addProperySources ( applicationContext . getEnvironment ( ) ) ;
 + addPropertySources ( applicationContext . getEnvironment ( ) ) ;
 addPostProcessors ( applicationContext ) ;
 }
 } . apply ( ) ;

Fix typo in ConfigFileAppListener addProper t ySources


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public final class Utils {

 TOKEN_NAME_TO_VALUE = builder . build ( ) ;
 TOKEN_VALUE_TO_NAME = tempTokenValueToName ;
 - final Integer [ ] ids = TOKEN_NAME_TO_VALUE . values ( ) . toArray ( new Integer [ NUMBER0 ] ) ;
 + final ImmutableCollection < Integer > values = TOKEN_NAME_TO_VALUE . values ( ) ;
 + final Integer [ ] ids = values . toArray ( new Integer [ values . size ( ) ] ) ;
 TOKEN_IDS = ArrayUtils . toPrimitive ( ids ) ;
 }

Replace toArray argument with correctly sized array


<nb> public class LegacyEditorFragment extends EditorFragmentAbstract implements Text
 }
 }

 + @ override
 public void appendGallery ( MediaGallery mediaGallery ) {
 Editable editableText = mContentEditText . getText ( ) ;
 if ( editableText == null ) {


<nb> public class EditNoteActivity extends LinearLayout implements TimerActionListene
 private View commentButton ;
 private int commentItems = NUMBER0 ;
 private ImageButton pictureButton ;
 - private static Bitmap pendingCommentPicture = null ;
 + private Bitmap pendingCommentPicture = null ;
 private final Fragment fragment ;
 private final ImageDiskCache imageCache ;
 private final int cameraButton ;
 <nb> public class EditNoteActivity extends LinearLayout implements TimerActionListene
 parentView = parent ;

 loadViewForTaskID ( t ) ;
 -
 - if ( pendingCommentPicture != null )
 - pictureButton . setImageBitmap ( pendingCommentPicture ) ;
 }

 private int getDefaultCameraButton ( ) {


<nb> public class DiagnosticGroups {
 CheckNullableReturn . NULLABLE_RETURN_WITH_NAME ,
 CheckPrototypeProperties . ILLEGAL_PROTOTYPE_MEMBER ,
 ImplicitNullabilityCheck . IMPLICITLY_NULLABLE_JSDOC ,
 - RhinoErrorReporter . JSDOC_MISSING_BRACES_WARNING ,
 - TypeCheck . NON_STRINGIFIABLE_OBJECT_KEY ) ;
 + RhinoErrorReporter . JSDOC_MISSING_BRACES_WARNING ) ;

 public static final DiagnosticGroup USE_OF_GOOG_BASE =
 DiagnosticGroups . registerGroup ( STRING0 ,
 <nb> public final class TypeCheck implements NodeTraversal . Callback , CompilerPass {
 STRING1 ) ;

 static final DiagnosticType NON_STRINGIFIABLE_OBJECT_KEY =
 - DiagnosticType . disabled (
 + DiagnosticType . warning (
 STRING2 ,
 STRING3
 + STRING4 ) ;
 <nb> public final class TypeCheck implements NodeTraversal . Callback , CompilerPass {
 IN_USED_WITH_STRUCT ,
 ILLEGAL_PROPERTY_CREATION ,
 ILLEGAL_OBJLIT_KEY ,
 + NON_STRINGIFIABLE_OBJECT_KEY ,
 RhinoErrorReporter . TYPE_PARSE_ERROR ,
 TypedScopeCreator . UNKNOWN_LENDS ,
 TypedScopeCreator . LENDS_ON_NON_OBJECT ,

Enable non stringifiable object keys compiler check by default


<nb> public class ComponentDao extends BaseDao < ComponentMapper , ComponentDto , String >

 @ override
 protected void doDeleteByKey ( DbSession session , String key ) {
 - SINGLE
 mapper ( session ) . deleteByKey ( key ) ;
 }

 <nb> public class UserUpdater implements ServerComponent {
 if ( updateUser . isScmAccountsChanged ( ) ) {
 List < String > scmAccounts = updateUser . scmAccounts ( ) ;
 if ( scmAccounts != null && ! scmAccounts . isEmpty ( ) ) {
 - scmAccounts = sanitizeScmAccounts ( updateUser . scmAccounts ( ) ) ;
 + scmAccounts = sanitizeScmAccounts ( scmAccounts ) ;
 validateScmAccounts ( dbSession , scmAccounts , userDto . getLogin ( ) , email != null ? email : userDto . getEmail ( ) , userDto , messages ) ;
 userDto . setScmAccounts ( convertScmAccountsToCsv ( scmAccounts ) ) ;
 } else {


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OAutomaticBackup extends OServerHandlerAbstract {
 filePath . mkdirs ( ) ;

 OLogManager . instance ( ) . info ( this ,
 - STRING0 , delay , firstTime ,
 + STRING1 , delay , firstTime ,
 targetDirectory ) ;

 final TimerTask timerTask = new TimerTask ( ) {


<nb> public class BuildCraftSilicon extends BuildCraftMod {
 BuildCraftCore . mainConfiguration . save ( ) ;

 laserBlock = new BlockLaser ( ) ;
 + laserBlock . setBlockName ( STRING0 ) ;
 CoreProxy . proxy . registerBlock ( laserBlock ) ;

 assemblyTableBlock = new BlockLaserTable ( ) ;


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

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 class SmartPsiElementPointerImpl < E extends PsiElement > implements SmartPointerEx < E > {
 private Reference < E > myElement ;
 <nb> class SmartPsiElementPointerImpl < E extends PsiElement > implements SmartPointerEx
 }

 private void cacheElement ( E element ) {
 - myElement = element == null ? null : new SoftReference < E > ( element ) ;
 + myElement = element == null ? null :
 + ( ( PsiManagerEx ) element . getManager ( ) ) . isBatchFilesProcessingMode ( ) ? new WeakReference < E > ( element ) :
 + new SoftReference < E > ( element ) ;
 }

 @ override

use weak references in smart pointers when in bulk mode


<nb> public class HikariDataSource extends HikariConfig implements DataSource , Closea
 public Connection getConnection ( ) throws SQLException
 {
 if ( isShutdown ) {
 - throw new SQLException ( STRING0 , pool . getConfiguration ( ) . getPoolName ( ) ) ;
 + throw new SQLException ( String . format ( STRING1 , pool . getConfiguration ( ) . getPoolName ( ) ) ) ;
 }

 if ( fastPathPool != null ) {
 <nb> public class ShutdownTest
 ds . getConnection ( ) ;
 }
 catch ( SQLException e ) {
 - Assert . assertTrue ( e . getMessage ( ) . contains ( STRING2 ) ) ;
 + Assert . assertTrue ( e . getMessage ( ) . contains ( STRING3 ) ) ;
 }
 }


<nb> public class HttpResponseHeader extends HttpHeader {
 private static final String _CONTENT_TYPE_IMAGE = STRING0 ;
 private static final String _CONTENT_TYPE_TEXT = STRING1 ;
 private static final String _CONTENT_TYPE_HTML = STRING2 ;
 + private static final String _CONTENT_TYPE_JAVASCRIPT = STRING3 ;

 static final Pattern patternStatusLine
 <nb> public class HttpResponseHeader extends HttpHeader {
 return false ;

 }
 +
 + public boolean isJavaScript ( ) {
 + String contentType = getHeader ( CONTENT_TYPE . toUpperCase ( ) ) ;
 +
 + if ( contentType != null ) {
 + if ( contentType . toLowerCase ( ) . indexOf ( _CONTENT_TYPE_JAVASCRIPT ) > - NUMBER0 ) {
 + return true ;
 + }
 + }
 +
 + return false ;
 +
 + }

 public static boolean isStatusLine ( String data ) {
 return patternPartialStatusLine . matcher ( data ) . find ( ) ;


<nb> public class ControlFlowUtils {
 return PsiTreeUtil . getParentOfType ( expression , PsiReturnStatement . class ) != null ;
 }

 - private static boolean isInThrowStatementArgument ( @ notnull PsiExpression expression ) {
 + public static boolean isInThrowStatementArgument ( @ notnull PsiExpression expression ) {
 return PsiTreeUtil . getParentOfType ( expression , PsiThrowStatement . class ) != null ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class FromFtpSimulateNetworkIssueRecoverTest extends FtpServerTestSupport

 resultEndpoint . assertIsSatisfied ( ) ;

 - assertEquals ( NUMBER0 , counter ) ;
 + Thread . sleep ( NUMBER1 ) ;
 +
 + assertTrue ( STRING0 + counter , counter >= NUMBER0 ) ;
 assertEquals ( NUMBER2 , rollback ) ;
 }


<nb> public class ConversationFragment extends Fragment implements EditMessage . Keyboa
 if ( m . getStatus ( ) != Message . STATUS_SEND_FAILED ) {
 sendAgain . setVisible ( false ) ;
 }
 - if ( ( ( m . getType ( ) != Message . TYPE_IMAGE && m . getDownloadable ( ) == null )
 - || m . getImageParams ( ) . url == null ) && ! GeoHelper . isGeoUri ( m . getBody ( ) ) ) {
 + if ( ! m . hasFileOnRemoteHost ( ) && ! GeoHelper . isGeoUri ( m . getBody ( ) ) ) {
 copyUrl . setVisible ( false ) ;
 }
 if ( m . getType ( ) != Message . TYPE_TEXT

always show copy original url in context menu when url is available


<nb> public class FtpPollingConsumerTest extends FtpServerTestSupport {
 @ test
 public void testPollingConsumer ( ) throws Exception {
 MockEndpoint result = getMockEndpoint ( STRING0 ) ;
 - result . expectedBodiesReceivedInAnyOrder ( STRING1 , STRING2 , STRING3 , STRING4 , STRING5 ) ;
 + result . expectedBodiesReceived ( NUMBER0 ) ;
 result . expectedFileExists ( FTP_ROOT_DIR + STRING6 ) ;
 result . expectedFileExists ( FTP_ROOT_DIR + STRING7 ) ;
 result . expectedFileExists ( FTP_ROOT_DIR + STRING8 ) ;


<nb> public class NetworkManager {
 public boolean isAvailable ( )
 {
 NetworkInfo info = sockMan . getActiveNetworkInfo ( ) ;
 - boolean conn = info . isConnected ( ) ;
 + boolean conn = false ;
 + if ( info != null )
 + conn = info . isConnected ( ) ;
 return conn ;
 }

 <nb> public class PhoneGap {
 return version ;
 }

 -
 +
 public void httpGet ( String url , String file )
 COMMENT
 COMMENT


<nb> public class Table extends WidgetGroup {
 return layout . add ( actor ) ;
 }

 + public void add ( Actor . . . actors ) {
 + for ( int i = NUMBER0 , n = actors . length ; i < n ; i ++ )
 + layout . add ( actors [ i ] ) ;
 + }
 +
 public boolean removeActor ( Actor actor ) {
 if ( ! super . removeActor ( actor ) ) return false ;
 Cell cell = getCell ( actor ) ;


<nb> public final class AuthorizationServerSecurityConfigurer extends
 return this ;
 }

 + public AuthorizationServerSecurityConfigurer tokenGranter ( TokenGranter tokenGranter ) {
 + this . tokenGranter = tokenGranter ;
 + return this ;
 + }
 +
 public AuthorizationServerSecurityConfigurer clientDetailsService ( ClientDetailsService clientDetailsService ) {
 this . clientDetailsService = clientDetailsService ;
 return this ;

Add support for TokenGranter in AuthorizationServerSecurityConfigurer


<nb> public enum TypeConstantAdjustment implements AsmVisitorWrapper {
 }

 @ override
 - public MethodVisitor visitMethod ( int access , String name , String desc , String signature , String [ ] exceptions ) {
 + public MethodVisitor visitMethod ( int modifiers , String name , String descriptor , String signature , String [ ] exception ) {
 return supportsTypeConstants
 - ? super . visitMethod ( access , name , desc , signature , exceptions )
 - : new TypeConstantDissolvingMethodVisitor ( super . visitMethod ( access , name , desc , signature , exceptions ) ) ;
 + ? super . visitMethod ( modifiers , name , descriptor , signature , exception )
 + : new TypeConstantDissolvingMethodVisitor ( super . visitMethod ( modifiers , name , descriptor , signature , exception ) ) ;
 }

 @ override


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class AntFileImpl extends LightPsiFileBase implements AntFile {
 updateTypeDefinitions ( myAntProject . getTaskDefinitions ( ) , true ) ;
 SINGLE
 updateTypeDefinitions ( myAntProject . getDataTypeDefinitions ( ) , false ) ;
 + AntTypeDefinition sequentialDef = myTypeDefinitions . get ( Sequential . class . getName ( ) ) ;
 + if ( sequentialDef != null ) {
 + for ( AntTypeDefinition def : myTypeDefinitions . values ( ) ) {
 + sequentialDef . registerNestedType ( def . getTypeId ( ) , def . getClassName ( ) ) ;
 + }
 + }
 return myTypeDefinitions . get ( className ) ;
 }


<nb> public class CalendarPickerView extends ListView {
 if ( invalidDateListener != null ) {
 invalidDateListener . onInvalidDateSelected ( clickedDate ) ;
 }
 - } else {
 + } else if ( dateListener != null ) {
 boolean wasSelected = doSelectDate ( clickedDate , cell ) ;
 -
 - if ( wasSelected && dateListener != null ) {
 +
 + if ( wasSelected ) {
 dateListener . onDateSelected ( clickedDate ) ;
 - } else if ( ! wasSelected && dateListener != null ) {
 + } else if ( ! wasSelected ) {
 dateListener . onDateUnselected ( clickedDate ) ;
 }
 }
 <nb> public class CalendarPickerView extends ListView {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class CalendarPickerView extends ListView {
 public interface OnDateSelectedListener {
 void onDateSelected ( Date date ) ;

 - void onDateUnselected ( Date date ) ;
 + void onDateUnselected ( Date date ) ;
 }

 COMMENT

revoke rights to execute CalendarPickerView


<nb> public class OracleDatabase extends AbstractJdbcDatabase {
 if ( ( STRING0 . equals ( example . getName ( ) ) || STRING1 . equals ( example . getName ( ) ) || STRING2 . equals ( example . getName ( ) ) || STRING3 . equals ( example . getName ( ) ) ) ) {
 return true ;
 }
 - } else if ( example instanceof Table ) {
 + } else if ( example . getName ( ) != null ) {
 if ( example . getName ( ) . startsWith ( STRING4 ) ) { SINGLE
 return true ;
 } else if ( example . getName ( ) . startsWith ( STRING5 ) ) { SINGLE

The oracle system objects check applies to all objects not just tables


<nb> public class DynamicListView extends ListView {
 COMMENT
 COMMENT
 public void setAdapter ( ListAdapter adapter ) {
 - throw new IllegalArgumentException ( STRING0 ) ;
 + if ( ! ( adapter instanceof BaseAdapter ) ) {
 + throw new IllegalArgumentException ( STRING0 ) ;
 + }
 + super . setAdapter ( adapter ) ;
 }

 COMMENT

Fix accidental calls to setAdapter ListAdapter


<nb> public final class InlineTest extends SingleFileTranslationWithDirectivesTest {
 public void testMutualRecursion ( ) throws Exception {
 try {
 checkFooBoxIsOkWithDirectives ( ) ;
 - } catch ( Exception e ) {
 - assert e . getCause ( ) instanceof InlineRecursionException ;
 + } catch ( InlineRecursionException e ) {
 + return ;
 }
 +
 + throw new AssertionError ( STRING0 ) ;
 }

 public void testInlineOrder ( ) throws Exception {


<nb> public class NetworkManager extends Plugin {
 }
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + public void onReset ( ) {
 + this . onDestroy ( ) ;
 + }
 +
 SINGLE
 SINGLE
 SINGLE


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 public class DelegateGraphFacade implements GraphFacade {

 @ notnull
 - private final PermanentGraphImpl < Integer > myPermanentGraph ;
 + private final PermanentGraph < Integer > myPermanentGraph ;
 private final GraphCellPainter myGraphCellPainter ;

 @ notnull
 <nb> public class DelegateGraphFacade implements GraphFacade {
 @ nullable
 private Condition < Integer > myVisibilityPredicate = null ;

 - public DelegateGraphFacade ( @ notnull PermanentGraphImpl < Integer > permanentGraph , @ notnull ColorGenerator colorGenerator ) {
 + public DelegateGraphFacade ( @ notnull PermanentGraph < Integer > permanentGraph , @ notnull ColorGenerator colorGenerator ) {
 myPermanentGraph = permanentGraph ;
 myGraphCellPainter = new SimpleGraphCellPainter ( colorGenerator ) ;
 updateVisibleGraph ( ) ;


<nb>
 package NAMESPACE ;

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

 <nb> class MarkupModelDelegate extends UserDataHolderBase implements MarkupModelEx {
 public boolean containsHighlighter ( final RangeHighlighter highlighter ) {
 return myHostModel . containsHighlighter ( highlighter ) ;
 }
 +
 + public void addMarkupModelListener ( MarkupModelListener listener ) {
 + myHostModel . addMarkupModelListener ( listener ) ;
 + }
 +
 +
 + public void removeMarkupModelListener ( MarkupModelListener listener ) {
 + myHostModel . removeMarkupModelListener ( listener ) ;
 + }
 }


<nb> public final class TimestampType
 }

 @ override
 -
 public String getName ( )
 {
 return STRING0 ;


<nb> class ViewFetcher {
 COMMENT
 COMMENT

 - public ArrayList < View > getViews ( View parent , boolean onlySufficientlyVisible ) {
 + public ArrayList < View > getViews ( View parent , boolean onlySufficientlyVisible ) {
 + activityUtils . getCurrentActivity ( false ) ;
 final ArrayList < View > views = new ArrayList < View > ( ) ;
 final View parentToUse ;

 <nb> class ViewFetcher {
 COMMENT

 public float getScrollListWindowHeight ( View view ) {
 -
 final int [ ] xyParent = new int [ NUMBER0 ] ;
 final View parent = getScrollOrListParent ( view ) ;
 final float windowHeight ;

Added a getCurrentActivity in getViews in order to make sure that finalize will finish all openeded actvities


<nb> public class HazelcastAggregationRepository extends ServiceSupport
 return unmarshallExchange ( camelContext , cache . get ( key ) ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public boolean containsKey ( Object key ) {
 + return cache . containsKey ( key ) ;
 + }
 +
 public boolean isAllowSerializedHeaders ( ) {
 return allowSerializedHeaders ;
 }


<nb> public final class Alias {
 if ( rv != null ) {
 return rv ;
 } else if ( arg instanceof EntityPath < ? > ) {
 - return ( EntityPathBase < D > ) arg ;
 + return ( EntityPathBase < D > ) arg ; SINGLE
 } else if ( arg instanceof ManagedObject ) {
 return ( EntityPathBase < D > ) ( ( ManagedObject ) arg ) . __mappedPath ( ) ;
 } else {
 <nb> public abstract class AbstractJPAQuery < Q extends AbstractJPAQuery < Q > > extends JP
 COMMENT
 COMMENT
 COMMENT
 + @ nullable
 private Object getSingleResult ( Query query ) {
 if ( factoryExpressionUsed ) {
 Object result = query . getSingleResult ( ) ;


<nb> public class MetricFilterAutoConfiguration {
 result = result . replace ( STRING0 , STRING1 ) ;
 result = result . replace ( STRING2 , STRING3 ) ;
 result = result . replace ( STRING4 , STRING5 ) ;
 + result = result . replace ( STRING6 , STRING5 ) ;
 if ( result . endsWith ( STRING7 ) ) {
 result = result . substring ( NUMBER0 , result . length ( ) - NUMBER1 ) ;
 }


<nb> public @ interface UiThread {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

add note to javadoc that propagation is ignored when the delay is non zero


<nb> public class SwitchRenderer extends AbstractWidgetRenderer {

 if ( s . getMappings ( ) . size ( ) == NUMBER0 ) {
 if ( state instanceof PercentType ) {
 - state = ( ( PercentType ) state ) . toBigDecimal ( ) . compareTo ( BigDecimal . ZERO ) > NUMBER0 ? OnOffType . ON : OnOffType . OFF ;
 + state = ( ( PercentType ) state ) . intValue ( ) > NUMBER0 ? OnOffType . ON : OnOffType . OFF ;
 }
 if ( state . equals ( OnOffType . ON ) ) {
 snippet = snippet . replaceAll ( STRING0 , STRING1 ) ;


<nb> import NAMESPACE ;

 import NAMESPACE ;

 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public abstract class InspectionToolsConfigurable extends BaseConfigurable imple
 public void run ( ) {
 SingleInspectionProfilePanel panel = getSelectedPanel ( ) ;
 if ( panel != null ) {
 - panel . filterTree ( option ) ;
 + panel . setFilter ( option ) ;
 }
 }
 } ;
 <nb> public class SingleInspectionProfilePanel extends JPanel {
 return null ;
 }

 + public void setFilter ( String filter ) {
 + myProfileFilter . setFilter ( filter ) ;
 + }
 +
 public void filterTree ( String filter ) {
 if ( myTree != null ) {
 mySelectedProfile . getExpandedNodes ( ) . saveVisibleState ( myTree ) ;

provide inspections filter when filter globally


<nb> public abstract class AbstractAjaxCallback < T , K > implements Runnable {
 }
 }

 + } else {
 + skip ( url , result , status ) ;
 }

 filePut ( ) ;
 <nb> public abstract class AbstractAjaxCallback < T , K > implements Runnable {

 }

 + protected void skip ( String url , T object , AjaxStatus status ) {
 +
 + }
 +
 protected T fileGet ( String url , File file , AjaxStatus status ) {

 try {
 <nb> public class BitmapAjaxCallback extends AbstractAjaxCallback < Bitmap , BitmapAjaxC

 }

 + @ override
 + protected void skip ( String url , Bitmap bm , AjaxStatus status ) {
 + queueMap . remove ( url ) ;
 + }
 +
 +
 private void checkCb ( BitmapAjaxCallback cb , String url , ImageView v , Bitmap bm , AjaxStatus status ) {

 if ( v == null || cb == null ) return ;

Fix terminated activity with pending image callback doesn t clear the


<nb> public class GeneralCommandLine {
 if ( parameter . contains ( STRING0 ) ) {
 parameter = StringUtil . replace ( parameter , STRING0 , STRING1 ) ;
 }
 + else if ( parameter . length ( ) == NUMBER0 ) {
 + parameter = STRING2 ;
 + }
 }
 return parameter ;
 }
 <nb> public class GeneralCommandLineTest extends UsefulTestCase {
 ) ;
 }

 - final String [ ] parameters = { STRING3 , STRING4 , STRING5 , STRING6 , STRING7 , STRING0 , STRING8 , STRING9 } ;
 + final String [ ] parameters = { STRING3 , STRING4 , STRING5 , STRING6 , STRING10 , STRING7 , STRING0 , STRING8 , STRING9 } ;
 try {
 final GeneralCommandLine commandLine = new GeneralCommandLine ( ) ;
 commandLine . setExePath ( tempFile . getCanonicalPath ( ) ) ;


<nb> public class AsyncHttpResponseHandler {
 if ( handler != null ) {
 msg = this . handler . obtainMessage ( responseMessage , response ) ;
 } else {
 - msg = new Message ( ) ;
 + msg = Message . obtain ( ) ;
 msg . what = responseMessage ;
 msg . obj = response ;
 }

Use obtain instead of new on Message creation to improve memory efficiency


<nb> ConfirmationDialogFragment . ConfirmationDialogFragmentListener {

 private boolean mIgnoreFirstSavedState ;

 - private FileFragment . ContainerActivity mContainerActivity ;
 -

 COMMENT
 COMMENT
 <nb> public class PreviewMediaFragment extends FileFragment implements
 private boolean mAutoplay ;
 public boolean mPrepared ;

 - private FileFragment . ContainerActivity mContainerActivity ;
 -
 private static final String TAG = PreviewMediaFragment . class . getSimpleName ( ) ;

Fixed wrong field override breaking options menu in PreviewMediaFragment and PreviewImageFragment


<nb> public abstract class AbstractVcs {
 return true ;
 }

 + public static boolean fileInVcsByFileStatus ( final Project project , final FilePath path ) {
 + final VirtualFile virtualFile = path . getVirtualFile ( ) ;
 + if ( virtualFile != null ) {
 + final FileStatus fileStatus = FileStatusManager . getInstance ( project ) . getStatus ( virtualFile ) ;
 + return fileStatus != FileStatus . UNKNOWN && fileStatus != FileStatus . ADDED && fileStatus != FileStatus . IGNORED ;
 + }
 + return true ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public class AbstractShowDiffAction extends AbstractVcsAction {

 if ( diffProvider == null ) return false ;

 - return vcs . fileExistsInVcs ( new FilePathImpl ( selectedFile ) ) ;
 + return AbstractVcs . fileInVcsByFileStatus ( project , new FilePathImpl ( selectedFile ) ) ;
 }


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

 import NAMESPACE ;


<nb> public class SwipeRefreshLayout extends ViewGroup {
 mCircleView . offsetTopAndBottom ( offset ) ;
 mCurrentTargetOffsetTop = mCircleView . getTop ( ) ;
 if ( requiresUpdate && android . os . Build . VERSION . SDK_INT <= NUMBER0 ) {
 - mCircleView . invalidate ( ) ;
 + invalidate ( ) ;
 }
 }

Make the swipe refresh background spinner visible during the swipe gesture on gingerbread and before


<nb> class AndroidObjectFactory implements ObjectFactory {
 } else if ( instance instanceof InstrumentationTestCase ) {
 ( ( InstrumentationTestCase ) instance ) . injectInstrumentation ( mInstrumentation ) ;
 } else if ( instance instanceof AndroidTestCase ) {
 - ( ( AndroidTestCase ) instance ) . setContext ( mInstrumentation . getContext ( ) ) ;
 + ( ( AndroidTestCase ) instance ) . setContext ( mInstrumentation . getTargetContext ( ) ) ;
 }
 mInstances . put ( type , instance ) ;
 return instance ;

Inject target context instead of test context


<nb> public class AtmosphereFramework implements ServletContextProvider {
 className = className . replaceFirst ( STRING0 , STRING1 ) . replace ( STRING2 , STRING3 ) ;
 Class < ? > clazz = classloader . loadClass ( className ) ;

 - if ( WebSocketHandler . class . isAssignableFrom ( clazz ) ) {
 - webSocketProtocol = ( WebSocketHandler ) clazz . newInstance ( ) ;
 + if ( WebSocketProtocol . class . isAssignableFrom ( clazz ) ) {
 + webSocketProtocol = ( WebSocketProtocol ) clazz . newInstance ( ) ;
 InjectorProvider . getInjector ( ) . inject ( webSocketProtocol ) ;
 - logger . info ( STRING4 , webSocketProtocol ) ;
 + logger . info ( STRING5 , webSocketProtocol ) ;
 }
 } catch ( Throwable t ) {
 - logger . trace ( STRING6 + className , t ) ;
 + logger . trace ( STRING7 + className , t ) ;
 }
 }
 }

Add support for autodetecting WebSocketProtocol not only WebSocketHandler


<nb> public class ProgressWindow extends BlockingProgressIndicator {
 LOG . assertTrue ( ! myStoppedAlready ) ;
 myInstallFunAlarm . cancelAllRequests ( ) ;

 + super . stop ( ) ;
 if ( myDialog != null ) {
 myDialog . hide ( ) ;
 myFocusTrackback . restoreFocus ( ) ;
 }
 - super . stop ( ) ;
 myStoppedAlready = true ;

 SwingUtilities . invokeLater ( EmptyRunnable . INSTANCE ) ; SINGLE


<nb> public class KMeansClusterMapper extends Mapper < WritableComparable < ? > , VectorWrit
 if ( ( clusterPath != null ) && ( clusterPath . length ( ) > NUMBER0 ) ) {
 KMeansUtil . configureWithClusterInfo ( new Path ( clusterPath ) , clusters ) ;
 if ( clusters . isEmpty ( ) ) {
 - throw new IllegalStateException ( STRING0 ) ;
 + throw new IllegalStateException ( STRING1 ) ;
 }
 }
 this . clusterer = new KMeansClusterer ( measure ) ;

reworded error message in cluster mapper for clarity


<nb> public class CrateDocCollector implements CrateCollector {
 private final TopRowUpstream topRowUpstream ;
 private final RowReceiver rowReceiver ;
 private final Row inputRow ;
 - private final Collection < ? extends LuceneCollectorExpression < ? > > expressions ;
 + private final LuceneCollectorExpression [ ] expressions ;

 public LuceneDocCollector ( RamAccountingContext ramAccountingContext ,
 TopRowUpstream topRowUpstream ,
 <nb> public class CrateDocCollector implements CrateCollector {
 this . topRowUpstream = topRowUpstream ;
 this . rowReceiver = rowReceiver ;
 this . inputRow = inputRow ;
 - this . expressions = expressions ;
 + this . expressions = expressions . toArray ( new LuceneCollectorExpression [ NUMBER0 ] ) ;
 }

 @ override

Convert expressions to array in CrateDocCollector


<nb> public class LocalIndexesFragment extends OsmandExpandableListFragment {
 if ( dir . canRead ( ) ) {
 StatFs fs = new StatFs ( dir . getAbsolutePath ( ) ) ;
 size = formatGb . format ( new Object [ ] { ( float ) ( fs . getAvailableBlocks ( ) ) * fs . getBlockSize ( ) / ( NUMBER0 < < NUMBER1 ) } ) ;
 - percent = ( int ) ( fs . getAvailableBytes ( ) * NUMBER2 / fs . getTotalBytes ( ) ) ;
 + percent = ( int ) ( fs . getAvailableBlocks ( ) * NUMBER2 / fs . getBlockCount ( ) ) ;
 }
 sizeProgress . setProgress ( percent ) ;
 String text = getString ( R . string . free , size ) ;

Updated percentage count method for local indexes


<nb> public class ChainedExecutionQueryRunner < T > implements QueryRunner < T >
 }
 ) ;
 }
 -
 - public static void main ( String [ ] args ) throws Exception
 - {
 - ExecutorService foo = Executors . newFixedThreadPool ( NUMBER0 ) ;
 - Future test = foo . submit (
 - new Callable < List > ( )
 - {
 - @ override
 - public List call ( ) throws Exception
 - {
 - throw new ISE ( STRING0 ) ;
 - }
 - }
 - ) ;
 - System . out . println ( Lists . newArrayList ( test ) ) ;
 - }
 }


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CreateConstructorMatchingSuperFix extends BaseIntentionAction {
 }
 derived = ( PsiMethod ) formatter . reformat ( derived ) ;
 derived = ( PsiMethod ) JavaCodeStyleManager . getInstance ( project ) . shortenClassReferences ( derived ) ;
 - derived = ( PsiMethod ) GenerateMembersUtil . insert ( targetClass , derived , null , true ) ;
 + PsiGenerationInfo < PsiMethod > info = OverrideImplementUtil . createGenerationInfo ( derived ) ;
 + info . insert ( targetClass , null , true ) ;
 + derived = info . getPsiMember ( ) ;
 }
 if ( derived != null ) {
 editor . getCaretModel ( ) . moveToOffset ( derived . getTextRange ( ) . getStartOffset ( ) ) ;

Add constructor matching super inserts full qualified types


<nb> public class WifiStateMachine extends StateMachine {
 transitionTo ( mDriverUnloadingState ) ;
 break ;
 case CMD_START_SUPPLICANT :
 + try {
 + mNwService . wifiFirmwareReload ( mInterfaceName , STRING0 ) ;
 + } catch ( Exception e ) {
 + Log . e ( TAG , STRING1 + e ) ;
 + SINGLE
 + }
 SINGLE
 SINGLE
 SINGLE


<nb> public class MetaDataMappingService extends AbstractComponent {
 return newClusterStateBuilder ( ) . state ( currentState ) . metaData ( builder ) . build ( ) ;
 } catch ( Exception e ) {
 logger . warn ( STRING0 , e ) ;
 + listener . onFailure ( e ) ;
 return currentState ;
 - } finally {
 - listener . onResponse ( new Response ( true ) ) ;
 }
 }


<nb> public class BufferingStreamSinkConduit extends AbstractStreamSinkConduit < Stream
 this . pool = pool ;
 }

 - COMMENT
 - COMMENT
 - COMMENT
 @ override
 public long transferFrom ( FileChannel src , long position , long count ) throws IOException {
 if ( anyAreSet ( state , SHUTDOWN ) ) {
 throw new ClosedChannelException ( ) ;
 }
 - if ( ! flushBuffer ( ) ) {
 - return NUMBER0 ;
 - }
 return src . transferTo ( position , count , new ConduitWritableByteChannel ( this ) ) ;
 }


<nb> public final class JerseyBroadcasterUtil {
 final static void onException ( Throwable t , AtmosphereResource < ? , ? > r ) {
 try {
 logger . debug ( STRING0 , t ) ;
 -
 - if ( t instanceof IOException && r instanceof AtmosphereEventLifecycle ) {
 - ( ( AtmosphereEventLifecycle ) r ) . notifyListeners ( new AtmosphereResourceEventImpl ( ( AtmosphereResourceImpl ) r , true , false ) ) ;
 - ( ( AtmosphereEventLifecycle ) r ) . removeEventListeners ( ) ;
 - }
 + r . notifyListeners ( new AtmosphereResourceEventImpl ( ( AtmosphereResourceImpl ) r , true , false ) ) ;
 + r . resume ( ) ;
 } finally {
 - try {
 - r . getBroadcaster ( ) . removeAtmosphereResource ( r ) ;
 - } catch ( IllegalStateException ex ) {
 - logger . trace ( ex . getMessage ( ) , ex ) ;
 - }
 BroadcasterFactory . getDefault ( ) . removeAllAtmosphereResource ( r ) ;
 }
 }

Force the connection to resume in case of an unexpected connection


<nb> public class TachyonFS extends AbstractTachyonFS {
 }

 private static final Logger LOG = LoggerFactory . getLogger ( Constants . LOGGER_TYPE ) ;
 - private final int mUserFailedSpaceRequestLimits =
 - mTachyonConf . getInt ( Constants . USER_FAILED_SPACE_REQUEST_LIMITS , NUMBER0 ) ;
 + private final int mUserFailedSpaceRequestLimits ;
 private final ExecutorService mExecutorService ;

 SINGLE
 <nb> public class TachyonFS extends AbstractTachyonFS {
 mCloser . register ( new MasterClient ( mMasterAddress , mExecutorService , mTachyonConf ) ) ;
 mWorkerClient = mCloser . register ( new WorkerClient ( mMasterClient , mExecutorService ,
 mTachyonConf ) ) ;
 +
 + mUserFailedSpaceRequestLimits =
 + mTachyonConf . getInt ( Constants . USER_FAILED_SPACE_REQUEST_LIMITS , NUMBER0 ) ;
 }

 COMMENT

Prevent NPE on init TachyonFS member variable


<nb> public final class NativeProtocol {

 for ( Signature signature : packageInfo . signatures ) {
 String hashedSignature = Utility . sha1hash ( signature . toByteArray ( ) ) ;
 - if ( validAppSignatureHashes . contains ( hashedSignature ) ) {
 - return true ;
 + if ( ! validAppSignatureHashes . contains ( hashedSignature ) ) {
 + return false ;
 }
 }

 - return false ;
 + return true ;
 }

 public TreeSet < Integer > getAvailableVersions ( ) {


<nb> public class AtmosphereResourceImpl implements AtmosphereResource {
 timeoutms = TimeUnit . MILLISECONDS . convert ( timeout , timeunit ) ;
 }

 - return suspend ( timeoutms , true ) ;
 + return suspend ( timeoutms , flushComment ) ;
 }

 public AtmosphereResource suspend ( long timeout , boolean flushComment ) {

Propagate flushComment properly in suspend


<nb> public abstract class AbstractHistogram extends AbstractHistogramBase implements
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public long sizeOfEquivalentValueRange ( final long value ) {
 final int bucketIndex = getBucketIndex ( value ) ;


<nb> public class StudyTaskManager implements ProjectComponent , PersistentStateCompon
 addShortcut ( NextWindowAction . SHORTCUT , NextWindowAction . ACTION_ID ) ;
 addShortcut ( PrevWindowAction . SHORTCUT , PrevWindowAction . ACTION_ID ) ;
 addShortcut ( ShowHintAction . SHORTCUT , ShowHintAction . ACTION_ID ) ;
 + addShortcut ( NextWindowAction . SHORTCUT2 , NextWindowAction . ACTION_ID ) ;
 }
 }
 } ) ;
 <nb> import NAMESPACE ;
 public class NextWindowAction extends DumbAwareAction {
 public static final String ACTION_ID = STRING0 ;
 public static final String SHORTCUT = STRING1 ;
 + public static final String SHORTCUT2 = STRING2 ;

 public void actionPerformed ( AnActionEvent e ) {
 Project project = e . getProject ( ) ;


<nb> public class StringProperty extends AbstractProperty implements Property {
 super . format = format ;
 }

 - SINGLE
 public static boolean isType ( String type , String format ) {
 return TYPE . equals ( type ) && ( format == null || Format . fromName ( format ) != null ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SingletonPolicyBuilder implements ResourceServiceBuilder < SingletonP
 return target . addService ( this . getServiceName ( ) , new ValueService < > ( new ImmediateValue < SingletonPolicy > ( this ) ) )
 . addDependency ( SingletonServiceName . BUILDER . getServiceName ( this . containerName , this . cacheName ) , SingletonServiceBuilderFactory . class , this . factory )
 . addDependency ( new ElectionPolicyServiceNameProvider ( this . name ) . getServiceName ( ) , SingletonElectionPolicy . class , this . policy )
 - . setInitialMode ( ServiceController . Mode . ON_DEMAND ) ;
 + ;
 }

 @ override

Install SingletonPolicy service as ACTIVE


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

 public class ContentProviderController < T extends ContentProvider > {
 <nb> public class AndroidManifestTest {
 @ test
 public void parseManifest_shouldReadContentProviders ( ) throws Exception {
 AndroidManifest config = newConfig ( STRING0 ) ;
 - assertThat ( config . getContentProviders ( ) ) . hasSize ( NUMBER0 ) ;

 assertThat ( config . getContentProviders ( ) . get ( NUMBER1 ) . getClassName ( ) ) . isEqualTo ( STRING1 ) ;
 assertThat ( config . getContentProviders ( ) . get ( NUMBER1 ) . getAuthority ( ) ) . isEqualTo ( STRING2 ) ;

Fix test assertion remove check of total count


<nb> public class ModelLoaderRegistry
 {
 private static final Set < ICustomModelLoader > loaders = new HashSet < ICustomModelLoader > ( ) ;
 private static final Map < ResourceLocation , IModel > cache = new HashMap < ResourceLocation , IModel > ( ) ;
 - private static boolean registered = false ;

 SINGLE
 static
 <nb> public class ModelLoaderRegistry
 public static void registerLoader ( ICustomModelLoader loader )
 {
 loaders . add ( loader ) ;
 - if ( ! registered )
 - {
 - ( ( IReloadableResourceManager ) Minecraft . getMinecraft ( ) . getResourceManager ( ) ) . registerReloadListener ( new IResourceManagerReloadListener ( )
 - {
 - public void onResourceManagerReload ( IResourceManager manager )
 - {
 - for ( ICustomModelLoader loader : loaders ) loader . onResourceManagerReload ( manager ) ;
 - }
 - } ) ;
 - registered = true ;
 - }
 + ( ( IReloadableResourceManager ) Minecraft . getMinecraft ( ) . getResourceManager ( ) ) . registerReloadListener ( loader ) ;
 }

 public static boolean loaded ( ResourceLocation location )

Fix custom model loader reload hook not firing during registration


<nb> public class ZLAndroidWidget extends View implements View . OnLongClickListener {
 myPendingDoubleTap = true ;
 } else {
 postLongClickRunnable ( ) ;
 + myPendingPress = true ;
 }
 myScreenIsTouched = true ;
 - myPendingPress = true ;
 myPressedX = x ;
 myPressedY = y ;
 break ;


<nb> public abstract class MotionEditorActionHandler extends AbstractEditorActionHand
 CommandGroups . getInstance ( ) . getMark ( ) . saveJumpLocation ( editor ) ;
 }
 if ( ! CommandState . inInsertMode ( editor ) ) {
 - final int size = EditorHelper . getFileSize ( editor ) ;
 - offset = Math . min ( offset , size - NUMBER0 ) ;
 + offset = EditorHelper . normalizeOffset ( editor , offset , false ) ;
 }
 MotionGroup . moveCaret ( editor , offset ) ;
 postMove ( editor , context , cmd ) ;
 <nb> public class MotionActionTest extends VimTestCase {
 STRING0 ) ;
 assertOffset ( NUMBER1 ) ;
 }
 +
 + public void testDownToLastEmptyLine ( ) {
 + typeTextInFile ( stringToKeys ( STRING1 ) ,
 + STRING2 +
 + STRING3 ) ;
 + assertOffset ( NUMBER2 ) ;
 + }
 }

Fixed regression in moving down to the last empty line that ends with n


<nb> public class MultiInstanceTest extends PluggableActivitiTestCase {

 @ deployment
 public void testEndTimeOnMiSubprocess ( ) {
 +
 + if ( ! processEngineConfiguration . getHistoryLevel ( ) . isAtLeast ( HistoryLevel . AUDIT ) ) {
 + return ;
 + }
 +
 ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( STRING0 ) ;

 List < Task > tasks = taskService . createTaskQuery ( ) . processInstanceId ( processInstance . getId ( ) ) . list ( ) ;


<nb> public class PlaybackPreferences implements
 COMMENT
 public static final String PREF_CURRENT_EPISODE_IS_VIDEO = STRING0 ;

 - COMMENT
 - public static final String PREF_QUEUE_ADD_TO_FRONT = STRING1 ;
 + COMMENT
 + public static final String PREF_QUEUE_ADD_TO_FRONT = STRING1 ;

 COMMENT
 public static final long NO_MEDIA_PLAYING = - NUMBER0 ;


<nb> class AppWidgetService extends IAppWidgetService . Stub
 out . startTag ( null , STRING0 ) ;
 out . attribute ( null , STRING1 , p . info . provider . getPackageName ( ) ) ;
 out . attribute ( null , STRING2 , p . info . provider . getClassName ( ) ) ;
 - out . endTag ( null , STRING3 ) ;
 + out . endTag ( null , STRING0 ) ;
 p . tag = providerIndex ;
 providerIndex ++ ;
 }


<nb> public class WebView extends AbsoluteLayout
 }
 }
 setNewZoomScale ( scale , false ) ;
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + clearTextEntry ( ) ;
 break ;
 case MOVE_OUT_OF_PLUGIN :
 if ( nativePluginEatsNavKey ( ) ) {


<nb> public class ActFmSyncThread {
 }

 for ( ClientToServerMessage < ? > message : messageBatch ) {
 + try {
 Runnable r = pendingCallbacks . remove ( message ) ;
 if ( r != null )
 r . run ( ) ;
 + } catch ( Exception e ) {
 + Log . e ( ERROR_TAG , STRING0 , e ) ;
 + }
 }
 if ( refreshAfterBatch ) {
 Intent refresh = new Intent ( AstridApiConstants . BROADCAST_EVENT_REFRESH ) ;

Don t allow sync callbacks to crash the sync thread


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class SQLServerTemplates extends SQLTemplates {
 + public class SQLServerTemplates extends SQLTemplates {

 public static Builder builder ( ) {
 return new Builder ( ) {
 <nb> public class SQLServerTemplates extends SQLTemplates {
 setDummyTable ( STRING0 ) ;

 SINGLE
 + add ( Ops . CONCAT , STRING1 , NUMBER0 ) ;
 add ( Ops . CHAR_AT , STRING2 ) ;
 add ( Ops . INDEX_OF , STRING3 ) ;
 add ( Ops . INDEX_OF_2ARGS , STRING4 ) ;


<nb> VirtualFile result = LocalFileSystem . getInstance ( ) . findFileByIoFile ( myFile ) ;

 private Document processReadException ( final Exception e ) {
 myBlockSavingTheContent = isProjectOrModuleFile ( ) ;
 - if ( ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
 + if ( ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) && ! ApplicationManager . getApplication ( ) . isHeadlessEnvironment ( ) ) {
 SwingUtilities . invokeLater ( new Runnable ( ) {
 public void run ( ) {
 JOptionPane . showMessageDialog ( JOptionPane . getRootFrame ( ) ,


<nb> public class JavaGenericsUtil {
 PsiSubstitutor superClassSubstitutor = TypeConversionUtil . getClassSubstitutor ( owner , aClass , substitutor ) ;
 if ( superClassSubstitutor == null ) return null ;
 PsiType itemType = superClassSubstitutor . substitute ( typeParameter ) ;
 - itemType = substitutor . substitute ( itemType ) ;
 return itemType == null ? PsiType . getJavaLangObject ( manager , aClass . getResolveScope ( ) ) : itemType ;
 }
 return null ;

do not dbl substitution type annotations could be lost after that


<nb>
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb>
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class DeltaManager extends ClusterManagerBase {

 SINGLE

 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - @ deprecated
 - protected static final String managerName = STRING0 ;
 protected String name = null ;

 private boolean expireSessionsOnShutdown = false ;


<nb> public class Utils {
 COMMENT
 COMMENT
 @ safevarargs
 - public static < T > AsyncTask executeInOrder ( AsyncTask < T , ? , ? > task , T . . . args ) {
 + public static < Params , Progress , Result > AsyncTask < Params , Progress , Result > executeInOrder (
 + AsyncTask < Params , Progress , Result > task , Params . . . args ) {
 return task . executeOnExecutor ( AsyncTask . SERIAL_EXECUTOR , args ) ;
 }
 }

Specify generics more clearly for Utils executeInOrder