<nb> public class SpringBootstrapCompilerAutoConfiguration extends CompilerAutoConfig

 @ override
 public void applyDependencies ( DependencyCustomizer dependencies ) {
 - DependencyCustomizer customizer = dependencies . ifAnyMissingClasses (
 + dependencies . ifAnyMissingClasses (
 STRING0 ) . add (
 STRING1 , STRING2 , STRING3 ) ;
 - customizer = customizer . ifAnyResourcesPresent ( STRING4 ) . add (
 - STRING5 , STRING6 , STRING7 ) ;
 - customizer = customizer . ifNotAdded ( STRING8 , STRING6 )
 + dependencies . ifAnyResourcesPresent ( STRING4 ) . add ( STRING5 ,
 + STRING6 , STRING7 ) ;
 + dependencies . ifNotAdded ( STRING8 , STRING6 )
 . ifAnyResourcesPresent ( STRING9 , STRING10 )
 . add ( STRING11 , STRING12 , STRING13 )
 . add ( STRING14 , STRING14 , STRING15 ) ;
 - customizer = customizer . ifNotAdded ( STRING5 , STRING6 )
 + dependencies . ifNotAdded ( STRING5 , STRING6 )
 . ifNotAdded ( STRING11 , STRING12 )
 . add ( STRING11 , STRING16 , STRING13 ) ;
 SINGLE

Improve readability of SpringBootstrapCompilerAutoConfiguration


<nb> import NAMESPACE ;
 public class TestCountLogger implements TestListener {
 private final ProgressLoggerFactory factory ;
 private ProgressLogger progressLogger ;
 - private final Logger logger ; SINGLE
 + private final Logger logger ;

 private long totalTests ;
 private long failedTests ;

removed TODO because the simplification I had in mind doesn t appear to work


<nb>

 package NAMESPACE ;

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

 - import NAMESPACE ;
 + import NAMESPACE ;

 COMMENT
 COMMENT


<nb> public class BatchingPageCache implements PageCache
 Writer writer = file . getName ( ) . contains ( StoreFactory . COUNTS_STORE )
 ? SYNCHRONOUS . create ( channel , monitor )
 : writerFactory . create ( channel , monitor ) ;
 - BatchingPagedFile pageFile = new BatchingPagedFile ( file , channel , writer , pageSize ) ;
 + BatchingPagedFile pageFile = new BatchingPagedFile ( file , channel , writer ,
 + individualizedPageSize ( file , pageSize ) ) ;
 pagedFiles . put ( file , pageFile ) ;
 return pageFile ;
 }

 + private int individualizedPageSize ( File file , int pageSize )
 + {
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + return file . getName ( ) . endsWith ( StoreFactory . RELATIONSHIP_STORE_NAME ) ? pageSize * NUMBER0 : pageSize ;
 + }
 +
 void unmap ( BatchingPagedFile pagedFile ) throws IOException
 {
 File file = pagedFile . file ;

Importer page cache uses larger page size for relationship store


<nb> public abstract class BaseSourceProcessor implements SourceProcessor {
 protected Properties getLanguageProperties ( String fileName ) {
 StringBundler sb = new StringBundler ( NUMBER0 ) ;

 - int pos = fileName . indexOf ( STRING0 ) ;
 + int pos = fileName . indexOf ( STRING1 ) ;

 sb . append ( BASEDIR ) ;

SourceFormatter Make small change so we can use this for plugins as well


<nb> public class WPMobileStatsUtil {

 SINGLE
 boolean connected = WordPress . hasValidWPComCredentials ( WordPress . getContext ( ) ) ;
 - int numBlogs = WordPress . wpDB . getAccounts ( ) . size ( ) ;
 + int numBlogs = WordPress . wpDB . getShownAccounts ( ) . size ( ) ;
 try {
 JSONObject properties = new JSONObject ( ) ;
 properties . put ( STRING0 , STRING1 ) ;


<nb> public enum DataSourceType implements Tag {
 RATE ,

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 NORMALIZED ,

make it clear that normalized is for counters


<nb> public class MainFragment extends Fragment {
 View rootView = inflater . inflate ( R . layout . fragment_main , container , false ) ;
 TextView tvSection = ( TextView ) rootView . findViewById ( R . id . section_label ) ;
 tvSection . setText ( R . string . hello ) ;
 - tvSection . setTextColor ( getResources ( ) . getColor ( net . wequick . example . small . lib . utils . R . color . my_test_color2 ) ) ;
 + tvSection . setTextColor ( getResources ( ) . getColor ( R . color . my_test_color2 ) ) ;

 Button button = ( Button ) rootView . findViewById ( R . id . inter_start_button ) ;
 button . setOnClickListener ( new View . OnClickListener ( ) {

Add sample for directly using R xx of lib


<nb> public class DatabaseShardManager
 for ( int attempt = NUMBER0 ; attempt <= maxAttempts ; attempt ++ ) {
 try {
 dbi . useTransaction ( ( handle , status ) - > {
 - if ( commitTransaction ( shardDaoSupplier . attach ( handle ) , transactionId ) ) {
 + ShardDao dao = shardDaoSupplier . attach ( handle ) ;
 + if ( commitTransaction ( dao , transactionId ) ) {
 callback . useHandle ( handle ) ;
 dao . deleteCreatedShards ( transactionId ) ;
 }

Fix commit to delete created shards within transaction


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DiskBasedCache implements Cache {
 return ;
 }
 for ( File file : files ) {
 - FileInputStream fis = null ;
 + BufferedInputStream fis = null ;
 try {
 - fis = new FileInputStream ( file ) ;
 + fis = new BufferedInputStream ( new FileInputStream ( file ) ) ;
 CacheHeader entry = CacheHeader . readHeader ( fis ) ;
 entry . size = file . length ( ) ;
 putEntry ( entry . key , entry ) ;

Improve DiskBasedCache initial scan performance


<nb> import NAMESPACE ;

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

 COMMENT
 COMMENT


<nb> public class QueryStringDecoder {
 boolean modified = false ;
 for ( int i = NUMBER0 ; i < size ; i ++ ) {
 final char c = s . charAt ( i ) ;
 - switch ( c ) {
 - case STRING0 :
 - i ++ ; SINGLE
 - SINGLE
 - case STRING1 :
 - modified = true ;
 - break ;
 + if ( c == STRING0 || c == STRING1 ) {
 + modified = true ;
 + break ;
 }
 }
 if ( ! modified ) {

Fix inefficient loop in QueryStringDecoder decodeComponent


<nb> public final class InputManager {
 synchronized ( mInputDevicesLock ) {
 int index = findInputDeviceListenerLocked ( listener ) ;
 if ( index >= NUMBER0 ) {
 + InputDeviceListenerDelegate d = mInputDeviceListeners . get ( index ) ;
 + d . removeCallbacksAndMessages ( null ) ;
 mInputDeviceListeners . remove ( index ) ;
 }
 }


<nb> ZWaveCommandClassDynamicState {
 public SerialMessage setValueMessage ( int value ) {

 if ( fanModeTypes . isEmpty ( ) ) {
 + logger . warn ( STRING0 , this . getNode ( ) . getNodeId ( ) ) ;
 return this . getSupportedMessage ( ) ;
 }

 <nb> import NAMESPACE
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> ZWaveCommandClassDynamicState {

 SINGLE
 if ( modeTypes . isEmpty ( ) ) {
 + logger . warn ( STRING1 , this . getNode ( ) . getNodeId ( ) ) ;
 return this . getSupportedMessage ( ) ;
 }

 - if ( modeTypes . contains ( ModeType . getModeType ( value ) ) ) {
 + if ( ! modeTypes . contains ( ModeType . getModeType ( value ) ) ) {
 logger . error ( STRING2 , this . getNode ( ) . getNodeId ( ) , value ) ;
 return null ;
 }

Fixed boolean logic error when look for supported mode types added warnings messages


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class HttpStaticFileServerHandler extends SimpleChannelInboundHandler < Ful
 ctx . write ( new DefaultFileRegion ( raf . getChannel ( ) , NUMBER0 , fileLength ) , ctx . newProgressivePromise ( ) ) ;
 } else {
 sendFileFuture =
 - ctx . write ( new ChunkedFile ( raf , NUMBER0 , fileLength , NUMBER1 ) , ctx . newProgressivePromise ( ) ) ;
 + ctx . write ( new HttpChunkedInput ( new ChunkedFile ( raf , NUMBER0 , fileLength , NUMBER1 ) ) ,
 + ctx . newProgressivePromise ( ) ) ;
 }

 sendFileFuture . addListener ( new ChannelProgressiveFutureListener ( ) {

Make use of HttpChunkedInput as this will also work when compression is used


<nb> public class StaticTypeCheckingVisitor extends ClassCodeVisitorSupport {
 }
 }
 }
 - if ( receiver == ClassHelper . GSTRING_TYPE ) return findMethodOrFail ( expr , ClassHelper . STRING_TYPE , name , args ) ;
 + if ( receiver == ClassHelper . GSTRING_TYPE ) return findMethod ( expr , ClassHelper . STRING_TYPE , name , args ) ;
 return null ;
 }

Fixed recursive method calling findMethodOrFail instead of findMethod


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


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

 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class Gdx {
 public static GL10 gl10 ;
 public static GL11 gl11 ;
 public static GL20 gl20 ;
 - public static GLU glu ;
 }

Removed GLU only complicates backends and libgdx matrix stuff has the same functionality


<nb> public class TextEditingTargetNotebook
 SINGLE
 SINGLE
 SINGLE
 - if ( scope . getEnd ( ) . getRow ( ) == terminalLine )
 + if ( scope != null &&
 + scope . getEnd ( ) . getRow ( ) == terminalLine )
 {
 ChunkDefinition def = ( ChunkDefinition ) widget . getData ( ) ;
 def . setRow ( terminalLine ) ;

handle removing line widget with no associated scope


<nb> public abstract class GroovyPage extends Script {
 }
 }

 + if ( value == null ) {
 + MetaProperty mp = getMetaClass ( ) . getMetaProperty ( property ) ;
 + if ( mp != null ) {
 + return mp . getProperty ( this ) ;
 + }
 + }
 +
 return value ;
 }

fix for failing test will touch base with Stephane tomorrow to discuss if this is really the right thing


<nb> public class HttpTransportOverHTTP2 implements HttpTransport
 @ override
 public void abort ( Throwable failure )
 {
 + IStream stream = this . stream ;
 if ( LOG . isDebugEnabled ( ) )
 - LOG . debug ( STRING0 , stream . getId ( ) ) ;
 - stream . reset ( new ResetFrame ( stream . getId ( ) , ErrorCode . INTERNAL_ERROR . code ) , Callback . Adapter . INSTANCE ) ;
 + LOG . debug ( STRING0 , stream == null ? - NUMBER0 : stream . getId ( ) ) ;
 + if ( stream != null )
 + stream . reset ( new ResetFrame ( stream . getId ( ) , ErrorCode . INTERNAL_ERROR . code ) , Callback . Adapter . INSTANCE ) ;
 }

 private class CommitCallback implements Callback


<nb> public class Wallet implements Serializable {
 COMMENT
 COMMENT
 public synchronized void saveToFile ( File f ) throws IOException {
 - saveToFileStream ( new FileOutputStream ( f ) ) ;
 + FileOutputStream stream = null ;
 + try {
 + stream = new FileOutputStream ( f ) ;
 + saveToFileStream ( stream ) ;
 + } finally {
 + if ( stream != null ) stream . close ( ) ;
 + }
 }

 COMMENT

Always close the FileOutputStream in Wallet saveToFile


<nb> public final class BluetoothGattServer implements BluetoothProfile {

 List < BluetoothGattDescriptor > descriptors = characteristic . getDescriptors ( ) ;
 for ( BluetoothGattDescriptor descriptor : descriptors ) {
 + permission = ( ( characteristic . getKeySize ( ) - NUMBER0 ) < < NUMBER1 )
 + + descriptor . getPermissions ( ) ;
 mService . addDescriptor ( mServerIf ,
 - new ParcelUuid ( descriptor . getUuid ( ) ) ,
 - descriptor . getPermissions ( ) ) ;
 + new ParcelUuid ( descriptor . getUuid ( ) ) , permission ) ;
 }
 }

Fix minor LE descriptor permissions issue


<nb> public class TWItemClickListener implements OnItemTouchListener {
 }

 private int getFirstVisiblePosition ( ) {
 - RecyclerView . LayoutParams lp =
 - ( RecyclerView . LayoutParams ) mHostView . getChildAt ( NUMBER0 ) . getLayoutParams ( ) ;
 + final View child = mHostView . getChildAt ( NUMBER0 ) ;
 + if ( child == null ) {
 + return NUMBER0 ;
 + }
 +
 + final RecyclerView . LayoutParams lp =
 + ( RecyclerView . LayoutParams ) child . getLayoutParams ( ) ;
 return lp . getViewPosition ( ) ;
 }

core Fix crasher on TWItemClickListener when list is empty


<nb> public class NodeVersionAllocationDeciderTests extends ESAllocationTestCase {
 assertThat ( primary , notNullValue ( ) ) ;
 String fromId = primary . currentNodeId ( ) ;
 String toId = r . relocatingNodeId ( ) ;
 - logger . error ( STRING0 + fromId + STRING1 + routingNodes . node ( fromId ) . node ( ) . version ( ) + STRING2 + toId + STRING1 + routingNodes . node ( toId ) . node ( ) . version ( ) ) ;
 - logger . error ( routingNodes . prettyPrint ( ) ) ;
 + logger . trace ( STRING0 + fromId + STRING1 + routingNodes . node ( fromId ) . node ( ) . version ( ) + STRING2 + toId + STRING1 + routingNodes . node ( toId ) . node ( ) . version ( ) ) ;
 assertTrue ( routingNodes . node ( toId ) . node ( ) . version ( ) . onOrAfter ( routingNodes . node ( fromId ) . node ( ) . version ( ) ) ) ;
 }
 }

TEST Reduce log level in NodeVersionAllocationDeciderTests


<nb> public class OEdgeTransformer extends OAbstractLookupTransformer {
 return null ;
 case HALT :
 throw new OETLProcessHaltedException ( STRING0 + joinCurrentValue + STRING1 ) ;
 + case NOTHING :
 + default :
 + return null ;
 }
 }

remove warning about missing default in switch


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BatchInserterImpl implements BatchInserter
 ConfiguringPageCacheFactory pageCacheFactory = new ConfiguringPageCacheFactory (
 fileSystem , config , PageCacheTracer . NULL ) ;
 PageCache pageCache = pageCacheFactory . getOrCreatePageCache ( ) ;
 + life . add ( new PageCacheLifecycle ( pageCache ) ) ;

 msgLog = StringLogger . loggerDirectory ( fileSystem , this . storeDir ) ;
 logging = new SingleLoggingService ( msgLog ) ;

Add BatchInserterImpl pageCache to lifecycle


<nb> public class FileDisplayActivity extends SherlockFragmentActivity implements

 @ override
 protected void onRestoreInstanceState ( Bundle savedInstanceState ) {
 - Log . e ( STRING0 , STRING1 ) ;
 super . onRestoreInstanceState ( savedInstanceState ) ;
 mDirs = savedInstanceState . getStringArray ( KEY_DIR_ARRAY ) ;
 mDirectories = new CustomArrayAdapter < String > ( this , R . layout . sherlock_spinner_dropdown_item ) ;
 <nb> public class FileDisplayActivity extends SherlockFragmentActivity implements

 @ override
 protected void onSaveInstanceState ( Bundle outState ) {
 - Log . e ( STRING0 , STRING2 + ( mCurrentDir != null ? mCurrentDir . getFileName ( ) : STRING3 ) ) ;
 super . onSaveInstanceState ( outState ) ;
 if ( mDirectories != null && mDirectories . getCount ( ) != NUMBER0 ) {
 mDirs = new String [ mDirectories . getCount ( ) - NUMBER1 ] ;


<nb> import NAMESPACE ;
 import NAMESPACE ;

 - public class SpringInfinispanIdempotentRpoositoryIT extends CamelSpringTestSupport {
 + public class SpringInfinispanIdempotentRepositoryIT extends CamelSpringTestSupport {
 @ override
 protected AbstractApplicationContext createApplicationContext ( ) {
 return new ClassPathXmlApplicationContext ( STRING0 ) ;

Renamed SpringInfinispanIdempotentRepositoryIT test class


<nb> public class ExtendedVerifier implements GroovyClassVisitor {
 }

 private void visitDeprecation ( AnnotatedNode node , AnnotationNode visited ) {
 - if ( visited . getClassNode ( ) . isResolved ( ) && visited . getClassNode ( ) . getTypeClass ( ) == Deprecated . class ) {
 + if ( visited . getClassNode ( ) . isResolved ( ) && visited . getClassNode ( ) . getTypeClass ( ) . getName ( ) . equals ( Deprecated . class . getName ( ) ) ) {
 if ( node instanceof MethodNode ) {
 MethodNode mn = ( MethodNode ) node ;
 mn . setModifiers ( mn . getModifiers ( ) | Opcodes . ACC_DEPRECATED ) ;
 <nb> public class ExtendedVerifier implements GroovyClassVisitor {
 ) ;
 }

 + SINGLE
 public void visitGenericType ( GenericsType genericsType ) {

 }

Deprecated does not have effect in Groovy minor refactor


<nb> public class ReaderPostDetailFragment extends Fragment

 if ( mPost . hasPostAvatar ( ) ) {
 imgAvatar . setImageUrl ( mPost . getPostAvatarForDisplay (
 - mResourceVars . likeAvatarSizePx ) , WPNetworkImageView . ImageType . AVATAR ) ;
 + mResourceVars . headerAvatarSizePx ) , WPNetworkImageView . ImageType . AVATAR ) ;
 imgAvatar . setVisibility ( View . VISIBLE ) ;
 } else {
 imgAvatar . setVisibility ( View . GONE ) ;
 <nb> class ReaderResourceVars {
 final int displayWidthPx ;
 final int actionBarHeightPx ;
 final int likeAvatarSizePx ;
 + final int headerAvatarSizePx ;

 final int marginLargePx ;
 final int marginSmallPx ;
 <nb> class ReaderResourceVars {
 displayWidthPx = DisplayUtils . getDisplayPixelWidth ( context ) ;
 actionBarHeightPx = DisplayUtils . getActionBarHeight ( context ) ;
 likeAvatarSizePx = resources . getDimensionPixelSize ( R . dimen . avatar_sz_small ) ;
 + headerAvatarSizePx = resources . getDimensionPixelSize ( R . dimen . avatar_sz_medium ) ;
 featuredImageHeightPx = resources . getDimensionPixelSize ( R . dimen . reader_featured_image_height ) ;

 marginLargePx = resources . getDimensionPixelSize ( R . dimen . margin_large ) ;

Add an additional avatar size to ReaderResourceVars


<nb> public final class ActFmSyncService {
 metadata . clear ( ) ;
 model . clearValue ( Task . REMOTE_ID ) ;
 model . setValue ( Task . REMOTE_ID , json . getLong ( STRING0 ) ) ;
 - model . setValue ( Task . FLAGS , NUMBER0 ) ;
 readUser ( json . getJSONObject ( STRING1 ) , model , Task . USER_ID , Task . USER ) ;
 readUser ( json . getJSONObject ( STRING2 ) , model , Task . CREATOR_ID , null ) ;
 model . setValue ( Task . COMMENT_COUNT , json . getInt ( STRING3 ) ) ;


<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 ExternalSystemFacadeManager {
 myProgressManager = ( RemoteExternalSystemProgressNotificationManager ) notificationManager ;
 myRemoteCommunicationManager = remoteCommunicationManager ;
 myInProcessCommunicationManager = inProcessCommunicationManager ;
 - boolean inProcessCommunication = Registry . is ( ExternalSystemConstants . USE_IN_PROCESS_COMMUNICATION_REGISTRY_KEY , false ) ;
 + boolean inProcessCommunication = ExternalSystemApiUtil . isInProcessMode ( ) ;
 myInProcessCommunication . set ( inProcessCommunication ) ;
 myCommunicationManager . set ( inProcessCommunication ? myInProcessCommunicationManager : myRemoteCommunicationManager ) ;
 }

Make it possible to customize processing classpath in case of in process mode


<nb> public class Protocol {
 return processInteger ( is ) ;
 } else if ( b == DOLLAR_BYTE ) {
 return processBulkReply ( is ) ;
 - } else {
 + } else if ( b == PLUS_BYTE ) {
 return processStatusCodeReply ( is ) ;
 + } else {
 + throw new JedisException ( STRING0 ) ;
 }
 } catch ( IOException e ) {
 throw new JedisException ( e ) ;

Treat any other type of reply as an error


<nb> public class IntentUriOverrideTest extends ActivityInstrumentationTestCase2 < Sabo
 runTestOnUiThread ( new Runnable ( ) {
 public void run ( )
 {
 + sleep ( ) ;
 boolean isBadUrl = testView . getUrl ( ) . equals ( BAD_URL ) ;
 assertFalse ( isBadUrl ) ;
 }

Added sleep to avoid null error after most recent change to not break API


<nb> public class FormField {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public FormField createCopy ( ) {
 + return new FormField ( this . element . createCopy ( ) ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Adds utility method that allows you to create copies of a DataForm object


<nb> public class ServerProperties implements EmbeddedServletContainerCustomizer {
 this . sessionTimeout = sessionTimeout ;
 }

 + public void setLoader ( String value ) {
 + SINGLE
 + }
 +
 @ override
 public void customize ( ConfigurableEmbeddedServletContainerFactory factory ) {
 factory . setPort ( getPort ( ) ) ;

Add back no op setLoader to ServerProperties


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class MavenWebArtifactConfiguration {
 - @ tag ( STRING0 )
 - public String webArtifactName ;
 -
 @ tag ( STRING1 )
 public String moduleName ;

 <nb> public class MavenResourceCompilerConfigurationGenerator {
 MavenWebArtifactConfiguration artifactResourceCfg = projectCfg . webArtifactConfigs . get ( webArtifactName ) ;
 if ( artifactResourceCfg == null ) {
 artifactResourceCfg = new MavenWebArtifactConfiguration ( ) ;
 - artifactResourceCfg . webArtifactName = webArtifactName ;
 artifactResourceCfg . moduleName = module . getName ( ) ;
 projectCfg . webArtifactConfigs . put ( webArtifactName , artifactResourceCfg ) ;
 }


<nb> public class DecorView extends FrameLayout implements RootViewSurfaceTaker , Wind
 mDecorCaptionView . addView ( root ,
 new ViewGroup . MarginLayoutParams ( MATCH_PARENT , MATCH_PARENT ) ) ;
 } else {
 - addView ( root , new ViewGroup . LayoutParams ( MATCH_PARENT , MATCH_PARENT ) ) ;
 +
 + SINGLE
 + addView ( root , NUMBER0 , new ViewGroup . LayoutParams ( MATCH_PARENT , MATCH_PARENT ) ) ;
 }
 mContentRoot = ( ViewGroup ) root ;
 initializeElevation ( ) ;

Fix disappearing translucent status bar background


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

 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ ignore ( STRING0 )
 public final class FileSystemAclIntegrationTest {

 private static final int BLOCK_SIZE = NUMBER0 ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class JournalIntegrationTest {
 }

 @ test
 + @ ignore ( STRING0 )
 @ localalluxioclusterresource.config ( confParams = {
 Constants . SECURITY_AUTHENTICATION_TYPE , STRING1 ,
 Constants . SECURITY_AUTHORIZATION_PERMISSION_ENABLED , STRING2 ,

SMALLFIX Disable failing integration tests for now with TODOS


<nb> public final class AutoBuffer {
 }
 return put1 ( STRING0 ) ;
 }
 - AutoBuffer putJSONA4 ( String name , int [ ] a ) {
 + public AutoBuffer putJSONA4 ( String name , int [ ] a ) {
 putJSONStr ( name ) . put1 ( STRING1 ) ;
 return putJSONA4 ( a ) ;
 }


<nb> public class StackScrollAlgorithm {
 private static final int MAX_ITEMS_IN_BOTTOM_STACK = NUMBER0 ;
 private static final int MAX_ITEMS_IN_TOP_STACK = NUMBER0 ;

 - COMMENT
 - private static final float ACTIVATED_INVERSE_ALPHA = FLOAT0 ;
 public static final float DIMMED_SCALE = FLOAT1 ;

 private int mPaddingBetweenElements ;
 <nb> public class StackScrollAlgorithm {
 childViewState . scale = ! mScaleDimmed || ! dimmed || isActivatedChild
 ? FLOAT2
 : DIMMED_SCALE ;
 - if ( dimmed && activatedChild != null ) {
 - if ( ! isActivatedChild ) {
 - childViewState . alpha *= ACTIVATED_INVERSE_ALPHA ;
 - } else {
 - childViewState . zTranslation += FLOAT3 * mZDistanceBetweenElements ;
 - }
 + if ( dimmed && isActivatedChild ) {
 + childViewState . zTranslation += FLOAT3 * mZDistanceBetweenElements ;
 }
 }
 }

Do not dim the non activated notifications on lockscreen


<nb> public class ELFAnalyzer extends FileAnalyzer {
 out . write ( STRING0 ) ;
 }

 - class ELFHeader {
 + private static class ELFHeader {
 SINGLE
 SINGLE
 SINGLE

Fixed FindBugs warning inner class should be static


<nb> public class DefaultFormat extends RepresentationFormat
 }

 @ override
 - protected String serializeValue ( String type , Object value )
 + protected String serializeValue ( String type , Object value ) throws BadInputException
 {
 return inner . serializeValue ( type , value ) ;
 }
 <nb> public class DefaultFormat extends RepresentationFormat
 }

 @ override
 - protected String complete ( MappingWriter serializer )
 + protected String complete ( MappingWriter serializer ) throws BadInputException
 {
 return inner . complete ( serializer ) ;
 }

updated DefaultOutput to pass on BadInputExceptions


<nb> public class OptionsMenuProcessor implements ElementProcessor {

 JBlock body = method . body ( ) ;

 - JVar menuInflater = body . decl ( holder . refClass ( usesSherlock ? STRING0 : STRING1 ) , STRING2 , invoke ( usesSherlock ? STRING3 : STRING4 ) ) ;
 + JVar menuInflater = body . decl ( holder . refClass ( usesSherlock ? STRING5 : STRING1 ) , STRING2 , invoke ( usesSherlock ? STRING3 : STRING4 ) ) ;

 body . invoke ( menuInflater , STRING6 ) . arg ( optionsMenuId ) . arg ( menuParam ) ;

Fixed typo in Sherlock version of the MenuInflater class


<nb> public abstract class IteratorUtil
 }
 } ;
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static < T > int count ( Iterator < T > iterator )
 + {
 + int result = NUMBER0 ;
 + while ( iterator . hasNext ( ) )
 + {
 + iterator . next ( ) ;
 + result ++ ;
 + }
 + return result ;
 + }
 }


<nb> public class RecoveryStatus extends AbstractRefCounted {

 COMMENT
 public void setWaitingRecoveryThread ( Thread thread ) {
 + ensureRefCount ( ) ;
 waitingRecoveryThread . set ( thread ) ;
 }

 <nb> public class RecoveryStatus extends AbstractRefCounted {

 final Thread thread = waitingRecoveryThread . get ( ) ;
 if ( thread != null ) {
 + logger . debug ( STRING0 ) ;
 thread . interrupt ( ) ;
 }
 }

add more debug logging if recovery thread got iterrupted


<nb> public class Realm {
 @ suppresswarnings ( STRING0 )
 private static Realm createAndValidate ( String absolutePath , byte [ ] key , boolean validateSchema , boolean autoRefresh ) {
 Map < Integer , Realm > realms = realmsCache . get ( ) ;
 - Realm realm = realms . get ( absolutePath . hashCode ( ) ) ;
 + Realm realm = realms . get ( absolutePath ) ;

 if ( realm != null ) {
 return realm ;


<nb> public class EnglishGrammaticalRelations {
 STRING0 ,
 STRING1 ,
 SINGLE
 - STRING2 ,
 + STRING3 ,
 STRING4 ,
 STRING5 ,
 STRING6 + copularWordRegex + STRING7 ,

Fix a few examples of xcomp dependencies


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class HttpTransportOverSPDYTest
 @ test
 public void testVerifyThatAStreamIsNotCommittedTwice ( ) throws IOException
 {
 + ( ( StdErrLog ) Log . getLogger ( HttpTransportOverSPDY . class ) ) . setHideStacks ( true ) ;
 ByteBuffer content = createRandomByteBuffer ( ) ;
 boolean lastContent = false ;

 <nb> public class HttpTransportOverSPDYTest

 verify ( stream , times ( NUMBER0 ) ) . data ( any ( DataInfo . class ) ) ;
 verify ( stream , times ( NUMBER1 ) ) . data ( any ( DataInfo . class ) , anyLong ( ) , any ( TimeUnit . class ) , any ( Callback . class ) ) ;
 +
 + ( ( StdErrLog ) Log . getLogger ( HttpTransportOverSPDY . class ) ) . setHideStacks ( false ) ;
 }

 private ByteBuffer createRandomByteBuffer ( )


<nb> public class MethodProcessorSetupFailedException extends Exception {
 public MethodProcessorSetupFailedException ( @ nonnls String message ) {
 super ( message ) ;
 }
 +
 + @ suppresswarnings ( { STRING0 } )
 + @ override
 + public Throwable fillInStackTrace ( ) {
 + return this ;
 + }
 }

don t need a stack trace for this control flow throwable


<nb> public class HyperLogLogPlus implements ICardinality
 {
 biasTotal += biasVector [ nearestNeighbor ] ;
 }
 - return biasTotal / ( biasVector . length ) ;
 + return biasTotal / ( nearestNeighbors . length ) ;
 }

 private int [ ] getNearestNeighbors ( SortedMap < Double , Integer > distanceMap )


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class VcsLogContentProvider implements ChangesViewContentProvider , NotNul

 @ override
 public void disposeContent ( ) {
 + Disposer . dispose ( myLogManager ) ;
 }

log Properly dispose the content provider


<nb> public class German extends Language implements AutoCloseable {
 private GermanCompoundTokenizer strictCompoundTokenizer ;
 private LanguageModel languageModel ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 + public German ( ) {
 + }
 +
 @ override
 public Language getDefaultLanguageVariant ( ) {
 return GERMANY_GERMAN ;
 <nb> public class English extends Language implements AutoCloseable {
 private WordTokenizer wordTokenizer ;
 private LuceneLanguageModel languageModel ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 + public English ( ) {
 + }
 +
 @ override
 public Language getDefaultLanguageVariant ( ) {
 return AMERICAN_ENGLISH ;

en de deprecate the constructors that create a language object without spell checking rules this regularly confused users


<nb> public class Duration extends AbstractDuration implements ReadableDuration , Seri

 SINGLE
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public Duration withDurationType ( DurationType type ) {
 + if ( type == null ) {
 + type = DurationType . getAllType ( ) ;
 + }
 + if ( type . equals ( getDurationType ( ) ) ) {
 + return this ;
 + }
 + return new Duration ( getTotalMillis ( ) , type ) ;
 + }
 +
 + SINGLE
 + COMMENT
 COMMENT
 COMMENT
 protected final void setDuration ( ReadableDuration duration ) {


<nb> public class ConcurrentLinkedHashCacheProvider implements IRowCacheProvider

 public int weightOf ( IRowCacheEntry value )
 {
 - return ( int ) Math . min ( meter . measure ( value ) , Integer . MAX_VALUE ) ;
 + return ( int ) Math . min ( meter . measureDeep ( value ) , Integer . MAX_VALUE ) ;
 }
 } ;
 }


<nb> public abstract class HttpContentEncoder extends MessageToMessageCodec < HttpReque
 break ;
 }
 if ( ! buf . isReadable ( ) ) {
 + buf . release ( ) ;
 continue ;
 }
 out . add ( new DefaultHttpContent ( buf ) ) ;

Fix potential leak in HttpContentEncoder


<nb> public class CompletionUtil {
 type = factory . createType ( aClass , substitutor ) ;
 }
 } else if ( type instanceof PsiArrayType ) {
 - final PsiType psiType = eliminateWildcardsInner ( ( ( PsiArrayType ) type ) . getComponentType ( ) , false ) ;
 - if ( psiType != null ) return psiType . createArrayType ( ) ;
 + return eliminateWildcardsInner ( ( ( PsiArrayType ) type ) . getComponentType ( ) , false ) . createArrayType ( ) ;
 } else if ( type instanceof PsiWildcardType ) {
 return ( ( PsiWildcardType ) type ) . getExtendsBound ( ) ;
 }


<nb> public class MongoInsertStorage extends StoreFunc implements StoreMetadata {

 }

 + @ override
 public void checkSchema ( ResourceSchema schema ) throws IOException {
 this . schema = schema ;
 UDFContext udfc = UDFContext . getUDFContext ( ) ;
 <nb> public class MongoInsertStorage extends StoreFunc implements StoreMetadata {
 p . setProperty ( SCHEMA_SIGNATURE , schema . toString ( ) ) ;
 }

 + @ override
 public void storeSchema ( ResourceSchema schema , String location , Job job ) {
 SINGLE
 }

 -
 + @ override
 public void storeStatistics ( ResourceStatistics stats , String location , Job job ) {
 SINGLE
 }

 + @ override
 public void putNext ( Tuple tuple ) throws IOException {
 try {
 final BasicDBObjectBuilder builder = BasicDBObjectBuilder . start ( ) ;


<nb> public class OracleDatabase extends AbstractDatabase {
 SINGLE
 SINGLE
 SINGLE
 - SINGLE
 + STRING0 ,
 SINGLE
 SINGLE
 SINGLE
 <nb> public class OracleDatabase extends AbstractDatabase {
 SINGLE
 SINGLE
 SINGLE
 - SINGLE
 + STRING1
 SINGLE
 SINGLE
 SINGLE


<nb> public final class ProcessControllerClient implements Closeable {
 for ( int i = NUMBER0 ; i < cnt ; i ++ ) {
 final String processName = readUTFZBytes ( dataStream ) ;
 final byte [ ] processAuthCode = new byte [ NUMBER1 ] ;
 - final boolean processRunning = StreamUtils . readBoolean ( dataStream ) ;
 readFully ( dataStream , processAuthCode ) ;
 + final boolean processRunning = StreamUtils . readBoolean ( dataStream ) ;
 inventory . put ( processName , new ProcessInfo ( processName , authCode , processRunning ) ) ;
 }
 dataStream . close ( ) ;

Fix wrong unmarshalling order of process inventory data


<nb> public class ClassNode extends AnnotatedNode implements Opcodes {
 while ( node != null ) ;
 return false ;
 }
 +
 + public boolean isInterface ( ) {
 + return ( getModifiers ( ) & Opcodes . ACC_INTERFACE ) > NUMBER0 ;
 + }
 }

added a method to identify a classnode as interface


<nb> public enum CompilationLevel {
 }

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public void setTypeBasedOptimizationOptions ( CompilerOptions options ) {
 <nb> public enum CompilationLevel {
 options . setUseTypesForOptimization ( true ) ;
 break ;
 case SIMPLE_OPTIMIZATIONS :
 - options . setUseTypesForOptimization ( true ) ;
 - break ;
 case WHITESPACE_ONLY :
 break ;
 }

Turn off useTypesForOptimization in simple mode


<nb> public class GetDatabaseVersionHeadersFolderResponse extends FolderResponse {
 @ elementlist ( required = true , entry = STRING0 )
 private ArrayList < DatabaseVersionHeader > databaseVersionHeaders ;

 + public GetDatabaseVersionHeadersFolderResponse ( ) {
 + SINGLE
 + }
 +
 public GetDatabaseVersionHeadersFolderResponse ( int requestId , String root , List < DatabaseVersionHeader > databaseVersionHeaders ) {
 super ( NUMBER0 , requestId , null ) ;


<nb> public class SampleIntegrationTests {

 @ test
 public void integrationSample ( ) throws Exception {
 - SINGLE
 - System . clearProperty ( STRING0 ) ;
 -
 String output = this . cli . run ( STRING1 ) ;
 assertTrue ( STRING2 + output , output . contains ( STRING3 ) ) ;
 }

Remove special case for integration sample s milestone dependency


<nb> public class OutgoingConnection {
 }
 }
 }
 -
 +
 SINGLE
 final Iterator < Buffer > it = buffersToRecycle . iterator ( ) ;
 - while ( it . hasNext ( ) ) {
 + while ( it . hasNext ( ) ) {
 it . next ( ) . recycleBuffer ( ) ;
 }
 }

Corrected code style of OutgoingConnection java


<nb> public class TextViewCompatTest extends ActivityInstrumentationTestCase2 < TestAct
 TextViewCompat . setTextAppearance ( mTextView , R . style . TextMediumStyle ) ;

 final Resources res = getActivity ( ) . getResources ( ) ;
 - assertEquals ( STRING0 , mTextView . getTypeface ( ) . getStyle ( ) ,
 - Typeface . ITALIC ) ;
 + assertTrue ( STRING0 ,
 + mTextView . getTypeface ( ) . isItalic ( ) || ( mTextView . getPaint ( ) . getTextSkewX ( ) < NUMBER0 ) ) ;
 assertEquals ( STRING1 , mTextView . getTextColors ( ) . getDefaultColor ( ) ,
 res . getColor ( R . color . text_color ) ) ;
 assertEquals ( STRING2 , mTextView . getTextSize ( ) ,

Refine TextViewCompat setTextAppearance logic


<nb> public final class BlockMaster extends MasterBase
 }
 }
 }
 -
 - SINGLE
 - if ( mLostWorkers . size ( ) != NUMBER0 ) {
 - LOG . warn ( STRING0 ) ;
 - try {
 - String tachyonHome = conf . get ( Constants . TACHYON_HOME ) ;
 - java . lang . Runtime . getRuntime ( )
 - . exec ( tachyonHome + STRING1 ) ;
 - } catch ( IOException e ) {
 - LOG . error ( e . getMessage ( ) ) ;
 - }
 - }
 }
 }


<nb> public class CrawlController extends Configurable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - public < T extends WebCrawler > void startNonBlocking ( final Class < T > _c ,
 - final int numberOfCrawlers ) {
 - this . start ( new DefaultWebCrawlerFactory < > ( _c ) , numberOfCrawlers , false ) ;
 + public < T extends WebCrawler > void startNonBlocking ( Class < T > clazz , int numberOfCrawlers ) {
 + start ( new DefaultWebCrawlerFactory < > ( clazz ) , numberOfCrawlers , false ) ;
 }

 protected < T extends WebCrawler > void start ( final WebCrawlerFactory < T > crawlerFactory ,


<nb> public class Redwood {
 COMMENT
 COMMENT
 static {
 - RedwoodConfiguration . standard ( ) . apply ( ) ;
 + RedwoodConfiguration . minimal ( ) . apply ( ) ;
 }

 COMMENT

Redwood should load the minimal configuration by default


<nb> public class ReplicatedRecord < K , V > implements IdentifiedDataSerializable {
 }

 public K getKey ( ) {
 + access ( ) ;
 return key ;
 }

 public V getValue ( ) {
 + access ( ) ;
 return value ;
 }

 <nb> public class ReplicatedRecord < K , V > implements IdentifiedDataSerializable {
 }

 public V setValue ( V value , int hash , long ttlMillis ) {
 + access ( ) ;
 V oldValue = value ;
 this . value = value ;
 this . latestUpdateHash = hash ;

Added record access for lastAccess time in statistics


<nb> public class DBTCPConnector implements DBConnector {
 return false ;

 if ( _masterPortPool != null )
 - _logger . log ( Level . WARNING , STRING0 + _masterPortPool . getServerAddress ( ) + STRING1 + addr ) ;
 + _logger . log ( Level . WARNING , STRING2 + _masterPortPool . getServerAddress ( ) + STRING1 + addr ) ;
 _masterPortPool = newPool ;
 return true ;
 }

changed Master to Primary in log statement


<nb> abstract public class ShadowContext {
 }

 @ implementation
 + public File getCacheDir ( ) {
 + SINGLE
 + File file = new File ( System . getProperty ( STRING0 ) , STRING1 ) ;
 + file . mkdirs ( ) ;
 + return file ;
 + }
 +
 + @ implementation
 public File getFilesDir ( ) {
 SINGLE
 File file = new File ( System . getProperty ( STRING0 ) , STRING2 ) ;
 <nb> public class ContextTest {
 }

 @ test
 + public void getCacheDir_shouldCreateDirectory ( ) throws Exception {
 + assertTrue ( context . getCacheDir ( ) . exists ( ) ) ;
 + }
 +
 + @ test
 public void getFilesDir_shouldCreateDirectory ( ) throws Exception {
 assertTrue ( context . getFilesDir ( ) . exists ( ) ) ;
 }


<nb> public interface DataContext {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 @ nullable Object getData ( @ nonnls String dataId ) ;
 }
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 public interface DataProvider {
 COMMENT


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

 import NAMESPACE ;


<nb> public class ImplementationImportCollector extends HeaderImportCollector {

 @ override
 public boolean visit ( ArrayAccess node ) {
 - addReference ( Types . getTypeBinding ( node ) ) ;
 + ITypeBinding componentType = Types . getTypeBinding ( node ) ;
 + addReference ( componentType ) ;
 + addReference ( Types . resolveArrayType ( componentType ) ) ;
 return super . visit ( node ) ;
 }

 <nb> public class ImplementationImportCollectorTest extends GenerationTest {
 STRING0 , STRING1 ) ;
 SINGLE
 }
 +
 + public void testArrayImport ( ) throws IOException {
 + addSourceFile ( STRING2 , STRING3 ) ;
 + String translation = translateSourceFile (
 + STRING4 , STRING5 , STRING6 ) ;
 + assertTranslation ( translation , STRING7 ) ;
 + }
 }

Add import references for array type and its component type


<nb> public class ContactAccessorSdk5 extends ContactAccessor {
 columnsToFetch . add ( ContactsContract . CommonDataKinds . Phone . TYPE ) ;
 }
 if ( isRequired ( STRING0 , populate ) ) {
 + columnsToFetch . add ( ContactsContract . CommonDataKinds . Email . _ID ) ;
 columnsToFetch . add ( ContactsContract . CommonDataKinds . Email . DATA ) ;
 columnsToFetch . add ( ContactsContract . CommonDataKinds . Email . TYPE ) ;
 }

Searching for emails in Contacts throws an exception always errors out


<nb> public class LockExclusiveJobCmd implements Command < Object > , Serializable {
 }

 if ( log . isDebugEnabled ( ) ) {
 - log . debug ( STRING0 , job . getId ( ) ) ;
 + log . debug ( STRING1 , job . getId ( ) , job . getExecutionId ( ) ) ;
 }

 if ( job . isExclusive ( ) ) {


<nb>
 COMMENT
 package NAMESPACE ;

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

 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 public class HostedRoom {

 - private final Jid jid ;
 + private final EntityBareJid jid ;

 private final String name ;

 public HostedRoom ( DiscoverItems . Item item ) {
 - jid = item . getEntityID ( ) ;
 + jid = Objects . requireNonNull ( item . getEntityID ( ) . asEntityBareJidIfPossible ( ) ,
 + STRING0 ) ;
 name = item . getName ( ) ;
 }

 <nb> public class HostedRoom {
 COMMENT
 COMMENT
 COMMENT
 - public Jid getJid ( ) {
 + public EntityBareJid getJid ( ) {
 return jid ;
 }


<nb> public class ReconstructMessageTest extends AndroidTestCase {
 STRING0 +
 STRING1 +
 STRING2 +
 - STRING3 +
 STRING4 +
 STRING5 +
 STRING6 +
 + STRING3 +
 STRING7 +
 STRING8 +
 STRING9 +

Modify ReconstructMessageTest to highlight more problems


<nb> public class MessageCompose extends K9Activity implements OnClickListener ,
 if ( body != null && ! subject . isEmpty ( ) ) {
 mMessageContentView . setCharacters ( body ) ;
 }
 -
 -
 }

 - static class CaseInsensitiveParamWrapper {
 - private final Uri uri ;
 - private Set < String > mParamNames ;
 -
 - public CaseInsensitiveParamWrapper ( Uri uri ) {
 - this . uri = uri ;
 - }
 -
 - public List < String > getQueryParameters ( String key ) {
 - final List < String > params = new ArrayList < String > ( ) ;
 - for ( String paramName : uri . getQueryParameterNames ( ) ) {
 - if ( paramName . equalsIgnoreCase ( key ) ) {
 - params . addAll ( uri . getQueryParameters ( paramName ) ) ;
 - }
 - }
 - return params ;
 - }
 -
 - }

 private class SendMessageTask extends AsyncTask < Void , Void , Void > {
 @ override


<nb> public class MongodbQuery < K > implements SimpleQuery < MongodbQuery < K > > , SimpleProj

 @ override
 public K uniqueResult ( ) {
 - DBCursor c = createCursor ( ) . limit ( NUMBER0 ) ;
 + Long limit = queryMixin . getMetadata ( ) . getModifiers ( ) . getLimit ( ) ;
 + if ( limit == null ) {
 + limit = NUMBER1 ;
 + }
 + DBCursor c = createCursor ( ) . limit ( limit . intValue ( ) ) ;
 if ( c . hasNext ( ) ) {
 K rv = transformer . transform ( c . next ( ) ) ;
 if ( c . hasNext ( ) ) {


<nb> public class QualityGates {
 return from ( conditionDao . selectForQualityGate ( qGateId ) ) . filter ( new MatchConditionId ( conditionId ) ) . toList ( ) ;
 }

 - private void validateCondition ( Metric metric , String operator , @ nullable String warningThreshold , @ nullable String errorThreshold , @ nullable Integer period ) {
 + private static void validateCondition ( Metric metric , String operator , @ nullable String warningThreshold , @ nullable String errorThreshold , @ nullable Integer period ) {
 Errors errors = new Errors ( ) ;
 validateMetric ( metric , errors ) ;
 checkOperator ( metric , operator , errors ) ;


<nb> public final class MessageEventManager extends Manager {
 method . invoke ( listener , new Object [ ] { from , packetID , this } ) ;
 }
 } catch ( Exception e ) {
 - LOGGER . log ( Level . SEVERE , STRING0 , e ) ;
 + LOGGER . log ( Level . SEVERE , STRING1 + methodName , e ) ;
 }
 }

 <nb> public final class MessageEventManager extends Manager {
 method . invoke ( listener , new Object [ ] { from , packetID } ) ;
 }
 } catch ( Exception e ) {
 - LOGGER . log ( Level . SEVERE , STRING2 , e ) ;
 + LOGGER . log ( Level . SEVERE , STRING3 + methodName , e ) ;
 }
 }

Improve MessageEventManager s log message


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class Camera implements Savable , Cloneable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Created clickable links out of http mentions in Camera Javadoc


<nb> public class EnglishGrammaticalRelations {
 SINGLE
 SINGLE
 STRING0 ,
 - STRING1 ,
 + STRING2 ,
 STRING3 ,
 } ) ;
 public static class RelativeClauseModifierGRAnnotation extends GrammaticalRelationAnnotation { }

Reorder a tregex pattern to make it slightly more efficient


<nb> public class ImplementationBodyCodegen extends ClassBodyCodegen {
 }
 }

 - @ nullable
 - private JetClassObject getClassObject ( ) {
 - return myClass instanceof JetClass ? ( ( JetClass ) myClass ) . getClassObject ( ) : null ;
 - }
 -

 COMMENT
 COMMENT


<nb> class AlarmManagerService extends IAlarmManager . Stub {
 private static final String ClockReceiver_TAG = STRING0 ;
 private static final boolean localLOGV = false ;
 private static final boolean DEBUG_BATCH = localLOGV || false ;
 - private static final boolean DEBUG_VALIDATE = localLOGV || true ;
 + private static final boolean DEBUG_VALIDATE = localLOGV || false ;
 private static final int ALARM_EVENT = NUMBER0 ;
 private static final String TIMEZONE_PROPERTY = STRING1 ;

Turn off Alarm Manager logspew pending a more friendly implementation


<nb> public class DefaultIvyDependencyResolver implements IvyDependencyResolver {

 for ( ModuleDependency moduleDependency : selectedDependencies ) {
 Set < ResolvedDependency > resolvedDependencies = conversionResult . getFirstLevelResolvedDependencies ( ) . get ( moduleDependency ) ;
 + SINGLE
 if ( resolvedDependencies != null ) {
 for ( ResolvedDependency resolvedDependency : resolvedDependencies ) {
 artifacts . addAll ( resolvedDependency . getParentArtifacts ( conversionResult . getRoot ( ) ) ) ;

Added todo comment for DefaultIvyDependencyResolver


<nb> public class ArrayMultiplication {
 int result2 = multiplicationImproved ( x % div , y % div , len ) ;
 int result3 = multiplicationImproved ( x / div + x % div , y / div + y % div , len ) ;

 - return result1 * ( power ( NUMBER0 * len ) - power ( len ) ) +
 - result3 * power ( len ) - result2 * ( power ( len ) - NUMBER1 ) ;
 + return result1 * div * ( div - NUMBER1 ) +
 + result3 * div - result2 * ( div - NUMBER1 ) ;

 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class MapStoreWriteBehindTest extends AbstractMapStoreTest {

 @ test ( timeout = NUMBER0 )
 + @ category ( NightlyTest . class )
 SINGLE
 public void testWriteBehindDestroy ( ) throws InterruptedException {
 - final int writeDelaySeconds = NUMBER1 ;
 + final int writeDelaySeconds = NUMBER2 ;
 String mapName = randomMapName ( ) ;

 final MapStore < String , String > store = new SimpleMapStore < String , String > ( ) ;


<nb> public final class LineageFileSystemTest {
 Whitebox . setInternalState ( LineageContext . class , STRING0 , mLineageContext ) ;
 mAlluxioLineageFileSystem = LineageFileSystem . get ( ) ;
 Whitebox . setInternalState ( mAlluxioLineageFileSystem , STRING1 , mLineageContext ) ;
 - FileSystemContext mFileSystemContext = PowerMockito . mock ( FileSystemContext . class ) ;
 - FileSystemMasterClient mFileSystemMasterClient =
 + FileSystemContext fileSystemContext = PowerMockito . mock ( FileSystemContext . class ) ;
 + FileSystemMasterClient fileSystemMasterClient =
 PowerMockito . mock ( FileSystemMasterClient . class ) ;
 - Mockito . when ( mFileSystemContext . acquireMasterClient ( ) ) . thenReturn ( mFileSystemMasterClient ) ;
 - Whitebox . setInternalState ( FileSystemContext . class , STRING0 , mFileSystemContext ) ;
 - Whitebox . setInternalState ( mAlluxioLineageFileSystem , STRING2 , mFileSystemContext ) ;
 + Mockito . when ( fileSystemContext . acquireMasterClient ( ) ) . thenReturn ( fileSystemMasterClient ) ;
 + Whitebox . setInternalState ( FileSystemContext . class , STRING0 , fileSystemContext ) ;
 + Whitebox . setInternalState ( mAlluxioLineageFileSystem , STRING2 , fileSystemContext ) ;
 }

 COMMENT


<nb> public class InputUnusedParameter
 Object aUnreadObject )
 {
 int i = aReadObject . length ( ) ;
 -
 +
 int j = aRectangle . x ;
 -
 +
 try {
 - i ++ ;
 + i ++ ;
 }
 catch ( Exception unreadException ) {
 }
 <nb> public class InputUnusedParameter
 int i = aArray [ NUMBER0 ] ;
 aArray2 [ NUMBER0 ] = NUMBER0 ;
 }
 +
 + private int member = NUMBER1 ;
 + private void methodSameLocalVariable ( int member )
 + {
 + int x = member ; SINGLE
 + }
 }

 interface Interface

added test input for hidden field to prevent false alarms


<nb> public final class MediaType {
 public static final MediaType ATOM_UTF_8 = createConstantUtf8 ( APPLICATION_TYPE , STRING0 ) ;
 public static final MediaType BZIP2 = createConstant ( APPLICATION_TYPE , STRING1 ) ;

 - public static final MediaType X_PROTOBUF = createConstant ( APPLICATION_TYPE , STRING2 ) ;
 -
 COMMENT
 COMMENT
 COMMENT

Withdraw application x protobuf from Guava and document it


<nb> public class ImperativeCodeDetectingTransformer extends AbstractScriptTransforme
 }

 ImperativeCodeDetectingVisitor visitor = new ImperativeCodeDetectingVisitor ( scriptBlockNames ) ;
 - statementBlock . visit ( visitor ) ;
 + for ( int i = NUMBER0 ; i < statements . size ( ) && ! visitor . isImperativeStatementDetected ( ) ; i ++ ) {
 + statements . get ( i ) . visit ( visitor ) ;
 + }
 imperativeStatementDetected = visitor . isImperativeStatementDetected ( ) ;
 }

Don t visit any subsequent build script statements after encountering the first imperative statement


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface DocumentReaderAndWriter < IN extends CoreMap >
 COMMENT
 COMMENT
 COMMENT
 - public void init ( SeqClassifierFlags flags ) ;
 + void init ( SeqClassifierFlags flags ) ;

 COMMENT
 COMMENT
 <nb> public interface DocumentReaderAndWriter < IN extends CoreMap >
 COMMENT
 COMMENT
 COMMENT
 - public void printAnswers ( List < IN > doc , PrintWriter out ) ;
 + void printAnswers ( List < IN > doc , PrintWriter out ) ;

 }


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - SINGLE
 + @ ignore
 @ runwith ( StructurePerformanceSuite . class )
 @ structureperformancesuite.graphproviderclass ( provider = BerkeleyGraphProvider . class , graph = TitanGraph . class )
 public class BerkeleyTitanStructurePerformanceTest {


<nb>
 SINGLE
 SINGLE
 SINGLE
 + SINGLE

 package NAMESPACE ;

 <nb> public abstract class AbstractPlugin implements Plugin , Comparable < Object > {
 try {
 result = URLEncoder . encode ( msg , STRING0 ) ;

 - } catch ( UnsupportedEncodingException e ) {
 - e . printStackTrace ( ) ;
 + } catch ( UnsupportedEncodingException ignore ) {
 + SINGLE
 }

 return result ;
 <nb> public abstract class AbstractPlugin implements Plugin , Comparable < Object > {
 try {
 result = URLDecoder . decode ( msg , STRING0 ) ;

 - } catch ( UnsupportedEncodingException e ) {
 - e . printStackTrace ( ) ;
 + } catch ( UnsupportedEncodingException ignore ) {
 + SINGLE
 }

 return result ;

Remove unnecessary exceptions stack trace prints


<nb> public class DbMigrate {
 }

 MigrationInfo [ ] future = infoService . future ( ) ;
 - MigrationInfo [ ] resolved = infoService . resolved ( ) ;
 - boolean isFutureMigration = future . length < NUMBER0 ;
 - if ( isFutureMigration ) {
 + if ( future . length > NUMBER0 ) {
 + MigrationInfo [ ] resolved = infoService . resolved ( ) ;
 LOG . warn ( STRING0 + schema + STRING1 + currentSchemaVersion + STRING2
 + resolved [ resolved . length - NUMBER1 ] . getVersion ( ) + STRING3 ) ;
 }


<nb> public final class InputSplitManager {
 if ( inputSplits . length == NUMBER0 ) {
 continue ;
 }
 -
 +
 final InputSplitAssigner assigner = this . assignerCache . remove ( groupVertex ) ;
 if ( assigner == null ) {
 LOG . error ( STRING0 + groupVertex . getName ( )


<nb> public class ChartServlet extends HttpServlet implements ManagedService {
 }
 if ( properties . get ( STRING0 ) != null ) {
 scale = Double . parseDouble ( ( String ) properties . get ( STRING0 ) ) ;
 - if ( scale < FLOAT0 )
 + if ( scale < FLOAT1 )
 scale = FLOAT2 ;
 }
 }


<nb> public class RepeatRule implements TestRule
 public abstract int times ( ) ;
 }

 - private static class RepeatStatement extends Statement
 + private int count ;
 +
 + private class RepeatStatement extends Statement
 {
 private final int times ;
 private final Statement statement ;
 <nb> public class RepeatRule implements TestRule
 @ override
 public void evaluate ( ) throws Throwable
 {
 - for ( int i = NUMBER0 ; i < times ; i ++ )
 + for ( count = NUMBER0 ; count < times ; count ++ )
 {
 statement . evaluate ( ) ;
 }
 <nb> public class RepeatRule implements TestRule
 }
 return base ;
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public int getCount ( )
 + {
 + return count ;
 + }
 }

RepeatRule now exposes count for easy debug output of which iteration is currently running


<nb> public class VolumeDialog {
 }

 protected void dismissH ( int reason ) {
 + if ( mMotion . isAnimating ( ) ) {
 + return ;
 + }
 mHandler . removeMessages ( H . DISMISS ) ;
 mHandler . removeMessages ( H . SHOW ) ;
 if ( ! mShowing ) return ;


<nb> package NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public class AbstractCodegenTestCaseOnAndroid extends TestCase {
 Class clazz ;
 clazz = Class . forName ( filePath . replaceAll ( STRING0 , STRING1 ) + STRING2 ) ;
 Method method ;
 - method = clazz . getMethod ( STRING3 ) ;
 + try {
 + method = clazz . getMethod ( STRING3 ) ;
 + }
 + catch ( NoSuchMethodException e ) {
 + try {
 + method = clazz . getMethod ( STRING4 , String [ ] . class ) ;
 + }
 + catch ( Throwable e ) {
 + throw new RuntimeException ( STRING5 + filePath , e ) ;
 + }
 + method . invoke ( null ) ;
 + return ;
 + }
 assertEquals ( STRING6 , method . invoke ( null ) ) ;
 }
 catch ( Throwable e ) {

some codegen tests use main instead of box


<nb> public class NotificationTemplateViewWrapper extends NotificationViewWrapper {
 }
 }
 if ( mIcon != null ) {
 + boolean hadColorFilter = mNotificationHeader . getOriginalIconColor ( )
 + != NotificationHeaderView . NO_COLOR ;
 if ( fade ) {
 - fadeIconColorFilter ( mIcon , dark , delay ) ;
 - fadeIconAlpha ( mIcon , dark , delay ) ;
 + if ( hadColorFilter ) {
 + fadeIconColorFilter ( mIcon , dark , delay ) ;
 + fadeIconAlpha ( mIcon , dark , delay ) ;
 + } else {
 + fadeGrayscale ( mIcon , dark , delay ) ;
 + }
 } else {
 - updateIconColorFilter ( mIcon , dark ) ;
 - updateIconAlpha ( mIcon , dark ) ;
 + if ( hadColorFilter ) {
 + updateIconColorFilter ( mIcon , dark ) ;
 + updateIconAlpha ( mIcon , dark ) ;
 + } else {
 + updateGrayscale ( mIcon , dark ) ;
 + }
 }
 }
 setPictureGrayscale ( dark , fade , delay ) ;

Fixed a bug where legacy icons where incorrectly colored


<nb> public abstract class DataChangedNotifier < T > {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public Set < SqlTable < ? > > whichTables ( ) {


<nb> public class ParseTests extends TestCase {
 }

 public void testParseWithUnclosedSquareBracket ( ) throws Exception {
 - String output = parseCode ( STRING0 , STRING1 ) . generatedGsp ;
 + String output = parseCode ( STRING0 , STRING2 ) . generatedGsp ;
 String expected = makeImports ( ) +
 STRING3 +
 STRING4 +
 <nb> public class ParseTests extends TestCase {
 STRING5 +
 STRING6 +

 - STRING7 +
 + STRING8 +
 STRING9 + GSP_FOOTER ;

 assertEquals ( trimAndRemoveCR ( expected ) , trimAndRemoveCR ( output ) ) ;


<nb> public class GermanHelperTest {
 }

 @ test
 + public void testGetDeterminerNumber ( ) throws Exception {
 + assertThat ( GermanHelper . getDeterminerNumber ( STRING0 ) , is ( STRING1 ) ) ;
 + }
 +
 + @ test
 + public void testGetDeterminerDefiniteness ( ) throws Exception {
 + assertThat ( GermanHelper . getDeterminerDefiniteness ( STRING0 ) , is ( STRING2 ) ) ;
 + }
 +
 + @ test
 + public void testGetDeterminerCase ( ) throws Exception {
 + assertThat ( GermanHelper . getDeterminerCase ( STRING0 ) , is ( STRING3 ) ) ;
 + }
 +
 + @ test
 public void testGetDeterminerGender ( ) throws Exception {
 assertThat ( GermanHelper . getDeterminerGender ( null ) , is ( STRING4 ) ) ;
 assertThat ( GermanHelper . getDeterminerGender ( STRING4 ) , is ( STRING4 ) ) ;


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


<nb> public class IndexRotationThread extends Periodical {
 LOG . error ( STRING0 ) ;
 return ;
 }
 - LOG . info ( STRING1 , rotate . getDescription ( ) ) ;
 + LOG . debug ( STRING1 , rotate . getDescription ( ) ) ;
 if ( rotate . shouldRotate ( ) ) {
 LOG . info ( STRING2 , currentTarget ) ;
 deflector . cycle ( ) ;

Log index rotation strategy message to debug instead of info


<nb> public class HighlyAvailableGraphDatabase

 protected void start ( )
 {
 + life . start ( ) ;
 +
 getMessageLog ( ) . logMessage ( STRING0 + getStoreDir ( ) + STRING1 ) ;

 StoreId storeId = null ;


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class MinaFiltersTest extends ContextTestSupport {


<nb> public class ContactListTreeCellRenderer

 UIContactDetail desktopContact
 = uiContact . getDefaultContactDetail (
 - OperationSetDesktopStreaming . class ) ;
 + OperationSetDesktopSharingServer . class ) ;

 if ( desktopContact != null
 || ( contactPhoneUtil != null

Check for correct capability for showing desktop sharing


<nb> public class AndroidAptCompiler implements SourceGeneratingCompiler {
 context . addMessage ( CompilerMessageCategory . ERROR , STRING0 + genRootPath , null , - NUMBER0 , - NUMBER0 ) ;
 continue ;
 }
 + final File parent = genRootDir . getParentFile ( ) ;
 + if ( parent != null && ! parent . exists ( ) && ! parent . mkdirs ( ) ) {
 + context . addMessage ( CompilerMessageCategory . ERROR , STRING1 + parent . getPath ( ) , null , - NUMBER0 , - NUMBER0 ) ;
 + continue ;
 + }
 if ( ! FileUtil . moveDirWithContent ( tmpOutputDir , genRootDir ) ) {
 final String message = STRING2 + tmpOutputDir . getPath ( ) + STRING3 + genRootPath ;
 context . addMessage ( CompilerMessageCategory . ERROR , message , null , - NUMBER0 , - NUMBER0 ) ;


<nb> public class FileStructureDialogTest extends BaseProjectViewTestCase {
 final Document document = FileDocumentManager . getInstance ( ) . getDocument ( virtualFile ) ;
 assertNotNull ( document ) ;

 - final Editor editor = factory . createEditor ( document ) ;
 + final Editor editor = factory . createEditor ( document , myProject ) ;
 try {
 final FileStructureDialog dialog =
 new FileStructureDialog ( structureViewModel , editor , myProject , psiClass , new Disposable ( ) {
 <nb> public class LocalHistoryActionsTest extends LocalHistoryUITestCase {
 document = FileDocumentManager . getInstance ( ) . getDocument ( f ) ;
 document . setText ( STRING0 ) ;

 - editor = getEditorFactory ( ) . createEditor ( document ) ;
 + editor = getEditorFactory ( ) . createEditor ( document , myProject ) ;
 }

 @ override

create editors associated with a project


<nb> public class UIStyleFamily {
 Table < String , String , UIStyle > elementStyles = elementStyleLookup . get ( classes . get ( i ) ) ;
 if ( elementStyles != null ) {
 style = elementStyles . get ( part , mode ) ;
 + if ( style == null && part . equals ( UIWidget . BASE_PART ) ) {
 + style = elementStyles . get ( STRING0 , mode ) ;
 + }
 if ( style == null ) {
 style = elementStyles . get ( part , STRING0 ) ;
 }

Fixed a bug causing mode styles to not be applied


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

 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class LegSwitchingEdge extends Edge {
 private static final long serialVersionUID = NUMBER0 ;


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

 public abstract class TestBase {
 private final MongoClient mongoClient ;


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

 COMMENT
 COMMENT


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ClassMappingNameConverter extends ResolvingConverter . StringConverte
 assert parent != null ;
 return parent . getXmlElement ( ) ;
 }
 +
 + @ override
 + public boolean isReferenceTo ( @ notnull PsiElement element ,
 + String stringValue ,
 + @ nullable String resolveResult ,
 + ConvertContext context ) {
 + return element . getManager ( ) . areElementsEquivalent ( element , resolve ( stringValue , context ) ) ;
 + }
 }

highlight usages in file should highlight all occurrences of servlet name re fixed


<nb> public enum Direction {
 throw new IllegalArgumentException ( ) ;
 }

 + public Direction opposite ( ) {
 + switch ( this ) {
 + case UP :
 + return DOWN ;
 + case UP_RIGHT :
 + return DOWN_LEFT ;
 + case RIGHT :
 + return LEFT ;
 + case DOWN_RIGHT :
 + return UP_LEFT ;
 + case DOWN :
 + return UP ;
 + case DOWN_LEFT :
 + return UP_RIGHT ;
 + case LEFT :
 + return RIGHT ;
 + case UP_LEFT :
 + return DOWN_RIGHT ;
 + }
 + throw new IllegalArgumentException ( ) ;
 + }
 +
 SINGLE
 SINGLE
 SINGLE


<nb> public class SurfaceView extends MockView {
 super ( context , attrs , defStyle ) ;
 }

 + public SurfaceView ( Context context , AttributeSet attrs , int defStyleAttr , int defStyleRes ) {
 + super ( context , attrs , defStyleAttr , defStyleRes ) ;
 + }
 +
 public SurfaceHolder getHolder ( ) {
 return mSurfaceHolder ;
 }
 <nb> import NAMESPACE ;
 public class MockView extends TextView {

 public MockView ( Context context , AttributeSet attrs , int defStyle ) {
 - super ( context , attrs , defStyle ) ;
 + this ( context , attrs , defStyle , NUMBER0 ) ;
 + }
 +
 + public MockView ( Context context , AttributeSet attrs , int defStyleAttr , int defStyleRes ) {
 + super ( context , attrs , defStyleAttr , defStyleRes ) ;

 setText ( this . getClass ( ) . getSimpleName ( ) ) ;
 setTextColor ( NUMBER1 ) ;


<nb> public class TestPlan implements Closeable {
 SINGLE
 }

 - private final class ExecutionExceptionHandler implements ExecutionListener {
 + private static final class ExecutionExceptionHandler implements ExecutionListener {
 private String executionError ;

 public ExecutionVertex executionVertex ;

Made ExecutionExceptionHandler in TestPlans static to make the code more robust against resource leakage


<nb> public class Nio2Endpoint extends AbstractEndpoint < Nio2Channel > {

 private final CompletionHandler < Integer , SocketWrapperBase < Nio2Channel > > readCompletionHandler ;
 private final Semaphore readPending = new Semaphore ( NUMBER0 ) ;
 - private boolean readInterest = true ; SINGLE
 + private boolean readInterest = false ; SINGLE

 private final CompletionHandler < Integer , ByteBuffer > writeCompletionHandler ;
 private final CompletionHandler < Long , ByteBuffer [ ] > gatheringWriteCompletionHandler ;
 private final Semaphore writePending = new Semaphore ( NUMBER0 ) ;
 - private boolean writeInterest = true ; SINGLE
 + private boolean writeInterest = false ; SINGLE
 private boolean writeNotify = false ;

 private CompletionHandler < Integer , SocketWrapperBase < Nio2Channel > > awaitBytesHandler

Change read write interest defaults for NIO


<nb> public class OutputServiceMJImpl implements OutputService {

 @ override
 public Output load ( String streamOutputId ) throws NotFoundException {
 - return coll . findOneById ( streamOutputId ) ;
 + final Output output = coll . findOneById ( streamOutputId ) ;
 + if ( output == null ) {
 + throw new NotFoundException ( STRING0 + streamOutputId ) ;
 + }
 +
 + return output ;
 }

 @ override

Fix contract of OutputServiceMJImpl load String


<nb> public class LdapContactQuery
 @ override
 public void cancel ( )
 {
 - ldapQuery . setState ( LdapQuery . State . CANCELLED ) ;
 + if ( ldapQuery != null )
 + {
 + ldapQuery . setState ( LdapQuery . State . CANCELLED ) ;
 + }
 super . cancel ( ) ;
 }
 }

Fix null pointer exception in LDAP contact source plugin


<nb> public abstract class BatteryStats implements Parcelable {
 STRING0 , which , linePrefix ) ;
 linePrefix = printWakeLock ( sb , wl . getWakeTime ( WAKE_TYPE_WINDOW ) , rawRealtime ,
 STRING1 , which , linePrefix ) ;
 - if ( ! linePrefix . equals ( STRING2 ) ) {
 + if ( true || ! linePrefix . equals ( STRING2 ) ) {
 sb . append ( STRING3 ) ;
 SINGLE
 pw . println ( sb . toString ( ) ) ;
 <nb> public final class BatteryStatsImpl extends BatteryStats {
 SINGLE
 SINGLE
 SINGLE
 - private static final int MAX_WAKELOCKS_PER_UID = NUMBER0 ;
 + private static final int MAX_WAKELOCKS_PER_UID = NUMBER1 ;

 private static int sNumSpeedSteps ;

raise overflow limit print all wake locks


<nb> public final class ExceptionsHelper {
 return result ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 public static String detailedMessage ( Throwable t ) {
 return detailedMessage ( t , false , NUMBER0 ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 public static String detailedMessage ( Throwable t , boolean newLines , int initialCounter ) {
 if ( t == null ) {
 return STRING0 ;


<nb> public class LuceneSerializerTest {
 }

 @ test
 + @ ignore
 + public void in ( ) throws Exception {
 + fail ( STRING0 ) ;
 + }
 +
 + @ test
 public void various ( ) throws Exception {
 MatchingFilters filters = new MatchingFilters ( Module . LUCENE , Target . LUCENE ) ;
 for ( EBoolean filter : filters . string ( title , EStringConst . create ( STRING1 ) ) ) {

Added test stub for IN operation in LuceneSerializerTest


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

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

 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CustomTHsHaServer extends TNonblockingServer
 }
 catch ( Throwable t )
 {
 + if ( t instanceof OutOfMemoryError )
 + Throwables . propagate ( t ) ;
 + StorageMetrics . exceptions . inc ( ) ;
 LOGGER . error ( STRING0 , t ) ;
 }
 finally


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

 - import NAMESPACE ;
 -
 COMMENT
 COMMENT
 COMMENT


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;

 public class GuiceChatModule extends ServletModule {

 @ override
 protected void configureServlets ( ) {
 - bind ( org . atmosphere . commons . jersey . ResourceChat . class ) ;
 + bind ( GuiceResourceChat . class ) ;
 }
 }


<nb> public class ForgeNetworkHandler

 public static void registerChannel ( ForgeModContainer forgeModContainer , Side side )
 {
 - channelPair = NetworkRegistry . INSTANCE . newChannel ( forgeModContainer , STRING0 , new FMLRuntimeCodec ( ) , new HandshakeCompletionHandler ( ) ) ;
 + channelPair = NetworkRegistry . INSTANCE . newChannel ( forgeModContainer , STRING1 , new ForgeRuntimeCodec ( ) , new HandshakeCompletionHandler ( ) ) ;
 EmbeddedChannel embeddedChannel = channelPair . get ( Side . SERVER ) ;
 embeddedChannel . attr ( FMLOutboundHandler . FML_MESSAGETARGET ) . set ( OutboundTarget . NOWHERE ) ;

Forge uses the FORGE channel for packets


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class ASTFactory {
 }

 public static LeafElement whitespace ( CharSequence text ) {
 - return new PsiWhiteSpaceImpl ( WHITSPACES . intern ( text ) ) ;
 + PsiWhiteSpaceImpl w = new PsiWhiteSpaceImpl ( WHITSPACES . intern ( text ) ) ;
 + CodeEditUtil . setNodeGenerated ( w , true ) ;
 + return w ;
 }

 public static LeafElement leaf ( IElementType type , CharSequence text , CharTable table ) {


<nb> public class CheckTxLogs
 }
 }

 + SINGLE
 + public boolean checkAll ( File [ ] logs ) throws IOException
 + {
 + return scan ( logs , new PrintingInconsistenciesHandler ( out ) , CheckTypes . CHECK_TYPES ) ;
 + }
 +
 boolean scan ( File [ ] logs , InconsistenciesHandler handler , CheckType < ? , ? > . . . checkTypes ) throws IOException
 {
 boolean success = true ;

Add public method to run all checks in a programmatic way


<nb> public class DataFlowInspection extends BaseLocalInspectionTool {
 PsiMethod method = ( PsiMethod ) body . getParent ( ) ;
 final PsiIdentifier name = method . getNameIdentifier ( ) ;
 if ( name != null ) { SINGLE
 - holder . registerProblem ( name , InspectionsBundle . message ( STRING0 ) , ProblemHighlightType . INFO ) ;
 + holder . registerProblem ( name , InspectionsBundle . message ( STRING0 ) , ProblemHighlightType . WEAK_WARNING ) ;
 }
 }
 }
 <nb> public class HighlightInfo implements Segment {
 if ( infoType == HighlightInfoType . ERROR || infoType == HighlightInfoType . WRONG_REF ) return ProblemHighlightType . ERROR ;
 if ( infoType == HighlightInfoType . WARNING ) return ProblemHighlightType . GENERIC_ERROR_OR_WARNING ;
 if ( infoType == HighlightInfoType . INFORMATION ) return ProblemHighlightType . INFORMATION ;
 - return ProblemHighlightType . INFO ;
 + return ProblemHighlightType . WEAK_WARNING ;
 }

 public static ProblemHighlightType convertSeverityToProblemHighlight ( HighlightSeverity severity ) {

remove deprecated ProblemHighlightType INFO usages


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - @ suppresswarnings ( { STRING0 } )
 public class RoboGuice {
 public static Stage DEFAULT_STAGE = Stage . PRODUCTION ;

 <nb> public class RoboGuice {

 + @ suppresswarnings ( STRING1 )
 protected static ResourceListener getResourceListener ( Application application ) {
 ResourceListener resourceListener = resourceListeners . get ( application ) ;
 if ( resourceListener == null ) {
 <nb> public class RoboGuice {
 return resourceListener ;
 }

 + @ suppresswarnings ( STRING1 )
 protected static ViewListener getViewListener ( final Application application ) {
 ViewListener viewListener = viewListeners . get ( application ) ;
 if ( viewListener == null ) {
 <nb> public class RoboGuice {
 public static void destroyInjector ( Context context ) {
 final RoboInjector injector = getInjector ( context ) ;
 injector . getInstance ( EventManager . class ) . destroy ( ) ;
 - injectors . remove ( context ) ;
 + SINGLE
 + injectors . remove ( context ) ; SINGLE
 }


<nb> public class TileTank extends TileBuildCraft implements ITankContainer {
 resource = resource . copy ( ) ;
 int totalUsed = NUMBER0 ;
 TileTank tankToFill = getBottomTank ( ) ;
 + LiquidStack liquid = tankToFill . tank . getLiquid ( ) ;
 +
 + if ( liquid != null && ! liquid . isLiquidEqual ( resource ) )
 + return NUMBER0 ;
 +
 while ( tankToFill != null && resource . amount > NUMBER0 ) {
 int used = tankToFill . tank . fill ( resource , doFill ) ;
 resource . amount -= used ;

Stacked tanks no longer store different liquids


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class Polygonal2DRegionSelector implements RegionSelector , CUIRegion {
 - protected BlockVector pos1 ;
 - protected Polygonal2DRegion region ;
 + private BlockVector pos1 ;
 + private Polygonal2DRegion region ;

 public Polygonal2DRegionSelector ( LocalWorld world ) {
 region = new Polygonal2DRegion ( world ) ;
 <nb> public class Polygonal2DRegionSelector implements RegionSelector , CUIRegion {
 public String getLegacyTypeID ( ) {
 return STRING0 ;
 }
 -
 -
 }

Made the fields of Polygonal2DRegionSelector private


<nb> public class CompileStepBeforeRun extends BeforeRunTaskProvider < CompileStepBefor
 private static final Logger LOG = Logger . getInstance ( STRING0 ) ;
 public static final Key < MakeBeforeRunTask > ID = Key . create ( STRING1 ) ;
 private static final Key < RunConfiguration > RUN_CONFIGURATION = Key . create ( STRING2 ) ;
 + private static final Key < String > RUN_CONFIGURATION_TYPE_ID = Key . create ( STRING3 ) ;

 @ nonnls protected static final String MAKE_PROJECT_ON_RUN_KEY = STRING4 ;

 <nb> public class CompileStepBeforeRun extends BeforeRunTaskProvider < CompileStepBefor
 if ( ! myProject . isDisposed ( ) ) {
 done . down ( ) ;
 scope . putUserData ( RUN_CONFIGURATION , configuration ) ;
 + scope . putUserData ( RUN_CONFIGURATION_TYPE_ID , configuration . getType ( ) . getId ( ) ) ;
 compilerManager . make ( scope , callback ) ;
 }
 }

pass run configuration type id to compile server


<nb> public class WsRemoteEndpoint implements RemoteEndpoint {
 }
 }
 }
 + if ( opCode == Constants . OPCODE_CLOSE ) {
 + SINGLE
 + SINGLE
 + writeBarrier . reset ( ) ;
 + }
 }

Spotted a couple of threads hanging waiting on this barrier after an aborted Autobahn test


<nb> public abstract class AbstractSyncableContentProvider extends SyncableContentPro

 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public final void beginBatch ( ) {
 <nb> public abstract class AbstractSyncableContentProvider extends SyncableContentPro

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public abstract class AbstractSyncableContentProvider extends SyncableContentPro
 getContext ( ) . getContentResolver ( ) . notifyChange ( url , null COMMENT ,
 changeRequiresLocalSync ( url ) ) ;
 }
 - mDb . endTransaction ( ) ;
 }
 }

Fix a bug in AbstractSyncableContentProvider java and modify comments


<nb> public class DbEntityColumnDescriptor implements Comparable {
 COMMENT
 COMMENT
 public void updateDbSqlType ( int dbSqlType ) {
 - if ( dbSqlType == Integer . MAX_VALUE ) {
 + if ( this . dbSqlType == Integer . MAX_VALUE ) {
 this . dbSqlType = dbSqlType ;
 }
 }


<nb> public class SpreadsheetPresentation extends AbstractPresentation implements IRe
 for ( Integer row : spreadsheet . getRowSelection ( ) ) {
 rows . add ( controller . getModel ( ) . getRow ( row ) ) ;
 }
 + Collections . sort ( rows , new Comparator < ResultSetRow > ( ) {
 + @ override
 + public int compare ( ResultSetRow o1 , ResultSetRow o2 ) {
 + return o1 . getVisualNumber ( ) - o2 . getVisualNumber ( ) ;
 + }
 + } ) ;
 return rows ;
 }
 }


<nb> public class MessagesController extends AuthenticatedController {
 Map < String , Object > result = Maps . newHashMap ( ) ;
 result . put ( STRING0 , message . getId ( ) ) ;
 if ( filtered )
 - result . put ( STRING1 , message . getFormattedFields ( ) ) ;
 + result . put ( STRING1 , message . getFilteredFields ( ) ) ;
 else
 result . put ( STRING1 , message . getFields ( ) ) ;

don t use formatted fields for the message loader only filter fields but never format them


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CommitHelper {
 moveToFailedList ( myChangeList , myCommitMessage , getChangesFailedToCommit ( ) ,
 VcsBundle . message ( STRING0 , myChangeList . getName ( ) ) , myProject ) ;
 }
 - } ) ;
 + } , ModalityState . defaultModalityState ( ) , o - > myProject . isDisposed ( ) ) ;
 }

 public void doBeforeRefresh ( ) {


<nb> public abstract class AbstractValueHint {
 }

 protected boolean showHint ( final JComponent component ) {
 + if ( myCurrentHint != null ) {
 + myCurrentHint . hide ( ) ;
 + }
 myCurrentHint = new LightweightHint ( component ) ;
 myCurrentHint . addHintListener ( new HintListener ( ) {
 @ override

do not show two debugger tooltips loading and real value


<nb>
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class RcFilePageSourceFactory
 TupleDomain < HiveColumnHandle > effectivePredicate ,
 DateTimeZone hiveStorageTimeZone )
 {
 - if ( ! isOptimizedReaderEnabled ( session , enabled ) ) {
 + SINGLE
 + if ( false || ! isOptimizedReaderEnabled ( session , enabled ) ) {
 return Optional . absent ( ) ;
 }

Disable new RcFileReader until GC issues are resolved


<nb> public final class Settings {
 ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED ,
 WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON ,
 WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY ,
 + WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED ,
 WIFI_NUM_OPEN_NETWORKS_KEPT ,
 EMERGENCY_TONE ,
 CALL_AUTO_RETRY ,

Back up restore the Avoid poor connections wifi setting


<nb> public class JsonMarshaller {

 public void write ( ConfigurationMetadata metadata , OutputStream outputStream )
 throws IOException {
 - JSONObject object = new JSONObject ( ) ;
 + JSONObject object = new JSONOrderedObject ( ) ;
 object . put ( STRING0 , toJsonArray ( metadata , ItemType . GROUP ) ) ;
 object . put ( STRING1 , toJsonArray ( metadata , ItemType . PROPERTY ) ) ;
 object . put ( STRING2 , toJsonArray ( metadata . getHints ( ) ) ) ;


<nb> public class TileGenericPipe extends TileEntity implements IPowerReceptor , ILiqu
 private boolean blockNeighborChange = false ;
 private boolean pipeBound = false ;

 + SINGLE
 + int key ;
 +
 @ tilenetworkdata
 public int pipeId = - NUMBER0 ;

 <nb> public class TileGenericPipe extends TileEntity implements IPowerReceptor , ILiqu
 if ( pipe != null ) {
 nbttagcompound . setInteger ( STRING0 , pipe . itemID ) ;
 pipe . writeToNBT ( nbttagcompound ) ;
 - }
 + } else
 + nbttagcompound . setInteger ( STRING0 , key ) ;
 }

 @ override
 <nb> public class TileGenericPipe extends TileEntity implements IPowerReceptor , ILiqu
 super . readFromNBT ( nbttagcompound ) ;

 - int key = nbttagcompound . getInteger ( STRING0 ) ;
 + key = nbttagcompound . getInteger ( STRING0 ) ;
 pipe = BlockGenericPipe . createPipe ( key ) ;

 if ( pipe != null ) {

Prevent addon pipes from becoming permanent ghosts


<nb> public class RepairJob implements Runnable {
 }

 public RepairJob ( StoreRepository storeRepo , MetadataStore metadataStore , Semaphore repairPermits ) {
 - this ( storeRepo , metadataStore , repairPermits , false , NUMBER0 ) ;
 + this ( storeRepo , metadataStore , repairPermits , true , NUMBER0 ) ;
 }

 public RepairJob ( StoreRepository storeRepo ,

Made deleteOnly true as default in RepairJob


<nb> public class InMemoryDataSource < T extends Cacheable > implements DataSource < T > {
 List < T > newItems = new LinkedList < > ( ) ;
 for ( T i : items ) {
 if ( i . equals ( item ) ) {
 - items . add ( item ) ;
 + newItems . add ( item ) ;
 } else {
 - items . add ( i ) ;
 + newItems . add ( i ) ;
 }
 }
 this . items = newItems ;

Fix little bug I ve found in InMemoryDataSource


<nb> public abstract class SearchSelectionFragment extends BaseOsmAndDialogFragment {
 clearButton . setOnClickListener ( new View . OnClickListener ( ) {
 @ override
 public void onClick ( View v ) {
 - searchEditText . setText ( null ) ;
 + dismiss ( ) ;
 }
 } ) ;
 return view ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class InspectionNodeInfo extends JPanel {
 description . setContentType ( UIUtil . HTML_MIME ) ;
 description . setEditable ( false ) ;
 description . setOpaque ( false ) ;
 - if ( Registry . is ( STRING0 ) ) {
 - description . setBackground ( UIUtil . getLabelBackground ( ) ) ;
 - description . setForeground ( UIUtil . getLabelForeground ( ) ) ;
 - }
 description . addHyperlinkListener ( BrowserHyperlinkListener . INSTANCE ) ;
 final String toolDescription = toolWrapper . loadDescription ( ) ;
 SingleInspectionProfilePanel . readHTML ( description , SingleInspectionProfilePanel . toHTML ( description , toolDescription == null ? STRING1 : toolDescription , false ) ) ;

remove hack for transparent editor pane from InspectionNodeInfo


<nb> public class StandardGraphIO implements GraphIO , VizArchitecture {
 graphDrawable . graphComponent . setCursor ( Cursor . getDefaultCursor ( ) ) ;
 }

 + vizEventManager . mouseReleased ( ) ;
 if ( pressing ) {
 pressing = false ;
 }


<nb> public class Image
 final ErrorHandler errorHandler ,
 final long correlationId )
 {
 + System . out . println ( STRING0 + this ) ;
 this . correlationId = correlationId ;
 this . sessionId = sessionId ;
 this . subscriberPosition = subscriberPosition ;
 <nb> public class Image

 public void delete ( )
 {
 + System . out . println ( STRING1 + Image . this ) ;
 logBuffers . close ( ) ;
 }
 }

Cleanly separate the close and release logic in publications


<nb> public class Iconify {
 COMMENT
 COMMENT
 COMMENT
 - static Icon findIconForKey ( String iconKey ) {
 + public static Icon findIconForKey ( String iconKey ) {
 for ( int i = NUMBER0 , iconFontDescriptorsSize = iconFontDescriptors . size ( ) ; i < iconFontDescriptorsSize ; i ++ ) {
 IconFontDescriptorWrapper iconFontDescriptor = iconFontDescriptors . get ( i ) ;
 Icon icon = iconFontDescriptor . getIcon ( iconKey ) ;


<nb> public class PlainTextPresentation extends AbstractPresentation implements IAdap

 @ override
 public void refreshData ( boolean refreshMetadata , boolean append ) {
 + colWidths = null ;
 if ( controller . isRecordMode ( ) ) {
 printRecord ( ) ;
 } else {


<nb> import static NAMESPACE ;

 public class SettingRunner implements Runner {
 private static final GlobalSettingParser settingParser = new GlobalSettingParser ( ) ;
 - private final Optional < Integer > port ;
 private final ImmutableList < GlobalSetting > globalSettings ;
 private final Optional < String > env ;
 private final StartArgs startArgs ;
 <nb> public class SettingRunner implements Runner {
 private final FluentIterable < File > files ;

 public SettingRunner ( InputStream stream , StartArgs args ) {
 - this . port = args . getPort ( ) ;
 this . env = args . getEnv ( ) ;
 this . globalSettings = settingParser . parse ( stream ) ;
 this . files = from ( globalSettings ) . transform ( toFile ( ) ) ;
 <nb> public class SettingRunner implements Runner {
 }

 private Predicate < ? super GlobalSetting > byEnv ( final Optional < String > env ) {
 -
 return new Predicate < GlobalSetting > ( ) {
 @ override
 public boolean apply ( GlobalSetting globalSetting ) {


<nb> public class PipeItemsEmerald extends PipeItemsWood implements ISpecialInventory

 COMMENT
 @ override
 - public void readFromNBT ( NBTTagCompound nbttagcompound ) {
 - super . readFromNBT ( nbttagcompound ) ;
 - filters . readFromNBT ( nbttagcompound ) ;
 + public void readFromNBT ( NBTTagCompound nbt ) {
 + super . readFromNBT ( nbt ) ;
 + filters . readFromNBT ( nbt ) ;
 + currentFilter = nbt . getInteger ( STRING0 ) ;
 }

 @ override
 - public void writeToNBT ( NBTTagCompound nbttagcompound ) {
 - super . writeToNBT ( nbttagcompound ) ;
 - filters . writeToNBT ( nbttagcompound ) ;
 + public void writeToNBT ( NBTTagCompound nbt ) {
 + super . writeToNBT ( nbt ) ;
 + filters . writeToNBT ( nbt ) ;
 + nbt . setInteger ( STRING0 , currentFilter ) ;
 }

 SINGLE

Emerald Pipes should remember their state better


<nb> public class NettyConnectionsPool implements ConnectionsPool < String , Channel > {
 log . debug ( STRING0 , trackedIdleConnections . size ( ) ) ;
 }
 } else {
 - log . debug ( STRING1 , config . getMaxConnectionPerHost ( ) ) ;
 + log . debug ( STRING2 , config . getMaxConnectionPerHost ( ) , uri ) ;
 added = false ;
 }
 return added ;


<nb>

 package NAMESPACE ;

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

 import NAMESPACE ;
 import NAMESPACE ;


<nb>
 package NAMESPACE ;

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

 <nb> public class JumpToLastEditAction extends AnAction {
 presentation . setEnabled ( false ) ;
 return ;
 }
 - Editor editor = PlatformDataKeys . EDITOR . getData ( dataContext ) ;
 - if ( editor == null ) {
 - presentation . setEnabled ( false ) ;
 - return ;
 - }
 presentation . setEnabled ( IdeDocumentHistory . getInstance ( project ) . isNavigatePreviousChangeAvailable ( ) ) ;
 }
 }

allow Ctrl Shift Backspace even if all editors are closed


<nb>
 - package NAMESPACE ;
 + package NAMESPACE ;

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

 - public class TestCreators3 extends BaseMapTest
 + public class TestCreators421 extends BaseMapTest
 {
 static class MultiCtor
 {

move failing test to failing so as to prevent CI failures github merge warnings


<nb> public class GrailsResourceUtils {
 for ( Pattern COMPILER_ROOT_PATTERN : COMPILER_ROOT_PATTERNS ) {
 Matcher m = COMPILER_ROOT_PATTERN . matcher ( path ) ;
 if ( m . find ( ) ) {
 - return m . group ( m . groupCount ( ) ) ;
 + return m . group ( m . groupCount ( ) - NUMBER0 ) ;
 }
 }
 return null ;
 <nb> public class GrailsResourceUtilsTests extends TestCase {
 }

 public void testGetPathFromRoot ( ) throws Exception {
 - assertEquals ( STRING0 , GrailsResourceUtils . getPathFromRoot ( TEST_URL ) ) ;
 assertEquals ( STRING1 , GrailsResourceUtils . getPathFromRoot ( TEST_PACKAGE_URL ) ) ;
 + assertEquals ( STRING0 , GrailsResourceUtils . getPathFromRoot ( TEST_URL ) ) ;
 }

 public void testGetClassNameResource ( ) throws Exception {


<nb> public class ReceiverHandler extends BaseAnnotationHandler < HasReceiverRegistrati

 Receiver annotation = element . getAnnotation ( Receiver . class ) ;
 String [ ] actions = annotation . actions ( ) ;
 + String [ ] dataSchemes = annotation . dataSchemes ( ) ;
 Receiver . RegisterAt registerAt = annotation . registerAt ( ) ;
 boolean local = annotation . local ( ) ;

 - JFieldVar intentFilterField = holder . getIntentFilterField ( actions ) ;
 + JFieldVar intentFilterField = holder . getIntentFilterField ( actions , dataSchemes ) ;
 JFieldVar receiverField = createReceiverField ( holder , receiverName , methodName , hasIntentParam ) ;
 registerAndUnregisterReceiver ( holder , registerAt , intentFilterField , receiverField , local ) ;
 }


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


<nb> public class QuickTour {

 SINGLE
 DBCursor cur = coll . find ( ) ;
 - while ( cur . hasNext ( ) ) {
 - System . out . println ( cur . next ( ) ) ;
 + try {
 + while ( cur . hasNext ( ) ) {
 + System . out . println ( cur . next ( ) ) ;
 + }
 + } finally {
 + cur . close ( ) ;
 }

 SINGLE
 <nb> public class QuickTour {
 System . out . println ( STRING0 + db . getLastError ( ) ) ;

 db . resetError ( ) ;
 +
 + SINGLE
 + m . close ( ) ;
 }
 }


<nb> public class MaterialMenuDrawable extends Drawable implements Animatable {
 }

 @ override public void stop ( ) {
 - if ( ! isRunning ( ) ) return ;
 - if ( transformation . isRunning ( ) ) {
 + if ( isRunning ( ) && transformation . isRunning ( ) ) {
 transformation . end ( ) ;
 } else {
 transformationRunning = false ;


<nb> public class CommandContext {
 }

 public boolean matches ( String command ) {
 - return command . equalsIgnoreCase ( command ) ;
 + return this . command . equalsIgnoreCase ( command ) ;
 }

 public String getString ( int index ) {

Fixed CommandContext matches always returning true


<nb> public abstract class Log {
 }
 }
 }
 + public static void POST ( int n , Exception e ) {
 + if ( e . getMessage ( ) != null ) {
 + POST ( n , e . getMessage ( ) ) ;
 + }
 + POST ( n , e . toString ( ) ) ;
 + StackTraceElement [ ] els = e . getStackTrace ( ) ;
 + for ( int i = NUMBER0 ; i < els . length ; i ++ ) {
 + POST ( n , els [ i ] . toString ( ) ) ;
 + }
 + }

 public static void main ( String [ ] args ) {
 Log . info ( STRING0 ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class EmergencyButton extends Button {
 Intent intent = new Intent ( ACTION_EMERGENCY_DIAL ) ;
 intent . setFlags ( Intent . FLAG_ACTIVITY_NEW_TASK
 | Intent . FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) ;
 - getContext ( ) . startActivity ( intent ) ;
 + getContext ( ) . startActivityAsUser ( intent ,
 + new UserHandle ( mLockPatternUtils . getCurrentUser ( ) ) ) ;
 }
 }

Fix bug where Keyguard s emergencydialer wasn t being launched with a userid


<nb> package NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 -
 + @ deprecated
 public final class Constants {
 public static final String Package = STRING0 ;
 }


<nb> public final class ValueGraphTest {

 @ after
 public void validateGraphState ( ) {
 - new EqualsTester ( ) . addEqualityGroup (
 - graph ,
 - Graphs . copyOf ( graph ) ,
 - ImmutableValueGraph . copyOf ( graph ) ) . testEquals ( ) ;
 + new EqualsTester ( )
 + . addEqualityGroup (
 + graph ,
 + Graphs . copyOf ( graph ) ,
 + ImmutableValueGraph . copyOf ( graph ) )
 + . addEqualityGroup (
 + Graphs . copyOf ( ( Graph < Integer > ) graph ) ,
 + ImmutableGraph . copyOf ( graph ) )
 + . testEquals ( ) ;

 for ( Endpoints < Integer > edge : graph . edges ( ) ) {
 assertThat ( graph . edgeValue ( edge . nodeA ( ) , edge . nodeB ( ) ) ) . isNotNull ( ) ;

Add a bit of test coverage for value graphs


<nb> public final class AndroidManifest {
 this . minSdkVersion = minSdkVersion ;
 this . maxSdkVersion = maxSdkVersion ;
 this . targetSdkVersion = targetSdkVersion ;
 - debugabble = debuggable ;
 + this . debugabble = debuggable ;
 }

 SINGLE

Fix unintentional self assignment in AndroidManifest java


<nb> class SitePickerAdapter extends RecyclerView . Adapter < SitePickerAdapter . SiteViewH
 String searchTextLowerCase = searchText . toLowerCase ( ) ;

 for ( int i = NUMBER0 ; i < sites . size ( ) ; i ++ ) {
 - SiteRecord record = sites . get ( NUMBER0 ) ;
 + SiteRecord record = sites . get ( i ) ;
 String siteNameLowerCase = record . blogName . toLowerCase ( ) ;
 String hostNameLowerCase = record . hostName . toLowerCase ( ) ;

Getting every index vs the first one every time


<nb> public class MessagingController implements Runnable
 List < Message > messages = new ArrayList < Message > ( ) ;

 messages . add ( message ) ;
 - stats . unreadMessageCount += ( message . isSet ( Flag . SEEN ) == false ) ? NUMBER0 : NUMBER1 ;
 + stats . unreadMessageCount += ( ! message . isSet ( Flag . SEEN ) ) ? NUMBER0 : NUMBER1 ;
 stats . flaggedMessageCount += ( message . isSet ( Flag . FLAGGED ) ) ? NUMBER0 : NUMBER1 ;
 if ( listener != null )
 {


<nb> public class ParcelTransactionWorker extends AbstractCompletionTransactionWorker
 public ParcelImplementations innerRun ( Provider < ASTType > valueProvider ) {

 ASTType value = valueProvider . get ( ) ;
 - Parcel parcelAnnotation = value . getAnnotation ( Parcel . class ) ;
 ASTAnnotation parcelASTAnnotation = value . getASTAnnotation ( Parcel . class ) ;

 ParcelableDescriptor analysis = parcelableAnalysis . analyze ( value , parcelASTAnnotation ) ;


<nb> public abstract class Parser extends Recognizer < Token , ParserATNSimulator > {
 return _input . getSourceName ( ) ;
 }

 - COMMENT
 - COMMENT
 - COMMENT
 - public List < String > toStrings ( List < ? extends Token > tokens ) {
 - if ( tokens == null ) return null ;
 - List < String > strings = new ArrayList < String > ( tokens . size ( ) ) ;
 - for ( int i = NUMBER0 ; i < tokens . size ( ) ; i ++ ) {
 - strings . add ( tokens . get ( i ) . getText ( ) ) ;
 - }
 - return strings ;
 - }
 -
 COMMENT
 COMMENT
 COMMENT

Remove unused Parser utility method toStrings left over from output template


<nb> public class TestAsyncContextImpl extends TomcatBaseTest {
 if ( flush ) {
 resp . flushBuffer ( ) ;
 }
 + try {
 + SINGLE
 + SINGLE
 + Thread . sleep ( NUMBER0 ) ;
 + } catch ( InterruptedException e ) {
 + throw new ServletException ( e ) ;
 + }
 throw new ServletException ( STRING0 ) ;
 }
 }


<nb> public class AbstractQueueVisitorTest {
 counter . awaitQuiescence ( COMMENT false ) ;
 assertSame ( NUMBER0 , counter . getCount ( ) ) ;
 assertSame ( NUMBER1 , counter . activeParallelTasks ( ) ) ;
 - assertSame ( NUMBER2 , counter . getMaxRunningConcurrently ( ) ) ;
 + SINGLE
 + SINGLE
 }

 @ test

Quick fix for AbstractQueueVisitorTest simpleCounter test flake


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 @ incubating
 public class BuildDashboardPlugin implements Plugin < ProjectInternal > {
 <nb> public class BuildDashboardPlugin implements Plugin < ProjectInternal > {
 project . getPlugins ( ) . apply ( ReportingBasePlugin . class ) ;

 final GenerateBuildDashboard buildDashboardTask = project . getTasks ( ) . create ( BUILD_DASHBOARD_TASK_NAME , GenerateBuildDashboard . class ) ;
 + buildDashboardTask . setDescription ( STRING0 ) ;
 + buildDashboardTask . setGroup ( STRING1 ) ;

 DirectoryReport htmlReport = buildDashboardTask . getReports ( ) . getHtml ( ) ;
 ConventionMapping htmlReportConventionMapping = new DslObject ( htmlReport ) . getConventionMapping ( ) ;

Added a description and group to the buildDashboard task


<nb> public class OCommandExecutorSQLSelect extends OCommandExecutorSQLAbstract imple
 public static final String KEYWORD_ORDER_BY = STRING0 ;
 public static final String KEYWORD_LIMIT = STRING1 ;
 public static final String KEYWORD_RANGE = STRING2 ;
 + private static final String KEYWORD_FROM_2FIND = STRING3 + KEYWORD_FROM + STRING3 ;

 private OSQLAsynchQuery < ORecordSchemaAware < ? > > request ;
 private OSQLFilter compiledFilter ;
 <nb> public class OCommandExecutorSQLSelect extends OCommandExecutorSQLAbstract imple
 if ( ! word . toString ( ) . equals ( KEYWORD_SELECT ) )
 return - NUMBER0 ;

 - int fromPosition = textUpperCase . indexOf ( KEYWORD_FROM , currentPos ) ;
 + int fromPosition = textUpperCase . indexOf ( KEYWORD_FROM_2FIND , currentPos ) ;
 if ( fromPosition == - NUMBER0 )
 throw new OQueryParsingException ( STRING4 + KEYWORD_FROM , text , currentPos ) ;

fixed bug on recognizing of FROM clause reported by Raf in ML


<nb> public class OLocalHashTable < K , V > extends OSharedResourceAdaptive {
 }

 public V get ( K key ) {
 + if ( key == null )
 + return null ;
 +
 acquireSharedLock ( ) ;
 try {
 key = keySerializer . preprocess ( key , ( Object [ ] ) keyTypes ) ;
 <nb> public class OSBTree < K , V > extends ODurableComponent implements OTreeInternal < K ,
 }

 public V get ( K key ) {
 + if ( key == null )
 + return null ;
 +
 acquireSharedLock ( ) ;
 try {
 key = keySerializer . preprocess ( key , ( Object [ ] ) keyTypes ) ;


<nb> public class KeyguardBottomAreaView extends FrameLayout implements View . OnClickL
 public void onScreenTurnedOff ( int why ) {
 updateLockIcon ( ) ;
 }
 +
 + @ override
 + public void onKeyguardVisibilityChanged ( boolean showing ) {
 + updateLockIcon ( ) ;
 + }
 } ;

 public void setKeyguardIndicationController (


<nb> public final class JavassistProxyFactory
 try
 {
 SINGLE
 - String methodBody = STRING0 ;
 + String methodBody = STRING1 ;
 generateProxyClass ( Connection . class , ConnectionProxy . class , methodBody ) ;

 - SINGLE
 - methodBody = STRING2 ;
 + SINGLE
 + methodBody = STRING3 ;
 generateProxyClass ( Statement . class , StatementProxy . class , methodBody ) ;
 - generateProxyClass ( CallableStatement . class , CallableStatementProxy . class , methodBody ) ;
 - generateProxyClass ( PreparedStatement . class , PreparedStatementProxy . class , methodBody ) ;
 generateProxyClass ( ResultSet . class , ResultSetProxy . class , methodBody ) ;
 +
 + SINGLE
 + methodBody = STRING2 ;
 + generateProxyClass ( PreparedStatement . class , PreparedStatementProxy . class , methodBody ) ;
 + generateProxyClass ( CallableStatement . class , CallableStatementProxy . class , methodBody ) ;
 }
 catch ( Exception e )
 {

Remove unnecessary casts in the generated proxies


<nb> public class DoSFilter implements Filter
 SINGLE
 if ( _insertHeaders )
 ( ( HttpServletResponse ) response ) . addHeader ( STRING0 , STRING1 ) ;
 - Continuation continuation = ContinuationSupport . getContinuation ( request , response ) ;
 + Continuation continuation = ContinuationSupport . getContinuation ( request ) ;
 request . setAttribute ( __TRACKER , tracker ) ;
 if ( _delayMs > NUMBER0 )
 continuation . setTimeout ( _delayMs ) ;


<nb> public class BluetoothA2dpService extends IBluetoothA2dp . Stub {
 private boolean isSinkDevice ( String address ) {
 String uuids [ ] = mBluetoothService . getRemoteUuids ( address ) ;
 UUID uuid ;
 - for ( String deviceUuid : uuids ) {
 - uuid = UUID . fromString ( deviceUuid ) ;
 - if ( BluetoothUuid . isAudioSink ( uuid ) ) {
 - return true ;
 + if ( uuids != null ) {
 + for ( String deviceUuid : uuids ) {
 + uuid = UUID . fromString ( deviceUuid ) ;
 + if ( BluetoothUuid . isAudioSink ( uuid ) ) {
 + return true ;
 + }
 }
 }
 return false ;

Fix NullPointerException when checking if its a sinkDevice


<nb> import NAMESPACE
 public class UnderSwipeableExampleActivity extends AppCompatActivity implements ItemPinnedMessageDialogFragment . EventListener {
 private static final String FRAGMENT_TAG_DATA_PROVIDER = STRING0 ;
 private static final String FRAGMENT_LIST_VIEW = STRING1 ;
 - private static final String FRAGMENT_TAG_ITEM_PINNED_DIALOG = STRING2 ;

 @ override
 protected void onCreate ( Bundle savedInstanceState ) {
 <nb> public class UnderSwipeableExampleActivity extends AppCompatActivity implements
 snackbar . show ( ) ;
 }

 - private void onItemUndoActionClicked ( ) {
 - int position = getDataProvider ( ) . undoLastRemoval ( ) ;
 - if ( position >= NUMBER0 ) {
 - final Fragment fragment = getSupportFragmentManager ( ) . findFragmentByTag ( FRAGMENT_LIST_VIEW ) ;
 - ( ( RecyclerListViewFragment ) fragment ) . notifyItemInserted ( position ) ;
 - }
 - }
 -
 SINGLE
 @ override
 public void onNotifyItemPinnedDialogDismissed ( int itemPosition , boolean ok ) {


<nb> import NAMESPACE ;
 COMMENT
 public class PublishRequest extends RequestBase {

 - private static final Log log = LogFactory . getLog ( RequestBase . class ) ;
 + private static final Log log = LogFactory . getLog ( PublishRequest . class ) ;

 protected static HashMap < String , Object > responseTemplate = new HashMap < String , Object > ( ) ;


<nb> public class Utils {

 Calendar cal = getAirtimeCalendar ( airtime , prefs ) ;

 - SINGLE
 final java . text . DateFormat timeFormat = DateFormat . getTimeFormat ( context ) ;
 final SimpleDateFormat dayFormat = new SimpleDateFormat ( STRING0 ) ;
 Date airDate = cal . getTime ( ) ;
 <nb> public class Utils {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public static void setPosterBitmap ( ImageView poster , String path , boolean isBusy ,
 Context context ) {


<nb> public class FetchBlogListWPOrg extends FetchBlogListAbstract {
 private boolean mHttpAuthRequired ;
 private boolean mErroneousSslCertificate ;
 private int mErrorMsgId ;
 - private boolean mForcedXmlrpcUrl ;

 public FetchBlogListWPOrg ( String username , String password , String selfHostedUrl ) {
 super ( username , password ) ;


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


<nb> public class ClassWithOnlyPrivateConstructorsInspectionBase extends BaseInspecti
 return ;
 }
 for ( PsiMethod constructor : constructors ) {
 - if ( constructor . hasModifierProperty ( PsiModifier . FINAL ) ) {
 + if ( ! constructor . hasModifierProperty ( PsiModifier . PRIVATE ) ) {
 return ;
 }
 }
 <nb> public class ClassWithOnlyPrivateConstructorsInspectionTest extends LightInspect
 STRING0 ) ;
 }

 + public void testPublicConstructor ( ) {
 + doTest ( STRING1 +
 + STRING2 +
 + STRING0 ) ;
 + }
 +
 @ nullable
 @ override
 protected InspectionProfileEntry getInspection ( ) {

correct check that all constructors are private for Class with only private constructors should be declared final inspection


<nb> public class DeprecationLogger {
 public static void nagUserWith ( String message ) {
 if ( isEnabled ( ) && METHODS . add ( message ) ) {
 LOGGER . warn ( message ) ;
 + logTraceIfNecessary ( ) ;
 }
 }

Add missing deprecation trace for nagUserWith


<nb> public class SiteSettingsFragment extends PreferenceFragment
 @ override
 public void onClick ( DialogInterface dialog , int which ) {
 String entry = input . getText ( ) . toString ( ) ;
 - if ( ! mEditingList . contains ( entry ) ) {
 + if ( ! TextUtils . isEmpty ( entry ) && ! mEditingList . contains ( entry ) ) {
 mEditingList . add ( entry ) ;
 list . setAdapter ( new ArrayAdapter < > ( getActivity ( ) ,
 R . layout . wp_simple_list_item_1 ,

Preventing users from adding blank keys to list editor