<nb> public final class NearestNUserNeighborhood extends AbstractUserNeighborhood {
 public NearestNUserNeighborhood ( int n ,
 UserSimilarity userSimilarity ,
 DataModel dataModel ) {
 - this ( n , FLOAT0 , userSimilarity , dataModel , FLOAT1 ) ;
 + this ( n , Double . NEGATIVE_INFINITY , userSimilarity , dataModel , FLOAT1 ) ;
 }

 COMMENT
 <nb> public final class NearestNUserNeighborhood extends AbstractUserNeighborhood {
 private final User theUser ;
 private final double minSim ;

 - private Estimator ( UserSimilarity userSimilarityImpl , User theUser ) {
 - this . userSimilarityImpl = userSimilarityImpl ;
 - this . theUser = theUser ;
 - this . minSim = Double . NEGATIVE_INFINITY ;
 - }
 -
 private Estimator ( UserSimilarity userSimilarityImpl , User theUser , double minSim ) {
 this . userSimilarityImpl = userSimilarityImpl ;
 this . theUser = theUser ;

Oops minSimilarity should default to Double NEGATIVE_INFINITY


<nb> public class GrailsDomainClassPersistentEntity implements PersistentEntity , Init
 public void setExternal ( boolean external ) {
 SINGLE
 }
 +
 + public PersistentProperty getVersion ( ) {
 + SINGLE
 + throw new UnsupportedOperationException ( ) ;
 + }

 + public boolean isVersioned ( ) {
 + SINGLE
 + throw new UnsupportedOperationException ( ) ;
 + }
 }

implement getVersion and isVersioned to satisfy the new methods defined in the PersistentEntity interface


<nb> package NAMESPACE ;
 import NAMESPACE ;

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

 public class PrimaryKey implements DatabaseObject , Comparable < PrimaryKey > {
 private String name ;

Removing the VersionString reference which appears to be completely redundent and breaking the build


<nb> public interface BeanFactory {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class DynamicRegexReplaceableByCompiledPatternInspection
 STRING0 +
 STRING1 ) ;
 final int expressionsLength = expressions . length ;
 - System . out . println ( STRING2 + expressionsLength ) ;
 if ( expressionsLength > NUMBER0 ) {
 fieldText . append ( expressions [ NUMBER0 ] . getText ( ) ) ;
 }


<nb> public abstract class BaseTest <
 . fetchOne ( ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + protected final Result < B > getBooks ( ) {
 + return create ( ) . selectFrom ( TBook ( ) )
 + . orderBy ( TBook_ID ( ) )
 + . fetch ( ) ;
 + }
 +
 protected final String zeroDate ( ) {
 return new Date ( NUMBER0 ) . toString ( ) ;
 }


<nb> public class ConcurrencyUtil {
 } ) ;
 }
 public static ScheduledExecutorService newSingleScheduledThreadExecutor ( @ nonnls final String threadFactoryName ) {
 - ScheduledThreadPoolExecutor threadPoolExecutor = new ScheduledThreadPoolExecutor ( NUMBER0 ) ;
 - threadPoolExecutor . setThreadFactory ( new ThreadFactory ( ) {
 + return new ScheduledThreadPoolExecutor ( NUMBER0 , new ThreadFactory ( ) {
 public Thread newThread ( final Runnable r ) {
 return new Thread ( r , threadFactoryName ) ;
 }
 } ) ;
 - return threadPoolExecutor ;
 }
 }


<nb> public class DirectoryIndexTest extends IdeaTestCase {

 checkInfo ( myResDir , myModule , true , false , STRING0 , JavaResourceRootType . RESOURCE , myModule ) ;

 - SINGLE
 - SINGLE
 + checkInfo ( myExcludedLibSrcDir , null , true , false , STRING1 , null , myModule3 , myModule ) ;
 + checkInfo ( myExcludedLibClsDir , null , true , false , STRING2 , null , myModule3 ) ;
 }

 <nb> public class DirectoryIndexTest extends IdeaTestCase {
 assertEquals ( packageName , fileIndex . getPackageNameByDirectory ( dir ) ) ;
 }

 - assertEquals ( modulesOfOrderEntries . length , info . getOrderEntries ( ) . length ) ;
 + assertEquals ( Arrays . toString ( info . getOrderEntries ( ) ) , modulesOfOrderEntries . length , info . getOrderEntries ( ) . length ) ;
 for ( Module aModule : modulesOfOrderEntries ) {
 OrderEntry found = info . findOrderEntryWithOwnerModule ( aModule ) ;
 - assertNotNull ( found ) ;
 + assertNotNull ( STRING3 + aModule , found ) ;
 }
 }

DirectoryIndexTest reflecting current state of excluded lib dirs under module content


<nb>
 package NAMESPACE ;

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

 import NAMESPACE ;
 - import NAMESPACE ;

 public class DateFormatterTest extends AndroidTestCase {
 protected void setUp ( ) throws Exception {
 <nb> public class DateFormatterTest extends AndroidTestCase {
 }

 public void test24Hours ( ) {
 - SharedPreferences prefs = MainActivity . getPrefs ( getContext ( ) ) ;
 + SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( getContext ( ) ) ;
 prefs . edit ( ) . putBoolean ( SettingsFragment . TIMESTAMPS_24H , true ) . commit ( ) ;
 assertTrue ( DateFormatter . accountFor24HourTime ( getContext ( ) , new SimpleDateFormat ( STRING0 ) ) . equals ( new SimpleDateFormat ( STRING1 ) ) ) ;
 prefs . edit ( ) . putBoolean ( SettingsFragment . TIMESTAMPS_24H , false ) . commit ( ) ;


<nb> import static NAMESPACE ;
 COMMENT
 public class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTests {

 - private static final String SERVICE_URL = STRING0 ;
 + private static final String SERVICE_URL = STRING1 ;

 private JMXServiceURL getServiceUrl ( ) throws MalformedURLException {
 return new JMXServiceURL ( SERVICE_URL ) ;


<nb> public class QueryThenFetchConsumer implements Consumer {
 collectSymbols ,
 ImmutableList . < Projection > of ( ) ,
 orderBy ,
 - table . querySpec ( ) . limit ( ) + table . querySpec ( ) . offset ( )
 + MoreObjects . firstNonNull ( table . querySpec ( ) . limit ( ) , Constants . DEFAULT_SELECT_LIMIT ) + table . querySpec ( ) . offset ( )
 ) ;
 collectNode . keepContextForFetcher ( true ) ;

fixed NPE when applying limit on CollectNode


<nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class ThreeStateCheckBox extends JCheckBox {
 if ( icon == null ) {
 icon = UIManager . getIcon ( STRING0 ) ;
 }
 -
 + if ( UIUtil . isUnderDarcula ( ) || UIUtil . isUnderIntelliJLaF ( ) ) {
 + icon = EmptyIcon . create ( NUMBER0 , NUMBER1 ) ;
 + }
 if ( icon != null ) {
 final Insets i = getInsets ( ) ;
 final Rectangle r = getBounds ( ) ;

fix three state check box under intellij and darcula lafs


<nb> import NAMESPACE ;

 public class DefaultFunctionalSourceSet extends AddOnlyRuleAwarePolymorphicDomainObjectContainer < LanguageSourceSet > implements FunctionalSourceSet {
 private final String name ;
 - private final ProjectSourceSet projectSourceSet ;

 public DefaultFunctionalSourceSet ( String name , Instantiator instantiator , final ProjectSourceSet projectSourceSet ) {
 super ( LanguageSourceSet . class , instantiator ) ;
 this . name = name ;
 - this . projectSourceSet = projectSourceSet ;
 whenObjectAdded ( new Action < LanguageSourceSet > ( ) {
 public void execute ( LanguageSourceSet languageSourceSet ) {
 projectSourceSet . add ( languageSourceSet ) ;


<nb> public class MetricsServlet extends HttpServlet {
 json . writeStartObject ( ) ;
 {

 + json . writeFieldName ( STRING0 ) ;
 + json . writeStartObject ( ) ;
 + {
 + json . writeStringField ( STRING1 , vmName ( ) ) ;
 + json . writeStringField ( STRING2 , vmVersion ( ) ) ;
 + }
 + json . writeEndObject ( ) ;
 json . writeFieldName ( STRING3 ) ;
 json . writeStartObject ( ) ;
 {

Added vm name and version to metrics json


<nb> public class PublisherInterceptor extends AbstractLifecycleInterceptor {
 try {
 HttpService httpService = getHttpService ( context , false ) ;
 if ( httpService != null )
 - httpService . unregister ( STRING0 ) ;
 + httpService . unregister ( STRING1 ) ;
 } finally {
 SINGLE
 Thread . currentThread ( ) . setContextClassLoader ( ctxLoader ) ;

Fix interceptor unregisters not the same context that it registered


<nb> public class AudioService extends IAudioService . Stub {
 AudioSystem . setDeviceConnectionState (
 spec . mDeviceType ,
 AudioSystem . DEVICE_STATE_AVAILABLE ,
 - ( String ) device . getValue ( ) ,
 - STRING0 ) ;
 + spec . mDeviceAddress ,
 + spec . mDeviceName ) ;
 }
 }
 SINGLE

fix String cast crash when mediaserver killed


<nb> public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
 if ( groupPosition == NUMBER0 ) {
 headerString = context . getString ( R . string . queue_label ) ;
 if ( ! queueItems . isEmpty ( ) ) {
 - headerString += STRING0 + queueItems . size ( ) + STRING1 ;
 + headerString += STRING0 + getChildrenCount ( GROUP_POS_QUEUE ) + STRING1 ;
 }
 } else {
 headerString = context . getString ( R . string . new_label ) ;
 if ( ! unreadItems . isEmpty ( ) ) {
 - headerString += STRING0 + unreadItems . size ( ) + STRING1 ;
 + headerString += STRING0 + getChildrenCount ( GROUP_POS_UNREAD ) + STRING1 ;
 }
 }
 headerTitle . setText ( headerString ) ;

Headers displayed wrong number of episodes in some cases


<nb> public class DraggableView extends RelativeLayout {
 return false ;
 }

 + private boolean isMinimized ( ) {
 + return dragView . getTop ( ) == ( getHeight ( ) - dragView . getHeight ( ) ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT

Add method to know if dragView is minimized based on dragView top position and view height


<nb> public abstract class Plugin {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public void onIndexService ( IndexService indexService ) { }
 -
 - COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class PluginsService extends AbstractComponent {
 for ( Tuple < PluginInfo , Plugin > plugin : plugins ) {
 plugin . v2 ( ) . onIndexModule ( indexModule ) ;
 }
 - indexModule . addIndexEventListener ( new IndexEventListener ( ) {
 - @ override
 - public void afterIndexCreated ( IndexService indexService ) {
 - for ( Tuple < PluginInfo , Plugin > plugin : plugins ) {
 - plugin . v2 ( ) . onIndexService ( indexService ) ;
 - }
 - }
 - } ) ;
 }
 COMMENT
 COMMENT


<nb> public class GitCheckinEnvironment implements CheckinEnvironment {
 myPanel = new JPanel ( new GridBagLayout ( ) ) ;
 myPanel . add ( authorLabel , gb . nextLine ( ) . next ( ) ) ;
 myPanel . add ( myAuthorField , gb . next ( ) . fillCellHorizontally ( ) . weightx ( NUMBER0 ) ) ;
 - myPanel . add ( mySignOffCheckbox , gb . nextLine ( ) . next ( ) . coverLine ( ) ) ;
 myPanel . add ( myAmendComponent . getComponent ( ) , gb . nextLine ( ) . next ( ) . coverLine ( ) ) ;
 + myPanel . add ( mySignOffCheckbox , gb . nextLine ( ) . next ( ) . coverLine ( ) ) ;
 }

 @ notnull


<nb> public final class IOConverter {
 }
 return toInputStream ( text . getBytes ( ) ) ;
 }
 +
 + @ converter
 + public static InputStream toInputStream ( BufferedReader buffer ) throws IOException {
 + return toInputStream ( toString ( buffer ) , null ) ;
 + }

 @ converter
 public static InputStream toInputStream ( BufferedReader buffer , Exchange exchange ) throws IOException {


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

 abstract class VirtualFileImpl extends VirtualFile implements VirtualFileWithId {

moved off the testFramework made thread safe


<nb> public class ShutdownTimeout
 COMMENT
 COMMENT
 COMMENT
 - public static final long SHUTDOWN_TIMEOUT_DEFAULT = NUMBER0 ; SINGLE
 + public static final long SHUTDOWN_TIMEOUT_DEFAULT = NUMBER1 ; SINGLE

 COMMENT
 COMMENT

Increase hard shutdown timeout as discussed with Emil


<nb> public class UltimateRecyclerView extends FrameLayout implements Scrollable {
 mEmpty . setVisibility ( View . GONE ) ;

 + }
 +
 + public void setEmptyView ( int emptyResourceId ) {
 + mEmptyId = emptyResourceId ;
 +
 + mEmpty . setLayoutResource ( mEmptyId ) ;
 + if ( mEmptyId != NUMBER0 )
 + mEmptyView = mEmpty . inflate ( ) ;
 + mEmpty . setVisibility ( View . GONE ) ;
 + }

 + public void showEmptyView ( ) {
 + if ( mEmptyId != NUMBER0 )
 + mEmpty . setVisibility ( View . VISIBLE ) ;
 + }

 + public void hideEmptyView ( ) {
 + if ( mEmptyId != NUMBER0 )
 + mEmpty . setVisibility ( View . GONE ) ;
 }

 - public void showFloatingButtonView ( ) {
 + public void showFloatingButtonView ( ) {
 if ( mFloatingButtonId != NUMBER0 ) {
 mFloatingButtonView = mFloatingButtonViewStub . inflate ( ) ;
 mFloatingButtonView . setVisibility ( View . VISIBLE ) ;

add setEmptyView showEmptyView hideEmptyView in URV


<nb> public class ConsoleViewImpl extends JPanel implements ConsoleView , ObservableCo
 }
 myFilters . setForceUseAllFilters ( true ) ;
 myHeavyUpdateTicket = NUMBER0 ;
 - myHeavyAlarm = myFilters . isAnyHeavy ( ) ? new Alarm ( Alarm . ThreadToUse . SHARED_THREAD , this ) : null ;
 + myHeavyAlarm = myFilters . isAnyHeavy ( ) ? new Alarm ( Alarm . ThreadToUse . POOLED_THREAD , this ) : null ;

 ConsoleInputFilterProvider [ ] inputFilters = Extensions . getExtensions ( ConsoleInputFilterProvider . INPUT_FILTER_PROVIDERS ) ;

apply heavy filters on a non shared thread


<nb> public class Http11AprProtocol implements ProtocolHandler , MBeanRegistration {
 if ( log . isInfoEnabled ( ) )
 log . info ( sm . getString ( STRING0 , getName ( ) ) ) ;
 endpoint . destroy ( ) ;
 + cHandler . recycledProcessors . clear ( ) ;
 if ( tpOname != null )
 Registry . getRegistry ( null , null ) . unregisterComponent ( tpOname ) ;
 if ( rgOname != null )

Fix unit test failure with APR connector


<nb> public class XmppConnection extends ImConnection implements CallbackHandler {
 }

 mConfig . setCustomSSLContext ( sslContext ) ;
 - mConfig . setEnabledCipherSuites ( XMPPCertPins . SSL_IDEAL_CIPHER_SUITES ) ;
 +
 + int currentapiVersion = android . os . Build . VERSION . SDK_INT ;
 + if ( currentapiVersion >= android . os . Build . VERSION_CODES . ICE_CREAM_SANDWICH ) {
 + mConfig . setEnabledCipherSuites ( XMPPCertPins . SSL_IDEAL_CIPHER_SUITES ) ;
 + }
 mConfig . setCallbackHandler ( this ) ;

 } else {

don t use custom cipher suites on older devices may not support them


<nb> public class ChatWindow

 if ( getExtendedState ( ) != JFrame . ICONIFIED )
 {
 - if ( ConfigurationManager . isAutoPopupNewMessage ( ) || setSelected )
 + if ( ConfigurationManager . isAutoPopupNewMessage ( ) || setSelected )
 {
 if ( ! isVisible ( ) )
 setVisible ( true ) ;

 toFront ( ) ;
 }
 - else
 + else if ( ! isWindowVisible )
 {
 setFocusableWindowState ( false ) ;
 setVisible ( true ) ;

Fixes lost focus in chat window when receiving messages while typing


<nb> public final class PrintManager {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class SelectBox extends Widget {

 public void hideList ( ) {
 if ( list . getParent ( ) == null ) return ;
 -
 - getStage ( ) . removeCaptureListener ( list . stageListener )
 +
 + getStage ( ) . removeCaptureListener ( list . stageListener ) ;
 list . addAction ( sequence ( fadeOut ( FLOAT0 , Interpolation . fade ) , removeActor ( ) ) ) ;
 }


<nb> public class AbstractSObjectBase extends AbstractDTOBase {
 private String LastActivityDate ;

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public final void clearBaseFields ( ) {
 attributes = null ;
 Id = null ;
 OwnerId = null ;
 IsDeleted = null ;
 - Name = null ;
 CreatedDate = null ;
 CreatedById = null ;
 LastModifiedDate = null ;

Allow clearing of field Name for upserts in Salesforce component


<nb> public class AnalysisScope {
 myModule = null ;
 myScope = null ;
 myElement = psiDirectory ;
 - if ( psiDirectory . getPackage ( ) != null ) {
 - myType = DIRECTORY ;
 - }
 - else {
 - myType = INVALID ;
 - }
 + myType = DIRECTORY ;
 }

 public AnalysisScope ( PsiPackage psiPackage ) {

enable analyzing dirs not only packages integrate


<nb> final class ObjectType implements TypeWithProperties {
 if ( ! hasNonPrototypeProperties ( ) ) {
 if ( fn != null ) {
 return fn . appendTo ( builder ) ;
 - } else if ( nominalType != null ) {
 - return nominalType . appendTo ( builder ) ;
 + } else if ( getNominalType ( ) != null ) {
 + return getNominalType ( ) . appendTo ( builder ) ;
 }
 }
 if ( nominalType != null && ! nominalType . getName ( ) . equals ( STRING0 ) ) {


<nb> public class NetworkService extends AbstractComponent {
 COMMENT
 COMMENT
 COMMENT
 - InetAddress resolveDefault ( ) ;
 + InetAddress resolveDefault ( ) throws IOException ;

 COMMENT
 COMMENT
 COMMENT
 - InetAddress resolveIfPossible ( String value ) ;
 + InetAddress resolveIfPossible ( String value ) throws IOException ;
 }

 private final List < CustomNameResolver > customNameResolvers = new CopyOnWriteArrayList < CustomNameResolver > ( ) ;

add throws IOException to CustomNameResolver interface


<nb> public class WindowLayersController {
 }

 layer = assignAndIncreaseLayerIfNeeded ( mDockDivider , layer ) ;
 -
 - SINGLE
 - if ( mDockDivider != null && mService . mInputMethodWindow != null ) {
 - layer = assignAndIncreaseLayerIfNeeded ( mService . mInputMethodWindow , layer ) ;
 - }
 -
 SINGLE
 SINGLE
 SINGLE
 <nb> public class WindowManagerService extends IWindowManager . Stub
 SINGLE
 SINGLE
 if ( fl == NUMBER0 || fl == ( FLAG_NOT_FOCUSABLE | FLAG_ALT_FOCUSABLE_IM )
 - || type == TYPE_APPLICATION_STARTING ) {
 + || type == TYPE_APPLICATION_STARTING || type == TYPE_DOCK_DIVIDER ) {
 if ( DEBUG_INPUT_METHOD ) {
 Slog . i ( TAG_WM , STRING0 + w + STRING1 + w . isVisibleOrAdding ( ) ) ;
 if ( ! w . isVisibleOrAdding ( ) ) {

Revert Do not set docked divider as IME target


<nb> public interface FrameworkConfig {
 COMMENT
 COMMENT
 COMMENT
 - String TRANSPORT_IN_USE = AtmosphereConfig . class . getName ( ) + STRING0 ;
 + String TRANSPORT_IN_USE = FrameworkConfig . class . getName ( ) + STRING0 ;
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface FrameworkConfig {
 COMMENT
 COMMENT
 String CDI_INJECTOR = STRING1 ;
 + COMMENT
 + COMMENT
 + COMMENT
 + String MAPPED_PATH = AtmosphereHandler . class . getName ( ) + STRING2 ;
 +

 }
 <nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DefaultEndpointMapper < U > implements EndpointMapper < U > {
 }
 }
 }
 + req . setAttribute ( FrameworkConfig . MAPPED_PATH , path ) ;
 return handler ;
 }

Allow framework to discover which path mapped them


<nb> public interface GraphService {
 COMMENT
 COMMENT
 public int evictAll ( ) ;
 -
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public GraphSourceFactory getGraphSourceFactory ( ) ;
 }

Add some javadoc comment to GraphService interface


<nb>
 package NAMESPACE ;

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

 import static NAMESPACE ;

 + @ runwith ( HazelcastParallelClassRunner . class )
 + @ category ( { QuickTest . class , ParallelTest . class } )
 public class ProxySplitBrainTest extends SplitBrainTestSupport {

 @ override
 <nb> public class ProxySplitBrainTest extends SplitBrainTestSupport {
 }
 } ) ;
 }
 - }
 + }

Add missing Category to ProxySplitBrainTest


<nb> public class PinnedSectionListView extends ListView {
 SINGLE
 post ( new Runnable ( ) {
 @ override public void run ( ) {
 + ListAdapter adapter = getAdapter ( ) ;
 + if ( adapter == null ) return ; SINGLE

 SINGLE
 int firstVisiblePosition = getFirstVisiblePosition ( ) ;

restore state checks for not set adapter


<nb> public class BooksIntegrationTest {
 }
 }

 - @ test
 - public void wontFindBook ( ) {
 - try {
 - getResponse ( STRING0 , STRING1 + bookId , null ) ;
 - } catch ( Exception e ) {
 - if ( e instanceof FileNotFoundException ) {
 - assertTrue ( true ) ;
 - } else {
 - e . printStackTrace ( ) ;
 - throw new RuntimeException ( e ) ;
 - }
 - }
 + @ test ( expected = FileNotFoundException . class )
 + public void wontFindBook ( ) throws IOException {
 + getResponse ( STRING0 , STRING1 + bookId , null ) ;
 }

 private static UrlResponse doMethod ( String requestMethod , String path , String body ) {

use JUnit syntax to expect an exception in wontFindBook


<nb> public class LruCache < K , V > {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void resize ( int maxSize ) {
 + if ( maxSize <= NUMBER0 ) {
 + throw new IllegalArgumentException ( STRING0 ) ;
 + }
 +
 + synchronized ( this ) {
 + this . maxSize = maxSize ;
 + }
 + trimToSize ( maxSize ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class LruCache < K , V > {
 }

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public synchronized final int hitCount ( ) {
 return hitCount ;

Add LruCache resize to the support library


<nb> public class WalletTest extends TestWithWallet {
 assertArrayEquals ( address . getHash160 ( ) , tx . getOutput ( NUMBER0 ) . getScriptPubKey ( ) . getPubKeyHash ( ) ) ;
 }

 - @ test
 + SINGLE
 public void fragmentedReKeying ( ) throws Exception {
 SINGLE
 ECKey key = new ECKey ( ) ;

Disable fragmentedRekeying test for now as bouncy castle is so slow at signature generation


<nb> public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
 SINGLE
 MUCRoom room = getChatRoom ( name ) ;
 if ( room != null && room . isPublicRoom ( ) ) {
 - MUCRole role ;
 Element item ;
 - for ( Iterator < MUCRole > members = room . getOccupants ( ) ; members . hasNext ( ) ; ) {
 + for ( MUCRole role : room . getOccupants ( ) ) {
 SINGLE
 - role = members . next ( ) ;
 item = DocumentHelper . createElement ( STRING0 ) ;
 item . addAttribute ( STRING1 , role . getRoleAddress ( ) . toStringPrep ( ) ) ;

Modified methods that were receiveing an Iterator to receive a Collection


<nb> abstract public class ModelBuilder < M extends Model < M , P , O > , P extends Model . Param
 if ( isSupervised ( ) )
 error ( STRING0 , STRING1 + _parms . _response_column + STRING2 ) ;
 } else {
 + if ( _response == _offset )
 + error ( STRING3 , STRING4 ) ;
 + if ( _response == _weights )
 + error ( STRING3 , STRING5 ) ;
 + if ( _response == _fold )
 + error ( STRING3 , STRING6 ) ;
 _train . add ( _parms . _response_column , _response ) ;
 ++ res ;
 }

Disallow the response to be the same as fold offset weights


<nb> public class TextureUtil {
 internalFormat = ARBTextureFloat . GL_LUMINANCE_ALPHA16F_ARB ;
 format = GL_LUMINANCE_ALPHA ;
 dataType = GL_UNSIGNED_BYTE ;
 + break ;
 case Intensity8 :
 internalFormat = GL_INTENSITY8 ;
 format = GL_INTENSITY ;
 <nb> public class TextureUtil {
 internalFormat = GL_LUMINANCE8_ALPHA8 ;
 format = GL_LUMINANCE_ALPHA ;
 dataType = GL_UNSIGNED_BYTE ;
 + break ;
 case Luminance16Alpha16 :
 internalFormat = GL_LUMINANCE16_ALPHA16 ;
 format = GL_LUMINANCE_ALPHA ;
 dataType = GL_UNSIGNED_BYTE ;
 + break ;
 case Luminance16 :
 internalFormat = GL_LUMINANCE16 ;
 format = GL_LUMINANCE ;

Fixed some luminance alpha formats failing due to missing break statement under switch


<nb> public abstract class Model < M extends Model < M , P , O > , P extends Model . Parameters ,
 COMMENT
 COMMENT
 COMMENT
 - public int _stopping_rounds = NUMBER0 ;
 + public int _stopping_rounds = NUMBER1 ;

 COMMENT
 COMMENT

Disable convergence based early stopping for GBM DRF by default for now


<nb> public class WorldEditCommands {
 min = NUMBER0 ,
 max = - NUMBER1
 )
 + @ commandpermissions ( STRING0 )
 @ console
 public void help ( CommandContext args , LocalSession session , LocalPlayer player ,
 EditSession editSession ) throws WorldEditException {


<nb> public class PyTestRunConfiguration extends AbstractPythonRunConfiguration {
 SINGLE
 File runner = null ;
 File bin_dir = bin_path . getParentFile ( ) ;
 + if ( bin_dir == null ) return null ;
 runner = new File ( bin_dir , PY_TEST ) ;
 if ( runner . exists ( ) ) return runner . getPath ( ) ;
 runner = new File ( new File ( bin_dir , STRING0 ) , PY_TEST ) ;

avoiding exceptions when running WebIDE from IDEA


<nb> public class SortParseElement implements SearchParseElement {
 addSortField ( context , sortFields , parser . text ( ) , false , false , null , null , null , null ) ;
 }
 }
 - } else {
 + } else if ( token == XContentParser . Token . VALUE_STRING ) {
 + addSortField ( context , sortFields , parser . text ( ) , false , false , null , null , null , null ) ;
 + } else if ( token == XContentParser . Token . START_OBJECT ) {
 addCompoundSortField ( parser , context , sortFields ) ;
 + } else {
 + throw new ElasticSearchIllegalArgumentException ( STRING0 ) ;
 }
 if ( ! sortFields . isEmpty ( ) ) {
 SINGLE


<nb> public class GraphHopper implements GraphHopperAPI
 }

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public GraphHopper forServer ( )
 {
 - SINGLE
 setSimplifyResponse ( true ) ;
 return setInMemory ( ) ;
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public GraphHopper forDesktop ( )
 {
 <nb> public class GraphHopper implements GraphHopperAPI
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public GraphHopper forMobile ( )
 {


<nb> package NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public class DisposableTaskListFragment extends TaskListFragment {
 @ override
 public void onDetach ( ) {
 Activity activity = getActivity ( ) ;
 - if ( activity instanceof TaskListActivity ) {
 + if ( activity instanceof TaskListActivity &&
 + Preferences . getIntegerFromString ( R . string . p_swipe_lists_performance_key , NUMBER0 ) > NUMBER0 ) {
 TaskListActivity tla = ( TaskListActivity ) activity ;
 if ( tla . getFragmentLayout ( ) == AstridActivity . LAYOUT_SINGLE )
 tla . getFragmentPagerAdapter ( ) . remove ( filter ) ;

Fixed a bug in the DisposableTaskListFragment


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OgreXMLDataObject extends SpatialAssetDataObject {
 super ( pf , loader ) ;
 }

 + @ override
 + public ModelKey getAssetKey ( ) {
 + if ( super . getAssetKey ( ) instanceof OgreMeshKey ) {
 + return ( OgreMeshKey ) assetKey ;
 + }
 + assetKey = new OgreMeshKey ( super . getAssetKey ( ) . getName ( ) ) ;
 + return ( OgreMeshKey ) assetKey ;
 + }
 +
 }

add OgreMeshKey support to OgreXMLDataObject


<nb> public class JmeLightProbe extends JmeLight {
 }

 set . put ( makeProperty ( obj , Vector3f . class , STRING0 , STRING1 , STRING2 ) ) ;
 - SINGLE
 + set . put ( makeEmbedProperty ( obj . getBounds ( ) , obj . getBounds ( ) . getClass ( ) , float . class , STRING3 , STRING4 , STRING5 ) ) ;
 +
 sheet . put ( set ) ;
 return sheet ;

Added a way to change the lightProbe radius in the property panel


<nb> public final class Response {
 this . body = body ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ deprecated
 public Response ( int status , String reason , List < Header > headers , TypedInput body ) {
 if ( status < NUMBER0 ) {

Add comment for now deprecated Response constructor


<nb> public class AssistManager {
 }

 final boolean isService = isAssistantService ( ) ;
 - if ( isService || ! isVoiceSessionRunning ( ) ) {
 + if ( ! isService || ! isVoiceSessionRunning ( ) ) {
 showOrb ( ) ;
 mView . postDelayed ( mHideRunnable , isService
 ? TIMEOUT_SERVICE
 <nb> public class AssistManager {
 mAssistUtils . launchVoiceAssistFromKeyguard ( ) ;
 }

 - private boolean getVoiceInteractorSupportsAssistGesture ( ) {
 - return mAssistUtils . activeServiceSupportsAssistGesture ( ) ;
 - }
 -
 public boolean canVoiceAssistBeLaunchedFromKeyguard ( ) {
 return mAssistUtils . activeServiceSupportsLaunchFromKeyguard ( ) ;
 }

Don t show orb when voice session is already running


<nb> public @ interface JSONType {

 Class < ? > builder ( ) default Void . class ;

 + COMMENT
 + COMMENT
 + COMMENT
 String typeName ( ) default STRING0 ;

 + COMMENT
 + COMMENT
 + COMMENT
 Class < ? > [ ] seeAlso ( ) default { } ;
 }


<nb> public class RandomUtils {
 }
 return str . toString ( ) ;
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static int getRandom ( int max ) {
 + return getRandom ( NUMBER0 , max ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static int getRandom ( int min , int max ) {
 + if ( min > max ) {
 + return NUMBER0 ;
 + }
 + if ( min == max ) {
 + return min ;
 + }
 +
 + Random random = new Random ( ) ;
 + return min + random . nextInt ( max - min ) ;
 + }
 }


<nb> public class MyFragmentActivityTest {
 assertThat ( activity . myFragment2 ) . isNotNull ( ) ;
 }

 + @ test
 + public void can_inject_native_fragment_with_with_default_tag ( ) {
 + assertThat ( activity . myFragmentTag ) . isNotNull ( ) ;
 + }
 +
 + @ test
 + public void can_inject_native_fragment_with_with_tag ( ) {
 + assertThat ( activity . myFragmentTag2 ) . isNotNull ( ) ;
 + }
 +
 }


<nb> public class LengthFieldBasedFrameDecoder extends ByteToMessageDecoder {
 COMMENT
 COMMENT
 protected ByteBuf extractFrame ( ChannelHandlerContext ctx , ByteBuf buffer , int index , int length ) {
 - ByteBuf frame = ctx . alloc ( ) . buffer ( length ) ;
 - frame . writeBytes ( buffer , index , length ) ;
 - return frame ;
 + return buffer . slice ( index , length ) . retain ( ) ;
 }

 private void fail ( long frameLength ) {

Remove memory copy when extract frame in LengthFieldBasedFrameDecoder


<nb> public class BubbleDraggable extends BubbleView implements Draggable {

 @ override
 public void onOrientationChanged ( ) {
 - switchToBubbleView ( ) ;
 + if ( mMode == Mode . BubbleView ) {
 + switchToBubbleView ( ) ;
 + } else {
 + switchToExpandedView ( ) ;
 + }
 }

 public void clearTargetPos ( ) {
 <nb> public class CanvasView extends FrameLayout {
 @ suppresswarnings ( STRING0 )
 @ subscribe
 public void onOrientationChanged ( MainController . OrientationChangedEvent e ) {
 - fadeOut ( ) ;
 for ( int i = NUMBER0 ; i < mTargets . size ( ) ; ++ i ) {
 BubbleTargetView bt = mTargets . get ( i ) ;
 bt . OnOrientationChanged ( ) ;

During orientation change consider current mode


<nb> public class InputTypeUtil {
 }

 int hOut = ( inHeight - kH + NUMBER0 * padH ) / sH + NUMBER1 ;
 - int wOut = ( inWidth - kW + NUMBER0 * padW ) / sH + NUMBER1 ;
 + int wOut = ( inWidth - kW + NUMBER0 * padW ) / sW + NUMBER1 ;
 return InputType . convolutional ( hOut , wOut , outputDepth ) ;
 }


<nb> public class SidePanel extends JPanel {

 @ override
 public String getCaptionAboveOf ( final Object value ) {
 - String text = myIndex2Separator . get ( myPlaces . indexOf ( value ) ) ;
 - return text != null && Registry . is ( STRING0 ) ? text . toUpperCase ( ) : text ;
 + return myIndex2Separator . get ( myPlaces . indexOf ( value ) ) ;
 }
 } ;


<nb> import NAMESPACE ;
 import NAMESPACE ;

 public class MagicLinkSignInActivity extends SignInActivity implements WPComMagicLinkFragment . OnMagicLinkFragmentInteraction , MagicLinkSignInFragment . OnMagicLinkRequestListener {
 - private String mEmail = STRING0 ;
 -
 @ override
 protected void onResume ( ) {
 super . onResume ( ) ;


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class WebDavStore extends Store
 response . getStatusLine ( ) . toString ( ) ) ;
 }
 }
 + catch ( SSLException e )
 + {
 + throw new CertificateValidationException ( e . getMessage ( ) , e ) ;
 + }
 catch ( IOException ioe )
 {
 Log . e ( K9 . LOG_TAG , STRING0 + ioe + STRING1 + processException ( ioe ) ) ;

Fix the ability to accept invalid SSL certificates for exchange support


<nb> public class TourViewActivity extends SherlockFragmentActivity {
 FragmentManager fragmentManager = getSupportFragmentManager ( ) ;
 Fragment fragment = fragments . get ( item ) ;
 if ( new Integer ( R . string . sherpafy_tours ) . equals ( item ) ) {
 - if ( fragment == null ) {
 + if ( fragment == null || fragment . getActivity ( ) == null ) {
 fragment = new SherpafySelectToursFragment ( ) ;
 fragments . put ( item , fragment ) ;
 } else {

Fixed null reference on backPressed in Sherpafy


<nb> public class SimpleMapTest {
 System . out . println ( STRING0 + VALUE_SIZE ) ;
 System . out . println ( STRING1 + GET_PERCENTAGE ) ;
 System . out . println ( STRING2 + PUT_PERCENTAGE ) ;
 + System . out . println ( STRING3 + ( NUMBER0 - ( PUT_PERCENTAGE + GET_PERCENTAGE ) ) ) ;
 ExecutorService es = Executors . newFixedThreadPool ( THREAD_COUNT ) ;
 for ( int i = NUMBER1 ; i < THREAD_COUNT ; i ++ ) {
 es . submit ( new Runnable ( ) {


<nb> import NAMESPACE ;
 import NAMESPACE ;

 public class PullToRefreshHelper implements OnRefreshListener {
 - private static String NEED_PTR_TIP = STRING0 ;
 + private static final String NEED_PTR_TIP = STRING0 ;
 private PullToRefreshHeaderTransformer mHeaderTransformer ;
 private PullToRefreshLayout mPullToRefreshLayout ;
 private RefreshListener mRefreshListener ;
 <nb> public class PullToRefreshHelper implements OnRefreshListener {
 createTipView ( activity ) ;
 }

 - public void setTipViewTopMargin ( int topMargin ) {
 - if ( mShowTip && mOnTopMessage != null ) {
 - mOnTopMessage . setTopMargin ( topMargin ) ;
 - }
 - }
 -
 public void setRefreshing ( boolean refreshing ) {
 mHeaderTransformer . setShowProgressBarOnly ( refreshing ) ;
 mPullToRefreshLayout . setRefreshing ( refreshing ) ;

remove unused code and set a constant String final


<nb>
 package NAMESPACE ;

 + COMMENT
 + COMMENT
 + COMMENT
 public interface EpisodeFlags {

 int UNWATCHED = NUMBER0 ;
 <nb> public class SeriesGuideContract {
 String FIRSTAIREDMS = STRING0 ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 String WATCHED = STRING1 ;


<nb> public class HiveSplitManager
 recursiveDfsWalkerEnabled ) . get ( ) ;
 }

 - private Iterable < HivePartitionMetadata > getPartitionMetadata ( final Table table , final SchemaTableName tableName , List < HivePartition > partitions )
 + private Iterable < HivePartitionMetadata > getPartitionMetadata ( Table table , SchemaTableName tableName , List < HivePartition > partitions )
 throws NoSuchObjectException
 {
 if ( partitions . isEmpty ( ) ) {
 <nb> public class HiveSplitManager
 COMMENT
 COMMENT
 COMMENT
 - private static < T > Iterable < List < T > > partitionExponentially ( final List < T > values , final int minBatchSize , final int maxBatchSize )
 + private static < T > Iterable < List < T > > partitionExponentially ( List < T > values , int minBatchSize , int maxBatchSize )
 {
 return ( ) - > new AbstractIterator < List < T > > ( )
 {


<nb> public class PrepareContractionHierarchies extends AbstractAlgoPreparation < Prepa
 SINGLE
 SINGLE
 double existingDirectWeight = v_u_weight + prepareWeighting . calcWeight ( outgoingEdges ) ;
 + if ( existingDirectWeight >= Double . MAX_VALUE )
 + continue ;
 double existingDistSum = v_u_dist + outgoingEdges . getDistance ( ) ;
 algo . setLimitWeight ( existingDirectWeight )
 . setLimitVisitedNodes ( ( int ) meanDegree * NUMBER0 )


<nb> public class DeepWaterTest extends TestUtil {
 names [ i ] = STRING0 + i ;
 double [ ] vals = new double [ batch_size ] ;
 for ( int j = NUMBER0 ; j < batch_size ; ++ j ) {
 - int idx = i * batch_size + j ; SINGLE
 + int idx = j * classes + i ; SINGLE
 vals [ j ] = pred [ idx ] ;
 }
 classprobs [ i ] = Vec . makeVec ( vals , Vec . newKey ( ) ) ;


<nb> public class TestOpenSSLCipherConfigurationParser {

 TesterOpenSSL . removeUnimplementedCiphersJsse ( jsseCipherListFromParser ) ;

 - SINGLE
 - Assert . assertEquals ( jsseCipherListFromOpenSSL . toString ( ) ,
 - jsseCipherListFromParser . toString ( ) ) ;
 + SINGLE
 + Assert . assertEquals ( jsseCipherListFromOpenSSL , jsseCipherListFromParser ) ;

 SINGLE
 SINGLE


<nb> public class MapInfoLayer extends OsmandMapLayer {
 registerSideWidget ( alt , R . drawable . ic_action_altitude , R . string . map_widget_altitude , STRING0 , false , NUMBER0 ) ;
 TextInfoWidget gpsInfo = mic . createGPSInfoControl ( map ) ;

 - registerSideWidget ( gpsInfo , R . drawable . ic_action_gps_info , R . string . map_widget_gps_info , STRING1 , false , NUMBER1 ) ;
 + registerSideWidget ( gpsInfo , R . drawable . ic_action_gps_info , R . string . map_widget_gps_info , STRING1 , false , NUMBER2 ) ;
 TextInfoWidget plainTime = ric . createPlainTimeControl ( map ) ;
 registerSideWidget ( plainTime , R . drawable . ic_action_time , R . string . map_widget_plain_time , STRING2 , false , NUMBER3 ) ;
 TextInfoWidget battery = ric . createBatteryControl ( map ) ;

Move gps widget to bottom of position related group


<nb> package NAMESPACE ;

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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class StateTransitionLogger
 line . append ( STRING0 + transition . getMessage ( ) . getHeader ( FROM ) ) ;
 }

 + if ( transition . getMessage ( ) . hasHeader ( INSTANCE ) )
 + {
 + line . append ( STRING1 + transition . getMessage ( ) . getHeader ( INSTANCE ) ) ;
 + }
 +
 if ( transition . getMessage ( ) . hasHeader ( CONVERSATION_ID ) )
 {
 line . append ( STRING2 + transition . getMessage ( ) . getHeader ( CONVERSATION_ID ) ) ;

Adds output of Paxos instance in StateTransitionLogger


<nb> public class Utility {
 public static boolean domainFieldValid ( EditText view ) {
 if ( view . getText ( ) != null ) {
 String s = view . getText ( ) . toString ( ) ;
 - if ( s . matches ( STRING0 ) ) {
 + if ( s . matches ( STRING1 ) ) {
 return true ;
 }
 if ( s . matches ( STRING2 ) ) {

Removed ability to add slashes url type parameters onto the server


<nb> public class TemplateTest extends TestCase {
 Map binding = new HashMap ( ) ;
 binding . put ( STRING0 , STRING1 ) ;
 Template template = new SimpleTemplateEngine ( ) . createTemplate ( STRING2 ) ;
 - template . setBinding ( binding . getVariables ( ) ) ;
 + template . setBinding ( binding ) ;
 assertEquals ( STRING1 , template . toString ( ) ) ;
 }
 }


<nb>
 package NAMESPACE ;

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

 <nb> public interface ProtocolNegotiator {
 COMMENT
 COMMENT
 COMMENT
 - interface Handler extends ChannelInboundHandler {
 + interface Handler extends ChannelHandler {
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ProtocolNegotiators {
 return new ProtocolNegotiator ( ) {
 @ override
 public Handler newHandler ( final Http2ConnectionHandler handler ) {
 - class PlaintextHandler extends ChannelDuplexHandler implements Handler {
 + class PlaintextHandler extends ChannelHandlerAdapter implements Handler {
 @ override
 public void handlerAdded ( ChannelHandlerContext ctx ) throws Exception {
 SINGLE

Negotiation Handlers should implement ChannelHandler


<nb> public class MediaSessionService extends SystemService implements Monitor {
 final int pid = Binder . getCallingPid ( ) ;
 final int uid = Binder . getCallingUid ( ) ;
 final long token = Binder . clearCallingIdentity ( ) ;
 + if ( DEBUG ) {
 + Log . d ( TAG , STRING0 + pid + STRING1 + uid + STRING2
 + + keyEvent ) ;
 + }

 try {
 synchronized ( mLock ) {

Add extra logging for media button events


<nb> public abstract class AbstractProtocol < S > implements ProtocolHandler ,
 if ( upgradeProtocol != null ) {
 processor = upgradeProtocol . getProcessor (
 wrapper , getProtocol ( ) . getAdapter ( ) ) ;
 - connections . put ( socket , processor ) ;
 } else if ( negotiatedProtocol . equals ( STRING0 ) ) {
 SINGLE
 SINGLE


<nb> public class SQLServer2005Dialect extends SQLServerDialect {
 return false ;
 }

 + @ override
 public boolean supportsVariableLimit ( ) {
 return false ;
 }

Added Override to the supportsVariableLimit method


<nb> enum Cipher {
 Protocol protocol , boolean export , EncryptionLevel level , boolean fipsCompatible , int strength_bits ,
 int alg_bits , String . . . jsseAltNames ) {
 this . openSSLAlias = openSSLAlias ;
 - Set < String > names = new HashSet < String > ( ) ;
 + Set < String > names = new HashSet < > ( ) ;
 if ( jsseAltNames != null ) {
 names . addAll ( Arrays . asList ( jsseAltNames ) ) ;
 }


<nb> public class DnsTestClient extends TestClientBase {
 }
 } ) ;

 - dns . lookup ( STRING0 , new Handler < AsyncResult < InetAddress > > ( ) {
 + dns . lookup4 ( STRING0 , new Handler < AsyncResult < Inet4Address > > ( ) {
 @ override
 - public void handle ( AsyncResult < InetAddress > event ) {
 + public void handle ( AsyncResult < Inet4Address > event ) {
 InetAddress result = event . result ( ) ;
 tu . azzert ( result != null ) ;
 tu . azzert ( STRING1 . equals ( result . getHostAddress ( ) ) ) ;


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - @ weblistener
 public class GitblitContext extends GuiceServletContextListener {

 private static GitblitContext gitblit ;


<nb> public class GeoBroker extends Plugin {
 COMMENT
 COMMENT
 public void onDestroy ( ) {
 - this . networkListener . destroy ( ) ;
 - this . gpsListener . destroy ( ) ;
 - this . networkListener = null ;
 - this . gpsListener = null ;
 + if ( this . networkListener != null ) {
 + this . networkListener . destroy ( ) ;
 + this . networkListener = null ;
 + }
 + if ( this . gpsListener != null ) {
 + this . gpsListener . destroy ( ) ;
 + this . gpsListener = null ;
 + }
 }

 COMMENT

Fix NPE on reset with undefined NetworkListener


<nb> package NAMESPACE ;

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

 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public class BeanSerializer {
 }

 if ( propertyName != null ) {
 + FieldDescriptor fieldDescriptor = propertyDescriptor . getFieldDescriptor ( ) ;
 +
 + if ( fieldDescriptor != null ) {
 + if ( Modifier . isTransient ( fieldDescriptor . getField ( ) . getModifiers ( ) ) ) {
 + SINGLE
 + continue ;
 + }
 + }
 +
 onProperty ( propertyName , propertyType , propertyDescriptor ) ;
 }
 }

Ignore properties with transient fields from serialization


<nb> public class IndexService extends AbstractIndexComponent implements IndexCompone
 Injector shardInjector = null ;
 try {
 lock = nodeEnv . shardLock ( shardId , TimeUnit . SECONDS . toMillis ( NUMBER0 ) ) ;
 + indicesLifecycle . beforeIndexShardCreated ( shardId , indexSettings ) ;
 ShardPath path ;
 try {
 path = ShardPath . loadShardPath ( logger , nodeEnv , shardId , indexSettings ) ;
 <nb> public class IndexService extends AbstractIndexComponent implements IndexCompone
 throw new IndexShardAlreadyExistsException ( shardId + STRING0 ) ;
 }

 - indicesLifecycle . beforeIndexShardCreated ( shardId , indexSettings ) ;
 logger . debug ( STRING1 , shardId ) ;
 SINGLE
 final boolean canDeleteShardContent = IndexMetaData . isOnSharedFilesystem ( indexSettings ) == false ||

Call beforeIndexShardCreated listener earlier in createShard


<nb> public class PathManager {
 return ourSystemPath ;
 }

 - public static void ensureConfigFolderExists ( boolean userInteractionAllowed ) {
 + public static void ensureConfigFolderExists ( boolean userInteractionAllowed , final boolean createIfNotExists ) {
 getConfigPathWithoutDialog ( ) ;

 File file = new File ( ourConfigPath ) ;
 - if ( ! file . exists ( ) ) {
 + if ( createIfNotExists && ! file . exists ( ) ) {
 file . mkdirs ( ) ;
 if ( userInteractionAllowed ) {
 ConfigImportHelper . importConfigsTo ( ourConfigPath ) ;
 <nb> public class PathManager {
 }

 public static String getConfigPath ( boolean createIfNotExists ) {
 - if ( createIfNotExists ) {
 - ensureConfigFolderExists ( false ) ;
 - }
 + ensureConfigFolderExists ( false , createIfNotExists ) ;
 return ourConfigPath ;
 }


<nb> public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
 COMMENT
 COMMENT
 COMMENT
 + @ awaitsfix ( bugUrl = STRING0 )
 public void testIndicesDeleted ( ) throws Exception {
 configureUnicastCluster ( NUMBER0 , null , NUMBER1 ) ;
 InternalTestCluster . Async < List < String > > masterNodes = internalCluster ( ) . startMasterOnlyNodesAsync ( NUMBER1 ) ;

Add AwaitsFix annotation to the sporadically failing test


<nb> public class CursorToMessage {
 values . put ( CallLog . Calls . DATE , getHeader ( message , Headers . DATE ) ) ;
 values . put ( CallLog . Calls . DURATION , Long . valueOf ( getHeader ( message , Headers . DURATION ) ) ) ;
 values . put ( CallLog . Calls . NEW , Integer . valueOf ( NUMBER0 ) ) ;
 +
 + PersonRecord record = lookupPerson ( getHeader ( message , Headers . ADDRESS ) ) ;
 + if ( ! record . unknown ) {
 + values . put ( CallLog . Calls . CACHED_NAME , record . name ) ;
 + }
 +
 break ;
 default : throw new MessagingException ( STRING0 + getDataType ( message ) ) ;
 }


<nb> import NAMESPACE ;
 COMMENT
 public class ListenersNotifyingIntegrationTests extends AndroidTestCase {

 + private static final long ASYNC_TEST_TIMEOUT = NUMBER0 ;
 +
 private static class StubListener implements IBambooStorageListener {

 private AtomicBoolean mAddCalled = new AtomicBoolean ( false ) ;
 <nb> public class ListenersNotifyingIntegrationTests extends AndroidTestCase {
 private static void shouldBeTrueInNearFuture ( AtomicBoolean atomicBoolean ) {
 final long startTime = System . currentTimeMillis ( ) ;

 - while ( System . currentTimeMillis ( ) - startTime < NUMBER1 ) {
 + while ( System . currentTimeMillis ( ) - startTime < ASYNC_TEST_TIMEOUT ) {
 + try {
 + Thread . sleep ( NUMBER2 ) ; SINGLE
 + } catch ( InterruptedException e ) {
 + fail ( STRING0 + e ) ;
 + }
 +
 if ( atomicBoolean . get ( ) ) {
 return ;
 }
 }

 - fail ( STRING1 ) ;
 + fail ( STRING2 + ASYNC_TEST_TIMEOUT + STRING3 ) ;
 }

 public void testNotifyAboutAdd ( ) {

test improved async tests in ListenersNotifyingIntegrationTests


<nb> public class StreetlessStopLinker implements GraphBuilder {
 Coordinate c = ts . getCoordinate ( ) ;
 LOG . trace ( STRING0 , ts ) ;
 int n = NUMBER0 ;
 - for ( TransitStop other : index . getNearbyTransitStops ( c , NUMBER1 ) ) {
 + for ( TransitStop other : index . getNearbyTransitStops ( c , radius ) ) {
 int distance = ( int ) distanceLibrary . distance ( c , other . getCoordinate ( ) ) ;
 LOG . trace ( STRING1 , other , distance ) ;
 new SimpleTransfer ( ts , other , distance ) ;


<nb> public class QueryRunner
 Optional < String > kerberosRemoteServiceName ,
 boolean authenticationEnabled )
 {
 - HttpClientConfig httpClientConfig = new HttpClientConfig ( ) . setConnectTimeout ( new Duration ( NUMBER0 , TimeUnit . SECONDS ) ) ;
 + HttpClientConfig httpClientConfig = new HttpClientConfig ( )
 + . setConnectTimeout ( new Duration ( NUMBER1 , TimeUnit . SECONDS ) )
 + . setRequestTimeout ( new Duration ( NUMBER1 , TimeUnit . SECONDS ) ) ;

 socksProxy . ifPresent ( httpClientConfig : : setSocksProxy ) ;


<nb> public class JZlibEncoder extends ZlibEncoder {

 SINGLE
 int maxOutputLength = ( int ) Math . ceil ( inputLength * FLOAT0 ) + NUMBER0 ;
 + out . ensureWritable ( maxOutputLength ) ;
 z . avail_out = maxOutputLength ;
 z . next_out = out . array ( ) ;
 z . next_out_index = out . arrayOffset ( ) + out . writerIndex ( ) ;

Fix IndexOutOfBoundsException raised by JZlibEncoder encode


<nb> public class UltimateRecyclerView extends FrameLayout implements Scrollable {
 COMMENT
 COMMENT
 if ( mAdapter . getAdapterItemCount ( ) == NUMBER0 ) {
 - mEmpty . setVisibility ( mEmptyId == NUMBER0 ? View . VISIBLE : View . GONE ) ;
 + mEmpty . setVisibility ( mEmptyId != NUMBER0 ? View . VISIBLE : View . GONE ) ;
 }
 if ( mAdapter . getCustomLoadMoreView ( ) == null ) return ;
 if ( mAdapter . getAdapterItemCount ( ) >= showLoadMoreItemNum && mAdapter . getCustomLoadMoreView ( ) . getVisibility ( ) == View . GONE ) {

fix the empty view problem in UltimateRecyclerview


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

 <nb> public class SkipUpToDateTaskExecuter implements TaskExecuter {

 public void execute ( TaskInternal task , TaskStateInternal state , TaskExecutionContext context ) {
 LOGGER . debug ( STRING0 , task ) ;
 + Clock clock = new Clock ( ) ;
 TaskArtifactState taskArtifactState = repository . getStateFor ( task ) ;
 try {
 List < String > messages = new ArrayList < String > ( ) ;
 if ( taskArtifactState . isUpToDate ( messages ) ) {
 - LOGGER . info ( STRING1 , task ) ;
 + LOGGER . info ( STRING2 , task , clock . getTime ( ) ) ;
 state . upToDate ( ) ;
 return ;
 }

Added a little info in an existing log message that shows how long the up to date check took


<nb> public abstract class AbstractMemoryHttpData extends AbstractHttpData {
 int written = NUMBER0 ;
 while ( written < length ) {
 written += fileChannel . write ( byteBuffer ) ;
 - fileChannel . force ( false ) ;
 }
 + fileChannel . force ( false ) ;
 fileChannel . close ( ) ;
 isRenamed = true ;
 return written == length ;

Move force after multiple writes not at every steps


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

removed uneeded clases in GremlinFluentUtilityTest


<nb> public class DesktopImportControllerUI implements ImportControllerUI {
 ImporterUI ui = controller . getUI ( importer ) ;
 if ( ui != null ) {
 ui . setup ( importer ) ;
 - String title = NbBundle . getMessage ( DesktopImportControllerUI . class , STRING0 ) ;
 + String title = NbBundle . getMessage ( DesktopImportControllerUI . class , STRING0 , ui . getDisplayName ( ) ) ;
 JPanel panel = ui . getPanel ( ) ;
 final DialogDescriptor dd = new DialogDescriptor ( panel , title ) ;
 if ( panel instanceof ValidationPanel ) {


<nb> public final class InodeTree implements JournalCheckpointStreamable {
 COMMENT
 COMMENT
 COMMENT
 - public CreatePathResult createPath ( AlluxioURI path , CreatePathOptions options )
 + public CreatePathResult createPath ( AlluxioURI path , CreatePathOptions < ? > options )
 throws FileAlreadyExistsException , BlockInfoException , InvalidPathException , IOException {
 if ( path . isRoot ( ) ) {
 LOG . info ( ExceptionMessage . FILE_ALREADY_EXISTS . getMessage ( path ) ) ;
 <nb> import NAMESPACE ;

 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 @ notthreadsafe

Add generic to raw CreatePathOptions usage


<nb> public abstract class ParseTime {
 if ( t0 != Long . MIN_VALUE ) return t0 ;
 long t2 = attemptTimeParse_2 ( str ) ; SINGLE
 if ( t2 != Long . MIN_VALUE ) return t2 ;
 - } catch ( org . joda . time . IllegalFieldValueException ie ) { }
 + } catch ( org . joda . time . IllegalFieldValueException | SINGLE
 + org . joda . time . IllegalInstantException SINGLE
 + ie ) { }
 return Long . MIN_VALUE ;
 }
 SINGLE

Handle another JODA time parse exception


<nb> public class PackagedProgram {
 Throwable exceptionInMethod = e . getTargetException ( ) ;
 if ( exceptionInMethod instanceof Error ) {
 throw ( Error ) exceptionInMethod ;
 + } else if ( exceptionInMethod instanceof ProgramInvocationException ) {
 + throw ( ProgramInvocationException ) exceptionInMethod ;
 } else {
 throw new ProgramInvocationException ( STRING0 , exceptionInMethod ) ;
 }

Avoid unnecessary exception wrapping in PackagedProgram invokation


<nb> import NAMESPACE ;
 COMMENT
 public class SentenceTokenizerTest extends TestCase {

 + private SentenceTokenizer stokenizer = new SentenceTokenizer ( ) ;
 +
 public void testTokenize ( ) {
 SINGLE
 SINGLE
 <nb> public class SentenceTokenizerTest extends TestCase {
 String s = ( String ) iter . next ( ) ;
 inputString . append ( s ) ;
 }
 - SentenceTokenizer stokenizer = new SentenceTokenizer ( ) ;
 assertEquals ( input , stokenizer . tokenize ( inputString . toString ( ) ) ) ;
 }


<nb> public class PluginManager {
 COMMENT
 COMMENT
 public boolean installPlugin ( InputStream in , String pluginFilename ) {
 + if ( in == null || pluginFilename == null || pluginFilename . length ( ) < NUMBER0 ) {
 + Log . error ( STRING0 ) ;
 + return false ;
 + }
 try {
 byte [ ] b = new byte [ NUMBER1 ] ;
 int len ;
 + SINGLE
 + int index = pluginFilename . lastIndexOf ( File . separator ) ;
 + if ( index != - NUMBER0 ) {
 + pluginFilename = pluginFilename . substring ( index + NUMBER0 ) ;
 + }
 SINGLE
 String absolutePath = pluginDirectory + File . separator + pluginFilename ;
 SINGLE

Added a little more robustness to installPlugin routine


<nb>

 package NAMESPACE ;

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

 import NAMESPACE ;

 <nb> public class DBCursor implements Iterator < DBObject > , Iterable < DBObject > {
 COMMENT
 COMMENT
 public DBCursor addOption ( int option ) {
 + if ( option == Bytes . QUERYOPTION_EXHAUST )
 + throw new IllegalArgumentException ( STRING0 ) ;
 +
 _options |= option ;
 return this ;
 }
 <nb> public class DBCursor implements Iterator < DBObject > , Iterable < DBObject > {
 public List < DBObject > toArray ( int max )
 throws MongoException {
 _checkType ( CursorType . ARRAY ) ;
 - _fill ( max ) ;
 + _fill ( max - NUMBER0 ) ;
 return _all ;
 }


<nb> public class OStorageRemote extends OStorageAbstract implements OStorageProxy {

 final List < ODocument > members = clusterConfiguration . field ( STRING0 ) ;
 if ( members != null ) {
 - SINGLE
 + serverURLs . clear ( ) ;

 for ( ODocument m : members )
 if ( m != null && ! serverURLs . contains ( ( String ) m . field ( STRING1 ) ) ) {

clients rebuild from scratch the list of available nodes on


<nb> public class DummyProxySession implements Session {
 public void setValid ( boolean isValid ) {
 SINGLE
 }
 +
 + @ override
 + public void tellChangedSessionId ( String newId , String oldId ,
 + boolean notifySessionListeners , boolean notifyContainerListeners ) {
 + SINGLE
 + }
 }


<nb> public class OAuth10aServiceImpl implements OAuthService
 config . log ( STRING0 + requestToken + STRING1 + verifier ) ;
 addOAuthParams ( request , requestToken ) ;
 appendSignature ( request ) ;
 +
 + config . log ( STRING2 ) ;
 Response response = request . send ( tuner ) ;
 - return api . getAccessTokenExtractor ( ) . extract ( response . getBody ( ) ) ;
 + String body = response . getBody ( ) ;
 +
 + config . log ( STRING3 + response . getCode ( ) ) ;
 + config . log ( STRING4 + body ) ;
 + return api . getAccessTokenExtractor ( ) . extract ( body ) ;
 }

 COMMENT

Added request logging to OAuth10aServiceImpl getAccessToken


<nb> public class FailureDetector implements IFailureDetector , FailureDetectorMBean
 private static final long DEFAULT_MAX_PAUSE = NUMBER0 * NUMBER1 ; SINGLE
 private static final long MAX_LOCAL_PAUSE_IN_NANOS = getMaxLocalPause ( ) ;
 private long lastInterpret = System . nanoTime ( ) ;
 - private boolean wasPaused = false ;
 + private long lastPause = NUMBER2 L ;

 private static long getMaxLocalPause ( )
 {
 <nb> public class FailureDetector implements IFailureDetector , FailureDetectorMBean
 if ( diff > MAX_LOCAL_PAUSE_IN_NANOS )
 {
 logger . warn ( STRING0 , diff , MAX_LOCAL_PAUSE_IN_NANOS ) ;
 - wasPaused = true ;
 + lastPause = now ;
 return ;
 }
 - if ( wasPaused )
 + if ( System . nanoTime ( ) - lastPause < MAX_LOCAL_PAUSE_IN_NANOS )
 {
 - wasPaused = false ;
 + logger . debug ( STRING1 ) ;
 return ;
 }
 double phi = hbWnd . phi ( now ) ;

Don t mark nodes down before the max local pause interval once paused


<nb> public class NotificationManagerService extends INotificationManager . Stub
 if ( ( ( mDisabledNotifications & StatusBarManager . DISABLE_NOTIFICATION_ALERTS ) == NUMBER0 )
 && ( ! ( old != null
 && ( notification . flags & Notification . FLAG_ONLY_ALERT_ONCE ) != NUMBER0 ) )
 - && ( r . userId == UserHandle . USER_ALL || r . userId == userId )
 + && ( r . userId == UserHandle . USER_ALL ||
 + ( r . userId == userId && r . userId == ActivityManager . getCurrentUser ( ) ) )
 && mSystemReady ) {

 final AudioManager audioManager = ( AudioManager ) mContext

Only play notification sounds for active user


<nb> import static NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ suppresswarnings ( STRING0 )
 public class CommonsPoolTargetSourceTests {

 COMMENT


<nb> public class ReactiveLocationProvider {
 COMMENT
 COMMENT
 COMMENT
 - public Observable < PlacePhotoMetadataResult > getPhotoMetadataById ( @ nullable final String placeId ) {
 + public Observable < PlacePhotoMetadataResult > getPhotoMetadataById ( final String placeId ) {
 return getGoogleApiClientObservable ( Places . PLACE_DETECTION_API , Places . GEO_DATA_API )
 . flatMap ( new Func1 < GoogleApiClient , Observable < PlacePhotoMetadataResult > > ( ) {
 @ override
 <nb> public class ReactiveLocationProvider {
 COMMENT
 COMMENT
 COMMENT
 - public Observable < PlacePhotoResult > getPhotoForMetadata ( @ nullable final PlacePhotoMetadata placePhotoMetadata ) {
 + public Observable < PlacePhotoResult > getPhotoForMetadata ( final PlacePhotoMetadata placePhotoMetadata ) {
 return getGoogleApiClientObservable ( Places . PLACE_DETECTION_API , Places . GEO_DATA_API )
 . flatMap ( new Func1 < GoogleApiClient , Observable < PlacePhotoResult > > ( ) {
 @ override

Removed wrong nullable annotations on method params


<nb> public class PostgreSQLSqlScriptSmallTest {
 STRING0 +
 STRING1 +
 STRING2 +
 - STRING3 +
 + STRING4 +
 STRING5 +
 STRING6 +
 STRING0 +
 STRING7 +
 STRING8 +
 - STRING9 +
 + STRING10 +
 STRING8 +
 STRING11 ;
 final PostgreSQLSqlScript script = new PostgreSQLSqlScript ( sqlScriptSource , PlaceholderReplacer . NO_PLACEHOLDERS ) ;


<nb> public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
 this . uuid = getIntent ( ) . getExtras ( ) . getString ( STRING0 ) ;
 }
 if ( uuid != null ) {
 - this . mConversation = xmppConnectionService
 - . findConversationByUuid ( uuid ) ;
 + this . mConversation = xmppConnectionService . findConversationByUuid ( uuid ) ;
 if ( this . mConversation != null ) {
 updateView ( ) ;
 }
 <nb> public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
 }

 private void updateView ( ) {
 + invalidateOptionsMenu ( ) ;
 final MucOptions mucOptions = mConversation . getMucOptions ( ) ;
 final User self = mucOptions . getSelf ( ) ;
 String account ;

redraw options menu after rotation in muc details


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class ColumnIdentifier implements RawSelector , Comparable < ColumnIdentifier >
 + public class ColumnIdentifier implements RawSelector
 {
 public final ByteBuffer key ;
 private final String text ;
 <nb> public class ColumnIdentifier implements RawSelector , Comparable < ColumnIdentifie
 this . key = ByteBufferUtil . bytes ( this . text ) ;
 }

 - public ColumnIdentifier ( ByteBuffer key , AbstractType type )
 + public ColumnIdentifier ( ByteBuffer key , AbstractType < ? > type )
 {
 this . key = key ;
 this . text = type . getString ( key ) ;
 <nb> public class ColumnIdentifier implements RawSelector , Comparable < ColumnIdentifie
 {
 return text ;
 }
 -
 - public int compareTo ( ColumnIdentifier other )
 - {
 - return key . compareTo ( other . key ) ;
 - }
 }

Remove unused and slightly broken ColumnIdentifier compareTo


<nb> public class IpnbMarkdownPanel extends IpnbEditablePanel < JPanel , IpnbMarkdownCel
 @ override
 public void updateCellView ( ) {
 final String text = myEditablePanel . getText ( ) ;
 - myCell . setSource ( text == null ? new String [ ] { } : StringUtil . splitByLines ( text ) ) ;
 + myCell . setSource ( text == null ? new String [ ] { } : StringUtil . splitByLinesKeepSeparators ( text ) ) ;
 updatePanel ( myViewPanel ) ;
 }

keep separators in markdown cell on cell run


<nb> public final class TestNodeRegistry {
 public String toString ( ) {
 return STRING0 +
 STRING1 + localEndpoint +
 - STRING2 + localConnection +
 STRING3 + remoteEndpoint +
 STRING4 ;
 }

remove connection from MockConnection class because it was causing recursive endless call when local connection MockConnection localConnection MockConnection this


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

 import NAMESPACE ;

add groovy position manager todo utilize qName caches


<nb> public class ViewPager extends ViewGroup {
 mItems . clear ( ) ;
 removeAllViews ( ) ;
 mCurItem = NUMBER0 ;
 + scrollTo ( NUMBER0 , NUMBER0 ) ;
 }

 mAdapter = adapter ;


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

 COMMENT
 COMMENT
 <nb> public class PlanPostPurchaseFragment extends Fragment {
 TextView txtDescription = ( TextView ) rootView . findViewById ( R . id . text_description ) ;
 Button button = ( Button ) rootView . findViewById ( R . id . button ) ;

 + SINGLE
 + if ( DisplayUtils . isLandscape ( getActivity ( ) ) ) {
 + PercentRelativeLayout . LayoutParams params = ( PercentRelativeLayout . LayoutParams ) image . getLayoutParams ( ) ;
 + PercentLayoutHelper . PercentLayoutInfo info = params . getPercentLayoutInfo ( ) ;
 + if ( info != null ) {
 + info . heightPercent = FLOAT0 ;
 + }
 + }
 +
 int titleResId ;
 int textResId ;
 int buttonResId ;


<nb> public class DruidDataSourceTest_notEmptyWait extends TestCase {

 endLatch . await ( NUMBER0 , TimeUnit . MILLISECONDS ) ;

 + Thread . sleep ( NUMBER1 ) ;
 Assert . assertEquals ( NUMBER2 , dataSource . getNotEmptyWaitThreadCount ( ) ) ;
 Assert . assertEquals ( NUMBER1 , dataSource . getNotEmptyWaitThreadPeak ( ) ) ;
 }


<nb>

 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 + @ immutable
 public class LazyDBObject extends LazyBSONObject implements DBObject {

 private boolean isPartial = false ;
 <nb> import NAMESPACE ;
 import static NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class LazyBSONObject implements BSONObject {
 private final byte [ ] bytes ;
 <nb> public class LazyBSONObject implements BSONObject {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public LazyBSONObject ( final byte [ ] bytes , final int offset , final LazyBSONCallback callback ) {
 <nb> public class LazyBSONObject implements BSONObject {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Added Javadoc for all the lazy BSON object types


<nb> import NAMESPACE ;
 JUnit4MethodProvider . class
 } )
 @ listeners ( {
 - ReproduceInfoPrinter . class
 + ReproduceInfoPrinter . class ,
 + FailureMarker . class
 } )
 @ runwith ( value = com . carrotsearch . randomizedtesting . RandomizedRunner . class )
 @ suppresscodecs ( value = STRING0 )

TEST Add FailureMarker to test listeners so Dtests failfast works


<nb> public class TransactionPropagator implements Lifecycle
 {
 try
 {
 - SINGLE
 + SINGLE
 SINGLE
 SINGLE
 - SINGLE
 + SINGLE
 + pusher . queuePush ( slave , txId ) ;

 - slave . pullUpdates ( txId ) ;
 return null ;
 }
 finally


<nb> public class InsertIntoIntegrationTest extends SQLTransportIntegrationTest {
 STRING0 +
 STRING1 ) ;
 ensureYellow ( ) ;
 - int bulkSize = randomIntBetween ( NUMBER0 , NUMBER1 ) ;
 + int bulkSize = randomIntBetween ( NUMBER0 , NUMBER2 ) ;
 Object [ ] [ ] bulkArgs = new Object [ bulkSize ] [ ] ;
 for ( int i = NUMBER3 ; i < bulkSize ; i ++ ) {
 bulkArgs [ i ] = new Object [ ] { System . currentTimeMillis ( ) + i , new String [ ] { randomAsciiOfLength ( NUMBER4 ) , randomAsciiOfLength ( NUMBER5 ) } , ( short ) i } ;


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

 - import static NAMESPACE ;
 -
 public class Stream {
 private final StreamService streamService ;


<nb> public class TemporaryFolder extends ExternalResource {
 File file = getRoot ( ) ;
 for ( String folderName : folderNames ) {
 file = new File ( file , folderName ) ;
 - file . mkdir ( ) ;
 + if ( ! file . mkdir ( ) )
 + throw new IllegalStateException (
 + STRING0 + folderName + STRING1 ) ;
 }
 return file ;
 }
 <nb> public class TemporaryFolderUsageTest {

 @ test ( expected = IllegalStateException . class )
 public void newFolderWithGivenPathThrowsIllegalStateExceptionIfCreateWasNotInvoked ( ) {
 - new TemporaryFolder ( ) . newFolder ( STRING2 , STRING3 , STRING4 ) ;
 + new TemporaryFolder ( ) . newFolder ( STRING2 , STRING5 , STRING6 ) ;
 + }
 +
 + @ test ( expected = IllegalStateException . class )
 + public void newFolderWithGivenPathThrowsIllegalStateExceptionIfPathExists ( ) throws IOException {
 + tempFolder . create ( ) ;
 + tempFolder . newFolder ( STRING2 , STRING5 , STRING6 ) ;
 + tempFolder . newFolder ( STRING2 , STRING5 , STRING6 ) ;
 }

 @ test

Throw an IllegalStateException when the folder already exists


<nb> public class DataLanguageBlockWrapper implements ASTBlock , BlockEx , BlockWithPar
 if ( node != null ) {
 final PsiElement psi = node . getPsi ( ) ;
 if ( psi != null ) {
 - language = psi . getLanguage ( ) ;
 + language = psi . getContainingFile ( ) . getLanguage ( ) ;
 }
 }
 myLanguage = language ;

Correctly derive the language from root file type a case of XML HTML elements mix


<nb> public class IQ extends Packet {
 buf . append ( queryXML ) ;
 }
 buf . append ( STRING0 ) ;
 - SINGLE
 - String propertiesXML = getPropertiesXML ( ) ;
 - if ( propertiesXML != null ) {
 - buf . append ( propertiesXML ) ;
 - }
 SINGLE
 XMPPError error = getError ( ) ;
 if ( error != null ) {

IQ packets should never include properties since doing so violates the XMPP spec


<nb> public final class BlackPointEstimator {

 SINGLE
 int bestValley = secondPeak - NUMBER0 ;
 - int bestValleyScore = Integer . MAX_VALUE ;
 + int bestValleyScore = - NUMBER0 ;
 for ( int i = secondPeak - NUMBER0 ; i > firstPeak ; i -- ) {
 - int distance = secondPeak - i + NUMBER1 ;
 - int score = distance * histogram [ i ] ;
 - if ( score < bestValleyScore ) {
 + int fromFirst = i - firstPeak ;
 + SINGLE
 + SINGLE
 + int score = fromFirst * fromFirst * ( secondPeak - i ) * ( NUMBER2 - histogram [ i ] ) ;
 + if ( score > bestValleyScore ) {
 bestValley = i ;
 bestValleyScore = score ;
 }
 <nb> public final class QRCodeReaderTestCase extends TestCase {
 STRING0 ) ;
 doTestURI ( STRING1 ,
 STRING2 ) ;
 + doTestURI ( STRING3 ,
 + STRING4 ) ;
 }

 private static void doTestURI ( final String uriString , final String expected )

Improved black point estimation favor a point not white so close the white peak


<nb> public abstract class AbstractGenruleStep extends ShellStep {
 ExecutionArgsAndCommand original = getCommandAndExecutionArgs ( platform , target ) ;
 String expandedCommand = original . command ;
 for ( Map . Entry < String , String > variable : environmentVariablesToExpand . entrySet ( ) ) {
 - expandedCommand = original . command
 + expandedCommand = expandedCommand
 . replace ( STRING0 + variable . getKey ( ) , variable . getValue ( ) )
 . replace ( STRING1 + variable . getKey ( ) + STRING2 , variable . getValue ( ) ) ;
 }


<nb> public class ExpectedTypesProvider {
 LOG . error ( STRING0 + parameter . getClass ( ) + STRING1 + parameter . getType ( ) ) ;
 }
 }
 - PsiType parameterType = GenericsUtil . getVariableTypeByExpressionType ( substitutor . substitute ( type ) ) ;
 + PsiType parameterType = substitutor . substitute ( type ) ;
 if ( parameterType instanceof PsiCapturedWildcardType ) {
 parameterType = ( ( PsiCapturedWildcardType ) parameterType ) . getWildcard ( ) ;
 }


<nb> public class VolumeNavigationDelegate {
 }
 switch ( direction ) {
 case DIRECTION_UP :
 - if ( mAppBarEnabled && ! mScrollable . scrollToPrevious ( ) && mAppBarLayout != null ) {
 + if ( ! mScrollable . scrollToPrevious ( ) && mAppBarEnabled && mAppBarLayout != null ) {
 mAppBarLayout . setExpanded ( true , true ) ;
 }
 break ;


<nb> public abstract class GraphDatabaseSettings
 public static final Setting < String > pagecache_swapper =
 setting ( STRING0 , STRING , ( String ) null ) ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ description ( STRING1 +
 STRING2 +
 STRING3 +
 <nb> public abstract class GraphDatabaseSettings
 {
 return new BoltConnector ( key ) ;
 }
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - private static int dynamicRecordDataSizeForAligningWith ( int recordSize )
 - {
 - return recordSize - DynamicRecordFormat . RECORD_HEADER_SIZE ;
 - }
 }

Add additional comment on data block sizes properties evaluation lifecycle


<nb> public class Uploader extends FileActivity

 SINGLE
 int index = displayName . lastIndexOf ( STRING0 ) ;
 - if ( index != - NUMBER0 || MimeTypeMap . getSingleton ( ) .
 - getMimeTypeFromExtension ( displayName . substring ( index ) ) == null ) {
 - displayName += STRING0 + MimeTypeMap . getSingleton ( ) . getExtensionFromMimeType ( mimeType ) ;
 + if ( index == - NUMBER0 || MimeTypeMap . getSingleton ( ) .
 + getMimeTypeFromExtension ( displayName . substring ( index ) ) == null ) {
 + String extension = MimeTypeMap . getSingleton ( ) . getExtensionFromMimeType ( mimeType ) ;
 + displayName += ( extension != null ) ? STRING0 + extension : STRING1 ;
 }

 } else if ( uri . getScheme ( ) . equals ( STRING2 ) ) {

Fix index condition and handle null mimetype extensions


<nb> public class PhotoWatcherReceiver extends BroadcastReceiver {
 PhotoUploadController controller = PhotoUploadController . getFromContext ( context ) ;

 if ( controller . addUpload ( upload ) ) {
 - if ( Flags . DEBUG ) {
 - Log . d ( LOG_TAG , STRING0 + uri . toString ( ) ) ;
 + if ( ConnectivityReceiver . isConnected ( context ) ) {
 + if ( Flags . DEBUG ) {
 + Log . d ( LOG_TAG , STRING1 + uri . toString ( ) ) ;
 + }
 + context . startService ( Utils . getUploadAllIntent ( context ) ) ;
 }
 - context . startService ( Utils . getUploadAllIntent ( context ) ) ;
 }

 }

Don t start service from Instant Upload unless we re connected


<nb> class BrowserFrame extends Handler {
 COMMENT
 private void downloadStart ( String url , String userAgent ,
 String contentDisposition , String mimeType , long contentLength ) {
 + SINGLE
 + if ( mimeType . isEmpty ( ) ) {
 + try {
 + String extension = url . substring ( url . lastIndexOf ( STRING0 ) + NUMBER0 ) ;
 + mimeType = libcore . net . MimeUtils . guessMimeTypeFromExtension ( extension ) ;
 + SINGLE
 + if ( mimeType == null )
 + mimeType = STRING1 ;
 + } catch ( IndexOutOfBoundsException exception ) {
 + SINGLE
 + }
 + }
 mimeType = MimeTypeMap . getSingleton ( ) . remapGenericMimeType (
 mimeType , url , contentDisposition ) ;
 mCallbackProxy . onDownloadStart ( url , userAgent ,

Find mime from file extension if the mime is empty


<nb> public class JavaPsiFacadeImpl extends JavaPsiFacadeEx {
 return result . values ( ) . toArray ( new PsiPackage [ result . size ( ) ] ) ;
 }

 - public PsiClass [ ] findClassByShortName ( String name , PsiPackage psiPackage , GlobalSearchScope scope ) {
 - List < PsiClass > result = null ;
 - for ( PsiElementFinder finder : filteredFinders ( ) ) {
 - PsiClass [ ] classes = finder . getClasses ( name , psiPackage , scope ) ;
 - if ( classes . length == NUMBER0 ) continue ;
 - if ( result == null ) result = new ArrayList < PsiClass > ( ) ;
 - ContainerUtil . addAll ( result , classes ) ;
 - }
 -
 - return result == null ? PsiClass . EMPTY_ARRAY : result . toArray ( new PsiClass [ result . size ( ) ] ) ;
 - }
 -
 private class PsiElementFinderImpl extends PsiElementFinder implements DumbAware {
 @ override
 public PsiClass findClass ( @ notnull String qualifiedName , @ notnull GlobalSearchScope scope ) {


<nb> public final class MockSpdyPeer implements Closeable {
 private final List < OutFrame > outFrames = new ArrayList < OutFrame > ( ) ;
 private final BlockingQueue < InFrame > inFrames = new LinkedBlockingQueue < InFrame > ( ) ;
 private int port ;
 - private final ExecutorService executor = Executors . newCachedThreadPool (
 + private final ExecutorService executor = Executors . newSingleThreadExecutor (
 Util . threadFactory ( STRING0 , false ) ) ;
 private ServerSocket serverSocket ;
 private Socket socket ;


<nb> public class TestingPrestoServer
 . put ( STRING0 , String . valueOf ( coordinator ) )
 . put ( STRING1 , STRING2 )
 . put ( STRING3 , STRING4 )
 + . put ( STRING5 , STRING4 )
 . put ( STRING6 , STRING7 ) ;

 if ( ! properties . containsKey ( STRING8 ) ) {

Cap the number of worker threads for tests


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

 <nb> public class ProjectSettingsStepBase extends AbstractActionWithPanel implements
 bottomPanel . add ( myErrorLabel , BorderLayout . NORTH ) ;
 bottomPanel . add ( myCreateButton , BorderLayout . EAST ) ;
 mainPanel . add ( bottomPanel , BorderLayout . SOUTH ) ;
 - UIUtil . setBackgroundRecursively ( mainPanel , FlatWelcomeFrame . getMainBackground ( ) ) ;
 return mainPanel ;
 }


<nb> public class PrivacyService {

 SINGLE
 mRegistered = true ;
 - Util . log ( null , Log . WARN , STRING0 + cServiceName ) ;
 + Util . log ( null , Log . WARN , STRING0 + cServiceName + STRING1 + cCurrentVersion ) ;

 SINGLE
 XActivityManagerService . setSemaphore ( mOndemandSemaphore ) ;


<nb> public final class HikariPool implements HikariPoolMBean

 closeIdleConnections ( ) ;

 - HikariMBeanElf . unregisterMBeans ( configuration , this ) ;
 + if ( isRegisteredMbeans )
 + {
 + HikariMBeanElf . unregisterMBeans ( configuration , this ) ;
 + }
 }

 SINGLE

Avoid error message on shutdown when MBeans are not registered


<nb> public class BroadcasterConfig {
 asyncWriteService . shutdownNow ( ) ;
 }

 - if ( scheduler != null ) {
 + if ( ( force || ! shared ) && scheduler != null ) {
 scheduler . shutdownNow ( ) ;
 }


<nb> public class AsyncQueryForwardingServlet extends HttpServlet
 emitter . emit (
 new ServiceMetricEvent . Builder ( )
 . setUser2 ( DataSourceUtil . getMetricName ( query . getDataSource ( ) ) )
 + . setUser3 ( String . valueOf ( query . getContextPriority ( NUMBER0 ) ) )
 . setUser4 ( query . getType ( ) )
 . setUser5 ( COMMA_JOIN . join ( query . getIntervals ( ) ) )
 . setUser6 ( String . valueOf ( query . hasFilters ( ) ) )
 <nb> public class QueryResource
 emitter . emit (
 new ServiceMetricEvent . Builder ( )
 . setUser2 ( DataSourceUtil . getMetricName ( query . getDataSource ( ) ) )
 + . setUser3 ( String . valueOf ( query . getContextPriority ( NUMBER0 ) ) )
 . setUser4 ( query . getType ( ) )
 . setUser5 ( COMMA_JOIN . join ( query . getIntervals ( ) ) )
 . setUser6 ( String . valueOf ( query . hasFilters ( ) ) )


<nb> public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
 throw new IllegalArgumentException ( STRING0 + maxActive ) ;
 }

 - if ( maxIdle <= NUMBER0 || maxIdle < minIdle ) {
 - throw new IllegalArgumentException ( STRING1 ) ;
 - }
 -
 if ( getInitialSize ( ) > maxActive ) {
 throw new IllegalArgumentException ( STRING2 + this . initialSize + STRING3
 + maxActive ) ;
 <nb> public class ParamTest extends TestCase {

 Assert . assertEquals ( NUMBER1 , dataSource . getProxyFilters ( ) . size ( ) ) ;

 - error = null ;
 - try {
 - dataSource . getConnection ( ) ;
 - } catch ( Exception ex ) {
 - error = ex ;
 - }
 - Assert . assertNotNull ( error ) ;
 + dataSource . getConnection ( ) ;

 dataSource . close ( ) ;
 }

DruidDataSource init remove maxIdle check


<nb> public final class InventoryUtils {
 return true ;
 }

 - if ( ! isSameStackId ( itemFrom , itemTo ) ) {
 + return isSameItem ( from , to ) && itemFrom . stackCount + itemTo . stackCount <= itemFrom . maxStackSize ;
 + }
 +
 + public static boolean isSameItem ( EntityRef item1 , EntityRef item2 ) {
 + ItemComponent itemComp1 = item1 . getComponent ( ItemComponent . class ) ;
 + ItemComponent itemComp2 = item2 . getComponent ( ItemComponent . class ) ;
 +
 + if ( ! isSameStackId ( itemComp1 , itemComp2 ) ) {
 return false ;
 }

 - if ( ! hasSameAttributes ( from , to ) ) {
 + if ( ! hasSameAttributes ( item1 , item2 ) ) {
 return false ;
 }

 - return itemFrom . stackCount + itemTo . stackCount <= itemFrom . maxStackSize ;
 + return true ;
 }

 private static boolean hasSameAttributes ( EntityRef from , EntityRef to ) {

Adding method that allows to easily compare two items


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

 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public final class CallServiceDescriptor implements Parcelable {
 mNetworkType == descriptor . mNetworkType ;
 }

 + @ override
 + public String toString ( ) {
 + return String . format ( Locale . US , STRING0 ,
 + CallServiceDescriptor . class . getSimpleName ( ) ,
 + mComponentName == null ? STRING1 : mComponentName . flattenToShortString ( ) ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT


<nb> public class PyNamedParameterImpl extends PyPresentableElementImpl < PyNamedParame

 @ nullable
 public PyExpression getDefaultValue ( ) {
 + final PyNamedParameterStub stub = getStub ( ) ;
 + if ( stub != null && ! stub . hasDefaultValue ( ) ) {
 + return null ;
 + }
 ASTNode [ ] nodes = getNode ( ) . getChildren ( PythonDialectsTokenSetProvider . INSTANCE . getExpressionTokens ( ) ) ;
 if ( nodes . length > NUMBER0 ) {
 return ( PyExpression ) nodes [ NUMBER0 ] . getPsi ( ) ;

avoid stub to AST switch if we don t have a default parameter value


<nb> public class MessageView extends K9Activity implements OnClickListener {
 } ) ;

 mMessageView . initialize ( this ) ;
 -
 + mMessageView . downloadRemainderButton ( ) . setOnClickListener ( this ) ;
 initializeActionBar ( ) ;

 setTitle ( STRING0 ) ;


<nb> public final class Main implements ActionListener {
 private JLanguageTool getCurrentLanguageTool ( Language currentLanguage ) {
 final JLanguageTool langTool ;
 try {
 + config = new Configuration ( new File ( System . getProperty ( STRING0 ) ) , CONFIG_FILE , currentLanguage ) ;
 final ConfigurationDialog configDialog = getCurrentConfigDialog ( currentLanguage ) ;
 langTool = new JLanguageTool ( currentLanguage , configDialog . getMotherTongue ( ) ) ;
 - config = new Configuration ( new File ( System . getProperty ( STRING0 ) ) , CONFIG_FILE , currentLanguage ) ;
 langTool . activateDefaultPatternRules ( ) ;
 langTool . activateDefaultFalseFriendRules ( ) ;
 final Set < String > disabledRules = configDialog . getDisabledRuleIds ( ) ;

initialize config before we open the config dialog fixes loss of configuration


<nb> extends ParagraphStyle
 boolean first , Layout layout ) ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public interface LeadingMarginSpan2 extends LeadingMarginSpan , WrapTogetherSpan {
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public int getLeadingMarginLineCount ( ) ;
 } ;

Add documentation for LeadingMarginSpan2


<nb> public class CordovaChromeClient extends WebChromeClient {
 result . confirm ( r == null ? STRING0 : r ) ;
 } catch ( JSONException e ) {
 e . printStackTrace ( ) ;
 + return false ;
 }
 }

Throwing this one over the fence but this change appears sane


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BuildArtifactsBeforeRunTaskProvider extends BeforeRunTaskProvider < B
 pointers . addAll ( task . getArtifactPointers ( ) ) ;
 ArtifactChooser chooser = new ArtifactChooser ( new ArrayList < ArtifactPointer > ( pointers ) ) ;
 chooser . markElements ( task . getArtifactPointers ( ) ) ;
 + chooser . setPreferredSize ( new Dimension ( NUMBER0 , NUMBER1 ) ) ;

 DialogBuilder builder = new DialogBuilder ( myProject ) ;
 builder . setTitle ( STRING0 ) ;
 + builder . setDimensionServiceKey ( STRING1 ) ;
 builder . addOkAction ( ) ;
 builder . addCancelAction ( ) ;
 builder . setCenterPanel ( chooser ) ;

remember size of Build artifacts chooser in run configuration


<nb> public class DroidGap extends PhonegapActivity {

 SINGLE
 String loading = null ;
 - if ( me . urls . size ( ) == NUMBER0 ) {
 + if ( me . urls . size ( ) == NUMBER1 ) {
 loading = me . getStringProperty ( STRING0 , null ) ;
 }
 else {

Fix bug with showing loadingDialog property


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

Fix Inject documentation as method injection happens after field injection


<nb> class ImagePresenceProvider extends PresenceInfoProvider {
 private void writeImageContent ( HttpServletRequest request , HttpServletResponse response ,
 String presenceType , byte [ ] defaultImage ) throws IOException {
 String images = request . getParameter ( STRING0 ) ;
 - if ( images != null ) {
 - writeImageContent ( images . replace ( STRING1 , presenceType ) , defaultImage , response ) ;
 - }
 - else if ( request . getParameter ( presenceType ) != null ) {
 + if ( request . getParameter ( presenceType ) != null ) {
 writeImageContent ( request . getParameter ( presenceType ) , defaultImage , response ) ;
 }
 + else if ( images != null ) {
 + writeImageContent ( images . replace ( STRING1 , presenceType ) , defaultImage , response ) ;
 + }
 else {
 writeImageContent ( null , defaultImage , response ) ;
 }


<nb> public class SubsamplingScaleImageView extends View {
 COMMENT
 @ override
 protected void onSizeChanged ( int w , int h , int oldw , int oldh ) {
 - if ( readySent ) {
 - setScaleAndCenter ( getScale ( ) , getCenter ( ) ) ;
 + PointF sCenter = getCenter ( ) ;
 + if ( readySent && sCenter != null ) {
 + this . anim = null ;
 + this . pendingScale = scale ;
 + this . sPendingCenter = sCenter ;
 }
 }

Fixed an issue with requested centre point after size change


<nb> public final class FileInputSplitAssigner implements InputSplitAssigner {
 for ( int i = NUMBER0 ; i < inputSplits . length ; ++ i ) {
 SINGLE
 final InputSplit inputSplit = inputSplits [ i ] ;
 - if ( inputSplit instanceof FileInputSplit ) {
 + if ( ! ( inputSplit instanceof FileInputSplit ) ) {
 LOG . error ( STRING0 + i + STRING1 + groupVertex . getName ( ) + STRING2
 + inputSplit . getClass ( ) + STRING3 ) ;
 + continue ;
 }
 splitStore . addSplit ( ( FileInputSplit ) inputSplit ) ;
 }

Fixed misleading log statement in FileInputSplitAssigner


<nb> public class Document extends JavaScriptObject
 public native final int getLength ( ) COMMENT
 COMMENT
 COMMENT ;
 +
 + public native final Position indexToPosition ( int index , int startRow ) COMMENT
 + COMMENT
 + COMMENT ;

 public final String getDocumentDump ( )
 {

expose Ace document index to position via JSNI


<nb> public class ApnsConnectionImpl implements ApnsConnection {
 byte [ ] bytes = new byte [ expectedSize ] ;
 while ( in . read ( bytes ) == expectedSize ) {
 int command = bytes [ NUMBER0 ] & NUMBER1 ;
 - assert command == NUMBER2 ;
 + if ( command != NUMBER2 ) {
 + throw new IOException ( STRING0 + command ) ;
 + }
 int statusCode = bytes [ NUMBER3 ] & NUMBER1 ;
 DeliveryError e = DeliveryError . ofCode ( statusCode ) ;

Replace assert when parsing error response packet


<nb> public class ServerMainModule

 private static String detectPrestoVersion ( )
 {
 - String title = PrestoServer . class . getPackage ( ) . getImplementationTitle ( ) ;
 - String version = PrestoServer . class . getPackage ( ) . getImplementationVersion ( ) ;
 - return ( ( title == null ) || ( version == null ) ) ? null : ( title + STRING0 + version ) ;
 + return PrestoServer . class . getPackage ( ) . getImplementationVersion ( ) ;
 }

 private static void bindFailureDetector ( Binder binder , boolean coordinator )

Remove title from detected Presto server version


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

 + @ test ( enabled = false )
 public class TestStarTreeSegmentCreator {
 private String testName ;
 private File indexDir ;
 <nb> public class TestStarTreeSegmentCreator {
 }
 }

 - SINGLE
 - @ test ( enabled = true )
 + @ test ( enabled = false )
 + SINGLE
 public void testCreation ( ) throws Exception {
 BasicConfigurator . configure ( ) ;


<nb> public class SimpleDispatcherCommand extends SimpleDispatcher implements Command

 @ override
 public void call ( CommandContext context ) throws CommandException {
 - if ( context . argsLength ( ) >= NUMBER0 ) {
 - super . call ( context . getRemainingString ( NUMBER1 ) , context . getLocals ( ) ) ;
 - } else {
 + boolean success = context . argsLength ( ) >= NUMBER0 && super . call ( context . getRemainingString ( NUMBER1 ) , context . getLocals ( ) ) != null ;
 +
 + if ( ! success ) {
 Set < String > aliases = getPrimaryAliases ( ) ;

 if ( aliases . size ( ) == NUMBER1 ) {

Fixed issue where the use of non existent subcommands had no response


<nb>
 COMMENT
 package NAMESPACE ;

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

 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 + @ api
 public interface BlockMeshGenerator {

 COMMENT


<nb> public class KeyguardUpdateMonitor {
 COMMENT
 COMMENT
 public void reportSimUnlocked ( ) {
 - mSimState = IccCard . State . READY ;
 - handleSimStateChange ( new SimArgs ( mSimState ) ) ;
 + handleSimStateChange ( new SimArgs ( IccCard . State . READY ) ) ;
 }

 public boolean isKeyguardBypassEnabled ( ) {

don t show pattern screen after SIM PUK unlock


<nb> public final class JmxMonitorRegistry implements MonitorRegistry {
 for ( MonitorMBean bean : beans ) {
 try {
 mBeanServer . unregisterMBean ( bean . getObjectName ( ) ) ;
 + locks . remove ( bean . getObjectName ( ) ) ;
 } catch ( InstanceNotFoundException ignored ) {
 SINGLE
 SINGLE


<nb> public class ConnectivityManager {
 COMMENT
 public final static int REQUEST_ID_UNSET = NUMBER0 ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final int NETID_UNSET = NUMBER0 ;
 +
 private final IConnectivityManager mService ;

 private final String mPackageName ;
 <nb> public class ConnectivityManager {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public static final int NETID_UNSET = NUMBER0 ;
 -
 - COMMENT
 COMMENT
 COMMENT
 COMMENT

Readjust location of NETID_UNSET definition


<nb> public interface NameSuggestionProvider {
 ExtensionPointName < NameSuggestionProvider > EP_NAME = ExtensionPointName . create ( STRING0 ) ;

 @ nullable
 - SuggestedNameInfo getSuggestedNames ( PsiElement element , PsiElement nameSuggestionContext , Set < String > result ) ;
 + SuggestedNameInfo getSuggestedNames ( PsiElement element , @ nullable PsiElement nameSuggestionContext , Set < String > result ) ;

 @ nullable
 - Collection < LookupElement > completeName ( PsiElement element , final PsiElement nameSuggestionContext , final String prefix ) ;
 + Collection < LookupElement > completeName ( PsiElement element , @ nullable final PsiElement nameSuggestionContext , final String prefix ) ;
 }


<nb> public class RESTApplication extends Application {
 private Dictionary < String , String > getJerseyServletParams ( ) {
 Dictionary < String , String > jerseyServletParams = new Hashtable < String , String > ( ) ;
 jerseyServletParams . put ( STRING0 , RESTApplication . class . getName ( ) ) ;
 - SINGLE
 + jerseyServletParams . put ( STRING1 , RESTApplication . REST_SERVLET_ALIAS + STRING2 ) ;
 jerseyServletParams . put ( STRING3 , STRING4 ) ;
 jerseyServletParams . put ( STRING5 , STRING4 ) ;
 jerseyServletParams . put ( STRING6 , STRING7 ) ;


<nb> public class Tool {
 public boolean undefined = false ;
 @ override
 public void tokenRef ( TerminalAST ref ) {
 + if ( STRING0 . equals ( ref . getText ( ) ) ) {
 + SINGLE
 + return ;
 + }
 +
 if ( g . isLexer ( ) ) ruleRef ( ref , null ) ;
 }

Fix support for the special token reference EOF


<nb> public abstract class CompoundButton extends Button implements Checkable {
 unscheduleDrawable ( mButtonDrawable ) ;
 }
 d . setCallback ( this ) ;
 - d . setState ( getDrawableState ( ) ) ;
 d . setVisible ( getVisibility ( ) == VISIBLE , false ) ;
 mButtonDrawable = d ;
 - mButtonDrawable . setState ( null ) ;
 setMinHeight ( mButtonDrawable . getIntrinsicHeight ( ) ) ;
 }

Remove unnecessary drawable code in CompoundButton


<nb> public class TypeUtils {
 return false ;
 }

 + public static boolean equalsOrContainsAsArgument ( @ nullable JetType type , @ notnull JetType . . . possibleArgumentTypes ) {
 + return equalsOrContainsAsArgument ( type , Sets . newHashSet ( possibleArgumentTypes ) ) ;
 + }
 +
 + private static boolean equalsOrContainsAsArgument ( @ nullable JetType type , @ notnull Set < JetType > possibleArgumentTypes ) {
 + if ( type == null ) return false ;
 + if ( possibleArgumentTypes . contains ( type ) ) return true ;
 + if ( type instanceof NamespaceType ) return false ;
 + for ( TypeProjection projection : type . getArguments ( ) ) {
 + if ( equalsOrContainsAsArgument ( projection . getType ( ) , possibleArgumentTypes ) ) return true ;
 + }
 + return false ;
 + }
 +
 @ notnull
 public static String getTypeNameAndStarProjectionsString ( @ notnull String name , int size ) {
 StringBuilder builder = new StringBuilder ( name ) ;


<nb> public class D2Config
 }

 Map < String , String > clusterProperties = new HashMap < > ( ) ;
 - if ( coloVariants != null && coloVariants . size ( ) > NUMBER0 )
 + if ( coloVariants != null && coloVariants . size ( ) > NUMBER0 && ! ( coloVariants . size ( ) == NUMBER1 && coloVariants . contains ( STRING0 ) ) )
 {
 clusterProperties . put ( PropertyKeys . COLO_VARIANTS , String . join ( LIST_SEPARATOR , coloVariants ) ) ;
 }

Fix a bug in D2Config where empty coloVariant is added to cluster


<nb> public class OperationSetTelephonyConferencingJabberImpl
 if ( callPeer != null )
 {
 if ( logger . isDebugEnabled ( ) )
 - logger . debug ( STRING0 + coinIQ . getFrom ( )
 - + STRING1 + coinIQ . getVersion ( ) + STRING2 ) ;
 + logger . debug ( STRING3 + coinIQ . getFrom ( )
 + + STRING4 + coinIQ . getVersion ( ) + STRING2 ) ;
 handleCoin ( callPeer , coinIQ ) ;
 }
 }


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CharUsedInArithmeticContextInspection extends BaseInspection {
 if ( type == null || type . equalsToText ( STRING0 ) ) {
 return ;
 }
 + final IElementType tokenType = expression . getOperationTokenType ( ) ;
 + if ( JavaTokenType . EQEQ . equals ( tokenType ) ||
 + JavaTokenType . NE . equals ( tokenType ) ) {
 + return ;
 + }
 final PsiExpression lhs = expression . getLOperand ( ) ;
 final PsiType lhsType = lhs . getType ( ) ;
 if ( PsiType . CHAR . equals ( lhsType ) ) {
 <nb> public class CharUsedInArithmeticContext {
 System . out . println ( i2 + STRING1 + i1 + STRING2 + ( i2 - i1 ) ) ;
 }

 + boolean compare ( char c1 , char c2 ) {
 + return c1 != c2 ;
 + }
 }


<nb> public class MessageList
 }

 @ override
 - public void listLocalMessages ( Account account , String folder , Message [ ] messages )
 - {
 - if ( ! account . equals ( mAccount ) )
 - {
 - return ;
 - }
 -
 - if ( folder != mFolderName )
 - {
 - return ;
 - }
 -
 - SINGLE
 - }
 - @ override
 public void listLocalMessagesRemoveMessage ( Account account , String folder , Message message )
 {
 if ( account . equals ( mAccount ) && folder . equals ( mFolderName ) )

Remove an overridden subroutine that s now a noop


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class GroovyToJavaGenerator implements SourceGeneratingCompiler , Compilat
 GenerationItem item ;
 for ( VirtualFile file : getGroovyFilesToGenerate ( context ) ) {
 if ( CompilerManager . getInstance ( myProject ) . isExcludedFromCompilation ( file ) ) continue ;
 + if ( CompilerConfiguration . getInstance ( myProject ) . isResourceFile ( file . getName ( ) ) ) continue ;

 final GroovyFileBase psiFile = findPsiFile ( file ) ;
 boolean isInTestSources = ModuleRootManager . getInstance ( getModuleByFile ( context , file ) ) . getFileIndex ( ) . isInTestSourceContent ( file ) ;
 <nb> public class GroovyToJavaGenerator implements SourceGeneratingCompiler , Compilat
 }

 public boolean validateConfiguration ( CompileScope scope ) {
 - SINGLE
 return true ;
 }

don t generate groovy stubs for groovy resource files


<nb> public class BukkitWorld extends LocalWorld {
 if ( ! ( state instanceof org . bukkit . block . NoteBlock ) ) return false ;
 org . bukkit . block . NoteBlock bukkit = ( org . bukkit . block . NoteBlock ) state ;
 NoteBlock we = ( NoteBlock ) block ;
 - bukkit . setNote ( we . getNote ( ) ) ;
 + bukkit . setRawNote ( we . getNote ( ) ) ;
 return true ;
 }

 <nb> public class BukkitWorld extends LocalWorld {
 if ( ! ( state instanceof org . bukkit . block . NoteBlock ) ) return false ;
 org . bukkit . block . NoteBlock bukkit = ( org . bukkit . block . NoteBlock ) state ;
 NoteBlock we = ( NoteBlock ) block ;
 - we . setNote ( bukkit . getNote ( ) ) ;
 + we . setNote ( bukkit . getRawNote ( ) ) ;
 }

 return false ;


<nb> public class UrlTypeVFS implements UrlType {
 URL adaptedUrl = adaptURL ( url ) ;
 return new ZipDir ( new JarFile ( adaptedUrl . getFile ( ) ) ) ;
 } catch ( Exception e ) {
 - if ( Reflections . log != null ) {
 - Reflections . log . warn ( STRING0 , e ) ;
 - }
 try {
 return new ZipDir ( new JarFile ( url . getFile ( ) ) ) ;
 } catch ( IOException e1 ) {
 if ( Reflections . log != null ) {
 + Reflections . log . warn ( STRING0 , e ) ;
 Reflections . log . warn ( STRING0 , e1 ) ;
 }
 }
 <nb> public class UrlTypeVFS implements UrlType {
 return new URL ( prefix + STRING1 + zipFile + STRING2 + zipPath ) ;
 }
 }
 - }
 + }

Update UrlTypeVFS java avoid warning altogether


<nb> public class SimUtilsTest extends TestCase {
 public void testBasic ( ) throws Exception {
 byte [ ] data , data2 ;

 - COMMENT
 + COMMENT
 COMMENT
 COMMENT

 <nb> public class SimUtilsTest extends TestCase {
 assertEquals ( STRING0 , IccUtils . bcdToString ( data , NUMBER0 , data . length - NUMBER1 ) ) ;

 SINGLE
 - data = IccUtils . hexStringToBytes ( STRING1 ) ;
 + data = IccUtils . hexStringToBytes ( STRING2 ) ;
 assertEquals ( STRING3 , IccUtils . bcdToString ( data , NUMBER2 , data . length ) ) ;

 + SINGLE
 + data = IccUtils . hexStringToBytes ( STRING1 ) ;
 + assertEquals ( STRING4 , IccUtils . bcdToString ( data , NUMBER2 , data . length ) ) ;
 +
 COMMENT
 COMMENT
 COMMENT

Fix SimUtilsTest after changing in bcdToString


<nb> public class FireBirdTrigger extends GenericTrigger {
 this . sequence = sequence ;
 }

 + @ property ( hidden = true , order = NUMBER0 )
 public DBSActionTiming getActionTiming ( )
 {
 return super . getActionTiming ( ) ;
 }

 - @ property ( viewable = true , order = NUMBER0 )
 + @ property ( hidden = true , order = NUMBER0 )
 public DBSManipulationType getManipulationType ( )
 {
 return super . getManipulationType ( ) ;


<nb> public abstract class FrameTask < T extends FrameTask < T > > extends MRTask < T > {
 int [ ] cats = MemoryManager . malloc4 ( n ) ;
 int nnums = NUMBER0 , ncats = NUMBER0 ;
 for ( int i = NUMBER0 ; i < n ; ++ i )
 - if ( tvecs [ i ] . isEnum ( ) ) cats [ ncats ++ ] = i ;
 - else nums [ nnums ++ ] = i ;
 + if ( tvecs [ i ] . isEnum ( ) && ( tvecs [ i ] . domain ( ) != null ) ) {
 + cats [ ncats ++ ] = i ;
 + }
 + else {
 + if ( tvecs [ i ] . isEnum ( ) ) {
 + Log . debug ( STRING0 + i ) ;
 + }
 + nums [ nnums ++ ] = i ;
 + }
 _nums = nnums ;
 _cats = ncats ;
 SINGLE


<nb> public final class GsmDataConnectionTracker extends DataConnectionTracker {

 protected void onVoiceCallEnded ( ) {
 if ( state == State . CONNECTED ) {
 - if ( mGsmPhone . mSST . isConcurrentVoiceAndData ( ) ) {
 + if ( ! mGsmPhone . mSST . isConcurrentVoiceAndData ( ) ) {
 startNetStatPoll ( ) ;
 phone . notifyDataConnection ( Phone . REASON_VOICE_CALL_ENDED ) ;
 } else {

Fix typo introduced during variable cleanup


<nb> final class FilesDelta {
 }

 private boolean _addToRecompiled ( BuildRootDescriptor root , File file ) {
 + if ( Utils . IS_TEST_MODE ) {
 + LOG . info ( STRING0 + file . getPath ( ) ) ;
 + }
 return _addToRecompiled ( root , Collections . singleton ( file ) ) ;
 }

 private boolean _addToRecompiled ( BuildRootDescriptor root , Collection < File > filesToAdd ) {
 - if ( Utils . IS_TEST_MODE ) {
 - for ( File file : filesToAdd ) {
 - LOG . info ( STRING0 + file . getPath ( ) ) ;
 - }
 - }
 -
 Set < File > files ;
 synchronized ( myFilesToRecompile ) {
 files = myFilesToRecompile . get ( root ) ;

do not log paths when cloning FilesDelta


<nb> public class LwjglApplication implements Application {
 @ override public void exit ( ) {
 postRunnable ( new Runnable ( ) {
 @ override public void run ( ) {
 - LwjglApplication . this . listener . pause ( ) ;
 - LwjglApplication . this . listener . dispose ( ) ;
 - Display . destroy ( ) ;
 - audio . dispose ( ) ;
 - System . exit ( - NUMBER0 ) ;
 + running = false ;
 }
 } ) ;
 }

fixed LwjglApplication exit will set running false in the future with a Runnable


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class XActivityThread extends XHook {
 if ( intent != null ) {
 SINGLE
 String action = intent . getAction ( ) ;
 + if ( action != null )
 + Util . log ( this , Log . INFO , STRING0 + action + STRING1 + Process . myUid ( ) ) ;
 if ( mActionName . equals ( action ) ) {
 if ( action . equals ( Intent . ACTION_NEW_OUTGOING_CALL ) ) {
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OpenFileDescriptor implements Navigatable {
 }

 private static void scrollToCaret ( final Editor e ) {
 - final Project project = e . getProject ( ) ;
 - if ( project != null ) {
 - IdeFocusManager . getInstance ( project ) . doWhenFocusSettlesDown ( new Runnable ( ) {
 - public void run ( ) {
 - e . getScrollingModel ( ) . scrollToCaret ( ScrollType . CENTER ) ;
 - }
 - } ) ;
 - } else {
 - e . getScrollingModel ( ) . scrollToCaret ( ScrollType . CENTER ) ;
 - }
 + e . getScrollingModel ( ) . scrollToCaret ( ScrollType . CENTER ) ;
 }

 public boolean canNavigate ( ) {

Don t do animated scrolling when opening NEW editor tab