<nb> public final class ContactsContract {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static Uri lookupContact ( ContentResolver resolver , Uri lookupUri ) {
 + if ( lookupUri == null ) {
 + return null ;
 + }
 +
 + Cursor c = resolver . query ( lookupUri , new String [ ] { Contacts . _ID } , null , null , null ) ;
 + if ( c == null ) {
 + return null ;
 + }
 +
 + try {
 + if ( c . moveToFirst ( ) ) {
 + long contactId = c . getLong ( NUMBER0 ) ;
 + return ContentUris . withAppendedId ( Contacts . CONTENT_URI , contactId ) ;
 + }
 + } finally {
 + c . close ( ) ;
 + }
 + return null ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Adding a convenience method to resolve contact lookup URI to a regular content URI


<nb> public class PrivacyManager {
 if ( ip != null )
 try {
 return InetAddress . getByName ( ip ) ;
 - } catch ( Throwable ex ) {
 - Util . bug ( null , ex ) ;
 + } catch ( Throwable ignored ) {
 }

 SINGLE


<nb> final class DefaultChannelHandlerContext extends DefaultAttributeMap implements
 private void invokeFlush0 ( ChannelPromise promise ) {
 Channel channel = channel ( ) ;
 if ( ! channel . isRegistered ( ) && ! channel . isActive ( ) ) {
 - promise . setFailure ( new ClosedChannelException ( ) ) ;
 + promise . tryFailure ( new ClosedChannelException ( ) ) ;
 return ;
 }

Fix a problem where flush future is set more than once


<nb> public class Messenger {
 COMMENT
 COMMENT
 COMMENT
 - @ objectivecname ( STRING0 )
 + @ objectivecname ( STRING1 )
 public void onPushReceived ( int seq , long authId ) {
 if ( modules . getUpdatesModule ( ) != null ) {
 modules . getUpdatesModule ( ) . onPushReceived ( seq , authId ) ;

add new arguments to onPushReceived ObjectiveCName


<nb> public class Capsule implements Runnable {
 return null ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + protected final Capsule sup ( String ClassName ) {
 + for ( Capsule c = this ; c != null ; c = c . sup ) {
 + for ( Class cls = c . getClass ( ) ; cls != null ; cls = cls . getSuperclass ( ) ) {
 + if ( ClassName . equals ( cls . getName ( ) ) )
 + return c ;
 + }
 + }
 + return null ;
 + }
 +
 protected final < T extends Capsule > T getCallTarget ( Class < T > clazz ) {
 COMMENT
 COMMENT


<nb> public class PlatformProjectOpenProcessor extends ProjectOpenProcessor {
 }

 if ( project == null ) return null ;
 + ProjectBaseDirectory . getInstance ( project ) . setBaseDir ( baseDir ) ;
 final Module module = runConfigurators ? runDirectoryProjectConfigurators ( baseDir , project ) : null ;

 openFileFromCommandLine ( project , virtualFile , line ) ;
 <nb> public class PlatformProjectOpenProcessor extends ProjectOpenProcessor {
 }

 public static Module runDirectoryProjectConfigurators ( VirtualFile baseDir , Project project ) {
 - ProjectBaseDirectory . getInstance ( project ) . setBaseDir ( baseDir ) ;
 final Ref < Module > moduleRef = new Ref < Module > ( ) ;
 for ( DirectoryProjectConfigurator configurator : Extensions . getExtensions ( DirectoryProjectConfigurator . EP_NAME ) ) {
 try {

set basedir when opening existing project


<nb> public class JetLineMarkerProvider implements LineMarkerProvider {
 }

 @ override
 - public void collectSlowLineMarkers ( List < PsiElement > elements , Collection < LineMarkerInfo > result ) {
 + public void collectSlowLineMarkers ( @ notnull List < PsiElement > elements , @ notnull Collection < LineMarkerInfo > result ) {
 + SINGLE
 + if ( ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) return ;
 +
 if ( elements . isEmpty ( ) || DumbService . getInstance ( elements . get ( NUMBER0 ) . getProject ( ) ) . isDumb ( ) ) {
 return ;
 }

Added another workaround for CME in IDEA code in tests to be removed after updating to new IDEA


<nb> public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid

 reply = IQ . createResultIQ ( packet ) ;
 session . process ( reply ) ;
 + SINGLE
 + Thread . sleep ( NUMBER0 ) ;
 SINGLE
 session . getConnection ( ) . close ( ) ;
 SINGLE

Added a very small delay before closing the connection once an account was removed


<nb> public class ModelCache extends AbstractCache < String , CachedModel > {

 public void readFromParcel ( Parcel source ) throws IOException {
 String className = source . readString ( ) ;
 + SINGLE
 + if ( className == null ) {
 + return ;
 + }
 Class < ? > clazz ;
 try {
 clazz = Class . forName ( className ) ;

Added check to class name because sometimes for unknown reasons it s null


<nb> public class TfsShellTest {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ test
 public void setPinTest ( ) throws Exception {


<nb> public class EditorNotificationPanel extends JPanel {
 JPanel panel = new NonOpaquePanel ( new BorderLayout ( ) ) ;
 panel . add ( BorderLayout . CENTER , myLabel ) ;
 panel . add ( BorderLayout . EAST , myLinksPanel ) ;
 - panel . setBorder ( JBUI . Borders . empty ( NUMBER0 , NUMBER0 , NUMBER0 , NUMBER1 ) ) ;
 + panel . setBorder ( JBUI . Borders . empty ( NUMBER2 , NUMBER0 , NUMBER2 , NUMBER1 ) ) ;
 panel . setMinimumSize ( new Dimension ( NUMBER0 , NUMBER0 ) ) ;

 add ( BorderLayout . CENTER , panel ) ;

added some space for editor notifications


<nb> public class ErrorOutputStream extends LoggerOutputStream {
 }
 @ override
 protected void log ( byte [ ] message , int off , int length ) {
 - logger . error ( new String ( message , off , length ) . replace ( STRING0 , STRING1 ) ) ;
 + String msg = new String ( message , off , length ) . replace ( STRING0 , STRING1 ) ;
 + String msgToLower = msg . toLowerCase ( ) ;
 + if ( msgToLower . contains ( STRING2 ) ) {
 + logger . warn ( msg ) ;
 + } else {
 + logger . error ( msg ) ;
 + }
 }
 }

Log messages printed on stderr by command ine tools containing warning on


<nb> public class Renderer extends JavaScriptObject
 public native final void updateFontSize ( ) COMMENT
 COMMENT
 COMMENT ;
 +
 + public native final void updateFull ( boolean force ) COMMENT
 + COMMENT
 + COMMENT ;

 public native final void onResize ( boolean force ) / * - {
 this . onResize ( force ) ;


<nb>
 package NAMESPACE ;

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

 <nb> public class MachineExtension {
 final EventBus eventBus ,
 final WorkspaceAgent workspaceAgent ,
 final ConsolesPanelPresenter consolesPanelPresenter ,
 - final ServerPortProvider machinePortProvider ,
 + final Provider < ServerPortProvider > machinePortProvider ,
 final OutputsContainerPresenter outputsContainerPresenter ,
 final PerspectiveManager perspectiveManager ,
 IconRegistry iconRegistry ,
 <nb> public class MachineExtension {
 eventBus . addHandler ( WsAgentStateEvent . TYPE , new WsAgentStateHandler ( ) {
 @ override
 public void onWsAgentStarted ( WsAgentStateEvent event ) {
 + machinePortProvider . get ( ) ;
 +
 perspectiveManager . setPerspectiveId ( PROJECT_PERSPECTIVE_ID ) ;
 workspaceAgent . openPart ( outputsContainerPresenter , PartStackType . INFORMATION ) ;
 workspaceAgent . openPart ( consolesPanelPresenter , PartStackType . INFORMATION ) ;


<nb> class PowerManagerService extends IPowerManager . Stub
 }

 private void forceUserActivityLocked ( ) {
 + SINGLE
 + mScreenBrightness . animating = false ;
 boolean savedActivityAllowed = mUserActivityAllowed ;
 mUserActivityAllowed = true ;
 userActivity ( SystemClock . uptimeMillis ( ) , false ) ;

Fix problem with proximity sensor not reawaking screen if the values change too quickly


<nb> import NAMESPACE ;
 import NAMESPACE ;

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

 COMMENT
 <nb> public class LocalBlockInStream extends BlockInStream {
 mBlockId = blockId ;
 mClosed = false ;
 mContext = BSContext . INSTANCE ;
 - mWorkerClient = mContext . acquireWorkerClient ( ) ;
 + mWorkerClient =
 + mContext . acquireWorkerClient ( NetworkAddressUtils . getLocalHostName ( ClientContext . getConf ( ) ) ) ;
 String blockPath = mWorkerClient . lockBlock ( blockId ) ;

 if ( null == blockPath ) {

Only get local client in local block in stream


<nb> public class LambdaClassesTest {

 @ test
 public void lambda_bodies_contain_no_unnecessary_methods ( ) throws ClassNotFoundException {
 - assertThat ( getDeclaredMethodNames ( HasLambdaBody . class ) , is ( ImmutableSet . of ( STRING0 , STRING1 ) ) ) ;
 + assertThat ( getDeclaredMethodNames ( HasLambdaBody . class ) , containsInAnyOrder ( startsWith ( STRING2 ) , equalTo ( STRING1 ) ) ) ;
 }

 @ suppresswarnings ( STRING3 )


<nb> public class BoundedStatsDeque implements Iterable < Long >

 public double mean ( )
 {
 - return size ( ) > NUMBER0 ? sum ( ) / size ( ) : NUMBER0 ;
 + return size ( ) > NUMBER0 ? ( ( double ) sum ( ) ) / size ( ) : NUMBER0 ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

 public class GoProjectModelConverterProvider extends ConverterProvider {
 -
 public static final String PROJECT_ROOT_MANAGER = STRING0 ;

 protected GoProjectModelConverterProvider ( ) {
 <nb> public class GoProjectModelConverterProvider extends ConverterProvider {
 settings . setModuleType ( GoConstants . MODULE_TYPE_ID ) ;
 for ( Element element : settings . getOrderEntries ( ) ) {
 if ( isGoSdkType ( element . getAttributeValue ( STRING1 ) ) ) {
 - element . setAttribute ( STRING2 , GoConstants . SDK_TYPE_ID ) ;
 + element . setAttribute ( STRING1 , GoConstants . SDK_TYPE_ID ) ;
 }
 }
 convertSdks ( ) ;


<nb> public abstract class NullableNotNullManager implements PersistentStateComponent
 return findNullabilityDefaultInHierarchy ( owner , nullable ) ;
 }

 - protected abstract boolean hasHardcodedContracts ( PsiElement element ) ;
 + protected boolean hasHardcodedContracts ( PsiElement element ) {
 + return false ;
 + }

 @ nullable
 private static PsiType getOwnerType ( PsiModifierListOwner owner ) {

added default implementation to new method to avoid breaking API fixed compatibility with Kotlin plugin


<nb> public class RoboSpiceDatabaseHelper extends OrmLiteSqliteOpenHelper {
 }

 @ override
 - public void onUpgrade ( SQLiteDatabase arg0 , ConnectionSource arg1 , int arg2 , int arg3 ) {
 + public void onUpgrade ( SQLiteDatabase database , ConnectionSource connectionSource , int oldVersion , int newVersion ) {
 SINGLE
 }

fix argument names in RoboSpiceDatabaseHelper onUpdate


<nb> public class RPC < V extends DTask > implements Future < V > , Delayed , ForkJoinPool . Ma
 SINGLE
 private void handleCompleter ( CountedCompleter cc ) {
 assert cc instanceof H2OCountedCompleter ;
 - if ( _fjtasks != null && ! _fjtasks . contains ( cc ) )
 + if ( _fjtasks == null || ! _fjtasks . contains ( cc ) )
 addCompleter ( ( H2OCountedCompleter ) cc ) ;
 _dt . setCompleter ( null ) ;
 }


<nb> public class StringManager {
 String str = null ;

 try {
 - str = bundle . getString ( key ) ;
 + SINGLE
 + if ( bundle != null ) {
 + str = bundle . getString ( key ) ;
 + }
 } catch ( MissingResourceException mre ) {
 SINGLE
 SINGLE


<nb> public class BulkIteration extends SingleInputContract < AbstractStub > implements

 private Contract iterationResult ;

 - private final Contract inputPlaceHolder = new PartialSolutionPlaceHolder ( this ) ;
 + private Contract inputPlaceHolder = new PartialSolutionPlaceHolder ( this ) ;

 private final AggregatorRegistry aggregators = new AggregatorRegistry ( ) ;

 <nb> public class BulkIteration extends SingleInputContract < AbstractStub > implements
 COMMENT
 COMMENT
 COMMENT
 - public static final class PartialSolutionPlaceHolder extends Contract {
 + SINGLE
 + public static class PartialSolutionPlaceHolder extends Contract {

 private final BulkIteration containingIteration ;

 - private PartialSolutionPlaceHolder ( BulkIteration container ) {
 + public PartialSolutionPlaceHolder ( BulkIteration container ) {
 super ( STRING0 ) ;
 this . containingIteration = container ;
 }

Make PartialSolutionHolder non final in BulkIteration


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

 import NAMESPACE ;


<nb> class WindowStateAnimator {
 final WindowState wallpaperTarget = mWallpaperControllerLocked . getWallpaperTarget ( ) ;
 if ( wallpaperTarget != null ) {
 final Task task = wallpaperTarget . getTask ( ) ;
 - if ( task != null && ! task . isFullscreen ( ) ) {
 + final WindowStateAnimator winAnimator = wallpaperTarget . mWinAnimator ;
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + final boolean useFinalCropOnWallpaper = ! winAnimator . isAnimationSet ( )
 + || winAnimator . resolveStackClip ( ) == STACK_CLIP_AFTER_ANIM ;
 + if ( task != null && ! task . isFullscreen ( )
 + && task . cropWindowsToStackBounds ( )
 + && useFinalCropOnWallpaper ) {
 final TaskStack stack = task . mStack ;
 if ( stack != null && ! stack . isFullscreen ( ) ) {
 stack . getDimBounds ( mTmpStackBounds ) ;
 <nb> class WindowStateAnimator {
 SINGLE
 SINGLE
 SINGLE
 - SINGLE
 + SINGLE
 SINGLE
 mForceScaleUntilResize = true ;
 } else {

Fix wallpaper crop during unlock animation


<nb> import static NAMESPACE ;

 public class StyledTextOutputBackedRenderer implements OutputEventListener {
 private final OutputEventTextOutputImpl textOutput ;
 + private final SimpleDateFormat dateFormat = new SimpleDateFormat ( STRING0 ) ;
 private boolean debugOutput ;
 private RenderableOutputEvent lastEvent ;

 <nb> public class StyledTextOutputBackedRenderer implements OutputEventListener {
 if ( ! textOutput . atEndOfLine ) {
 textOutput . println ( ) ;
 }
 - textOutput . text ( new SimpleDateFormat ( STRING0 ) . format ( new Date ( outputEvent . getTimestamp ( ) ) ) ) ;
 + textOutput . text ( dateFormat . format ( new Date ( outputEvent . getTimestamp ( ) ) ) ) ;
 textOutput . text ( STRING1 ) ;
 textOutput . text ( outputEvent . getLogLevel ( ) ) ;
 textOutput . text ( STRING2 ) ;

Don t create a SimpleDataFormat instance for every debug log message


<nb> public class PeerTest extends TestWithNetworkConnections {
 inbound ( peer , new Pong ( pingMsg . getNonce ( ) ) ) ;
 elapsed = future . get ( ) ;
 assertEquals ( elapsed , peer . getLastPingTime ( ) ) ;
 - assertEquals ( NUMBER0 , peer . getPingTime ( ) ) ;
 + assertEquals ( NUMBER1 , peer . getPingTime ( ) ) ;
 }

 private Message outbound ( ) {


<nb> public class Theme {
 String demoURI = object . getString ( DEMO_URI ) ;
 String name = object . getString ( NAME ) ;
 String stylesheet = object . getString ( STYLESHEET ) ;
 - String price = object . getString ( PRICE ) ;
 + String price ;
 + try {
 + price = object . getString ( PRICE ) ;
 + } catch ( JSONException e ) {
 + price = STRING0 ;
 + }

 return new Theme ( id , author , screenshot , authorURI , demoURI , name , stylesheet , price ) ;
 }

Some themes don t have a price so doing try catch


<nb> public class LayoutManager extends RecyclerView . LayoutManager {
 break ;
 }
 }
 +
 + SINGLE
 + if ( sli == - NUMBER0 && sd . headerParams . isHeaderInline ( ) && ! sd . headerParams . isHeaderOverlay ( ) ) {
 + markerLine = sectionBottom ;
 + }
 +
 int offset = NUMBER1 ;
 if ( ! sd . headerParams . isHeaderInline ( ) || sd . headerParams . isHeaderOverlay ( ) ) {
 View firstVisibleView = slm . getFirstVisibleView ( sd . firstPosition , true ) ;

Fix header for empty section on scroll to start


<nb> public class Requirements {
 for ( String service : XBinder . cListService )
 if ( ! mapService . containsKey ( service ) )
 listMissing . add ( service ) ;
 + if ( PrivacyManager . cTestVersion )
 + for ( String serviceName : XBinder . cListServiceName )
 + if ( ! mapService . containsValue ( serviceName ) )
 + listMissing . add ( serviceName ) ;

 SINGLE
 if ( listMissing . size ( ) > NUMBER0 ) {


<nb> public final class ActivityManagerService extends ActivityManagerNative
 @ override
 public final void activityIdle ( IBinder token , Configuration config , boolean stopProfiling ) {
 final long origId = Binder . clearCallingIdentity ( ) ;
 - if ( stopProfiling ) {
 - synchronized ( this ) {
 - ActivityStack stack = ActivityRecord . getStackLocked ( token ) ;
 - if ( stack != null ) {
 - ActivityRecord r = stack . activityIdleInternalLocked ( token , false , config ) ;
 + synchronized ( this ) {
 + ActivityStack stack = ActivityRecord . getStackLocked ( token ) ;
 + if ( stack != null ) {
 + ActivityRecord r = stack . activityIdleInternalLocked ( token , false , config ) ;
 + if ( stopProfiling ) {
 if ( ( mProfileProc == r . app ) && ( mProfileFd != null ) ) {
 try {
 mProfileFd . close ( ) ;

Perform activityIdleInternal in correct order


<nb> public class SQLiteDatabase extends SQLiteClosable {
 mSlowQueryThreshold = - NUMBER0 ; SINGLE
 mStackTrace = new DatabaseObjectNotClosedException ( ) . fillInStackTrace ( ) ;
 mFactory = factory ;
 + mPrograms = new WeakHashMap < SQLiteClosable , Object > ( ) ;
 dbopen ( mPath , mFlags ) ;

 if ( databaseHook != null ) {
 <nb> public class SQLiteDatabase extends SQLiteClosable {
 if ( SQLiteDebug . DEBUG_SQL_CACHE ) {
 mTimeOpened = getTime ( ) ;
 }
 - mPrograms = new WeakHashMap < SQLiteClosable , Object > ( ) ;
 try {
 setLocale ( Locale . getDefault ( ) ) ;
 } catch ( RuntimeException e ) {

Move map of SQLiteCloseable to allow preKey postKey operations


<nb> public class ContactGroupIcqImpl
 COMMENT
 void removeContact ( ContactIcqImpl contact )
 {
 - for ( Iterator < Map . Entry < String , Contact > > buddyIter
 - = buddies . entrySet ( ) . iterator ( ) ;
 - buddyIter . hasNext ( ) ; )
 - {
 - if ( buddyIter . next ( ) . getValue ( ) . equals ( contact ) )
 - {
 - buddyIter . remove ( ) ;
 - break ;
 - }
 - }
 + if ( contact == null )
 + return ;
 +
 + buddies . remove ( contact . getUIN ( ) . toLowerCase ( ) ) ;
 }

 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class MethodSorterTest {

 @ test public void getDeclaredMethods ( ) throws Exception {
 assertEquals ( STRING0 , declaredMethods ( Dummy . class ) ) ;
 - class Super {
 - void testOne ( ) { }
 - }
 - class Sub extends Super {
 - void testTwo ( ) { }
 - }
 assertEquals ( STRING1 , declaredMethods ( Super . class ) ) ;
 assertEquals ( STRING2 , declaredMethods ( Sub . class ) ) ;
 }
 <nb> public class MethodSorterTest {
 void delta ( ) { }
 void epsilon ( ) { }
 }
 + private static class Super {
 + void testOne ( ) { }
 + }
 + private static class Sub extends Super {
 + void testTwo ( ) { }
 + }

 }

Making Super and Sub member classes as suggested


<nb>
 COMMENT
 package NAMESPACE ;

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

 import NAMESPACE ;
 <nb> public class InvokeTemplateAction extends AnAction {

 public void actionPerformed ( AnActionEvent e ) {
 + final Document document = myEditor . getDocument ( ) ;
 + final VirtualFile file = FileDocumentManager . getInstance ( ) . getFile ( document ) ;
 + if ( file != null ) {
 + ReadonlyStatusHandler . getInstance ( myProject ) . ensureFilesWritable ( file ) ;
 + }
 +
 String selectionString = myEditor . getSelectionModel ( ) . getSelectedText ( ) ;

 if ( selectionString != null ) {

surround with template should checkout the file from VCS


<nb> public abstract class ProcessorDefinition < Type extends ProcessorDefinition > exte
 SINGLE
 channel . initChannel ( this , routeContext ) ;

 + SINGLE
 + ProcessorDefinition defn = ( ProcessorDefinition ) this ;
 SINGLE
 - if ( this instanceof TryDefinition || this instanceof CatchDefinition || this instanceof FinallyDefinition ) {
 + if ( defn instanceof TryDefinition || defn instanceof CatchDefinition || defn instanceof FinallyDefinition ) {
 SINGLE
 return channel ;
 } else {


<nb> public class FreeFlowContainer extends AbsLayoutContainer {
 }

 for ( FreeFlowItem freeflowItem : changeSet . removed ) {
 - freeflowItem . view . setAlpha ( FLOAT0 ) ;
 removeViewInLayout ( freeflowItem . view ) ;
 returnItemToPoolIfNeeded ( freeflowItem ) ;
 }
 <nb> public class FreeFlowContainer extends AbsLayoutContainer {
 v . setScaleX ( FLOAT1 ) ;
 v . setScaleY ( FLOAT1 ) ;

 - v . setAlpha ( NUMBER0 ) ;
 viewpool . returnViewToPool ( v ) ;
 }

Removed setAlpha calls which can be potentially expensive during scrolling


<nb> final class CdiSpiHelper {

 return Stream . of ( methods )
 . sorted ( comparing ( Method : : getName ) )
 - . collect ( ( ) - > new StringJoiner ( STRING0 , STRING1 , STRING2 ) ,
 + . collect ( ( ) - > new StringJoiner ( STRING0 , STRING3 + annotation . annotationType ( ) . getCanonicalName ( ) + STRING4 , STRING2 ) ,
 ( joiner , method ) - > {
 try {
 - joiner
 - . add ( method . getName ( ) ) . add ( STRING5 )
 - . add ( method . invoke ( annotation ) . toString ( ) ) ;
 + joiner . add ( method . getName ( ) + STRING5 + method . invoke ( annotation ) . toString ( ) ) ;
 } catch ( NullPointerException | IllegalArgumentException | IllegalAccessException | InvocationTargetException cause ) {
 throw new RuntimeException (
 STRING6 + method . getName ( ) + STRING7

Fix missing type and redundant delimiters in annotation id


<nb> public class Http11InputBuffer implements InputBuffer {

 lastValid = NUMBER0 ;
 pos = NUMBER0 ;
 -
 lastActiveFilter = - NUMBER1 ;
 parsingHeader = true ;
 swallowInput = true ;
 <nb> public class Http11InputBuffer implements InputBuffer {
 if ( swallowInput && ( lastActiveFilter != - NUMBER1 ) ) {
 int extraBytes = ( int ) activeFilters [ lastActiveFilter ] . end ( ) ;
 pos = pos - extraBytes ;
 - ( new Exception ( ) ) . printStackTrace ( ) ;
 }
 }


<nb> public class ControllerDynamicMethods extends
 public static final String MODEL_AND_VIEW_PROPERTY = STRING0 ;
 public static final String ACTION_URI_PROPERTY = STRING1 ;
 public static final String CONTROLLER_URI_PROPERTY = STRING2 ;
 - private static final String GET_VIEW_URI = null ;
 - private static final String GET_TEMPLATE_URI = null ;
 + public static final String GET_VIEW_URI = STRING3 ;
 + public static final String GET_TEMPLATE_URI = STRING4 ;

 protected GrailsControllerClass controllerClass ;


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DexMojo extends AbstractAndroidMojo {
 try {
 final OutputStream out = new FileOutputStream ( entryFile ) ;
 try {
 - IOUtil . copy ( in , out ) ;
 + IOUtil . copy ( in , out ) ;
 } finally {
 - closeQuietly ( out ) ;
 + IOUtils . closeQuietly ( out ) ;
 }
 } finally {
 - closeQuietly ( in ) ;
 + IOUtils . closeQuietly ( in ) ;
 }
 }
 }
 }

 - private void closeQuietly ( final Closeable c ) {
 - try {
 - c . close ( ) ;
 - } catch ( Exception ex ) {
 - getLog ( ) . warn ( STRING0 + c , ex ) ;
 - }
 - }
 }

Use Apache commons io s IOUtils closeQuitely instead of our own code


<nb> public class SourceUIContact
 {
 byte [ ] image = sourceContact . getImage ( ) ;

 - if ( image != null )
 + if ( ( image != null ) && ( image . length > NUMBER0 ) )
 {
 - ImageIcon icon = new ImageIcon ( ) ;
 + ImageIcon icon = new ImageIcon ( image ) ;

 if ( icon . getIconWidth ( ) > width || icon . getIconHeight ( ) > height )
 {

I don t get the images in the contact list and only see them in the tool tip


<nb>
 COMMENT
 package NAMESPACE ;

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

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

 public class StopWatcherTest {
 -
 - @ rule
 - public Timeout timeout = new Timeout ( NUMBER0 , TimeUnit . MILLISECONDS ) ;
 -
 - @ test
 + @ test ( timeout = NUMBER0 )
 public void stop_if_receive_command ( ) throws InterruptedException {
 ProcessCommands commands = mock ( ProcessCommands . class ) ;
 when ( commands . askedForStop ( ) ) . thenReturn ( false , true ) ;
 <nb> public class StopWatcherTest {
 verify ( stoppable ) . stopAsync ( ) ;
 }

 - @ test
 + @ test ( timeout = NUMBER1 )
 public void stop_watching_on_interruption ( ) throws InterruptedException {
 ProcessCommands commands = mock ( ProcessCommands . class ) ;
 when ( commands . askedForStop ( ) ) . thenReturn ( false ) ;


<nb> public abstract class AbstractEdge implements Edge {

 private void detachTo ( ) {
 if ( tov != null ) {
 - tov . removeOutgoing ( this ) ;
 + tov . removeIncoming ( this ) ;
 tov = null ;
 }
 }

bug remove edge from incoming not outgoing edge list of tov


<nb> public class WorldEdit {

 SINGLE
 if ( split . length > NUMBER0 ) {
 - if ( split [ NUMBER0 ] . equalsIgnoreCase ( STRING0 ) ) {
 - replace = null ; SINGLE
 - } else {
 - replace = getBlock ( split [ NUMBER0 ] ) ;
 - }
 + replace = getBlock ( split [ NUMBER0 ] ) ;
 } else {
 replace = new BaseBlock ( NUMBER1 ) ;
 }

Removed displacement argument from move and moveair not yet implemented


<nb> public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
 }

 boolean setClosed ( ) {
 - boolean set = super . setSuccess ( ) ;
 - assert set ;
 - return set ;
 + return super . setSuccess ( ) ;
 }
 }
 }


<nb> public class DTree extends Iced {
 if ( MathUtils . equalsWithinOneSmallUlp ( min , maxEx ) ) continue ; SINGLE
 if ( Float . isInfinite ( adj_nbins / ( maxEx - min ) ) ) continue ;
 if ( h . _isInt > NUMBER0 && ! ( min + NUMBER1 < maxEx ) ) continue ; SINGLE
 - assert min < maxEx && n > NUMBER1 : STRING0 + min + STRING1 + maxEx + STRING2 + n ;
 + assert min < maxEx && adj_nbins > NUMBER1 : STRING0 + min + STRING1 + maxEx + STRING3 + adj_nbins ;
 nhists [ j ] = DHistogram . make ( h . _name , adj_nbins , h . _isInt , min , maxEx , n , h . isBinom ( ) ) ;
 cnt ++ ; SINGLE
 }

Fix assertion was checking the wrong thing


<nb> public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
 PsiExpression expression = PsiTreeUtil . getParentOfType ( elementAtCaret , PsiExpression . class ) ;
 while ( expression != null ) {
 if ( ! expressions . contains ( expression ) && ! ( expression instanceof PsiParenthesizedExpression ) && ! ( expression instanceof PsiSuperExpression ) && expression . getType ( ) != PsiType . VOID ) {
 - if ( ! ( expression instanceof PsiReferenceExpression && expression . getParent ( ) instanceof PsiMethodCallExpression ) ) {
 + if ( ! ( expression instanceof PsiReferenceExpression && ( expression . getParent ( ) instanceof PsiMethodCallExpression ||
 + ( ( PsiReferenceExpression ) expression ) . resolve ( ) instanceof PsiClass ) ) ) {
 expressions . add ( expression ) ;
 }
 }

exclude class refrences from expressions list


<nb> public class SearchDialog extends Dialog implements OnItemClickListener , OnItemS
 SearchableInfo searchable = mSearchable ;
 try {
 if ( searchable . getVoiceSearchLaunchWebSearch ( ) ) {
 - getContext ( ) . startActivity ( mVoiceWebSearchIntent ) ;
 + Intent webSearchIntent = createVoiceWebSearchIntent ( mVoiceWebSearchIntent ,
 + searchable ) ;
 + getContext ( ) . startActivity ( webSearchIntent ) ;
 } else if ( searchable . getVoiceSearchLaunchRecognizer ( ) ) {
 Intent appSearchIntent = createVoiceAppSearchIntent ( mVoiceAppSearchIntent ,
 searchable ) ;
 <nb> public class SearchDialog extends Dialog implements OnItemClickListener , OnItemS
 } ;

 COMMENT
 + COMMENT
 + COMMENT
 + private Intent createVoiceWebSearchIntent ( Intent baseIntent , SearchableInfo searchable ) {
 + Intent voiceIntent = new Intent ( baseIntent ) ;
 + ComponentName searchActivity = searchable . getSearchActivity ( ) ;
 + voiceIntent . putExtra ( RecognizerIntent . EXTRA_CALLING_PACKAGE ,
 + searchActivity == null ? null : searchActivity . toShortString ( ) ) ;
 + return voiceIntent ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Also send EXTRA_CALLING_PACKAGE for voice search intents that do web


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - @ edu.umd.cs.findbugs.annotations.suppresswarnings ( { STRING0 } )
 + @ edu.umd.cs.findbugs.annotations.suppresswarnings ( { STRING0 } )
 public class MapPutParameters {

 public byte [ ] key ;
 <nb> public class MapMessageEncodeDecodeTest {
 @ test
 public void shouldEncodeDecodeWithHeaderCorrectly_PUT ( ) {
 byteBuffer = ByteBuffer
 - . allocate ( MapPutParameters . encodeSizeCost ( NAME , BYTES_DATA , BYTES_DATA , THE_LONG , THE_LONG , THE_BOOLEAN ) ) ;
 + . allocate ( MapPutParameters . encodeSizeCost ( NAME , BYTES_DATA , BYTES_DATA ) ) ;
 ClientMessage cmEncode = new ClientMessage ( ) ;
 cmEncode . wrapForEncode ( byteBuffer , NUMBER0 ) ;


<nb>
 package NAMESPACE ;

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

 COMMENT
 COMMENT
 <nb> public interface NbtValued {
 COMMENT
 COMMENT
 COMMENT
 + @ nullable
 CompoundTag getNbtData ( ) ;

 COMMENT
 <nb> public interface NbtValued {
 COMMENT
 COMMENT
 COMMENT
 - void setNbtData ( CompoundTag nbtData ) throws DataException ;
 + void setNbtData ( @ nullable CompoundTag nbtData ) throws DataException ;

 }


<nb> public class PersistenceWindowPool implements WindowPool
 brick . setWindow ( window ) ;
 break ;
 }
 - else
 - {
 - try
 - {
 - Thread . sleep ( NUMBER0 ) ;
 - }
 - catch ( InterruptedException e )
 - {
 - Thread . interrupted ( ) ;
 - continue ;
 - }
 - }
 }
 }
 memUsed += brickSize ;

Remove sleep in busy wait in refreshBricks


<nb> public class BuiltInCheckerSuppliers {
 PreconditionsCheckNotNull . class ,
 PreconditionsCheckNotNullPrimitive . class ,
 ProtoFieldNullComparison . class ,
 + ProvidesNull . class ,
 RectIntersectReturnValueIgnored . class ,
 ReturnValueIgnored . class ,
 SelfAssignment . class ,
 <nb> public class BuiltInCheckerSuppliers {
 PrimitiveArrayPassedToVarargsMethod . class ,
 ProtoFieldPreconditionsCheckNotNull . class ,
 ProtoStringFieldReferenceEquality . class ,
 - ProvidesNull . class ,
 ScopeAnnotationOnInterfaceOrAbstractClass . class ,
 ScopeOrQualifierAnnotationRetention . class ,
 SelfEquality . class ,


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public abstract class SafeAsyncTask < ResultT > implements Callable < ResultT > {
 - public static final int DEFAULT_POOL_SIZE = NUMBER0 ;
 + public static final int DEFAULT_POOL_SIZE = NUMBER1 ;

 protected Handler handler ;
 protected Executor executor ;

update pool size to decrease likelihood of deadlock


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class MUCOwnerProvider implements IQProvider {
 item . setActor ( parser . getAttributeValue ( STRING0 , STRING1 ) ) ;
 }
 if ( parser . getName ( ) . equals ( STRING2 ) ) {
 - item . setReason ( parser . getText ( ) ) ;
 + item . setReason ( parser . nextText ( ) ) ;
 }
 }
 else if ( eventType == XmlPullParser . END_TAG ) {
 <nb> public class MUCOwnerProvider implements IQProvider {
 int eventType = parser . next ( ) ;
 if ( eventType == XmlPullParser . START_TAG ) {
 if ( parser . getName ( ) . equals ( STRING2 ) ) {
 - destroy . setReason ( parser . getText ( ) ) ;
 + destroy . setReason ( parser . nextText ( ) ) ;
 }
 }
 else if ( eventType == XmlPullParser . END_TAG ) {


<nb> public class AntDomExtender extends DomExtender < AntDomElement > {
 final String nestedElementName = nested . next ( ) ;
 final DomExtension extension = registerChild ( registrar , genericInfo , nestedElementName ) ;
 if ( extension != null ) {
 - final AntDomNamedElement childDeclaration = CustomAntElementsRegistry . getInstance ( antProject ) . getDeclaringElement ( new XmlName ( nestedElementName , antDomElement . getXmlElementNamespace ( ) ) ) ;
 - if ( childDeclaration != null ) {
 - extension . setDeclaringElement ( childDeclaration ) ;
 - }
 final Class type = parentIntrospector . getNestedElementType ( nestedElementName ) ;
 if ( type != null ) {
 extension . putUserData ( ELEMENT_IMPL_CLASS_KEY , type ) ;


<nb> public class SvnFileUrlMappingImpl implements SvnFileUrlMapping , PersistentState
 private boolean updateMappings ( ) {
 boolean mappingsChanged ;
 synchronized ( myMonitor ) {
 - mappingsChanged = ! myMapping . equals ( myNewMapping ) ;
 - if ( mappingsChanged ) {
 - mappingsChanged = ! myMoreRealMapping . equals ( myNewFilteredMapping ) ;
 - }
 + mappingsChanged = ! myMoreRealMapping . equals ( myNewFilteredMapping ) ;
 + mappingsChanged |= ! myErrorRoots . equals ( myResult . getErrorRoots ( ) ) ;
 +
 myMapping . copyFrom ( myNewMapping ) ;
 myMoreRealMapping . copyFrom ( myNewFilteredMapping ) ;
 myErrorRoots . clear ( ) ;

Updated detection if svn roots were changed added error roots tracking


<nb> public class InspectionToolRegistrar implements ApplicationComponent , JDOMExtern
 public InspectionToolRegistrar ( InspectionToolProvider [ ] providers ) {
 myInspectionTools = new ArrayList < Class > ( ) ;
 myLocalInspectionTools = new ArrayList < Class > ( ) ;
 - SINGLE
 + if ( ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
 for ( int i = NUMBER0 ; i < providers . length ; i ++ ) {
 InspectionToolProvider provider = providers [ i ] ;
 Class [ ] classes = provider . getInspectionClasses ( ) ;
 <nb> public class InspectionToolRegistrar implements ApplicationComponent , JDOMExtern
 }
 }
 }
 - SINGLE
 + }
 }

 public static InspectionToolRegistrar getInstance ( ) {


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class FacebookProvider implements IDPProvider , FacebookCallback < LoginResu
 loginManager . registerCallback ( mCallbackManager , this ) ;

 String [ ] permissions = activity . getResources ( ) . getStringArray ( R . array . facebook_permissions ) ;
 - List < String > permissionsList = Arrays . asList ( permissions ) ;
 + List < String > permissionsList = new ArrayList < > ( Arrays . asList ( permissions ) ) ;

 SINGLE
 if ( ! permissionsList . contains ( EMAIL ) ) {


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ReaderRecyclerView extends RecyclerView {

 private void initialize ( Context context ) {
 if ( ! isInEditMode ( ) ) {
 - ItemAnimator animator = new DefaultItemAnimator ( ) ;
 - animator . setSupportsChangeAnimations ( true ) ;
 - setItemAnimator ( animator ) ;
 setLayoutManager ( new LinearLayoutManager ( context ) ) ;
 }
 }


<nb> public class OperationRequestCompleter implements Completor {
 if ( handler . hasOperationName ( ) || handler . endsOnAddressOperationNameSeparator ( ) ) {

 OperationCandidatesProvider provider = ctx . getOperationCandidatesProvider ( ) ;
 - final List < String > names = provider . getOperationNames ( ctx . getPrefix ( ) ) ;
 + final List < String > names = provider . getOperationNames ( handler . getAddress ( ) ) ;
 if ( names . isEmpty ( ) ) {
 return - NUMBER0 ;
 }

pass the full address instead of just the prefix to the candidates provider


<nb> public class GuidanceStylist implements FragmentAnimationProvider {
 . toString ( ) ) ;
 }

 - container . getViewTreeObserver ( ) . addOnPreDrawListener ( mParentPreDrawListener ) ;
 + mGuidanceContainer . getViewTreeObserver ( ) . addOnPreDrawListener ( mParentPreDrawListener ) ;
 }

 return guidanceView ;
 <nb> public class GuidanceStylist implements FragmentAnimationProvider {
 mDescriptionView = null ;
 mIconView = null ;
 mTitleView = null ;
 - mGuidanceContainer . getViewTreeObserver ( ) . removeOnPreDrawListener ( mParentPreDrawListener ) ;
 + if ( mGuidanceContainer != null ) {
 + mGuidanceContainer . getViewTreeObserver ( ) . removeOnPreDrawListener (
 + mParentPreDrawListener ) ;
 + }
 }

 COMMENT


<nb> public class RemoteImService extends Service implements OtrEngineListener , ImSer
 Intent notificationIntent = new Intent ( this , NewChatActivity . class ) ;
 PendingIntent launchIntent = PendingIntent . getActivity ( getApplicationContext ( ) , NUMBER0 , notificationIntent , NUMBER0 ) ;

 + mNotifyBuilder . setContentIntent ( launchIntent ) ;
 +
 mNotifyBuilder . setContentText ( getString ( R . string . app_unlocked ) ) ;

 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 -
 startForeground ( notifyId , mNotifyBuilder . build ( ) ) ;
 }


<nb> public class CassandraStorageSetup {
 private static ModifiableConfiguration getGenericConfiguration ( String ks , String backend ) {
 ModifiableConfiguration config = buildConfiguration ( ) ;
 config . set ( CASSANDRA_KEYSPACE , cleanKeyspaceName ( ks ) ) ;
 + log . debug ( STRING0 , config . get ( CASSANDRA_KEYSPACE ) ) ;
 config . set ( PAGE_SIZE , NUMBER0 ) ;
 config . set ( CONNECTION_TIMEOUT , new StandardDuration ( NUMBER1 , TimeUnit . SECONDS ) ) ;
 config . set ( STORAGE_BACKEND , backend ) ;

Log Cassandra keyspace name used in tests


<nb> public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
 private static final String ONE_OF_LANGUAGES = STRING0 ;
 SINGLE
 private static final String [ ] ONE_OF_INPUTS = new String [ ] {
 - STRING1 ,
 - STRING2
 + STRING1 ,
 + STRING2
 } ;
 SINGLE
 private static final String [ ] ONE_OF_OUTPUTS = new String [ ] {
 <nb> public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
 }
 }

 - private static class EipOptionComparator implements Comparator < EipOption > {
 + private static final class EipOptionComparator implements Comparator < EipOption > {

 private final EipModel model ;


<nb> public class ImapStore extends Store {
 do {
 response = mConnection . readResponse ( ) ;
 handleUntaggedResponse ( response ) ;
 - if ( response . mCommandContinuationRequested ) {
 - EOLConvertingOutputStream eolOut = new EOLConvertingOutputStream ( mConnection . mOut ) ;
 - eolOut . write ( STRING0 ) ;
 - eolOut . write ( STRING1 ) ;
 - eolOut . flush ( ) ;
 - }
 while ( response . more ( ) ) ;
 } while ( response . mTag == null ) ;

 <nb> public class ImapStore extends Store {
 return executeSimpleCommand ( command , sensitive , null ) ;
 }

 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 -
 public List < ImapResponse > executeSimpleCommand ( String command , boolean sensitive , UntaggedHandler untaggedHandler )
 throws IOException , ImapException , MessagingException {
 String commandToLog = command ;

Removed an unnecessary portion of code that attempted to handle command continuation requests after a UID COPY command


<nb> public class InvokerHelper {
 Object [ ] ia = ( Object [ ] ) a ;
 ans = new byte [ ia . length ] ;
 for ( int i = NUMBER0 ; i < ia . length ; i ++ ) {
 - ans [ i ] = ( ( Number ) ia [ i ] ) . byteValue ( ) ;
 + if ( ia [ i ] != null )
 + ans [ i ] = ( ( Number ) ia [ i ] ) . byteValue ( ) ;
 }
 }
 return ans ;

added a null check when converting to a byte array


<nb> public class AndroidManifest {
 List < FsFile > libraryBaseDirs = new ArrayList < FsFile > ( ) ;

 Properties properties = getProperties ( baseDir . join ( STRING0 ) ) ;
 + SINGLE
 + Properties overrideProperties = getProperties ( baseDir . join ( STRING1 ) ) ;
 + if ( overrideProperties != null ) properties . putAll ( overrideProperties ) ;
 if ( properties != null ) {
 int libRef = NUMBER0 ;
 String lib ;

Override project properies with those from robo project


<nb> import NAMESPACE ;
 import NAMESPACE ;

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

 <nb> public class IndexRangesCleanupPeriodical extends Periodical {
 final Set < String > indexNames = ImmutableSet . copyOf ( deflector . getAllDeflectorIndexNames ( ) ) ;
 final SortedSet < IndexRange > indexRanges = indexRangeService . findAll ( ) ;

 - final List < String > removedIndices = new ArrayList < > ( ) ;
 + final Set < String > removedIndices = new HashSet < > ( ) ;
 for ( IndexRange indexRange : indexRanges ) {
 if ( ! indexNames . contains ( indexRange . indexName ( ) ) ) {
 removedIndices . add ( indexRange . indexName ( ) ) ;

Fix compilation error in IndexRangesCleanupPeriodical


<nb> public class CommandFailureException extends MongoException {
 this . commandResult = commandResult ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public CommandFailureException ( final CommandResult commandResult ) {
 + super ( ServerError . getCode ( commandResult ) , commandResult . toString ( ) ) ;
 + this . commandResult = commandResult ;
 + }
 +
 CommandFailureException ( final MongoCommandFailureException e ) {
 this ( new CommandResult ( e . getCommandResult ( ) ) , e . getMessage ( ) ) ;
 }

Added back constructor to CommandFailureException that was removed in error


<nb> public class TangentBinormalGenerator {
 }
 }

 + SINGLE
 + mesh . clearBuffer ( Type . Tangent ) ;
 mesh . setBuffer ( Type . Tangent , NUMBER0 , tangents ) ;
 SINGLE
 }

TangentBinormalGenerator will replace the tangent buffer if it already exists on the mesh instead of crashing


<nb> public class ContextHandlerCollection extends HandlerCollection
 @ override
 public void setHandlers ( Handler [ ] handlers )
 {
 - _contexts = null ;
 super . setHandlers ( handlers ) ;
 if ( isStarted ( ) )
 mapContexts ( ) ;

Do not null context Trie during dynamic deploy


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

 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public final class Lists {
 COMMENT
 COMMENT
 COMMENT
 + @ checkreturnvalue
 public static < T > List < T > reverse ( List < T > list ) {
 if ( list instanceof ImmutableList ) {
 return ( ( ImmutableList < T > ) list ) . reverse ( ) ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public final class Lists {
 COMMENT
 COMMENT
 COMMENT
 + @ checkreturnvalue
 public static < T > List < T > reverse ( List < T > list ) {
 if ( list instanceof ImmutableList ) {
 return ( ( ImmutableList < T > ) list ) . reverse ( ) ;


<nb> public class XMPPTCPConnection extends AbstractXMPPConnection {
 else {
 socket = config . getSocketFactory ( ) . createSocket ( ) ;
 }
 + LOGGER . finer ( STRING0 + host + STRING1 + port ) ;
 try {
 socket . connect ( new InetSocketAddress ( host , port ) , config . getConnectTimeout ( ) ) ;
 } catch ( Exception e ) {
 exception = e ;
 }
 if ( exception == null ) {
 + LOGGER . finer ( STRING2 + host + STRING1 + port ) ;
 SINGLE
 this . host = host ;
 this . port = port ;

Add log statements around socket connect of XMPPTCPConnection


<nb> package NAMESPACE ;
 final class CompilerOptionsValidator {
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 static void validate ( CompilerOptions options ) {
 if ( options . checkMissingGetCssNameLevel . isOn ( ) &&

Add author tag to CompilerOptionsValidator


<nb> public class ProfilerEditingTargetWidget extends Composite
 private Toolbar createToolbar ( Commands commands )
 {
 Toolbar toolbar = new EditingTargetToolbar ( commands ) ;
 - toolbar . addLeftSeparator ( ) ;
 - toolbar . addLeftWidget ( commands . startProfiler ( ) . createToolbarButton ( ) ) ;
 - toolbar . addLeftWidget ( commands . stopProfiler ( ) . createToolbarButton ( ) ) ;
 return toolbar ;
 }


<nb> public class MessageList

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 private String mFolderName ;


<nb> public abstract class AbstractByteBufferedInputChannel < T extends Record > extends
 COMMENT
 COMMENT
 COMMENT
 - if ( getType ( ) == ChannelType . NETWORK ) {
 + final ChannelType type = getType ( ) ;
 + if ( type == ChannelType . NETWORK || type == ChannelType . INMEMORY ) {
 transferEvent ( new ByteBufferedChannelCloseEvent ( ) ) ;
 }
 }

Fixed bug concerning missing close ack for in memory channels


<nb> public class BundleExporter {
 }

 final Stream streamDescription = new Stream ( ) ;
 + streamDescription . setId ( stream . getId ( ) ) ;
 streamDescription . setTitle ( stream . getTitle ( ) ) ;
 streamDescription . setDescription ( stream . getDescription ( ) ) ;
 streamDescription . setDisabled ( stream . getDisabled ( ) ) ;


<nb> public final class BlockId {

 private static final int CONTAINER_ID_BITS = NUMBER0 ;
 private static final int SEQUENCE_NUMBER_BITS = NUMBER1 - CONTAINER_ID_BITS ;
 - private static final long CONTAINER_ID_MASK = ( NUMBER2 < < CONTAINER_ID_BITS ) - NUMBER2 ;
 - private static final long SEQUENCE_NUMBER_MASK = ( NUMBER2 < < SEQUENCE_NUMBER_BITS ) - NUMBER2 ;
 + private static final long CONTAINER_ID_MASK = ( NUMBER3 < < CONTAINER_ID_BITS ) - NUMBER2 ;
 + private static final long SEQUENCE_NUMBER_MASK = ( NUMBER3 < < SEQUENCE_NUMBER_BITS ) - NUMBER2 ;

 private BlockId ( ) {
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class WriteAheadLog {


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class ExceptionHandler implements HttpHandler {
 + public static final AttachmentKey < Throwable > THROWABLE = AttachmentKey . create ( Throwable . class ) ;
 +
 private final HttpHandler handler ;
 private final List < ExceptionHandlerHolder < ? > > exceptionHandlers = new CopyOnWriteArrayList < > ( ) ;

 <nb> public class ExceptionHandler implements HttpHandler {
 } catch ( Throwable throwable ) {
 for ( ExceptionHandlerHolder < ? > holder : exceptionHandlers ) {
 if ( holder . getClazz ( ) . isInstance ( throwable ) ) {
 + exchange . putAttachment ( THROWABLE , throwable ) ;
 holder . getHandler ( ) . handleRequest ( exchange ) ;
 return ;
 }

Exception handler now adds the exception as an attachment to the exchange


<nb> public class UriLoaderTest {

 verify ( urlLoader ) . getResourceFetcher ( eq ( new GlideUrl ( httpsUri . toString ( ) ) ) , eq ( IMAGE_SIDE ) , eq ( IMAGE_SIDE ) ) ;
 }
 +
 + SINGLE
 + @ test
 + public void testHandlesMostlyInvalidHttpUris ( ) {
 + Uri mostlyInvalidHttpUri =
 + Uri . parse ( STRING0 ) ;
 +
 + loader . getResourceFetcher ( mostlyInvalidHttpUri , IMAGE_SIDE , IMAGE_SIDE ) ;
 + verify ( urlLoader ) . getResourceFetcher ( eq ( new GlideUrl ( mostlyInvalidHttpUri . toString ( ) ) ) , eq ( IMAGE_SIDE ) ,
 + eq ( IMAGE_SIDE ) ) ;
 + }
 }

Add a test for a particular type of invalid uris


<nb> public final class FileUtil {
 }

 Stack < String > stack = new Stack < String > ( ) ;
 - String [ ] parts = path . split ( File . separator ) ;
 +
 + String separatorRegex = File . separator ;
 + if ( FileUtil . isWindows ( ) ) {
 + separatorRegex = STRING0 ;
 + }
 + String [ ] parts = path . split ( separatorRegex ) ;
 for ( String part : parts ) {
 if ( part . equals ( STRING1 ) && ! stack . isEmpty ( ) ) {
 SINGLE

Fixed the test error of FileUtilTest on Windows


<nb> public abstract class AWSEmailNotifier implements MonkeyEmailNotifier {
 COMMENT
 private static final Logger LOGGER = LoggerFactory . getLogger ( AWSEmailNotifier . class ) ;
 private static final String EMAIL_PATTERN =
 - STRING0
 + STRING1
 + STRING2 ;

 private final Pattern emailPattern ;


<nb> package NAMESPACE ;

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

 - import NAMESPACE ;
 -
 public class RestSqlAction extends BaseRestHandler {

 @ inject


<nb> public final class LoginUser {
 }
 return userSet . iterator ( ) . next ( ) ;
 } catch ( LoginException e ) {
 - throw new IOException ( STRING0 + e ) ;
 + throw new IOException ( STRING0 + e . getMessage ( ) , e ) ;
 }
 }


<nb>
 COMMENT
 package NAMESPACE ;

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

 import NAMESPACE ;
 + import NAMESPACE ;

 public class StreamAlertService {
 private final ApiClient api ;
 <nb> public class StreamAlertService {
 public StreamAlertService ( ApiClient api ) {
 this . api = api ;
 }
 +
 + public AlertListSummary listPaginated ( String streamId , int skip , int limit ) throws APIException , IOException {
 + return api . path ( routes . StreamAlertResource ( ) . listPaginated ( streamId ) , AlertListSummary . class )
 + . queryParam ( STRING0 , skip )
 + . queryParam ( STRING1 , limit )
 + . execute ( ) ;
 + }
 }

Adding StreamAlertService which retrieves alerts for streams


<nb> public class WebSocketServletRFCTest

 Assert . assertThat ( STRING0 , respHeader , startsWith ( STRING1 ) ) ;
 Assert . assertThat ( STRING2 , respHeader , containsString ( STRING3 ) ) ;
 - SINGLE
 + Assert . assertThat ( STRING4 , respHeader , containsString ( STRING5 ) ) ;

 SINGLE
 TextFrame txt = new TextFrame ( STRING6 ) ;
 <nb> public class WebSocketServletRFCTest
 BufferUtil . writeTo ( txtbuf , out ) ;

 SINGLE
 - ByteBuffer closeFrame = ByteBuffer . allocate ( NUMBER0 ) ;
 - System . out . println ( STRING7 ) ;
 - read ( in , closeFrame ) ;
 + ByteBuffer rbuf = ByteBuffer . allocate ( NUMBER0 ) ;
 + read ( in , rbuf ) ;

 SINGLE
 - parser . parse ( closeFrame ) ;
 + rbuf . flip ( ) ;
 + parser . parse ( rbuf ) ;

 + SINGLE
 capture . assertNoErrors ( ) ;
 capture . assertHasFrame ( CloseFrame . class , NUMBER1 ) ;

Upgrade response header does its thing re enabling test for it in websocket


<nb> public class AtmosphereFramework implements ServletContextProvider {
 try {
 sc . getServletContext ( ) . addListener ( SessionSupport . class ) ;
 } catch ( Throwable t ) {
 - logger . error ( STRING0 , t ) ;
 - logger . debug ( STRING1 , SessionSupport . class . getName ( ) ) ;
 + logger . warn ( STRING2 , SessionSupport . class . getName ( ) , t ) ;
 }
 } else {
 logger . debug ( STRING1 , SessionSupport . class . getName ( ) ) ;


<nb> public class DescriptiveMessagesWhenVerificationFailsTest extends TestBase {

 @ test
 public void shouldPrintNullArguments ( ) throws Exception {
 - mock . simpleMethod ( null , null ) ;
 + mock . simpleMethod ( null , ( Integer ) null ) ;
 try {
 verify ( mock ) . simpleMethod ( STRING0 ) ;
 fail ( ) ;

added a unit test to complete a functional test fixing build


<nb> public class MovieDetailsFragment extends SherlockFragment {
 mMovieTitle . setText ( tmdbMovie . title ) ;
 mMovieDescription . setText ( tmdbMovie . overview ) ;

 - SINGLE
 + SINGLE
 + StringBuilder releaseAndRuntime = new StringBuilder ( ) ;
 if ( traktMovie . released != null && traktMovie . released . getTime ( ) != NUMBER0 ) {
 - mMovieReleaseDate . setText (
 - DateUtils . formatDateTime ( getActivity ( ) , traktMovie . released . getTime ( ) ,
 - DateUtils . FORMAT_SHOW_DATE ) ) ;
 - } else {
 - mMovieReleaseDate . setText ( STRING0 ) ;
 + releaseAndRuntime . append ( DateUtils . formatDateTime ( getActivity ( ) ,
 + traktMovie . released . getTime ( ) , DateUtils . FORMAT_SHOW_DATE ) ) ;
 + releaseAndRuntime . append ( STRING1 ) ;
 }
 + releaseAndRuntime . append ( getString ( R . string . runtime_minutes , tmdbMovie . runtime ) ) ;
 + mMovieReleaseDate . setText ( releaseAndRuntime . toString ( ) ) ;

 SINGLE
 CheatSheet . setup ( mCheckinButton ) ;


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

 package NAMESPACE ;


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

 COMMENT
 COMMENT
 <nb> public class AssetKey < T > implements Savable , Cloneable {
 if ( list . size ( ) > NUMBER0 ) {
 list . removeLast ( ) ;
 } else {
 - throw new IllegalStateException ( STRING0 ) ;
 + Logger . getLogger ( AssetKey . class . getName ( ) ) . log ( Level . SEVERE , STRING1 ) ;
 }
 } else {
 list . add ( string ) ;

make AssetKey log SEVERE on relative path outside root


<nb> public class TransformFactory {
 result = new DeleteFloatFeatureTransform ( ) ;
 break ;
 }
 + case STRING0 : {
 + result = new DeleteFloatFeatureFamilyTransform ( ) ;
 + break ;
 + }
 case STRING1 : {
 result = new DeleteStringFeatureTransform ( ) ;
 break ;
 <nb> public class TransformFactory {
 result = new DeleteStringFeatureColumnTransform ( ) ;
 break ;
 }
 - case STRING0 : {
 - result = new DeleteFloatFeatureFamilyTransform ( ) ;
 - break ;
 - }
 case STRING2 : {
 result = new NormalizeFloatFeatureTransform ( ) ;
 break ;
 <nb> package NAMESPACE ;
 import NAMESPACE ;

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

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

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


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

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

 <nb> public class ProfileInputDialogFragment extends DialogFragment {
 return alertDialogBuilder . create ( ) ;
 }

 + @ override
 + public void onStart ( ) {
 + super . onStart ( ) ;
 + AlertDialog dialog = ( AlertDialog ) getDialog ( ) ;
 + Button positive = dialog . getButton ( DialogInterface . BUTTON_POSITIVE ) ;
 + Button negative = dialog . getButton ( DialogInterface . BUTTON_NEGATIVE ) ;
 + if ( positive != null ) WPPrefUtils . layoutAsFlatButton ( positive ) ;
 + if ( negative != null ) WPPrefUtils . layoutAsFlatButton ( negative ) ;
 + }
 +
 public interface Callback {
 void onSuccessfulInput ( String input , int callbackId ) ;
 }

Change the button style for my profile dialogs


<nb> public class OJSONWriter {
 this . prettyPrint = prettyPrint ;
 return this ;
 }
 +
 + public void write ( final String iText ) throws IOException {
 + out . append ( iText ) ;
 + }
 }

New write api to write dirty values in JSON


<nb> public class TaskListActivity extends AstridActivity implements MainMenuListener
 public static final String OPEN_TASK = STRING0 ; SINGLE

 private static final String FILTER_MODE = STRING1 ; SINGLE
 +
 private static final int FILTER_MODE_NORMAL = NUMBER0 ;
 private static final int FILTER_MODE_PEOPLE = NUMBER1 ;
 private static final int FILTER_MODE_FEATURED = NUMBER2 ;
 <nb> public class TaskListActivity extends AstridActivity implements MainMenuListener
 }
 }

 + @ override
 + protected Bundle configureIntentAndExtrasWithFilter ( Intent intent ,
 + Filter filter ) {
 + Bundle extras = super . configureIntentAndExtrasWithFilter ( intent , filter ) ;
 + getIntent ( ) . putExtra ( FILTER_MODE , filterMode ) ;
 + return extras ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT

Fixed a bug with saving filterMode between rotations


<nb> public class Attribute < T > {
 public static < T > Attribute < T > named ( String name ) {
 return new Attribute < > ( name ) ;
 }
 +
 + public static < T > Attribute < T > of ( Map . Entry < String , T > attr ) {
 + return new Attribute < > ( attr . getKey ( ) ) ;
 + }

 private final String name ;


<nb> public class RewritePolyfills implements HotSwapCompilerPass {
 SINGLE
 SINGLE

 - SINGLE
 - . addClasses ( ES6_IMPL , ES6_IMPL , STRING0 , STRING1 , STRING2 )
 + SINGLE
 + . addClasses ( ES6_IMPL , ES3 , STRING3 , STRING1 , STRING2 )
 SINGLE
 . addStatics ( ES6_IMPL , ES6_IMPL , STRING0 , STRING4 ,
 STRING5 , STRING6 , STRING7 , STRING8 , STRING9 , STRING10 , STRING11 , STRING12 , STRING13 , STRING14 ,


<nb> public class WebSocketProcessor implements Serializable {

 webSocketProtocol . onOpen ( webSocket ) ;

 - if ( webSocket . resource ( ) . getAtmosphereResourceEvent ( ) . isSuspended ( ) ) {
 + if ( ! webSocket . resource ( ) . getAtmosphereResourceEvent ( ) . isSuspended ( ) ) {
 webSocketProtocol . onError ( webSocket , new WebSocketException ( STRING0 , wsr ) ) ;
 }
 }


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class CodeMirrorEditor extends Composite
 for ( Command c : deferredCommands_ )
 c . execute ( ) ;
 deferredCommands_ . clear ( ) ;
 +
 + Scheduler . get ( ) . scheduleDeferred ( new ScheduledCommand ( )
 + {
 + public void execute ( )
 + {
 + updateBodyMinHeight ( ) ;
 + }
 + } ) ;
 }

 public HandlerRegistration addEditorFocusedHandler ( EditorFocusedHandler h )

Improve robustness of code mirror min body height updating code


<nb> public class ClassLoaderObjectInputStream extends ObjectInputStream {
 @ override
 protected Class < ? > resolveClass ( ObjectStreamClass desc ) throws IOException , ClassNotFoundException {
 try {
 - return Class . forName ( desc . getName ( ) , true , loader ) ;
 + return Class . forName ( desc . getName ( ) , false , loader ) ;
 } catch ( ClassNotFoundException e ) {
 return super . resolveClass ( desc ) ;
 }

change initialize false for Class forName call


<nb> static public int nextID ( ) {
 return id . getAndIncrement ( ) ;
 }

 + SINGLE
 + public static void loadLibrary ( String libname ) {
 + System . loadLibrary ( libname ) ;
 + }
 +

 SINGLE

Add a static method loadLibrary to clojure lang RT to load a library using the System ClassLoader


<nb> public class AccountActivity extends BasePhilmActivity {
 COMMENT
 protected void onCreate ( Bundle icicle ) {
 super . onCreate ( icicle ) ;
 + setContentView ( R . layout . activity_main ) ;

 mAccountAuthenticatorResponse =
 getIntent ( ) . getParcelableExtra ( AccountManager . KEY_ACCOUNT_AUTHENTICATOR_RESPONSE ) ;


<nb> public class SchemaGenerator {
 List < Class > domainClasses = getDomainClasses ( ) ;
 for ( Class domain : domainClasses ) {
 createTable ( domain , sqLiteDatabase ) ;
 + afterTableCreated ( domain , sqLiteDatabase ) ;
 }
 +
 + }
 +
 + public void afterTableCreated ( Class < ? > table , SQLiteDatabase sqLiteDatabase ) {
 + executeScript ( sqLiteDatabase , table . getSimpleName ( ) + STRING0 ) ;
 }

 public void doUpgrade ( SQLiteDatabase sqLiteDatabase , int oldVersion , int newVersion ) {

add method afterTableCreated that executes a sql file with the name of the domain class


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

 + import static NAMESPACE ;
 +
 public final class ErrorCode
 {
 private final int code ;
 <nb> public final class ErrorCode
 @ jsoncreator
 public ErrorCode ( @ jsonproperty ( STRING0 ) int code , @ jsonproperty ( STRING1 ) String name )
 {
 + if ( code < NUMBER0 ) {
 + throw new IllegalArgumentException ( STRING2 ) ;
 + }
 this . code = code ;
 - this . name = name ;
 + this . name = requireNonNull ( name , STRING3 ) ;
 }

 @ jsonproperty
 <nb> public final class ErrorCode
 {
 return name ;
 }
 +
 + @ override
 + public String toString ( )
 + {
 + return name + STRING4 + code ;
 + }
 }


<nb> public class TripleLoaderTransposedNodeFactory implements TransposedNodeFactory
 String subject , Project project ,
 int subjectRowIndex , int subjectCellIndex , Cell subjectCell ) {

 - Recon recon = subjectCell . recon != null &&
 + Recon recon = subjectCell != null && subjectCell . recon != null &&
 ( subjectCell . recon . judgment == Judgment . Matched || subjectCell . recon . judgment == Judgment . New )
 ? subjectCell . recon : null ;

Fixed minor bug introduced by recent check in for asserting types in triple loader payload


<nb> public class CythonParsingTest extends ParsingTestCase {
 doTest ( ) ;
 }

 + public void testEnums ( ) {
 + doTest ( ) ;
 + }
 +
 public void doTest ( ) {
 doTest ( true ) ;
 }


<nb> public class ShadowApplication extends ShadowContextWrapper {
 this . context = context ;
 exception = new Throwable ( ) ;
 }
 +
 + public BroadcastReceiver getBroadcastReceiver ( ) {
 + return broadcastReceiver ;
 + }
 +
 + public IntentFilter getIntentFilter ( ) {
 + return intentFilter ;
 + }
 +
 + public Context getContext ( ) {
 + return context ;
 + }
 }
 }


<nb> public class OneWireRefreshService extends Thread implements ManagedService {
 private static long refreshInterval = NUMBER0 ;

 + public OneWireRefreshService ( ) {
 + super ( STRING0 ) ;
 + }
 +
 +
 public void activate ( ) {
 }


<nb> class TwitterRestClientUsage {
 JSONArray timeline = ( JSONArray ) response ;

 try {
 - JSONObject firstEvent = timeline . get ( NUMBER0 ) ;
 + JSONObject firstEvent = ( JSONObject ) timeline . get ( NUMBER0 ) ;
 String tweetText = firstEvent . getString ( STRING0 ) ;

 SINGLE


<nb> public class AgentInfoSenderTest {
 public static final int PORT = SocketUtils . findAvailableTcpPort ( NUMBER0 ) ;
 public static final String HOST = STRING0 ;

 - private final TestAwaitUtils awaitUtils = new TestAwaitUtils ( NUMBER1 , NUMBER2 ) ;
 + private final int testAwaitTimeMs = NUMBER3 ;
 +
 + private final TestAwaitUtils awaitUtils = new TestAwaitUtils ( this . testAwaitTimeMs , NUMBER2 ) ;

 @ test
 public void agentInfoShouldBeSent ( ) throws InterruptedException {
 <nb> public class AgentInfoSenderTest {
 @ override
 public boolean checkCompleted ( ) {
 return requestCount . get ( ) == expectedRequestCount ;
 - } ;
 + }
 } ) ;

 Assert . assertTrue ( pass ) ;

Fix test for cases where multiple requests may be counted per check


<nb> public class GroovyAnnotator implements Annotator {
 GrExpression lValue = assignment . getLValue ( ) ;
 GrExpression rValue = assignment . getRValue ( ) ;
 if ( rValue != null ) {
 - PsiType lType = lValue . getType ( ) ;
 + PsiType lType = lValue . getNominalType ( ) ;
 PsiType rType = rValue . getType ( ) ;
 if ( lType != null && rType != null ) {
 checkAssignability ( holder , lType , rType , rValue ) ;

should use nominal type in assignability check


<nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class ResourceDatabasePopulator implements DatabasePopulator {
 COMMENT
 COMMENT
 COMMENT
 - public void setScripts ( Resource [ ] scripts ) {
 + public void setScripts ( Resource . . . scripts ) {
 this . scripts = Arrays . asList ( scripts ) ;
 }

ResourceDatabasePopulator s setScripts takes varargs


<nb> import NAMESPACE ;

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

 COMMENT
 COMMENT
 <nb> public class GitTestRunEnv {
 }
 }

 + log ( STRING0 ) ;
 + final Map < String , String > env = System . getenv ( ) ;
 + for ( Map . Entry < String , String > entry : env . entrySet ( ) ) {
 + log ( entry . getKey ( ) + STRING1 + entry . getValue ( ) ) ;
 + }
 + log ( STRING2 ) ;
 + log ( STRING3 ) ;
 + Properties properties = System . getProperties ( ) ;
 + for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) {
 + log ( entry . getKey ( ) + STRING1 + entry . getValue ( ) ) ;
 + }
 +
 throw new IllegalStateException ( STRING4 +
 STRING5 ) ;
 }

Inspect test environment on fucking Mac agent


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

 import NAMESPACE ;
 <nb> public class CvsConfigurationsListEditor extends DialogWrapper implements DataPr
 return null ;
 }

 + protected void doHelpAction ( ) {
 + HelpManager . getInstance ( ) . invokeHelp ( STRING0 ) ;
 + }
 +
 protected Action [ ] createActions ( ) {
 return new Action [ ] { getOKAction ( ) , getCancelAction ( ) , getHelpAction ( ) } ;
 }


<nb> public enum CommonClientConfigKey implements IClientConfigKey {
 Version ( STRING0 ) ,
 Port ( STRING1 ) ,
 SecurePort ( STRING2 ) ,
 + ForcePortConfig ( STRING3 ) , SINGLE
 VipAddress ( STRING4 ) ,
 DeploymentContextBasedVipAddresses ( STRING5 ) ,
 MaxAutoRetries ( STRING6 ) ,

Add parameter to force client config of port


<nb> public class AHBottomNavigation extends FrameLayout {
 setClipToPadding ( false ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setUseElevation ( boolean useElevation , float elevation ) {
 + ViewCompat . setElevation ( this , useElevation ? elevation : NUMBER0 ) ;
 + setClipToPadding ( false ) ;
 + }
 +
 SINGLE
 SINGLE
 SINGLE


<nb> import NAMESPACE ;
 COMMENT
 public abstract class TrayModulePreferences extends TrayPreference {

 - private final Context mContext ;
 -
 public TrayModulePreferences ( final Context context , final String module , final int version ) {
 super ( new TrayStorage ( context , module ) , version ) ;
 - mContext = context . getApplicationContext ( ) ;
 }

 protected Context getContext ( ) {
 - return mContext ;
 + return ( ( TrayStorage ) getStorage ( ) ) . getContext ( ) ;
 }
 }
 <nb> public class TrayStorage extends ModularizedStorage < TrayItem > {
 mProviderHelper = new TrayProviderHelper ( mContext ) ;
 }

 + public Context getContext ( ) {
 + return mContext ;
 + }
 +
 @ override
 public void clear ( ) {
 final Uri uri = mProviderHelper . getUri ( ) . buildUpon ( ) . appendPath ( getModuleName ( ) )

changed getContext to return a context when onCreate is called


<nb> import NAMESPACE ;

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

 public class JBTextField extends JTextField implements ComponentWithEmptyText {
 private StatusText myEmptyText ;
 <nb> public class JBTextField extends JTextField implements ComponentWithEmptyText {
 }
 } ;
 myEmptyText . clear ( ) ;
 + addFocusListener ( new FocusListener ( ) {
 + @ override
 + public void focusGained ( FocusEvent e ) {
 + repaint ( ) ;
 + }
 +
 + @ override
 + public void focusLost ( FocusEvent e ) {
 + repaint ( ) ;
 + }
 + } ) ;
 }

 @ notnull


<nb> public class DatePicker extends FrameLayout {
 mMonthPicker . setFormatter ( NumberPicker . TWO_DIGIT_FORMATTER ) ;
 DateFormatSymbols dfs = new DateFormatSymbols ( ) ;
 String [ ] months = dfs . getShortMonths ( ) ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + if ( months [ NUMBER0 ] . startsWith ( STRING0 ) ) {
 + for ( int i = NUMBER0 ; i < months . length ; i ++ ) {
 + months [ i ] = String . valueOf ( i + NUMBER1 ) ;
 + }
 + }
 +
 mMonthPicker . setRange ( NUMBER1 , NUMBER2 , months ) ;
 mMonthPicker . setSpeed ( NUMBER3 ) ;
 mMonthPicker . setOnChangeListener ( new OnChangedListener ( ) {

Make the Date Picker fields more consistent in locales with numeric months


<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 ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

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


<nb> public class BitcoinSerializer {

 SINGLE
 SINGLE
 - int mark = cursor ;
 - for ( ; header [ cursor ] != NUMBER0 && cursor - mark < COMMAND_LEN ; cursor ++ ) ;
 - byte [ ] commandBytes = new byte [ cursor - mark ] ;
 - System . arraycopy ( header , mark , commandBytes , NUMBER0 , cursor - mark ) ;
 + for ( ; header [ cursor ] != NUMBER0 && cursor < COMMAND_LEN ; cursor ++ ) ;
 + byte [ ] commandBytes = new byte [ cursor ] ;
 + System . arraycopy ( header , NUMBER0 , commandBytes , NUMBER0 , cursor ) ;
 try {
 command = new String ( commandBytes , STRING0 ) ;
 } catch ( UnsupportedEncodingException e ) {
 throw new RuntimeException ( e ) ; SINGLE
 }
 - cursor = mark + COMMAND_LEN ;
 + cursor = COMMAND_LEN ;

 size = ( int ) readUint32 ( header , cursor ) ;
 cursor += NUMBER1 ;


<nb> class ImapFolderPusher extends ImapFolder implements UntaggedHandler {
 } else {
 if ( response . getTag ( ) == null ) {
 if ( response . size ( ) > NUMBER0 ) {
 - boolean started = false ;
 -
 Object responseType = response . get ( NUMBER0 ) ;
 if ( equalsIgnoreCase ( responseType , STRING0 ) || equalsIgnoreCase ( responseType , STRING1 ) ||
 equalsIgnoreCase ( responseType , STRING2 ) ) {

 - if ( ! started ) {
 - wakeLock . acquire ( PUSH_WAKE_LOCK_TIMEOUT ) ;
 - started = true ;
 - }
 + wakeLock . acquire ( PUSH_WAKE_LOCK_TIMEOUT ) ;

 if ( K9MailLib . isDebug ( ) ) {
 Log . d ( LOG_TAG , STRING3 + response + STRING4 + getLogId ( ) ) ;


<nb> public final class NetworkImage extends ZLSingleImage {
 ext = path . substring ( j ) ;
 path . delete ( j , path . length ( ) ) ;
 } else {
 - return null ;
 + ext = STRING0 ;
 }
 } else if ( path . length ( ) > ext . length ( ) && path . substring ( path . length ( ) - ext . length ( ) ) . equals ( ext ) ) {
 path . delete ( path . length ( ) - ext . length ( ) , path . length ( ) ) ;


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ImageBasedHeightMap extends AbstractHeightMap implements ImageHeigh
 }

 protected ImageRaster getImageRaster ( ) {
 - return new DefaultImageRaster ( colorImage , NUMBER0 ) ;
 + return JmeSystem . createImageRaster ( colorImage , NUMBER0 ) ;
 }

 public boolean load ( boolean flipX , boolean flipY ) {

changed ImageBasedHeightMap to use JmeSystem to get ImageRaster


<nb> public class ReaderCommentListActivity extends AppCompatActivity {
 mCommentId = NUMBER0 ;
 break ;
 case COMMENT_REPLY :
 - setReplyToCommentId ( mCommentId , true ) ;
 + setReplyToCommentId ( mCommentId , ! ReaderUtils . isLoggedOutReader ( ) ) ;

 SINGLE
 mDirectOperation = null ;

Don t pull up keyboard to repond if logged out


<nb> public abstract class ZWaveCommandClass {
 ZIP_SERVER ( NUMBER0 , STRING0 , null ) ,
 SWITCH_BINARY ( NUMBER1 , STRING1 , ZWaveBinarySwitchCommandClass . class ) ,
 SWITCH_MULTILEVEL ( NUMBER2 , STRING2 , ZWaveMultiLevelSwitchCommandClass . class ) ,
 - SWITCH_ALL ( NUMBER3 , STRING3 , null ) ,
 + SWITCH_ALL ( NUMBER3 , STRING3 , ZWaveSwithcAllCommandClass . class ) ,
 SWITCH_TOGGLE_BINARY ( NUMBER4 , STRING4 , null ) ,
 SWITCH_TOGGLE_MULTILEVEL ( NUMBER5 , STRING5 , null ) ,
 CHIMNEY_FAN ( NUMBER6 , STRING6 , null ) ,


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

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

 import NAMESPACE ;


<nb> public class SinglePageItemRecyclerViewAdapter
 }

 private void toggleKids ( ToggleItemViewHolder holder , final ItemManager . Item item ) {
 + holder . mToggle . setVisibility ( item . getKidCount ( ) > NUMBER0 ? View . VISIBLE : View . GONE ) ;
 if ( item . getKidCount ( ) == NUMBER0 ) {
 return ;
 }
 - holder . mToggle . setVisibility ( View . VISIBLE ) ;
 if ( ! item . isCollapsed ( ) && mAutoExpand ) {
 expand ( item ) ;
 }


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

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface ByteBufferPool
 public ByteBuffer acquire ( int capacity , boolean direct )
 {
 ByteBuffer buffer = byteBufferPool . acquire ( capacity , direct ) ;
 + BufferUtil . clearToFill ( buffer ) ;
 append ( buffer , true ) ;
 return buffer ;
 }


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class TablePipe < S > extends AbstractPipe < S , S > implements SideEffectPipe < S , S , Table > {
 + public class TablePipe < S > extends AbstractPipe < S , S > implements SideEffectPipe < S , Table > {

 private Table table ;
 private final Closure [ ] closures ;

updated TablePipe to be respective of SideEffectPipe interface generic change in Pipes


<nb> public class ProjectBuildFileParser implements AutoCloseable {
 LOG . verbose ( STRING0 , values ) ;
 LOG . debug ( STRING1 , values . size ( ) ) ;
 profile = resultObject . getProfile ( ) ;
 + if ( profile != null ) {
 + LOG . debug ( STRING2 , profile ) ;
 + }
 return values ;
 } finally {
 buckEventBus . post ( ParseBuckFileEvent . finished ( parseBuckFileStarted , values , profile ) ) ;


<nb> public final class ClipboardHelpers {

 try {
 return ( String ) contents . getTransferData ( DataFlavor . stringFlavor ) ;
 - } catch ( final UnsupportedFlavorException | IOException ex ) {
 + } catch ( UnsupportedFlavorException | IOException ex ) {
 SINGLE
 }


<nb> public class GrizzlyServer {
 httpServer . getServerConfiguration ( ) . addHttpHandler ( new StaticHttpHandler ( STRING0 ) , STRING1 ) ;

 try {
 - httpServer . start ( ) ;
 + SINGLE
 System . out . println ( STRING2 + base_uri ) ;
 System . out . println ( STRING3 + base_uri + STRING4 ) ;
 System . out . println ( STRING5 + base_uri + STRING6 ) ;


<nb> public class WikipediaQuickCheck {
 final URL url = new URL ( urlString ) ;
 final String mediaWikiContent = check . getMediaWikiContent ( url ) ;
 final String plainText = check . getPlainText ( mediaWikiContent ) ;
 - final WikipediaQuickCheckResult checkResult = check . checkPage ( plainText , new German ( ) ) ;
 + final Language lang = check . getLanguage ( url ) ;
 + final WikipediaQuickCheckResult checkResult = check . checkPage ( plainText , lang ) ;
 final ContextTools contextTools = new ContextTools ( ) ;
 contextTools . setContextSize ( CONTEXT_SIZE ) ;
 for ( RuleMatch ruleMatch : checkResult . getRuleMatches ( ) ) {

use the language from the URL not German


<nb> public class ReaderVideoViewerActivity extends AppCompatActivity {
 }

 @ override
 + protected void onDestroy ( ) {
 + mWebView . onPause ( ) ;
 + super . onDestroy ( ) ;
 + }
 +
 + @ override
 public void onSaveInstanceState ( @ nonnull Bundle outState ) {
 outState . putString ( ReaderConstants . ARG_VIDEO_URL , mVideoUrl ) ;
 mWebView . saveState ( outState ) ;


<nb> public final class SqaleRatingDecorator implements Decorator {
 }

 protected double computeDensity ( double debt , double developmentCost ) {
 - if ( developmentCost != FLOAT0 ) {
 + if ( Double . doubleToRawLongBits ( developmentCost ) != NUMBER0 L ) {
 return debt / developmentCost ;
 }
 return FLOAT0 ;


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

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


<nb> public class ContainerUtil extends ContainerUtilRt {

 @ notnull
 public static < T > Collection < T > subtract ( @ notnull Collection < T > from , @ notnull Collection < T > what ) {
 - final Set < T > set = newHashSet ( ) ;
 + final Set < T > set = newHashSet ( from ) ;
 set . removeAll ( what ) ;
 return set ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SecurityFilterAutoConfiguration {
 @ bean
 @ conditionalonbean ( name = DEFAULT_FILTER_NAME )
 public DelegatingFilterProxyRegistrationBean securityFilterChainRegistration (
 - ApplicationContext applicationContext ,
 SecurityProperties securityProperties ) {
 DelegatingFilterProxyRegistrationBean registration = new DelegatingFilterProxyRegistrationBean (
 DEFAULT_FILTER_NAME ) ;

Remove unused parameter in Security configuration


<nb> public class GBMTest extends TestUtil {
 }
 }

 + @ ignore
 @ test
 public void testStochasticGBM ( ) {
 Frame tfr = null , vfr = null ;


<nb> import NAMESPACE ;
 public class StatefulComponentInstanceInterceptor extends AbstractEJBInterceptor {
 private static final Logger log = Logger . getLogger ( StatefulComponentInstanceInterceptor . class ) ;

 - private AtomicReference < Serializable > sessionIdReference ;
 + private final AtomicReference < Serializable > sessionIdReference ;

 public StatefulComponentInstanceInterceptor ( AtomicReference < Serializable > sessionIdReference ) {
 this . sessionIdReference = sessionIdReference ;
 <nb> public class StatefulComponentSessionIdGeneratingInterceptorFactory implements I

 private class StatefulComponentSessionIdGeneratingInterceptor implements Interceptor {

 - private AtomicReference < Serializable > sessionIdReference ;
 + final private AtomicReference < Serializable > sessionIdReference ;

 StatefulComponentSessionIdGeneratingInterceptor ( AtomicReference < Serializable > sessionIdReference ) {
 this . sessionIdReference = sessionIdReference ;


<nb> public class NetworkManagementService extends INetworkManagementService . Stub
 mContext . enforceCallingOrSelfPermission ( CONNECTIVITY_INTERNAL , TAG ) ;
 try {
 wifiFirmwareReload ( wlanIface , STRING0 ) ;
 - mConnector . execute ( STRING1 , STRING2 , wlanIface ) ;
 if ( wifiConfig == null ) {
 mConnector . execute ( STRING1 , STRING3 , wlanIface , softapIface ) ;
 } else {


<nb> public class ChooserActivity extends ResolverActivity {

 final ChooserTargetServiceConnection conn =
 new ChooserTargetServiceConnection ( this , dri ) ;
 - if ( bindServiceAsUser ( serviceIntent , conn , BIND_AUTO_CREATE | BIND_NOT_FOREGROUND ,
 - UserHandle . CURRENT ) ) {
 + if ( bindService ( serviceIntent , conn , BIND_AUTO_CREATE | BIND_NOT_FOREGROUND ) ) {
 if ( DEBUG ) {
 Log . d ( TAG , STRING0 + dri
 + STRING1 + serviceIntent ) ;

Don t bind ChooserTargetServices as user CURRENT


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SlidingMenuFragment extends ListFragment {
 SINGLE
 if ( getActivity ( ) instanceof BaseActivity ) {
 final BaseActivity activity = ( BaseActivity ) getActivity ( ) ;
 - activity . getMenu ( ) . closeMenu ( false ) ;
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 + Handler h = new Handler ( ) ;
 + h . postDelayed ( new Runnable ( ) {
 + @ override
 + public void run ( ) {
 + activity . getMenu ( ) . closeMenu ( ) ;
 + }
 + } , NUMBER0 ) ;
 }

 int itemId = ( ( MenuItem ) mAdapter . getItem ( position ) ) . mId ;


<nb> public abstract class AbstractTestQueries
 computeActual ( STRING0 ) ;
 }

 - @ test ( expectedExceptions = RuntimeException . class , expectedExceptionsMessageRegExp = STRING1 )
 + @ test ( expectedExceptions = RuntimeException . class , expectedExceptionsMessageRegExp = STRING2 )
 public void testInvalidTypeInfixOperator ( )
 {
 SINGLE
 <nb> public class TestProcedureCall
 assertCallFails ( STRING3 , STRING4 ) ;
 assertCallFails ( STRING5 , STRING6 ) ;
 assertCallFails ( STRING7 , STRING8 ) ;
 - assertCallFails ( STRING9 , STRING10 ) ;
 + assertCallFails ( STRING9 , STRING11 ) ;
 }

 private void assertCall ( @ language ( STRING12 ) String sql , String name , Object . . . arguments )


<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 ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PhoneStatusBar extends BaseStatusBar implements DemoMode ,
 }

 private void runPostCollapseRunnables ( ) {
 - int size = mPostCollapseRunnables . size ( ) ;
 + ArrayList < Runnable > clonedList = new ArrayList < > ( mPostCollapseRunnables ) ;
 + mPostCollapseRunnables . clear ( ) ;
 + int size = clonedList . size ( ) ;
 for ( int i = NUMBER0 ; i < size ; i ++ ) {
 - mPostCollapseRunnables . get ( i ) . run ( ) ;
 + clonedList . get ( i ) . run ( ) ;
 }
 - mPostCollapseRunnables . clear ( ) ;
 +
 }

 Animator mScrollViewAnim , mClearButtonAnim ;

Fixed a bug where collapserunnables where dropped


<nb> OnSslUntrustedCertListener , OnEnforceableRefreshListener {
 cursor . getColumnIndex ( OpenableColumns . DISPLAY_NAME ) ) ;
 Log . i ( TAG , STRING0 + displayName + STRING1 + mimeType ) ;

 + displayName . replace ( File . separatorChar , STRING2 ) ;
 + displayName . replace ( File . pathSeparatorChar , STRING2 ) ;
 remotepath += displayName + DisplayUtils . getComposedFileExtension ( filepath ) ;

 }

Fix failed uploads when display name of file brough from external apps includes separator or path separator characters


<nb> public class ReaderWebView extends WebView {

 mCustomView = null ;
 mCustomViewCallback = null ;
 -
 - mReaderWebView . onPause ( ) ;
 }

 boolean isCustomViewShowing ( ) {

Remove redundant onPause from ReaderWebView when hiding view


<nb> public class MutableInt extends Number implements Comparable < Number > {
 public int v ;

 public MutableInt ( int v ) { this . v = v ; }
 +
 + @ override
 + public boolean equals ( Object o ) {
 + if ( o instanceof Number ) return v == ( ( Number ) o ) . intValue ( ) ;
 + return false ;
 + }
 +
 + @ override public int hashCode ( ) { return v ; }
 +
 @ override public int compareTo ( Number o ) { return v - o . intValue ( ) ; }
 @ override public int intValue ( ) { return v ; }
 @ override public long longValue ( ) { return v ; }

defined compareTo but not equals hash Coverity


<nb> public class ExasolScript extends ExasolObject < DBSObject > implements DBSProcedur
 }

 @ notnull
 - @ property ( viewable = false , order = NUMBER0 )
 + @ property ( hidden = true )
 public String getSql ( ) {
 return this . scriptSQL ;
 }


<nb>
 COMMENT
 COMMENT
 COMMENT
 +
 package NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;

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

 @ notthreadsafe
 public interface AnimatedFactory {
 <nb> public interface AnimatedFactory {
 AnimatedDrawableFactory getAnimatedDrawableFactory ( Context context ) ;

 AnimatedImageFactory getAnimatedImageFactory ( ) ;
 -
 }

Removed unused imports for AnimatedFactory


<nb> public class PyPackageManagementService extends PackageManagementService {
 @ override
 public List < RepoPackage > getAllPackages ( ) throws IOException {
 List < RepoPackage > packages = new ArrayList < RepoPackage > ( ) ;
 - final Collection < String > packageNames = PyPIPackageUtil . INSTANCE . getPackageNames ( ) ;
 + final Collection < String > packageNames ;
 + try {
 + packageNames = PyPIPackageUtil . INSTANCE . getPackageNames ( ) ;
 + }
 + catch ( IOException e ) {
 + throw new IOException ( STRING0 + e . getMessage ( ) + STRING1 ) ;
 + }
 final boolean customRepoConfigured = ! PyPackageService . getInstance ( ) . additionalRepositories . isEmpty ( ) ;
 String url = customRepoConfigured ? PyPIPackageUtil . PYPI_URL : STRING2 ;
 for ( String name : packageNames ) {

remove python specific diagnostics from general manage packages dialog


<nb> public class LocalExecutionPlanner
 Iterables . getOnlyElement ( getChannelsForSymbols ( groupBySymbols , source . getLayout ( ) ) ) ,
 node . getStep ( ) ,
 functionDefinitions ,
 - NUMBER0 ,
 + NUMBER1 ,
 maxOperatorMemoryUsage ) ;

 return new PhysicalOperation ( aggregationOperator , outputMappings . build ( ) ) ;


<nb> public class ExtractMethodProcessor implements MatchProvider {
 private boolean applyChosenClassAndExtract ( List < PsiVariable > inputVariables , @ nullable Pass < ExtractMethodProcessor > extractPass )
 throws PrepareFailedException {
 myStatic = shouldBeStatic ( ) ;
 - if ( myTargetClass . getContainingClass ( ) == null || myTargetClass . hasModifierProperty ( PsiModifier . STATIC ) ) {
 + if ( ! PsiUtil . isLocalOrAnonymousClass ( myTargetClass ) && ( myTargetClass . getContainingClass ( ) == null || myTargetClass . hasModifierProperty ( PsiModifier . STATIC ) ) ) {
 ElementNeedsThis needsThis = new ElementNeedsThis ( myTargetClass ) ;
 for ( int i = NUMBER0 ; i < myElements . length && ! needsThis . usesMembers ( ) ; i ++ ) {
 PsiElement element = myElements [ i ] ;

do not suggest static method for anonymous local romka


<nb> public class CachingClusteredClient < T > implements QueryRunner < T >
 }

 descriptors . add ( segment . rhs ) ;
 - System . out . println (
 - String . format (
 - STRING0 ,
 - server . getHost ( ) ,
 - segment . rhs . getInterval ( ) ,
 - segment . rhs . getPartitionNumber ( ) ,
 - segment . rhs . getVersion ( )
 - )
 - ) ;
 }
 }


<nb> public class Portuguese extends Language {
 SINGLE
 new PostReformPortugueseCompoundRule ( messages ) ,
 new PortugueseReplaceRule ( messages ) ,
 + new PortugueseReplaceRule2 ( messages ) ,
 + new PortugueseClicheRule ( messages ) ,
 new PortugueseWordRepeatRule ( messages , this )
 SINGLE
 ) ;


<nb> public class GoCompletionTest extends GoCompletionTestBase {
 }

 @ suppresswarnings ( STRING0 )
 - public void testPackageNamesInEmptyDirectory ( ) throws IOException {
 + public void _testPackageNamesInEmptyDirectory ( ) throws IOException {
 VirtualFile dir = myFixture . getTempDirFixture ( ) . findOrCreateDir ( STRING1 ) ;
 VirtualFile file = dir . createChildData ( this , STRING2 ) ;
 VfsUtil . saveText ( file , STRING3 ) ;


<nb> public class EngineIron extends Engine {
 if ( burnTime > NUMBER0 ) {
 burnTime -- ;
 } else {
 - fuel . amount -- ;
 + if ( -- fuel . amount <= NUMBER0 ) fuelTank . setLiquid ( null ) ;
 burnTime = currentFuel . totalBurningTime / LiquidContainerRegistry . BUCKET_VOLUME ;
 }

 <nb> public class EngineIron extends Engine {
 heat = COOLANT_THRESHOLD ;
 } else {
 heat -= coolant . amount * currentCoolant . coolingPerUnit ;
 - coolant . amount = NUMBER0 ;
 + coolantTank . setLiquid ( null ) ;
 }
 }
 }

Fixed EngineIron fuel acceptance problem


<nb> public abstract class AsynchronousProcessor implements AsyncSupport < AtmosphereRe
 }
 }

 - logger . debug ( STRING0 , r . uuid ( ) ) ;
 -
 r = ( AtmosphereResourceImpl ) req . resource ( ) ;
 if ( r != null ) {
 + logger . debug ( STRING0 , r . uuid ( ) ) ;

 if ( r . isCancelled ( ) ) {
 logger . trace ( STRING1 , r . uuid ( ) ) ;


<nb> public class VariableInspector extends JDialog {

 public VariableInspector ( final JavaEditor editor ) {
 SINGLE
 - super ( editor , STRING0 ) ;
 + super ( editor , STRING1 ) ;
 this . editor = editor ;

 SINGLE


<nb> public class QueryableStateIntegrationTest {
 public boolean conditionMet ( ) {
 try {
 final StreamsMetadata metadata = streams . metadataForKey ( storeName , key , new StringSerializer ( ) ) ;
 - if ( metadata == null ) {
 + if ( metadata == null || metadata . equals ( StreamsMetadata . NOT_AVAILABLE ) ) {
 return false ;
 }
 final int index = metadata . hostInfo ( ) . port ( ) ;
 <nb> public class QueryableStateIntegrationTest {
 public boolean conditionMet ( ) {
 try {
 final StreamsMetadata metadata = streams . metadataForKey ( storeName , key , new StringSerializer ( ) ) ;
 - if ( metadata == null ) {
 + if ( metadata == null || metadata . equals ( StreamsMetadata . NOT_AVAILABLE ) ) {
 return false ;
 }
 final int index = metadata . hostInfo ( ) . port ( ) ;


<nb> public class CorruptSSTableException extends RuntimeException

 public CorruptSSTableException ( Exception cause , File path )
 {
 - super ( cause ) ;
 + super ( STRING0 + path , cause ) ;
 this . path = path ;
 }

Add file path to CorruptSSTableException message


<nb> import NAMESPACE ;
 public class SalesforceApi extends DefaultApi20 {

 SINGLE
 - private static final String BASE_URL = STRING0 ;
 - private static final String ACCESS_URL = BASE_URL + STRING1 ;
 - private static final String AUTHORIZE_URL = BASE_URL + STRING2 ;
 + private static final String BASE_URL = STRING0 ;
 + private static final String ACCESS_URL = BASE_URL + STRING1 ;
 + private static final String AUTHORIZE_URL = BASE_URL + STRING2 ;

 protected SalesforceApi ( ) {
 SSLContext sc ;
 <nb> public class SalesforceApi extends DefaultApi20 {
 sc . init ( null , null , null ) ;
 HttpsURLConnection . setDefaultSSLSocketFactory ( sc . getSocketFactory ( ) ) ;
 }
 - } catch ( NoSuchAlgorithmException e ) {
 - e . printStackTrace ( ) ;
 + } catch ( Exception e ) {
 + throw new IllegalStateException ( STRING3 , e ) ;
 }
 - catch ( KeyManagementException e ) {
 - e . printStackTrace ( ) ;
 - }
 }

 private static class InstanceHolder {


<nb> public class BinaryMapPoiReaderAdapter {
 break ;
 }
 }
 - Map < String , String > lt = am . getAdditionalInfo ( ) ;
 - for ( Entry < String , String > e : lt . entrySet ( ) ) {
 - matches = matcher . matches ( e . getValue ( ) ) ;
 - if ( matches ) {
 - break ;
 + if ( ! matches ) {
 + Map < String , String > lt = am . getAdditionalInfo ( ) ;
 + for ( Entry < String , String > e : lt . entrySet ( ) ) {
 + matches = matcher . matches ( e . getValue ( ) ) ;
 + if ( matches ) {
 + break ;
 + }
 }
 }
 }
 <nb> import NAMESPACE ;

 public class SearchCoreFactory {
 - SINGLE
 - SINGLE
 - SINGLE
 -
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE

 SINGLE


<nb> public abstract class SshCommand extends BaseCommand {
 }
 }

 - protected abstract void run ( ) throws UnloggedFailure , Failure , Exception ;
 + protected abstract void run ( ) throws Failure , Exception ;
 }


<nb> public class EjbResourceInjectionAnnotationProcessor implements DeploymentUnitPr
 final InjectionTarget targetDescription = new MethodInjectionTarget ( methodInfo . declaringClass ( ) . name ( ) . toString ( ) , methodName , injectionType ) ;

 final String localContextName = isEmpty ( annotation . name ( ) ) ? methodInfo . declaringClass ( ) . name ( ) . toString ( ) + STRING0 + methodName . substring ( NUMBER0 , NUMBER1 ) . toLowerCase ( ) + methodName . substring ( NUMBER1 ) : annotation . name ( ) ;
 - process ( eeModuleDescription , targetDescription . getClassName ( ) , annotation . beanName ( ) , annotation . lookup ( ) , methodInfo . declaringClass ( ) , targetDescription , localContextName ) ;
 + process ( eeModuleDescription , targetDescription . getDeclaredValueClassName ( ) , annotation . beanName ( ) , annotation . lookup ( ) , methodInfo . declaringClass ( ) , targetDescription , localContextName ) ;
 }

 private void processClass ( final EEModuleDescription eeModuleDescription , final EJBResourceWrapper annotation , final ClassInfo classInfo ) throws DeploymentUnitProcessingException {

Fix EJB injection on methods Pass the correct type of the target method param


<nb> public class CodeStyleHtmlPanel extends CodeStyleAbstractPanel {
 }

 protected String getPreviewText ( ) {
 - return readFromFile ( STRING0 ) ;
 + return readFromFile ( STRING1 ) ;

 }

 <nb> public class CodeStyleXmlPanel extends CodeStyleAbstractPanel {
 }

 protected String getPreviewText ( ) {
 - return readFromFile ( STRING2 ) ;
 + return readFromFile ( STRING3 ) ;
 }

 protected FileType getFileType ( ) {


<nb> public class TestOperationSetPresence
 logger . trace ( STRING0 + fixture . userID2 + STRING1 ) ;
 PresenceStatus actualReturn
 = operationSetPresence1 . queryContactStatus ( fixture . userID2 ) ;
 +
 + SINGLE
 + SINGLE
 + if ( ! actualReturn . equals ( expectedReturn ) )
 + {
 + logger . info ( STRING2 + status +
 + STRING3 ) ;
 +
 + PresenceStatus tempStatus ;
 + if ( status . equals ( MsnStatusEnum . ONLINE ) )
 + tempStatus = MsnStatusEnum . AWAY ;
 + else
 + tempStatus = MsnStatusEnum . ONLINE ;
 +
 + SINGLE
 + operationSetPresence2 . publishPresenceStatus ( status , STRING4 ) ;
 +
 + pauseAfterStateChanges ( ) ;
 +
 + SINGLE
 + operationSetPresence2 . publishPresenceStatus ( status , STRING4 ) ;
 +
 + pauseAfterStateChanges ( ) ;
 +
 + actualReturn
 + = operationSetPresence1 . queryContactStatus ( fixture . userID2 ) ;
 + }
 +
 assertEquals ( STRING5
 + expectedReturn . getStatusName ( )
 + STRING6


<nb> public class PagesServlet extends HttpServlet {
 if ( StringUtils . isEmpty ( resource ) ) {
 SINGLE
 List < String > markdownExtensions = GitBlit . getStrings ( Keys . web . markdownExtensions ) ;
 - List < String > extensions = new ArrayList < String > ( markdownExtensions . size ( ) + NUMBER0 ) ;
 + List < String > extensions = new ArrayList < String > ( markdownExtensions . size ( ) + NUMBER1 ) ;
 extensions . add ( STRING0 ) ;
 + extensions . add ( STRING1 ) ;
 extensions . addAll ( markdownExtensions ) ;
 for ( String ext : extensions ) {
 String file = STRING2 + ext ;

Added htm extension as default index page


<nb> public class XmppConnection extends ImConnection implements CallbackHandler {
 SINGLE
 public void setProxy ( String type , String host , int port ) {

 - android . os . Debug . waitForDebugger ( ) ;
 + SINGLE

 if ( type == null ) {
 mProxyInfo = ProxyInfo . forNoProxy ( ) ;


<nb>
 package NAMESPACE ;

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

 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class FlickrApi extends DefaultApi10a
 return STRING0 ;
 }

 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public String getRequestTokenEndpoint ( String callbackUrl )
 - {
 -
 - return String . format ( STRING1 , getRequestTokenEndpoint ( ) , OAuthEncoder . encode ( callbackUrl ) ) ;
 - }
 }


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DefaultExecCommandExecutor implements ExecCommandExecutor {
 } catch ( IOException ioe ) {
 SINGLE
 String msg = ioe . getMessage ( ) ;
 - if ( STRING0 . equals ( msg ) ) {
 + if ( msg != null && STRING1 . equals ( msg . toLowerCase ( Locale . ENGLISH ) ) ) {
 LOG . debug ( STRING2 , ioe ) ;
 SINGLE
 SINGLE

Better stream closed check to ignore case


<nb> public class DatabaseFactory {
 return database ;
 }

 - private DataSource buildDataSource ( DatabaseConnectionConfiguration connectionConfig , GenericObjectPool pool ) {
 + private static DataSource buildDataSource ( DatabaseConnectionConfiguration connectionConfig , GenericObjectPool pool ) {
 final Properties properties = new Properties ( ) ;
 for ( Map . Entry < String , String > property : connectionConfig . getProperties ( ) . entrySet ( ) ) {
 properties . setProperty ( property . getKey ( ) , property . getValue ( ) ) ;
 <nb> public class DatabaseFactory {
 return new PoolingDataSource ( pool ) ;
 }

 - private GenericObjectPool buildPool ( DatabaseConnectionConfiguration connectionConfig ) {
 + private static GenericObjectPool buildPool ( DatabaseConnectionConfiguration connectionConfig ) {
 final GenericObjectPool pool = new GenericObjectPool ( null ) ;
 pool . setMaxWait ( connectionConfig . getMaxWaitForConnection ( ) . toMilliseconds ( ) ) ;
 pool . setMinIdle ( connectionConfig . getMinSize ( ) ) ;

Make a few methods in DatabaseFactory static


<nb> public class ImmutableChecker extends BugChecker implements BugChecker . ClassTree
 }
 String message ;
 if ( immutableTyParams . isEmpty ( ) ) {
 - message =
 - String . format (
 - STRING0 , tyvar . getSimpleName ( ) , immutableTyParams ) ;
 + message = String . format ( STRING0 , tyvar . getSimpleName ( ) ) ;
 } else {
 message =
 String . format (


<nb> public abstract class CharMatcher implements Predicate < Character > {
 SINGLE

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public static final CharMatcher WHITESPACE = whitespace ( ) ;

Remove CharMatcher WHITESPACE internally


<nb> public class Mesh implements Savable , Cloneable {
 }

 clone . vertexArrayID = - NUMBER0 ;
 - clone . vertCount = - NUMBER0 ;
 - clone . elementCount = - NUMBER0 ;
 + clone . vertCount = vertCount ;
 + clone . elementCount = elementCount ;

 SINGLE
 SINGLE

Mesh deepClone sets wrong elementCount and vertCount in trunk


<nb> import NAMESPACE ;
 import static NAMESPACE ;

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public abstract class AbstractBlockChain {
 private static final Logger log = LoggerFactory . getLogger ( AbstractBlockChain . class ) ;


<nb> public final class SystemClock {

 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 COMMENT
 COMMENT
 COMMENT

Remove misleading documentation from SystemClock


<nb> public class DefaultCamelCatalog implements CamelCatalog {
 SINGLE
 sb . append ( hasQuestionmark ? ampersand : STRING0 ) ;
 String query = createQueryString ( copy , ampersand , encode ) ;
 - SINGLE
 - query = query . replaceAll ( STRING1 , STRING2 ) ;
 sb . append ( query ) ;
 }

 <nb> public class CamelCatalogTest {
 map . put ( STRING3 , STRING4 ) ;

 String uri = catalog . asEndpointUri ( STRING5 , map , true ) ;
 + assertEquals ( STRING6 , uri ) ;
 +
 + uri = catalog . asEndpointUri ( STRING5 , map , false ) ;
 assertEquals ( STRING7 , uri ) ;
 }

Camel catalog recent commits no need for this anymore


<nb> public class AccountExpiredException extends AccountStatusException {
 super ( msg , t ) ;
 }

 + @ deprecated
 public AccountExpiredException ( String msg , Object extraInformation ) {
 super ( msg , extraInformation ) ;
 }
 <nb> public class CredentialsExpiredException extends AccountStatusException {
 super ( msg , t ) ;
 }

 + @ deprecated
 public CredentialsExpiredException ( String msg , Object extraInformation ) {
 super ( msg , extraInformation ) ;
 }
 <nb> public class DisabledException extends AccountStatusException {
 super ( msg , t ) ;
 }

 + @ deprecated
 public DisabledException ( String msg , Object extraInformation ) {
 super ( msg , extraInformation ) ;
 }
 <nb> public class LockedException extends AccountStatusException {
 super ( msg , t ) ;
 }

 + @ deprecated
 public LockedException ( String msg , Object extraInformation ) {
 super ( msg , extraInformation ) ;
 }

Mark overriding extraInformation methods in account status exceptions as deprecated


<nb> public class StreamExecutionCallback implements TransportCallback < StreamResponse
 @ override
 public void run ( )
 {
 - Runnable r = _taskQueue . poll ( ) ;
 try
 {
 + Runnable r = _taskQueue . poll ( ) ;
 r . run ( ) ;
 }
 catch ( Throwable t )


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class Solo {
 COMMENT

 public void clickOnView ( View view ) {
 + waiter . waitForView ( view , SMALLTIMEOUT ) ;
 clicker . clickOnScreen ( view ) ;
 }

 <nb> public class Solo {
 COMMENT

 public void clickLongOnView ( View view ) {
 + waiter . waitForView ( view , SMALLTIMEOUT ) ;
 clicker . clickOnScreen ( view , true , NUMBER0 ) ;

 }
 <nb> public class Solo {
 setter . setTimePicker ( timePicker , hour , minute ) ;
 }

 +
 COMMENT
 COMMENT
 COMMENT

Updated clickOnView and clickLongOnView to wait for the view before clicking it