<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class ServerBootstrap extends AbstractBootstrap < ServerBootstrap > {
 + public final class ServerBootstrap extends AbstractBootstrap < ServerBootstrap > {

 private static final InternalLogger logger = InternalLoggerFactory . getInstance ( ServerBootstrap . class ) ;


<nb> public class CommentDetailFragment extends Fragment implements NotificationFragm

 final TextView txtPostTitle = ( TextView ) getView ( ) . findViewById ( R . id . text_post_title ) ;
 boolean postExists = ReaderPostTable . postExists ( blogId , postId ) ;
 +
 + SINGLE
 + SINGLE
 boolean isDotComOrJetpack = WordPress . wpDB . isRemoteBlogIdDotComOrJetpack ( mRemoteBlogId ) ;
 + boolean canRequestPost = isDotComOrJetpack && WordPress . hasValidWPComCredentials ( getActivity ( ) ) ;

 final String title ;
 final boolean hasTitle ;
 <nb> public class CommentDetailFragment extends Fragment implements NotificationFragm
 hasTitle = false ;
 }
 if ( hasTitle ) {
 - setPostTitle ( txtPostTitle , title , isDotComOrJetpack ) ;
 + setPostTitle ( txtPostTitle , title , canRequestPost ) ;
 } else {
 txtPostTitle . setText ( postExists ? R . string . untitled : R . string . loading ) ;
 }

 SINGLE
 SINGLE
 - if ( isDotComOrJetpack ) {
 + if ( canRequestPost ) {
 SINGLE
 SINGLE
 if ( ! postExists ) {

Comment detail now only requests the post associated with the comment if valid


<nb> public final class SocksCmdResponse extends SocksResponse {
 }
 host = IDN . toASCII ( host ) ;
 }
 - if ( port <= NUMBER0 && port >= NUMBER1 ) {
 - throw new IllegalArgumentException ( port + STRING0 ) ;
 + if ( port < NUMBER0 || port > NUMBER2 ) {
 + throw new IllegalArgumentException ( port + STRING1 ) ;
 }
 this . cmdStatus = cmdStatus ;
 this . addressType = addressType ;


<nb> public class PDFRenderTargetBuilder implements RenderTargetBuilder {
 double scale = ( float ) ( ratioWidth < ratioHeight ? ratioWidth : ratioHeight ) ;
 double translateX = ( marginLeft + pageWidth / FLOAT0 ) / scale ;
 double translateY = ( marginBottom + pageHeight / FLOAT0 ) / scale ;
 - cb . transform ( AffineTransform . getTranslateInstance ( - centerX * scale , - centerY * scale ) ) ;
 + cb . transform ( AffineTransform . getTranslateInstance ( - centerX * scale , centerY * scale ) ) ;
 cb . transform ( AffineTransform . getScaleInstance ( scale , scale ) ) ;
 cb . transform ( AffineTransform . getTranslateInstance ( translateX , translateY ) ) ;

 <nb> public class PreviewControllerImpl implements PreviewController {
 bottomRightY = y ;
 }
 }
 +
 float marginWidth = ( bottomRightX - topLeftX ) * ( margin / NUMBER0 f ) ;
 float marginHeight = ( bottomRightY - topLeftY ) * ( margin / NUMBER0 f ) ;
 topLeftX -= marginWidth ;


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

 import NAMESPACE ;

Fixed the CS error of camel cxf transport


<nb>
 package NAMESPACE ;

 - import NAMESPACE ;
 -
 - public final class IdAllocation implements Serializable
 + public final class IdAllocation
 {
 - private static final long serialVersionUID = NUMBER0 ;
 -
 private final long [ ] ids ;
 private final long highestIdInUse ;
 private final long defragCount ;
 <nb> public enum LockStatus
 {
 OK_LOCKED ,
 NOT_LOCKED ,
 - DEAD_LOCKED ,
 + DEAD_LOCKED
 + {
 + @ override
 + public boolean hasMessage ( )
 + {
 + return true ;
 + }
 + } ;
 +
 + public boolean hasMessage ( )
 + {
 + return false ;
 + }
 }


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class AbstractSimpleTranslogTests extends ElasticsearchTestCase
 }

 @ test
 + @ lucenetestcase.awaitsfix ( bugUrl = STRING0 )
 public void testTranslogChecksums ( ) throws Exception {
 List < Translog . Location > locations = newArrayList ( ) ;

TEST add AwaitsFix for testTranslogChecksums since it may cause OOME


<nb> public class AnalyzeStacktraceUtil {
 public static void printStacktrace ( final ConsoleView consoleView , final String unscrambledTrace ) {
 consoleView . clear ( ) ;
 consoleView . print ( unscrambledTrace + STRING0 , ConsoleViewContentType . ERROR_OUTPUT ) ;
 - if ( consoleView instanceof ConsoleViewImpl ) {
 - ( ( ConsoleViewImpl ) consoleView ) . foldImmediately ( ) ;
 - }
 consoleView . scrollTo ( NUMBER0 ) ;
 }

do not fold immediately as console now works async


<nb> public class NNModel extends Model {
 else err . valid_mse = validErr ;
 }

 + SINGLE
 + if ( errors . length > NUMBER0 ) {
 + if ( errors [ errors . length - NUMBER0 ] . trainAUC != null ) errors [ errors . length - NUMBER0 ] . trainAUC . thresholds = null ;
 + if ( errors [ errors . length - NUMBER0 ] . validAUC != null ) errors [ errors . length - NUMBER0 ] . validAUC . thresholds = null ;
 + }
 +
 SINGLE
 if ( err . train_confusion_matrix . cm != null
 && err . train_confusion_matrix . cm . length >= model_info ( ) . get_params ( ) . max_confusion_matrix_size ) {

Only keep that latest AUC thresholds in the NN output JSON to keep it small


<nb> public final class Stopwatch {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public Stopwatch ( ) {
 <nb> public final class Stopwatch {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public Stopwatch ( Ticker ticker ) {
 <nb> public final class Stopwatch {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public Stopwatch ( ) {
 <nb> public final class Stopwatch {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ deprecated
 public Stopwatch ( Ticker ticker ) {


<nb> public class PlainModuleTemplatesFactory implements ProjectTemplatesFactory {
 @ override
 public ProjectTemplate [ ] createTemplates ( final String group , WizardContext context ) {
 if ( OTHER_GROUP . equals ( group ) ) {
 - return context . isCreatingNewProject ( ) ? new ProjectTemplate [ ] { new PlainModuleTemplate ( new EmptyModuleBuilder ( ) {
 + if ( ! context . isCreatingNewProject ( ) ) {
 + return ProjectTemplate . EMPTY_ARRAY ;
 + }
 + return new ProjectTemplate [ ] { new PlainModuleTemplate ( new EmptyModuleBuilder ( ) {
 @ override
 public String getPresentableName ( ) {
 return STRING0 ;
 <nb> public class PlainModuleTemplatesFactory implements ProjectTemplatesFactory {
 public String getDescription ( ) {
 return STRING1 ;
 }
 - } ) } : ProjectTemplate . EMPTY_ARRAY ;
 + } ) } ;
 }
 ModuleBuilder [ ] builders = context . getAllBuilders ( ) ;
 return ContainerUtil . mapNotNull ( builders , new NullableFunction < ModuleBuilder , ProjectTemplate > ( ) {

remove empty project from templates list


<nb> public class MatcherTest {
 @ datapoint
 public static Matcher < ? > ANY_FAILURE = hasFailureContaining ( STRING0 ) ;

 - SINGLE
 -
 @ datapoint
 public static PrintableResult TWO_FAILURES_ONE_CHEESE = new PrintableResult (
 - Arrays . asList ( new Failure ( Description . EMPTY , new Error ( STRING0 ) ) ,
 - new Failure ( Description . EMPTY , new Error ( STRING1 ) ) ) ) ;
 + Arrays . asList ( failure ( STRING0 ) , failure ( STRING1 ) ) ) ;

 @ theory
 public < T > void differentMatchersHaveDifferentDescriptions (
 <nb> public class MatcherTest {
 assertThat ( matcher1 . toString ( ) , not ( matcher2 . toString ( ) ) ) ;
 }

 + private static Failure failure ( String string ) {
 + return new Failure ( Description . EMPTY , new Error ( string ) ) ;
 + }
 }


<nb> public class JSR356AsyncSupport extends Servlet30CometSupport {
 ServerContainer container = ( ServerContainer ) config . getServletContext ( ) . getAttribute ( ServerContainer . class . getName ( ) ) ;

 if ( container == null ) {
 - throw new IllegalStateException ( STRING0 ) ;
 + throw new IllegalStateException ( STRING1 ) ;
 }

 int pathLength = NUMBER0 ;


<nb> class MyDraggableSwipeableItemAdapter
 }

 SINGLE
 - holder . setSwipeItemSlideAmount (
 + holder . setSwipeItemHorizontalSlideAmount (
 item . isPinned ( ) ? RecyclerViewSwipeManager . OUTSIDE_OF_THE_WINDOW_LEFT : NUMBER0 ) ;
 }

 <nb> class MyExpandableDraggableSwipeableItemAdapter
 }

 SINGLE
 - holder . setSwipeItemSlideAmount (
 + holder . setSwipeItemHorizontalSlideAmount (
 item . isPinned ( ) ? RecyclerViewSwipeManager . OUTSIDE_OF_THE_WINDOW_LEFT : NUMBER0 ) ;
 }

 <nb> class MyExpandableDraggableSwipeableItemAdapter
 }

 SINGLE
 - holder . setSwipeItemSlideAmount (
 + holder . setSwipeItemHorizontalSlideAmount (
 item . isPinned ( ) ? RecyclerViewSwipeManager . OUTSIDE_OF_THE_WINDOW_LEFT : NUMBER0 ) ;
 }

 <nb> class MyUnderSwipeableItemAdapter
 SINGLE
 holder . setMaxLeftSwipeAmount ( - FLOAT0 ) ;
 holder . setMaxRightSwipeAmount ( NUMBER0 ) ;
 - holder . setSwipeItemSlideAmount (
 + holder . setSwipeItemHorizontalSlideAmount (
 item . isPinned ( ) ? - FLOAT0 : NUMBER0 ) ;
 }

Replace SwipableItemViewHolder setSwipeItemSlideAmount method with SwipeableItemViewHolder setSwipeItemHorizontalSlideAmount


<nb> public class SeriesGuideContract {
 String GENRES = STRING0 ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class TimeTools {
 if ( releaseDateTime == null || releaseDateTime . length ( ) == NUMBER0 ) {
 return null ;
 }
 - DateTime dateTime = DATE_TIME_FORMATTER_UTC . parseDateTime ( releaseDateTime ) ;
 +
 + DateTime dateTime ;
 +
 + try {
 + dateTime = DATE_TIME_FORMATTER_UTC . parseDateTime ( releaseDateTime ) ;
 + } catch ( IllegalArgumentException ignored ) {
 + SINGLE
 + try {
 + SINGLE
 + dateTime = TVDB_DATE_FORMATTER . parseDateTime ( releaseDateTime ) ;
 + } catch ( IllegalArgumentException e ) {
 + return null ;
 + }
 + }
 +
 return new SimpleDateFormat ( STRING1 , Locale . getDefault ( ) ) . format ( dateTime . toDate ( ) ) ;
 }

Support legacy show first release date strings


<nb> public abstract class AbstractPrologCommandPlayer implements CommandPlayer {
 private final int [ ] sortedVoiceVersions ;
 private AudioFocusHelper mAudioFocusHelper ;

 - private int streamType ;
 + protected int streamType ;

 protected AbstractPrologCommandPlayer ( Context ctx , OsmandSettings settings , String voiceProvider , String configFile , int [ ] sortedVoiceVersions )
 throws CommandPlayerException
 <nb> public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
 private MediaPlayer mediaPlayer ;
 SINGLE
 private List < String > filesToPlay = Collections . synchronizedList ( new ArrayList < String > ( ) ) ;
 - private int streamType ;

 public MediaCommandPlayerImpl ( Context ctx , OsmandSettings settings , String voiceProvider )


<nb> public class BuildToolsWebsitePanel extends BuildToolsPanel
 chkPreviewAfterBuilding_ . addStyleName ( RES . styles ( ) . previewWebsite ( ) ) ;
 add ( chkPreviewAfterBuilding_ ) ;

 - chkLivePreviewSite_ = checkBox ( STRING0 ) ;
 + chkLivePreviewSite_ = checkBox ( STRING1 ) ;
 chkLivePreviewSite_ . addStyleName ( RES . styles ( ) . previewWebsite ( ) ) ;
 add ( chkLivePreviewSite_ ) ;
 }
 <nb> public class RmdOutput implements RmdRenderStartedEvent . Handler ,
 if ( ! file . getParentPathString ( ) . equals ( websiteDir ) )
 reRenderPreview ( ) ;

 - SINGLE
 - else
 + SINGLE
 + else
 reRenderPreview ( file . getPath ( ) ) ;
 }


<nb> public class CollapsingToolbarLayout extends FrameLayout {
 COMMENT
 COMMENT
 public void setCollapsedTitleGravity ( int gravity ) {
 - mCollapsingTextHelper . setExpandedTextGravity ( gravity ) ;
 + mCollapsingTextHelper . setCollapsedTextGravity ( gravity ) ;
 }

 COMMENT


<nb> import NAMESPACE ;
 public final class BluetoothAdapter {
 private static final String TAG = STRING0 ;
 private static final boolean DBG = true ;
 + private static final boolean VDBG = false ;

 COMMENT
 COMMENT
 <nb> public final class BluetoothAdapter {
 if ( mService != null )
 {
 int state = mService . getState ( ) ;
 - if ( DBG ) Log . d ( TAG , STRING1 + hashCode ( ) + STRING2 + state ) ;
 + if ( VDBG ) Log . d ( TAG , STRING1 + hashCode ( ) + STRING2 + state ) ;
 return state ;
 }
 SINGLE

Turn off verbose debug message in BluetoothAdapter


<nb> public final class HiveWriteUtils
 return isWritableType ( listTypeInfo . getListElementTypeInfo ( ) ) ;
 case STRUCT :
 StructTypeInfo structTypeInfo = checkType ( typeInfo , StructTypeInfo . class , STRING0 ) ;
 - return structTypeInfo . getAllStructFieldTypeInfos ( ) . stream ( ) . allMatch ( HiveType : : isSupportedType ) ;
 + return structTypeInfo . getAllStructFieldTypeInfos ( ) . stream ( ) . allMatch ( HiveWriteUtils : : isWritableType ) ;
 }
 return false ;
 }


<nb> public abstract class AbstractJavaBuilder extends AbstractLibraryBuilder {
 COMMENT
 protected boolean debug = false ;

 - @ override
 - protected boolean keepFileDuringCleanup ( File file ) {
 - return false ;
 - }
 -
 COMMENT
 COMMENT
 COMMENT
 <nb> public abstract class AbstractLibraryBuilder extends CommonJavaLibraryProcessor
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public abstract class AbstractLibraryBuilder extends CommonJavaLibraryProcessor
 } else if ( ! removeEverything && keepClassFilesDuringCleanup ( ) &&
 file . getName ( ) . endsWith ( STRING0 ) ) {
 isEmpty = false ;
 - } else if ( ! removeEverything && keepFileDuringCleanup ( file ) ) {
 - isEmpty = false ;
 } else {
 file . delete ( ) ;
 }
 <nb> public abstract class AbstractLibraryBuilder extends CommonJavaLibraryProcessor
 return isEmpty ;
 }

 - protected abstract boolean keepFileDuringCleanup ( File file ) ;
 -
 COMMENT
 COMMENT
 COMMENT

Remove the callback that allowed excluding files from deletion


<nb> public class TextPanel extends JLabel {
 myText = text ;
 }

 + public void setDisplayedMnemonic ( int key ) {
 + SINGLE
 + }
 +
 + public void setDisplayedMnemonicIndex ( int index ) throws IllegalArgumentException {
 + SINGLE
 + super . setDisplayedMnemonicIndex ( - NUMBER0 ) ;
 + }
 +
 public final Dimension getPreferredSize ( ) {
 int max = NUMBER1 ;
 for ( String possibleString : myPossibleStrings ) {

ignore attempts to set mnemonics on status bar label


<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
 }

 public < T > T getComponent ( Class < T > interfaceClass ) {
 - assert ! myDisposed ;
 + assert ! myDisposed : STRING0 ;
 return getComponent ( interfaceClass , null ) ;
 }


<nb> public class ExactMatcher implements StreamRuleMatcher {

 @ override
 public boolean match ( Message msg , StreamRule rule ) {
 - String field = msg . getField ( rule . getField ( ) ) . toString ( ) ;
 + String field = ( String ) msg . getField ( rule . getField ( ) ) ;

 if ( field == null ) {
 return false ;
 <nb> public class RegexMatcher implements StreamRuleMatcher {

 @ override
 public boolean match ( Message msg , StreamRule rule ) {
 + if ( msg . getField ( rule . getField ( ) ) == null )
 + return false ;
 return Pattern . compile ( rule . getValue ( ) , Pattern . DOTALL ) . matcher ( msg . getField ( rule . getField ( ) ) . toString ( ) ) . find ( ) ;
 }

Preventing NullPointerExceptions in Matchers


<nb> public class DominantColorCalculator {
 COMMENT
 private int findPrimaryTextColor ( final ColorNode primary ) {
 SINGLE
 - for ( ColorNode color : mPalette ) {
 + for ( ColorNode color : mWeightedPalette ) {
 if ( ColorUtils . calculateContrast ( color , primary ) >= PRIMARY_TEXT_MIN_CONTRAST ) {
 return color . getRgb ( ) ;
 }

Use weighted palette to calculate text color


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

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

 import NAMESPACE ;


<nb> public class DiffToChangeLog {
 STRING0 +
 STRING1 ;

 + SINGLE
 + sql += STRING2 +
 + STRING3 +
 + STRING4 ;
 +
 SINGLE
 sql += STRING5 +
 STRING6 +


<nb> public class Wallet extends BaseTaggableObject implements Serializable , BlockCha
 }
 if ( dead . size ( ) > NUMBER0 ) {
 builder . append ( STRING0 ) ;
 - toStringHelper ( builder , dead , chain , Transaction . SORT_TX_BY_HEIGHT ) ;
 + toStringHelper ( builder , dead , chain , Transaction . SORT_TX_BY_UPDATE_TIME ) ;
 }
 }
 if ( includeExtensions && extensions . size ( ) > NUMBER0 ) {

Dead transaction does not contain confidence depth and should not fail when sorting


<nb> public class OsmandSettings {
 }

 + public final OsmandPreference < ApplicationMode > PREV_APPLICATION_MODE = new EnumIntPreference < ApplicationMode > (
 + STRING0 , ApplicationMode . DEFAULT , true , false , ApplicationMode . values ( ) ) ;
 +
 SINGLE
 SINGLE
 public final OsmandPreference < MetricsConstants > METRIC_SYSTEM = new EnumIntPreference < MetricsConstants > (
 <nb> public class MapActivityActions implements DialogProvider {
 }
 ApplicationMode mode = getAppMode ( buttons , settings ) ;
 SINGLE
 + settings . PREV_APPLICATION_MODE . set ( settings . APPLICATION_MODE . get ( ) ) ;
 boolean changed = settings . APPLICATION_MODE . set ( mode ) ;
 if ( changed ) {
 mapActivity . updateApplicationModeSettings ( ) ;

Save previously selected application mode


<nb> public class ShadowResources {
 public Configuration getConfiguration ( ) {
 Configuration configuration = new Configuration ( ) ;
 configuration . setToDefaults ( ) ;
 + if ( configuration . locale == null ) {
 + configuration . locale = Locale . getDefault ( ) ;
 + }
 return configuration ;
 }

 <nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ResourcesTest {

 @ test
 public void testConfiguration ( ) {
 - assertThat ( new Activity ( ) . getResources ( ) . getConfiguration ( ) , notNullValue ( ) ) ;
 + Configuration configuration = new Activity ( ) . getResources ( ) . getConfiguration ( ) ;
 + assertThat ( configuration , notNullValue ( ) ) ;
 + assertThat ( configuration . locale , notNullValue ( ) ) ;
 }

 @ test

Added default locale when retrieving configuration


<nb> public class DSLContexts {
 try ( Connection conn = dataSource . getConnection ( ) ) {
 dialect = dialect ( conn ) ;
 }
 - return DSL . using ( dataSource , dialect , new Settings ( )
 - . withRenderSchema ( false )
 - . withRenderNameStyle ( RenderNameStyle . AS_IS ) ) ;
 + return DSL . using ( dataSource , dialect ,
 + new Settings ( )
 + . withRenderSchema ( false )
 + . withRenderNameStyle ( RenderNameStyle . AS_IS ) ) ;
 }
 }


<nb> public class DemoActivity extends ActionBarActivity {
 } ) ;

 TextView t = ( TextView ) findViewById ( R . id . main ) ;
 + t . setOnClickListener ( new OnClickListener ( ) {
 + @ override
 + public void onClick ( View v ) {
 + mLayout . collapsePanel ( ) ;
 + }
 + } ) ;
 +
 t = ( TextView ) findViewById ( R . id . name ) ;
 t . setText ( Html . fromHtml ( getString ( R . string . hello ) ) ) ;
 Button f = ( Button ) findViewById ( R . id . follow ) ;

Updated demo to collapse the main when clicking on the main layout


<nb> public class I18nInspection extends BaseLocalInspectionTool {
 final Project project = manager . getProject ( ) ;
 final GlobalSearchScope scope = GlobalSearchScope . allScope ( project ) ;
 final PsiClass throwable = manager . findClass ( STRING0 , scope ) ;
 - return aClass . isInheritor ( throwable , true ) ;
 + return throwable != null && aClass . isInheritor ( throwable , true ) ;
 }

 private static boolean isArgOfSpecifiedExceptionConstructor ( PsiExpression expression , String [ ] specifiedExceptions ) {


<nb> public class OptimizeImportsRefactoringHelper implements RefactoringHelper < Set < P
 public Set < PsiJavaFile > prepareOperation ( final UsageInfo [ ] usages ) {
 Set < PsiJavaFile > javaFiles = new HashSet < PsiJavaFile > ( ) ;
 for ( UsageInfo usage : usages ) {
 + if ( usage . isNonCodeUsage ) continue ;
 final PsiElement element = usage . getElement ( ) ;
 if ( element != null ) {
 final PsiFile file = element . getContainingFile ( ) ;
 <nb> public class GroovyImportOptimizerRefactoringHelper implements RefactoringHelper
 public Set < GroovyFile > prepareOperation ( UsageInfo [ ] usages ) {
 Set < GroovyFile > files = new HashSet < GroovyFile > ( ) ;
 for ( UsageInfo usage : usages ) {
 + if ( usage . isNonCodeUsage ) continue ;
 final PsiElement element = usage . getElement ( ) ;
 if ( element != null ) {
 final PsiFile file = element . getContainingFile ( ) ;

skip non code usages when collecting files for optimize imports


<nb> public final class NetworkUtils {
 public static String getLocalIpAddress ( ) {
 try {
 InetAddress address = InetAddress . getLocalHost ( ) ;
 - LOG . debug ( STRING0 + address . toString ( ) + STRING1 + address . isLoopbackAddress ( ) + STRING1
 - + address . getHostAddress ( ) + STRING1 + address . getHostName ( ) ) ;
 + if ( LOG . isDebugEnabled ( ) ) {
 + LOG . debug ( STRING0 + address . toString ( ) + STRING1 + address . isLoopbackAddress ( ) + STRING1
 + + address . getHostAddress ( ) + STRING1 + address . getHostName ( ) ) ;
 + }
 if ( address . isLoopbackAddress ( ) ) {
 Enumeration < NetworkInterface > networkInterfaces = NetworkInterface . getNetworkInterfaces ( ) ;
 while ( networkInterfaces . hasMoreElements ( ) ) {

avoid unnecessary toString and concatenation


<nb> public interface Config extends ConfigMergeable {
 @ deprecated Long getNanoseconds ( String path ) ;

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface Config extends ConfigMergeable {
 COMMENT
 @ deprecated List < Long > getNanosecondsList ( String path ) ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 List < Long > getDurationList ( String path , TimeUnit unit ) ;

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

add since to getDuration and minor doc tweaks


<nb> public class CTConnectionFactory implements KeyedPoolableObjectFactory < String , C

 TSocket socket ;
 - if ( ! cfg . sslTruststoreLocation . isEmpty ( ) ) {
 + if ( null != cfg . sslTruststoreLocation && ! cfg . sslTruststoreLocation . isEmpty ( ) ) {
 TSSLTransportFactory . TSSLTransportParameters params = new TSSLTransportFactory . TSSLTransportParameters ( ) { {
 setKeyStore ( cfg . sslTruststoreLocation , cfg . sslTruststorePassword ) ;
 } } ;

Fix NPE in SSL trust store configuration


<nb> public class AsmClassGenerator extends ClassGenerator {
 }

 public void visitBlockStatement ( BlockStatement block ) {
 - onLineNumber ( block , STRING0 ) ;
 visitStatement ( block ) ;

 int mark = controller . getOperandStack ( ) . getStackLength ( ) ;

Rogue line number for method declarations confuses IDE debuggers


<nb> public class IndexCheck implements RecordCheck < IndexEntry , ConsistencyReport . Ind
 public void checkChange ( IndexEntry oldRecord , IndexEntry newRecord , CheckerEngine < IndexEntry , ConsistencyReport
 . IndexConsistencyReport > engine , DiffRecordAccess records )
 {
 + check ( newRecord , engine , records ) ;
 }
 }
 <nb> public class LabelScanCheck implements RecordCheck < LabelScanDocument , Consistenc
 CheckerEngine < LabelScanDocument ,
 ConsistencyReport . LabelScanConsistencyReport > engine , DiffRecordAccess records )
 {
 - throw new UnsupportedOperationException ( ) ;
 + check ( newRecord , engine , records ) ;
 }
 }

delegate incremental checking to full checking


<nb> public class CorePlugin implements Plugin {

 SINGLE
 extensions . add ( TendencyDecorator . class ) ;
 + extensions . add ( PastSnapshotFinderByDate . class ) ;
 extensions . add ( PastSnapshotFinderByDays . class ) ;
 + extensions . add ( PastSnapshotFinderByLastAnalysis . class ) ;
 extensions . add ( PastSnapshotFinderByVersion . class ) ;
 extensions . add ( PastMeasuresLoader . class ) ;
 extensions . add ( PastSnapshotFinder . class ) ;


<nb> public class SJK {
 SINGLE
 jarFileName = URLDecoder . decode ( packageURL . getFile ( ) , STRING0 ) ;
 jarFileName = jarFileName . substring ( NUMBER0 , jarFileName . indexOf ( STRING1 ) ) ;
 - System . out . println ( STRING2 + jarFileName ) ;
 jf = new JarFile ( jarFileName ) ;
 jarEntries = jf . entries ( ) ;
 while ( jarEntries . hasMoreElements ( ) ) {


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 @ modelcontainer
 - @ table ( database = TestDatabase . class )
 + @ table ( database = TestDatabase . class , cachingEnabled = true )
 public class AIContainerForeign extends AutoIncrementContainer {

 <nb> public class SqlUtils {
 }

 if ( cacheable != null ) {
 + instanceAdapter . reloadRelationships ( cacheable , cursor ) ;
 entities . add ( cacheable ) ;
 } else {
 cacheable = instanceAdapter . newInstance ( ) ;
 <nb> public class SqlUtils {
 if ( model == null ) {
 model = modelAdapter . newInstance ( ) ;
 modelAdapter . loadFromCursor ( cursor , model ) ;
 + } else {
 + modelAdapter . reloadRelationships ( model , cursor ) ;
 }
 }
 }

reloading relationships in the sql methods


<nb> public abstract class MediaRouteProviderService extends Service {
 if ( mControllers . indexOfKey ( controllerId ) < NUMBER0 ) {
 MediaRouteProvider . RouteController controller =
 mProvider . onCreateRouteController ( routeId ) ;
 - mControllers . put ( controllerId , controller ) ;
 - return true ;
 + if ( controller != null ) {
 + mControllers . put ( controllerId , controller ) ;
 + return true ;
 + }
 }
 return false ;
 }

Fix NPE when provider does not supply a route controller


<nb> public class BytecodeHelper implements Constants {
 cv . visitInsn ( ICONST_5 ) ;
 break ;
 default :
 - if ( value > Byte . MIN_VALUE && value < Byte . MAX_VALUE ) {
 + if ( value >= Byte . MIN_VALUE && value <= Byte . MAX_VALUE ) {
 cv . visitIntInsn ( BIPUSH , value ) ;
 }
 - else if ( value > Short . MIN_VALUE && value < Short . MAX_VALUE ) {
 + else if ( value >= Short . MIN_VALUE && value <= Short . MAX_VALUE ) {
 cv . visitIntInsn ( SIPUSH , value ) ;
 }
 else {


<nb> public class PsiReferenceExpressionImpl extends PsiReferenceExpressionBase imple
 LOG . error ( STRING0 ) ;
 return JavaResolveResult . EMPTY_ARRAY ;
 }
 + if ( ! isValid ( ) ) {
 + LOG . error ( STRING1 ) ;
 + return JavaResolveResult . EMPTY_ARRAY ;
 + }
 ResolveResult [ ] results = ResolveCache . getInstance ( getProject ( ) ) . resolveWithCaching ( this , OurGenericsResolver . INSTANCE , true , incompleteCode ) ;
 return results . length == NUMBER0 ? JavaResolveResult . EMPTY_ARRAY : ( JavaResolveResult [ ] ) results ;
 }


<nb> public class BeaconManager {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class BeaconManager {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class BeaconManager {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class BeaconParser {
 return null ;
 }
 else {
 - BeaconManager . logDebug ( TAG , STRING0 + String . format ( STRING1 , getMatchingBeaconTypeCode ( ) ) + STRING2 ) ;
 + BeaconManager . logDebug ( TAG , STRING3 + String . format ( STRING1 , getMatchingBeaconTypeCode ( ) ) + STRING2 ) ;
 }

 ArrayList < Identifier > identifiers = new ArrayList < Identifier > ( ) ;


<nb> public interface SourceSet {
 String getCompileTaskName ( String language ) ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


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


<nb> public class StorageProxy implements StorageProxyMBean
 SINGLE
 if ( destination . equals ( FBUtilities . getLocalAddress ( ) ) )
 {
 - insertLocalMessage ( rm , responseHandler ) ;
 + insertLocal ( rm , responseHandler ) ;
 }
 else
 {
 <nb> public class StorageProxy implements StorageProxyMBean
 message . setHeader ( RowMutation . HINT , bos . toByteArray ( ) ) ;
 }

 - private static void insertLocalMessage ( final RowMutation rm , final IWriteResponseHandler responseHandler )
 + private static void insertLocal ( final RowMutation rm , final IWriteResponseHandler responseHandler )
 {
 if ( logger . isDebugEnabled ( ) )
 logger . debug ( STRING0 + rm . toString ( true ) ) ;


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

 if ( ! properties . containsKey ( STRING8 ) ) {

Reduce number of exchange client threads used in tests


<nb> public class RootFileReferenceSet extends FileReferenceSet {
 }

 public boolean isAbsolutePathReference ( ) {
 - return FileUtil . isAbsolute ( getPathString ( ) ) ;
 + if ( ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
 + return FileUtil . isAbsolute ( getPathString ( ) ) ;
 + }
 + else {
 + return super . isAbsolutePathReference ( ) ;
 + }
 }

 @ notnull

Check that path is absolute equally for different OSs in tests


<nb> public class XmppConnectionService extends Service implements OnPhoneContactsLoa
 @ override
 public void onBind ( final Account account ) {
 account . getRoster ( ) . clearPresences ( ) ;
 + mJingleConnectionManager . cancelInTransmission ( ) ;
 fetchRosterFromServer ( account ) ;
 fetchBookmarks ( account ) ;
 - mMessageArchiveService . executePendingQueries ( account ) ;
 sendPresence ( account ) ;
 + mMessageArchiveService . executePendingQueries ( account ) ;
 connectMultiModeConversations ( account ) ;
 - mJingleConnectionManager . cancelInTransmission ( ) ;
 syncDirtyContacts ( account ) ;
 }
 } ;

changed order of send presence and execute mam queries


<nb> public class DefaultLanguageResolver implements LanguageResolver {
 }
 }

 - private Object lookupInRegistry ( CamelContext context , String . . . names ) {
 - for ( String name : names ) {
 - try {
 - Object bean = context . getRegistry ( ) . lookupByName ( name ) ;
 - if ( bean != null ) {
 - getLog ( ) . debug ( STRING0 , name , bean ) ;
 - return bean ;
 - }
 - } catch ( Exception e ) {
 - if ( getLog ( ) . isDebugEnabled ( ) ) {
 - getLog ( ) . debug ( STRING1 + name + STRING2 + e ) ;
 - }
 - }
 - }
 -
 - return null ;
 - }

 protected Language noSpecificLanguageFound ( String name , CamelContext context ) {
 Class < ? > type = null ;


<nb> public class ViewValuePanel implements IResultSetPanel {
 valueSaving = true ;
 Object newValue = valueViewer . extractEditorValue ( ) ;
 previewController . updateValue ( newValue ) ;
 + presentation . refreshData ( false , false ) ;
 } catch ( Exception e ) {
 UIUtils . showErrorDialog ( null , STRING0 , STRING1 , e ) ;
 } finally {


<nb> public class Sql {
 }
 } else {
 nulls = true ;
 - buffer . append ( STRING0 ) ; SINGLE
 - SINGLE
 + iter . remove ( ) ;
 + buffer . append ( STRING0 ) ; SINGLE
 }
 }
 }

Can not insert nulls into the table using Sql execute improved solution


<nb> public class LwjglOffscreenBuffer extends LwjglContext implements Runnable {
 }

 public void run ( ) {
 + loadNatives ( ) ;
 logger . log ( Level . FINE , STRING0 , Sys . getVersion ( ) ) ;
 initInThread ( ) ;
 while ( ! needClose . get ( ) ) {
 <nb> public class Installer extends ModuleInstall {
 logger . log ( Level . INFO , STRING1 , projectDir ) ;
 file . mkdirs ( ) ;
 }
 - com . jme3 . system . Natives . setExtractionDir ( jmpDir ) ;
 -
 +
 + com . jme3 . system . NativeLibraryLoader . setCustomExtractionFolder ( jmpDir ) ;
 SINGLE
 JPopupMenu . setDefaultLightWeightPopupEnabled ( false ) ;
 }

Ensure LwjglOffscreenBuffer extracts the required natives


<nb> public class HttpConnection extends AbstractConnection implements Runnable , Http
 finally
 {
 setCurrentConnection ( last ) ;
 - if ( ! suspended && getEndPoint ( ) . isOpen ( ) && getEndPoint ( ) . getConnection ( ) == this )
 + if ( ! suspended && ! getEndPoint ( ) . isInputShutdown ( ) && getEndPoint ( ) . getConnection ( ) == this )
 {
 fillInterested ( ) ;
 }

Fixed spinning loop that called onFillable in case of closed


<nb> public class UsbDeviceManager {
 intent . addFlags ( Intent . FLAG_RECEIVER_REGISTERED_ONLY ) ;
 intent . putExtra ( STRING0 , ( enabled ? NUMBER0 : NUMBER1 ) ) ;
 if ( enabled ) {
 + Scanner scanner = null ;
 try {
 - Scanner scanner = new Scanner ( new File ( AUDIO_SOURCE_PCM_PATH ) ) ;
 + scanner = new Scanner ( new File ( AUDIO_SOURCE_PCM_PATH ) ) ;
 int card = scanner . nextInt ( ) ;
 int device = scanner . nextInt ( ) ;
 intent . putExtra ( STRING1 , card ) ;
 intent . putExtra ( STRING2 , device ) ;
 } catch ( FileNotFoundException e ) {
 Slog . e ( TAG , STRING3 , e ) ;
 + } finally {
 + if ( scanner != null ) {
 + scanner . close ( ) ;
 + }
 }
 }
 mContext . sendStickyBroadcastAsUser ( intent , UserHandle . ALL ) ;


<nb> public class ReliabilityTest extends ActivityInstrumentationTestCase2 < Reliabilit
 System . gc ( ) ;
 System . gc ( ) ;
 }
 + updateTestStatus ( TEST_DONE ) ;
 activity . finish ( ) ;
 listReader . close ( ) ;
 }

Fixed bug where test status is not marked DONE when completed


<nb> public final class EncodeActivity extends Activity {
 return true ;
 case R . id . menu_encode :
 Intent intent = getIntent ( ) ;
 + if ( intent == null ) {
 + return false ;
 + }
 intent . putExtra ( USE_VCARD_KEY , ! qrCodeEncoder . isUseVCard ( ) ) ;
 - startActivity ( getIntent ( ) ) ;
 + startActivity ( intent ) ;
 finish ( ) ;
 return true ;
 default :

Fix possible strange NPE on EncodeActivity


<nb> public class AtmosphereFramework {
 for ( String p : params ) {
 s = p . split ( STRING0 , NUMBER0 ) ;
 final String header = s [ NUMBER1 ] ;
 - final String value = s [ NUMBER2 ] ;
 + final String value = s . length > NUMBER2 ? s [ NUMBER2 ] : STRING1 ;

 if ( header . equalsIgnoreCase ( STRING2 ) ) {
 SINGLE


<nb> public abstract class AbstractRememberMeServices implements RememberMeServices ,
 protected void onLoginFail ( HttpServletRequest request , HttpServletResponse response ) { }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public final void loginSuccess ( HttpServletRequest request , HttpServletResponse response ,
 Authentication successfulAuthentication ) {

Clarify AbstractRememberMeServices loginSuccess javadoc


<nb> public class NettyAsyncHttpProvider extends IdleStateHandler implements AsyncHtt
 if ( p != null && p . getRequestTimeoutInMs ( ) != - NUMBER0 ) {
 requestTimeout = p . getRequestTimeoutInMs ( ) ;
 }
 - this . nettyResponseFuture . getRequest ( ) . getPerRequestConfig ( ) ;
 -
 abort ( this . nettyResponseFuture , new TimeoutException ( String . format ( STRING0 , requestTimeout ) ) ) ;
 markChannelNotReadable ( channel . getPipeline ( ) . getContext ( NettyAsyncHttpProvider . class ) ) ;


<nb> public class AggregatorParsers {
 pipelineAggregatorFactory
 . validate ( null , factories . getAggregatorFactories ( ) , factories . getPipelineAggregatorFactories ( ) ) ;
 }
 + if ( metaData != null ) {
 + pipelineAggregatorFactory . setMetaData ( metaData ) ;
 + }
 factories . addPipelineAggregator ( pipelineAggregatorFactory ) ;
 }
 }


<nb> public final class HttpHeaders {
 public static final String RANGE = STRING0 ;
 COMMENT
 public static final String REFERER = STRING1 ;
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public static final String SERVICE_WORKER = STRING2 ;
 COMMENT
 public static final String TE = STRING3 ;
 <nb> public final class HttpHeaders {
 public static final String RETRY_AFTER = STRING4 ;
 COMMENT
 public static final String SERVER = STRING5 ;
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String SERVICE_WORKER_ALLOWED = STRING6 ;
 COMMENT
 public static final String SET_COOKIE = STRING7 ;
 COMMENT

Add the Service Worker Allowed header to the HTTP header constants for Java Go


<nb> public class WifiStateTracker implements NetworkStateTracker {

 mWifiManager = ( WifiManager ) mContext . getSystemService ( Context . WIFI_SERVICE ) ;
 IntentFilter filter = new IntentFilter ( ) ;
 - filter . addAction ( WifiManager . WIFI_STATE_CHANGED_ACTION ) ;
 filter . addAction ( WifiManager . NETWORK_STATE_CHANGED_ACTION ) ;
 filter . addAction ( WifiManager . CONFIG_CHANGED_ACTION ) ;
 - filter . addAction ( WifiManager . SCAN_RESULTS_AVAILABLE_ACTION ) ;

 mWifiStateReceiver = new WifiStateReceiver ( ) ;
 mContext . registerReceiver ( mWifiStateReceiver , filter ) ;


<nb> public class HSQLDBTemplates extends SQLTemplates {
 setAutoIncrement ( STRING0 ) ;
 add ( Ops . TRIM , STRING1 ) ;
 add ( Ops . NEGATE , STRING2 , NUMBER0 ) ;
 +
 + add ( Ops . NEXTVAL , STRING3 ) ;

 add ( Ops . MathOps . ROUND , STRING4 ) ;
 add ( Ops . MathOps . LN , STRING5 ) ;
 <nb> public final class SQLExpressions {
 }

 public static final < T extends Number > SimpleExpression < T > nextval ( Class < T > type , String sequence ) {
 - return SimpleOperation . create ( type , SQLTemplates . NEXTVAL , ConstantImpl . create ( STRING6 ) ) ;
 + return SimpleOperation . create ( type , SQLTemplates . NEXTVAL , ConstantImpl . create ( sequence ) ) ;
 }

 private SQLExpressions ( ) { }

Fixed nextval expression and NEXTVAL Operator for HSQLDB


<nb> public class ReturnChange {
 COMMENT
 public List < Integer > calculate ( int [ ] moneys , int billAmount ) {
 validateInputData ( moneys , billAmount ) ;
 -
 +
 List < Integer > change = new LinkedList < Integer > ( ) ;
 while ( billAmount > NUMBER0 && moneys . length > NUMBER0 ) {
 for ( int i = moneys . length - NUMBER1 ; i >= NUMBER0 ; i -- ) {


<nb> abstract class BaseCameraFragment extends Fragment implements CameraUriInterface
 return CameraUtil . makeTempFile ( getActivity ( ) , getArguments ( ) . getString ( CameraIntentKey . SAVE_DIR ) , STRING0 , STRING1 ) ;
 }

 + @ nonnull
 + protected final File getOutputPictureFile ( ) {
 + return CameraUtil . makeTempFile ( getActivity ( ) , getArguments ( ) . getString ( CameraIntentKey . SAVE_DIR ) , STRING1 ) ;
 + }
 +
 public abstract void openCamera ( ) ;

 public abstract void closeCamera ( ) ;


<nb> public class SnacktoryWebViewRenderer extends WebViewRenderer {
 leftString = STRING0 + authorName + STRING1 ;
 }
 if ( url != null ) {
 - leftString += STRING2 + url . getHost ( ) + STRING3 + ( url . getHost ( ) . replace ( STRING4 , STRING5 ) ) + STRING6 ;
 + leftString += STRING2 + url . getProtocol ( ) + STRING7 + url . getHost ( ) + STRING3 + ( url . getHost ( ) . replace ( STRING4 , STRING5 ) ) + STRING6 ;
 }

 Log . d ( STRING8 , STRING9 + url . getHost ( ) + STRING10 + authorName ) ;


<nb> public abstract class DBCollection {
 COMMENT
 COMMENT
 COMMENT
 - < < < < < < < HEAD
 - COMMENT
 - == == == =
 COMMENT
 - > > > > > > > JAVA - NUMBER0
 COMMENT
 public long getCount ( DBObject query ) {
 return getCount ( query , null ) ;


<nb> public final class Roster extends Manager {
 logLevel = Level . SEVERE ;
 }
 LOGGER . log ( logLevel , STRING0 , exception ) ;
 + for ( RosterLoadedListener listener : rosterLoadedListeners ) {
 + listener . onRosterLoadingFailed ( exception ) ;
 + }
 }
 } ) ;
 }
 <nb> public interface RosterLoadedListener {
 COMMENT
 public void onRosterLoaded ( Roster roster ) ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void onRosterLoadingFailed ( Exception exception ) ;
 +
 }


<nb> public final class DiscreteDomains {
 private Object readResolve ( ) {
 return INSTANCE ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return STRING0 ;
 + }

 private static final long serialVersionUID = NUMBER0 ;
 }
 <nb> public final class DiscreteDomains {
 private Object readResolve ( ) {
 return INSTANCE ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return STRING1 ;
 + }

 private static final long serialVersionUID = NUMBER0 ;
 }
 <nb> public final class DiscreteDomains {
 private Object readResolve ( ) {
 return INSTANCE ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return STRING2 ;
 + }

 private static final long serialVersionUID = NUMBER0 ;
 }


<nb> public class NetworkSender
 {
 ChannelPipeline pipeline = Channels . pipeline ( ) ;
 pipeline . addLast ( STRING0 , new ObjectEncoder ( NUMBER0 ) ) ;
 - pipeline . addLast ( STRING1 , new NetworkSender . MessageSender ( ) ) ;
 + pipeline . addLast ( STRING1 , new NetworkMessageSender ( ) ) ;
 return pipeline ;
 }
 }

 - private class MessageSender
 + private class NetworkMessageSender
 extends SimpleChannelHandler
 {
 @ override

Renames NetworkSender MessageSender to NetworkSenderdotNetworkMessageSender


<nb> import NAMESPACE ;
 public class KMeansModel extends Model < KMeansModel , KMeansModel . KMeansParameters , KMeansModel . KMeansOutput > {

 public static class KMeansParameters extends Model . Parameters < KMeansModel , KMeansModel . KMeansParameters , KMeansModel . KMeansOutput > {
 - public int _K ; SINGLE
 - public int _max_iters ; SINGLE
 - public boolean _normalize ; SINGLE
 - public long _seed ; SINGLE
 - public KMeans . Initialization _init ;
 + public int _K ; SINGLE
 + public int _max_iters = NUMBER0 ; SINGLE
 + public boolean _normalize = false ; SINGLE
 + public long _seed ; SINGLE
 + public KMeans . Initialization _init = KMeans . Initialization . None ;
 }

 public static class KMeansOutput extends Model . Output < KMeansModel , KMeansModel . KMeansParameters , KMeansModel . KMeansOutput > {

Set defaults for appropriate KMeansParameters


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ShowFeatureUsageStatisticsDialog extends DialogWrapper {
 }

 private static String formatCharacterCount ( int count , boolean full ) {
 - String result = count > NUMBER0 * NUMBER0 ? ( count / NUMBER0 / NUMBER0 ) + STRING0 :
 - count > NUMBER0 ? ( count / NUMBER0 ) + STRING1 :
 + DecimalFormat oneDigit = new DecimalFormat ( STRING2 ) ;
 + String result = count > NUMBER0 * NUMBER0 ? oneDigit . format ( ( double ) count / NUMBER0 / NUMBER0 ) + STRING0 :
 + count > NUMBER0 ? oneDigit . format ( ( double ) count / NUMBER0 ) + STRING1 :
 String . valueOf ( count ) ;
 if ( full ) {
 return result + STRING3 ;


<nb> class DisplayAdjustmentUtils {
 NUMBER0 , NUMBER0 , NUMBER0 , NUMBER1
 } ;

 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 private static final float [ ] INVERSION_MATRIX_VALUE_ONLY = new float [ ] {
 - NUMBER0 , - FLOAT0 , - FLOAT0 , NUMBER0 ,
 - - FLOAT0 , NUMBER0 , - FLOAT0 , NUMBER0 ,
 - - FLOAT0 , - FLOAT0 , NUMBER0 , NUMBER0 ,
 - NUMBER1 , NUMBER1 , NUMBER1 , NUMBER1
 + FLOAT1 , - FLOAT2 , - FLOAT3 , NUMBER0 ,
 + - FLOAT4 , - FLOAT5 , - FLOAT6 , NUMBER0 ,
 + - FLOAT7 , - FLOAT7 , FLOAT8 , NUMBER0 ,
 + NUMBER1 , NUMBER1 , NUMBER1 , NUMBER1
 } ;

 COMMENT

Adjust display inversion matrix to account for luminance


<nb> public class Contact {
 public void ResetRestitution ( ) {
 contact . resetRestitution ( ) ;
 }
 +
 + public float getTangentSpeed ( ) {
 + return contact . getTangentSpeed ( ) ;
 + }
 +
 + public void setTangentSpeed ( float speed ) {
 + contact . setTangentSpeed ( speed ) ;
 + }
 }

Implement Contact GWT Backend SetTangentSpeed GetTangentSpeed methods


<nb> public class ContextConfig implements LifecycleListener {
 String name = className . replace ( STRING0 , STRING1 ) + STRING2 ;
 InputStream is =
 context . getLoader ( ) . getClassLoader ( ) . getResourceAsStream ( name ) ;
 + if ( is == null ) {
 + return ;
 + }
 ClassParser parser = new ClassParser ( is , null ) ;
 try {
 JavaClass clazz = parser . parse ( ) ;

Avoid NPE if class interface is not present


<nb> public class MtpDatabase {
 return new int [ ] {
 SINGLE
 MtpConstants . FORMAT_UNDEFINED ,
 +
 MtpConstants . FORMAT_ASSOCIATION ,
 + MtpConstants . FORMAT_TEXT ,
 + MtpConstants . FORMAT_HTML ,
 + MtpConstants . FORMAT_WAV ,
 + MtpConstants . FORMAT_MP3 ,
 + MtpConstants . FORMAT_MPEG ,
 + MtpConstants . FORMAT_EXIF_JPEG ,
 + MtpConstants . FORMAT_TIFF_EP ,
 + MtpConstants . FORMAT_GIF ,
 + MtpConstants . FORMAT_JFIF ,
 + MtpConstants . FORMAT_PNG ,
 + MtpConstants . FORMAT_TIFF ,
 + MtpConstants . FORMAT_WMA ,
 + MtpConstants . FORMAT_OGG ,
 + MtpConstants . FORMAT_AAC ,
 + MtpConstants . FORMAT_MP4_CONTAINER ,
 + MtpConstants . FORMAT_MP2 ,
 + MtpConstants . FORMAT_3GP_CONTAINER ,
 MtpConstants . FORMAT_ABSTRACT_AV_PLAYLIST ,
 + MtpConstants . FORMAT_WPL_PLAYLIST ,
 + MtpConstants . FORMAT_M3U_PLAYLIST ,
 + MtpConstants . FORMAT_PLS_PLAYLIST ,
 + MtpConstants . FORMAT_XML_DOCUMENT ,
 } ;
 }

List all the formats we support in addition to FORMAT_UNDEFINED


<nb> public class TimerComponent extends DefaultComponent {
 answer = timers . get ( key ) ;
 if ( answer == null ) {
 SINGLE
 - String name = endpoint . getCamelContext ( ) . getExecutorServiceManager ( ) . resolveThreadName ( endpoint . getTimerName ( ) ) ;
 + String name = endpoint . getCamelContext ( ) . getExecutorServiceManager ( ) . resolveThreadName ( STRING0 + endpoint . getTimerName ( ) ) ;
 answer = new Timer ( name , endpoint . isDaemon ( ) ) ;
 timers . put ( key , answer ) ;
 }

Timer thread should use same thread name pattern as the others


<nb> public class InternalJUnitRunner implements RunnerImpl {
 SINGLE
 SINGLE
 SINGLE
 + SINGLE
 reporter . report ( testClass , notifier ) ;
 }
 }


<nb> public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
 return false ;
 }

 - EndpointOption that = ( EndpointOption ) o ;
 + ComponentOption that = ( ComponentOption ) o ;

 if ( ! name . equals ( that . name ) ) {
 return false ;


<nb> public class Log4JLoggingSystemTests {
 this . loggingSystem . initialize ( ) ;
 java . util . logging . Logger julLogger = java . util . logging . Logger
 . getLogger ( getClass ( ) . getName ( ) ) ;
 - julLogger . info ( STRING0 ) ;
 + julLogger . severe ( STRING0 ) ;
 String output = this . output . toString ( ) . trim ( ) ;
 assertTrue ( STRING1 + output , output . contains ( STRING0 ) ) ;
 }
 <nb> public class Log4J2LoggingSystemTests {
 this . loggingSystem . initialize ( ) ;
 java . util . logging . Logger julLogger = java . util . logging . Logger
 . getLogger ( getClass ( ) . getName ( ) ) ;
 - julLogger . info ( STRING0 ) ;
 + julLogger . severe ( STRING0 ) ;
 String output = this . output . toString ( ) . trim ( ) ;
 assertTrue ( STRING1 + output , output . contains ( STRING0 ) ) ;
 }

Increase the level of JUL logging calls in the tests to try to fix CI


<nb> public class DeterministicSeed implements EncryptableItem {
 COMMENT
 COMMENT
 public DeterministicSeed ( List < String > mnemonicCode , String passphrase , long creationTimeSeconds ) {
 - this ( getCachedMnemonicCodec ( ) . toSeed ( mnemonicCode , passphrase ) , mnemonicCode , creationTimeSeconds ) ;
 + this ( MnemonicCode . toSeed ( mnemonicCode , passphrase ) , mnemonicCode , creationTimeSeconds ) ;
 }

 COMMENT
 <nb> public class DeterministicSeed implements EncryptableItem {
 SINGLE
 throw new RuntimeException ( e ) ;
 }
 - this . seed = getCachedMnemonicCodec ( ) . toSeed ( mnemonicCode , passphrase ) ;
 + this . seed = MnemonicCode . toSeed ( mnemonicCode , passphrase ) ;
 this . encryptedMnemonicCode = null ;
 this . creationTimeSeconds = creationTimeSeconds ;
 }

Fix a couple of static method via instance warnings


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class MultiMatchQueryParser implements QueryParser {

 <nb> public class MultiMatchQueryParser implements QueryParser {
 }

 if ( value == null ) {
 - throw new QueryParsingException ( parseContext . index ( ) , STRING0 ) ;
 + throw new QueryParsingException ( parseContext . index ( ) , STRING1 ) ;
 }

 if ( fieldNameWithBoosts . isEmpty ( ) ) {
 - throw new QueryParsingException ( parseContext . index ( ) , STRING2 ) ;
 + throw new QueryParsingException ( parseContext . index ( ) , STRING3 ) ;
 }
 if ( type == null ) {
 type = MultiMatchQueryBuilder . Type . BEST_FIELDS ;
 <nb> public class MultiMatchQueryParser implements QueryParser {
 fieldNameWithBoosts . put ( fField , fBoost ) ;
 }
 }
 - }
 + }

Fix wrong error messages in MultiMatchQueryParser


<nb> class SearchEverywherePsiRenderer extends PsiElementListCellRenderer < PsiElement >
 if ( in ) text = text . substring ( NUMBER0 ) ;
 final FontMetrics fm = myList . getFontMetrics ( myList . getFont ( ) ) ;
 final int maxWidth = myList . getWidth ( ) - fm . stringWidth ( name ) - NUMBER1 - myRightComponentWidth - NUMBER2 ;
 - String left = STRING0 + ( in ? STRING1 : STRING2 ) ;
 + String left = in ? STRING3 : STRING0 ;
 String right = STRING4 ;

 if ( fm . stringWidth ( left + text + right ) < maxWidth ) return left + text + right ;


<nb> public class HttpExchangeBuilder {
 String relativePath ;
 String protocol ;
 final HeaderMap headers = new HeaderMap ( ) ;
 - final Map < String , Deque < String > > queryParameters = new SecureHashMap < String , java . util . Deque < String > > ( ) ;
 + final Map < String , Deque < String > > queryParameters = new SecureHashMap < String , java . util . Deque < String > > ( NUMBER0 ) ;

 public String getMethod ( ) {
 return method ;
 <nb> public final class HeaderMap implements Iterable < String > {
 private final String name ;

 HeaderValue ( final String name ) {
 + super ( NUMBER1 ) ;
 this . name = name ;
 }


<nb> public class CachedClass {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public CachedClass getCachedClass ( ) {
 return this ;


<nb> public class FrameDebuggerTree extends DebuggerTree {
 super . visitLocalVariable ( variable ) ;
 }

 + public void visitClass ( final PsiClass aClass ) {
 + SINGLE
 + }
 +
 COMMENT
 public void visitStatement ( PsiStatement statement ) {
 if ( lineRange . intersects ( statement . getTextRange ( ) ) ) {

do not display variables used in local and anonymous classes out of current execution scope


<nb> public class RefactoringQuickListPopupAction extends QuickSwitchSchemeAction {
 return true ;
 }

 + @ override
 + public void update ( AnActionEvent e ) {
 + super . update ( e ) ;
 + e . getPresentation ( ) . setVisible ( e . getPlace ( ) == ActionPlaces . MAIN_MENU ) ;
 + }
 +
 protected String getPopupTitle ( AnActionEvent e ) {
 return STRING0 ;
 }

disable refactor this everywhere but main menu


<nb> public class ChannelLocal < T > {
 COMMENT
 COMMENT
 COMMENT
 - protected T initialValue ( @ suppresswarnings ( STRING0 ) Channel channel ) {
 + protected T initialValue ( Channel channel ) {
 return null ;
 }

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

 - import NAMESPACE ;
 -
 COMMENT
 COMMENT
 COMMENT
 <nb> public class WriteTimeoutHandler extends SimpleChannelDownstreamHandler
 timer . stop ( ) ;
 }

 - protected long getTimeoutMillis ( @ suppresswarnings ( STRING0 ) MessageEvent e ) {
 + protected long getTimeoutMillis ( MessageEvent e ) {
 return timeoutMillis ;
 }


<nb> class ConfusionRuleEvaluator {
 ConfusionProbabilityRule foundRule = null ;
 for ( Rule rule : rules ) {
 if ( rule . getId ( ) . equals ( ConfusionProbabilityRule . RULE_ID ) ) {
 - foundRule = ( ConfusionProbabilityRule ) rules . get ( NUMBER0 ) ;
 + foundRule = ( ConfusionProbabilityRule ) rule ;
 break ;
 }
 }


<nb> public class MetaClassHelper {
 if ( parameter . getTheClass ( ) == argument ) return NUMBER0 ;

 if ( parameter . isInterface ( ) ) {
 - return getMaximumInterfaceDistance ( argument , parameter . getTheClass ( ) ) < < INTERFACE_SHIFT ;
 + int dist = getMaximumInterfaceDistance ( argument , parameter . getTheClass ( ) ) < < INTERFACE_SHIFT ;
 + if ( dist != - NUMBER1 ) return dist ;
 }

 long objectDistance = NUMBER0 ;
 <nb> public class MetaClassHelper {
 if ( clazz . isPrimitive ( ) ) {
 objectDistance += NUMBER2 ;
 } else {
 - while ( clazz != Object . class ) {
 + while ( clazz != Object . class && clazz != null ) {
 clazz = clazz . getSuperclass ( ) ;
 objectDistance += NUMBER2 ;
 }


<nb> public class DeviceAdminReceiver extends BroadcastReceiver {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ sdkconstant ( SdkConstantType . BROADCAST_INTENT_ACTION )
 public static final String ACTION_LOCK_TASK_ENTERING
 <nb> public class DeviceAdminReceiver extends BroadcastReceiver {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ sdkconstant ( SdkConstantType . BROADCAST_INTENT_ACTION )
 public static final String ACTION_LOCK_TASK_EXITING
 = STRING0 ;

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

Fix the javadocs for lock task mode intents


<nb> public class MockCompileContext implements CompileContextEx {
 throw new UnsupportedOperationException ( STRING0 ) ;
 }

 + SINGLE
 + public boolean isRebuildRequested ( ) {
 + throw new UnsupportedOperationException ( STRING1 ) ;
 + }
 +
 + SINGLE
 + @ nullable
 + public String getRebuildReason ( ) {
 + throw new UnsupportedOperationException ( STRING2 ) ;
 + }
 +
 @ override
 public Module getModuleByFile ( VirtualFile file ) {
 return module ;

Implemented abstract methods introduced in newer IDEA


<nb> public final class Bitmap_Delegate {
 }

 @ layoutlibdelegate
 - COMMENT
 + COMMENT
 sManager . removeJavaReferenceFor ( nativeBitmap ) ;
 + return true ;
 }

 @ layoutlibdelegate
 <nb> public class TestDelegates extends TestCase {
 originalClass . getName ( ) ) ,
 delegateMethod . getAnnotation ( LayoutlibDelegate . class ) ) ;

 + SINGLE
 + assertTrue (
 + String . format ( STRING0 +
 + STRING1 ,
 + delegateClass . getName ( ) ,
 + getMethodName ( delegateMethod ) ,
 + originalMethod . getReturnType ( ) . getName ( ) ) ,
 + delegateMethod . getReturnType ( ) == originalMethod . getReturnType ( ) ) ;
 +
 SINGLE
 assertTrue (
 String . format (

Layoutlib tests now check methods return value DO NOT MERGE


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Add notes about circular buffer to EvictingQueue javadocs


<nb>
 package NAMESPACE ;

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

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

 public class JcrNodePathCreationTest extends JcrRouteTestSupport {
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;

 public class JcrProducerSubNodeTest extends JcrRouteTestSupport {
 <nb> import NAMESPACE ;

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

 public class JcrProducerTest extends JcrRouteTestSupport {

Minor Organize imports to reduce warnings


<nb> public class StatusBarService extends Service implements CommandQueue . Callbacks
 PixelFormat . RGBX_8888 ) ;
 lp . gravity = Gravity . TOP | Gravity . FILL_HORIZONTAL ;
 lp . setTitle ( STRING0 ) ;
 - SINGLE
 + lp . windowAnimations = com . android . internal . R . style . Animation_StatusBar ;

 WindowManagerImpl . getDefault ( ) . addView ( view , lp ) ;
 }

Add animation for the status bar going away


<nb>
 COMMENT
 package NAMESPACE ;

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

 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 +
 + import static NAMESPACE ;
 + import static NAMESPACE ;
 + import static NAMESPACE ;
 +
 public class DatabaseTest {

 private File databaseDirectory ;
 <nb> public class DatabaseTest {
 }

 @ test
 + @ ignore
 public void shouldEnableRemoteShellByDefault ( ) throws IOException
 {
 int wellKnownSocket = NUMBER0 ;


<nb> public class EntityIdentifier {
 ) ;

 private final EntityBinding entityBinding ;
 - private AttributeBinding attributeBinding ;
 + private KeyValueBinding attributeBinding ;
 private IdentifierGenerator identifierGenerator ;
 private IdGenerator idGenerator ;
 SINGLE
 <nb> public class EntityIdentifier {
 this . entityBinding = entityBinding ;
 }

 - public AttributeBinding getValueBinding ( ) {
 + public KeyValueBinding getValueBinding ( ) {
 return attributeBinding ;
 }

 - public void setValueBinding ( AttributeBinding attributeBinding ) {
 + public void setValueBinding ( KeyValueBinding attributeBinding ) {
 if ( this . attributeBinding != null ) {
 SINGLE
 SINGLE

Change EntityIdentifier attributeBinding to be type KeyValueBinding


<nb> public interface TreeNode
 COMMENT
 JsonParser traverse ( ) ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + JsonParser traverse ( ObjectCodec codec ) ;
 }


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public final class TreeUtil {
 tree . validate ( ) ;
 }
 } else {
 - okToScroll = false ;
 + Application app = ApplicationManager . getApplication ( ) ;
 + if ( app != null && app . isUnitTestMode ( ) ) {
 + okToScroll = false ;
 + }
 }

 Runnable selectRunnable = new Runnable ( ) {


<nb> public abstract class DBCollection {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public abstract void createIndex ( DBObject keys , DBObject options , DBEncoder encoder ) ;

deprecate createIndex that takes an Encoder


<nb> public class NetworkStatsServiceTest extends AndroidTestCase {
 expect ( mSettings . getPollInterval ( ) ) . andReturn ( HOUR_IN_MILLIS ) . anyTimes ( ) ;
 expect ( mSettings . getTimeCacheMaxAge ( ) ) . andReturn ( DAY_IN_MILLIS ) . anyTimes ( ) ;
 expect ( mSettings . getSampleEnabled ( ) ) . andReturn ( true ) . anyTimes ( ) ;
 - expect ( mSettings . getReportXtOverDev ( ) ) . andReturn ( true ) . anyTimes ( ) ;

 final Config config = new Config ( bucketDuration , deleteAge , deleteAge ) ;
 expect ( mSettings . getDevConfig ( ) ) . andReturn ( config ) . anyTimes ( ) ;


<nb> public class WebDriverManager {
 }

 String url ;
 - if ( System . getProperty ( STRING0 ) != null ) {
 - url = System . getProperty ( STRING0 ) ;
 + if ( System . getenv ( STRING0 ) != null ) {
 + url = System . getenv ( STRING0 ) ;
 } else {
 url = STRING1 ;
 }


<nb> public class BulkProcessorIT extends ESIntegTestCase {
 public void testBulkProcessorConcurrentRequests ( ) throws Exception {
 int bulkActions = randomIntBetween ( NUMBER0 , NUMBER1 ) ;
 int numDocs = randomIntBetween ( bulkActions , bulkActions + NUMBER1 ) ;
 - int concurrentRequests = randomIntBetween ( NUMBER2 , NUMBER0 ) ;
 + int concurrentRequests = randomIntBetween ( NUMBER2 , NUMBER3 ) ;

 int expectedBulkActions = numDocs / bulkActions ;

 <nb> public class BulkProcessorIT extends ESIntegTestCase {

 Set < String > ids = new HashSet < > ( ) ;
 for ( BulkItemResponse bulkItemResponse : listener . bulkItems ) {
 - assertThat ( bulkItemResponse . isFailed ( ) , equalTo ( false ) ) ;
 + assertThat ( bulkItemResponse . getFailureMessage ( ) , bulkItemResponse . isFailed ( ) , equalTo ( false ) ) ;
 assertThat ( bulkItemResponse . getIndex ( ) , equalTo ( STRING0 ) ) ;
 assertThat ( bulkItemResponse . getType ( ) , equalTo ( STRING0 ) ) ;
 SINGLE

Reduce maximum number of concurrent requests in BulkProcessorIT


<nb>
 package NAMESPACE ;

 + import NAMESPACE ;
 +
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class Post implements Serializable {

 public JSONArray getJSONCategories ( ) {
 JSONArray jArray = null ;
 - if ( categories == null )
 - categories = STRING0 ;
 + if ( categories == null ) {
 + categories = STRING1 ;
 + }
 try {
 categories = StringUtils . unescapeHTML ( categories ) ;
 - jArray = new JSONArray ( categories ) ;
 + if ( TextUtils . isEmpty ( categories ) ) {
 + jArray = new JSONArray ( categories ) ;
 + } else {
 + jArray = new JSONArray ( ) ;
 + }
 } catch ( JSONException e ) {
 AppLog . e ( T . POSTS , e ) ;
 }

avoid a recuring exception print when no categories are selected


<nb> public class XmppConnectionService extends Service {

 public XmppConnection createConnection ( final Account account ) {
 final SharedPreferences sharedPref = getPreferences ( ) ;
 - account . setResource ( sharedPref . getString ( STRING0 , getString ( R . string . default_resource ) )
 - . toLowerCase ( Locale . getDefault ( ) ) ) ;
 + String resource ;
 + try {
 + resource = sharedPref . getString ( STRING0 , getString ( R . string . default_resource ) ) . toLowerCase ( Locale . ENGLISH ) ;
 + if ( resource . trim ( ) . isEmpty ( ) ) {
 + throw new Exception ( ) ;
 + }
 + } catch ( Exception e ) {
 + resource = STRING1 ;
 + }
 + account . setResource ( resource ) ;
 final XmppConnection connection = new XmppConnection ( account , this ) ;
 connection . setOnMessagePacketReceivedListener ( this . mMessageParser ) ;
 connection . setOnStatusChangedListener ( this . statusListener ) ;

add exception handling when loading default resource


<nb> public interface Person extends Observable , Parcelable , Persistable {
 String getName ( ) ;

 @ bindable
 - @ index ( name = STRING0 )
 + @ index ( value = STRING0 )
 String getEmail ( ) ;

 @ bindable


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public class XML {

Fix NullPointerException in XML toString object tagName


<nb> class NonRecursivePropertyPlaceholderHelper extends PropertyPlaceholderHelper {

 private final PlaceholderResolver resolver ;

 - public NonRecursivePlaceholderResolver ( PlaceholderResolver resolver ) {
 + NonRecursivePlaceholderResolver ( PlaceholderResolver resolver ) {
 this . resolver = resolver ;
 }

 <nb> public class DefaultErrorViewIntegrationTests {
 assertFalse ( STRING0 + content , content . contains ( STRING1 ) ) ;
 }

 + public static String injectCall ( ) {
 + return STRING1 ;
 + }
 +
 @ target ( ElementType . TYPE )
 @ retention ( RetentionPolicy . RUNTIME )
 @ documented
 <nb> public class DefaultErrorViewIntegrationTests {

 }

 - public static String injectCall ( ) {
 - return STRING1 ;
 - }
 -
 }


<nb> class CallbackProxy extends Handler {
 SINGLE
 SINGLE
 SINGLE
 - if ( messagesBlocked ( ) ) return ;
 + if ( messagesBlocked ( ) ) {
 + synchronized ( this ) {
 + notify ( ) ;
 + }
 + return ;
 + }
 switch ( msg . what ) {
 case PAGE_STARTED :
 String startedUrl = msg . getData ( ) . getString ( STRING0 ) ;


<nb> public class TokenMetadata
 private final Set < Pair < Token , InetAddress > > movingEndpoints = new HashSet < Pair < Token , InetAddress > > ( ) ;

 SINGLE
 - private final Map < Token , InetAddress > relocatingTokens = new HashMap < Token , InetAddress > ( ) ;
 + private final ConcurrentMap < Token , InetAddress > relocatingTokens = new ConcurrentHashMap < Token , InetAddress > ( ) ;

 COMMENT
 private final ReadWriteLock lock = new ReentrantReadWriteLock ( true ) ;

make TokenMetadata relocatingTokens a ConcurrentMap


<nb> public class Poller extends PollerBase implements Runnable
 public void start ( )
 {
 worker = new Thread ( this , name ) ;
 + worker . setDaemon ( true ) ;
 worker . start ( ) ;
 }


<nb> public class LogAspect {
 COMMENT
 COMMENT
 COMMENT
 - @ around ( STRING0 )
 + @ around ( STRING1 )
 public Object traceMethod ( final ProceedingJoinPoint proceedingJoinPoint ) throws Throwable {
 Object returnVal = null ;
 final Logger logger = this . getLog ( proceedingJoinPoint ) ;


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

 <nb> public final class Failures
 type = ( ( Failure ) failure ) . getType ( ) ;
 }
 else {
 - type = failure . getClass ( ) . getCanonicalName ( ) ;
 + Class < ? > clazz = failure . getClass ( ) ;
 + type = firstNonNull ( clazz . getCanonicalName ( ) , clazz . getName ( ) ) ;
 }

 return new ExecutionFailureInfo ( type ,

Fix handling of failure class without canonical name


<nb> public class JSSESocketFactory
 } else {
 sessionCacheSize = defaultSessionCacheSize ;
 }
 - int sessionCacheTimeout ;
 + int sessionTimeout ;
 if ( attributes . get (
 AbstractEndpoint . SSL_ATTR_SESSION_TIMEOUT ) != null ) {
 - sessionCacheTimeout = Integer . parseInt (
 + sessionTimeout = Integer . parseInt (
 ( String ) attributes . get (
 AbstractEndpoint . SSL_ATTR_SESSION_TIMEOUT ) ) ;
 } else {
 - sessionCacheTimeout = defaultSessionTimeout ;
 + sessionTimeout = defaultSessionTimeout ;
 }
 SSLSessionContext sessionContext =
 context . getServerSessionContext ( ) ;
 if ( sessionContext != null ) {
 sessionContext . setSessionCacheSize ( sessionCacheSize ) ;
 - sessionContext . setSessionTimeout ( sessionCacheTimeout ) ;
 + sessionContext . setSessionTimeout ( sessionTimeout ) ;
 }

 SINGLE


<nb>
 - package NAMESPACE ;
 -
 import NAMESPACE ;

 import NAMESPACE ;


<nb> public class Driver
 SINGLE
 try {
 for ( Operator operator : operators ) {
 - if ( operator instanceof AutoCloseable ) {
 try {
 - ( ( AutoCloseable ) operator ) . close ( ) ;
 + operator . close ( ) ;
 }
 catch ( InterruptedException t ) {
 SINGLE
 <nb> public class Driver
 operator . getOperatorContext ( ) . getOperatorId ( ) ,
 driverContext . getTaskId ( ) ) ;
 }
 - }
 }
 driverContext . finished ( ) ;
 }
 <nb> import NAMESPACE ;
 import NAMESPACE ;

 public interface Operator
 + extends AutoCloseable
 {
 ListenableFuture < ? > NOT_BLOCKED = Futures . immediateFuture ( null ) ;

 <nb> public interface Operator
 COMMENT
 COMMENT
 Page getOutput ( ) ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + @ override
 + default void close ( )
 + throws Exception
 + {
 + }
 }


<nb> public class MultipleParentClassLoader extends ClassLoader {
 classLoaders . add ( type . getClassLoader ( ) ) ;
 }
 return append ( classLoaders ) ;
 -
 }

 COMMENT

Removed an accidental line break to retain the standard code formatting


<nb> import NAMESPACE ;

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

 <nb> public class ThreadMonitorTest
 {
 public final static int DURATION = NUMBER0 ;

 + @ ignore
 @ test
 public void monitorTest ( ) throws Exception
 {


<nb> public class ReaderCharacterSource implements CharacterSource {
 try {
 ensureBuffer ( ) ;

 + foundEscape = false ;
 if ( readBuf [ index ] == STRING0 ) {
 index ++ ;
 return EMPTY_CHARS ;
 }

 int start = index ;
 - foundEscape = false ;

 char [ ] results = null ;
 boolean foundEnd = false ;

Set found escape when parsing empty strings


<nb> public final class MediaType {
 createConstant ( APPLICATION_TYPE , STRING0 ) ;
 public static final MediaType PDF = createConstant ( APPLICATION_TYPE , STRING1 ) ;
 public static final MediaType POSTSCRIPT = createConstant ( APPLICATION_TYPE , STRING2 ) ;
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final MediaType PROTOBUF = createConstant ( APPLICATION_TYPE , STRING3 ) ;
 public static final MediaType RDF_XML_UTF_8 = createConstantUtf8 ( APPLICATION_TYPE , STRING4 ) ;
 public static final MediaType RTF_UTF_8 = createConstantUtf8 ( APPLICATION_TYPE , STRING5 ) ;
 public static final MediaType SHOCKWAVE_FLASH = createConstant ( APPLICATION_TYPE ,
 <nb> public final class MediaType {
 . put ( OPENDOCUMENT_TEXT , OPENDOCUMENT_TEXT )
 . put ( PDF , PDF )
 . put ( POSTSCRIPT , POSTSCRIPT )
 + . put ( PROTOBUF , PROTOBUF )
 . put ( RDF_XML_UTF_8 , RDF_XML_UTF_8 )
 . put ( RTF_UTF_8 , RTF_UTF_8 )
 . put ( SHOCKWAVE_FLASH , SHOCKWAVE_FLASH )


<nb> public abstract class XmlElementStorage implements StateStorage , Disposable {
 private static final Logger LOG = Logger . getInstance ( STRING0 ) ;

 @ nonnls private static final String ATTR_NAME = STRING1 ;
 + public static final String VERSION_FILE_SUFFIX = STRING2 ;

 protected TrackingPathMacroSubstitutor myPathMacroSubstitutor ;
 @ notnull private final String myRootElementName ;
 <nb> public abstract class XmlElementStorage implements StateStorage , Disposable {
 StorageUtil . sendContent ( myStreamProvider , myFileSpec , copy , roamingType , true ) ;
 Document versionDoc = createVersionDocument ( copy ) ;
 if ( ! versionDoc . getRootElement ( ) . getChildren ( ) . isEmpty ( ) ) {
 - StorageUtil . sendContent ( myStreamProvider , myFileSpec + STRING2 , versionDoc , roamingType , true ) ;
 + StorageUtil . sendContent ( myStreamProvider , myFileSpec + VERSION_FILE_SUFFIX , versionDoc , roamingType , true ) ;
 }
 }
 }


<nb> public class JBOptionButton extends JButton implements MouseMotionListener {
 @ override
 protected void paintChildren ( Graphics g ) {
 super . paintChildren ( g ) ;
 - AllIcons . General . ArrowDown . paintIcon ( this , g , myMoreRec . x , myMoreRec . y ) ;
 -
 + boolean dark = UIUtil . isUnderDarcula ( ) ;
 + int off = dark ? NUMBER0 : NUMBER1 ;
 + AllIcons . General . ArrowDown . paintIcon ( this , g , myMoreRec . x - off , myMoreRec . y ) ;
 + if ( dark ) return ;
 int y1 = myMoreRec . y - NUMBER2 ;
 int y2 = myMoreRec . y + myMoreRec . height + NUMBER2 ;

dop out Commit button has misplaces arrow icon


<nb> public class ConvertViolationsToIssues implements DatabaseMigration {

 private static class ViolationHandler extends AbstractListHandler < Map < String , Object > > {
 - private static final String SQL ;
 + static final String SQL ;
 static {
 StringBuilder sb = new StringBuilder ( STRING0 +
 STRING1 +

Fix quality flaw in ConvertViolationsToIssues


<nb> public class DefaultRecordStore implements RecordStore {
 final List < Object > chunk = batchChunks . poll ( ) ;
 final List < Data > keyValueSequence = loadAndGet ( chunk ) ;
 if ( keyValueSequence . isEmpty ( ) ) {
 + if ( finishedBatchCounter . decrementAndGet ( ) == NUMBER0 ) {
 + loaded . set ( true ) ;
 + }
 continue ;
 }
 sendOperation ( keyValueSequence , finishedBatchCounter ) ;
 <nb> public class DefaultRecordStore implements RecordStore {
 }

 private List < Data > loadAndGet ( List < Object > keys ) {
 - Map < Object , Object > entries = mapContainer . getStore ( ) . loadAll ( keys ) ;
 + Map < Object , Object > entries = Collections . emptyMap ( ) ;
 + try {
 + entries = mapContainer . getStore ( ) . loadAll ( keys ) ;
 + } catch ( Throwable t ) {
 + logger . warning ( STRING0 , t ) ;
 + }
 return getKeyValueSequence ( entries ) ;
 }


<nb> public class NewChunk extends Chunk {
 return new CBSChunk ( cbuf , cbuf [ NUMBER0 ] , cbuf [ NUMBER1 ] ) ;
 }

 - SINGLE
 final boolean fpoint = xmin < NUMBER0 || min < Long . MIN_VALUE || max > Long . MAX_VALUE ;
 +
 + COMMENT
 + SINGLE
 SINGLE
 if ( ! fpoint && ( _nzCnt + _naCnt ) * NUMBER2 < _len2 && _len2 < NUMBER3 && SINGLE
 lemin > Short . MIN_VALUE && lemax <= Short . MAX_VALUE ) SINGLE
 if ( _len2 == _len ) return new CX2Chunk ( _ls , _xs , _len2 , _nzCnt , _naCnt ) ; SINGLE
 else return new CX2Chunk ( _ls , _xs , _len2 , _len ) ;
 + COMMENT

 SINGLE
 SINGLE

Comment out CX2Chunk temporarily since it triggers unimplemented failures


<nb> public class Notification implements Parcelable
 extras . putBoolean ( EXTRA_PROGRESS_INDETERMINATE , mProgressIndeterminate ) ;
 extras . putBoolean ( EXTRA_SHOW_CHRONOMETER , mUseChronometer ) ;
 extras . putBoolean ( EXTRA_SHOW_WHEN , mShowWhen ) ;
 + if ( mLargeIcon != null ) {
 + extras . putParcelable ( EXTRA_LARGE_ICON , mLargeIcon ) ;
 + }
 }

 COMMENT


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

 <nb> public class TridentKafkaWordCount {
 cluster . killTopology ( STRING0 ) ;
 cluster . shutdown ( ) ;
 }
 - }
 + }


<nb> public COMMENT class AutoBuffer {
 int oldpos = _bb . position ( ) ;
 _bb = ByteBuffer . wrap ( MemoryManager . arrayCopyOfRange ( ary , NUMBER0 , newLen ) , oldpos , newLen - oldpos )
 . order ( ByteOrder . nativeOrder ( ) ) ;
 - } else {
 + } else if ( _bb . capacity ( ) != BBP_BIG . _size ) { SINGLE
 int oldPos = _bb . position ( ) ;
 _bb . flip ( ) ;
 _bb = BBP_BIG . make ( ) . put ( _bb ) ;

Fixes a bug that allowed big buffers to be constantly reallocated when it wasn t needed


<nb> public class MavenExternalParameters {
 encodeCoreAndRunnerSettings ( coreSettings , runnerSettings , list ) ;

 if ( runnerSettings . isSkipTests ( ) ) {
 - addProperty ( list , STRING0 , STRING1 ) ;
 + addProperty ( list , STRING2 , STRING1 ) ;
 }

 for ( Map . Entry < String , String > entry : runnerSettings . getMavenProperties ( ) . entrySet ( ) ) {

use skipTests instead of maven test skip option


<nb> public class Constants {

 SINGLE
 SINGLE
 - public static final String VERSION = STRING0 ;
 + public static final String VERSION = STRING1 ;

 SINGLE
 SINGLE
 - public static final String VERSION_DATE = STRING2 ;
 + public static final String VERSION_DATE = STRING3 ;

 SINGLE
 SINGLE

Change build identifiers for next release


<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 COMMENT
 - public static String minus ( String left , Object value ) {
 + public static String minus ( String self , Object value ) {
 String text = RegexUtils . quote ( toString ( value ) ) ;
 - return left . replaceFirst ( text , STRING0 ) ;
 + return self . replaceFirst ( text , STRING0 ) ;
 }

 COMMENT


<nb> public class GpodnetAuthenticationActivity extends ActionBarActivity {
 @ override
 public void onClick ( View v ) {
 final int position = spinnerDevices . getSelectedItemPosition ( ) ;
 - selectedDevice = devices . get ( ) . get ( position ) ;
 - advance ( ) ;
 + if ( position != AdapterView . INVALID_POSITION ) {
 + selectedDevice = devices . get ( ) . get ( position ) ;
 + advance ( ) ;
 + }
 }
 } ) ;
 }

Fixed NullpointerException in GpodnetAuthenticationActivity


<nb> public class MongoConfigUtil {
 }
 }

 - public static BasicDBObject getDBObject ( Configuration conf , String key ) {
 + public static DBObject getDBObject ( Configuration conf , String key ) {
 try {
 final String json = conf . get ( key ) ;
 final BasicDBObject obj = ( BasicDBObject ) JSON . parse ( json ) ;

don t expose implementation of dbobject in config util


<nb> public abstract class AbstractTestQueries
 {
 assertQuery (
 STRING0 +
 - STRING1 +
 - STRING2 ) ;
 + STRING3 +
 + STRING4 +
 + STRING5 ) ;

 assertQuery (
 STRING0 +
 - STRING6 +
 - STRING7 ,
 + STRING8 +
 + STRING9 +
 + STRING5 ,
 STRING10 +
 STRING11 +
 - STRING6 +
 - STRING12 +
 + STRING8 +
 + STRING4 +
 + STRING13 +
 STRING14 +
 STRING15 +
 - STRING6 +
 - STRING16 +
 + STRING8 +
 + STRING17 +
 + STRING13 +
 STRING18 ) ;
 }


<nb>
 COMMENT

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 package NAMESPACE ;


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

 + import NAMESPACE ;
 import NAMESPACE ;

 @ jsonautodetect
 <nb> public class IOState < T extends Stoppable > {

 IOState that = ( IOState ) o ;

 - if ( ! stoppable . equals ( that . stoppable ) ) return false ;
 -
 - return true ;
 + return Objects . equals ( this . stoppable , that . stoppable ) ;
 }

 @ override
 public int hashCode ( ) {
 - int result = stoppable . hashCode ( ) ;
 - result = NUMBER0 * result + stoppable . hashCode ( ) ;
 - return result ;
 + return Objects . hash ( this . stoppable ) ;
 }
 }

Fix NPE in IOState hashCode and IOState equals


<nb> public class AbstractTreeBuilder implements Disposable {

 protected void runBackgroundLoading ( @ notnull final Runnable runnable ) {
 if ( isDisposed ( ) ) return ;
 -
 - final Application app = ApplicationManager . getApplication ( ) ;
 - if ( app != null ) {
 - app . runReadAction ( new Runnable ( ) {
 - @ override
 - public void run ( ) {
 - runnable . run ( ) ;
 - }
 - } ) ;
 - }
 - else {
 - runnable . run ( ) ;
 - }
 + runnable . run ( ) ;
 }

 protected void updateAfterLoadedInBackground ( @ notnull Runnable runnable ) {


<nb> public final class Aeron implements AutoCloseable
 }

 COMMENT
 + COMMENT
 + COMMENT
 + @ override
 + public Context aeronDirectoryName ( String dirName )
 + {
 + super . aeronDirectoryName ( dirName ) ;
 + return this ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 public void close ( )
 <nb> public final class MediaDriver implements AutoCloseable
 return this ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + @ override
 + public Context aeronDirectoryName ( String dirName )
 + {
 + super . aeronDirectoryName ( dirName ) ;
 + return this ;
 + }
 +
 public EpochClock epochClock ( )
 {
 return epochClock ;

Override CommonContext aeronDirectoryName in order to use covarient return types


<nb> public class MapDestroyTest extends HazelcastTestSupport {
 public void setUp ( ) {
 TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory ( NUMBER0 ) ;
 Config config = getConfig ( ) ;
 +
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + config . setProperty ( GroupProperty . PARTITION_MAX_PARALLEL_REPLICATIONS , String . valueOf ( Integer . MAX_VALUE ) ) ;
 instance1 = factory . newHazelcastInstance ( config ) ;
 instance2 = factory . newHazelcastInstance ( config ) ;
 }

Use unlimited parallel replications for MapDestroyTest


<nb> public class ZWaveProductDatabase {
 }

 public List < ZWaveDbProduct > GetProducts ( ) {
 - if ( selManufacturer == null )
 - return null ;
 + if ( selManufacturer == null ) {
 + return Collections . emptyList ( ) ;
 + }

 return selManufacturer . Product ;
 }
 <nb> public class ZWaveProductDatabase {
 COMMENT
 COMMENT
 public boolean FindManufacturer ( int manufacturerId ) {
 - if ( database == null )
 + if ( database == null ) {
 return false ;
 + }

 selManufacturer = null ;
 selProduct = null ;

Fix return from products list to avoid null return


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class IndexRotationThread extends Periodical {
 LOG . warn ( msg ) ;
 activityWriter . write ( new Activity ( msg , IndexRotationThread . class ) ) ;

 - deflector . pointTo ( shouldBeTarget , currentTarget ) ;
 + if ( ClusterHealthStatus . RED == indices . waitForRecovery ( shouldBeTarget ) ) {
 + LOG . error ( STRING0 ) ;
 + } else {
 + deflector . pointTo ( shouldBeTarget , currentTarget ) ;
 + }
 }
 } catch ( NoTargetIndexException e ) {
 LOG . warn ( STRING1 ) ;

Skip deflector update if new target index isn t healthy


<nb> import NAMESPACE ;
 public class ContactProtocolButton extends SIPCommButton {

 private Contact protocolContact ;
 -
 +
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - public ContactProtocolButton ( Image bgImage , Image rolloverImage ) {
 - super ( bgImage , rolloverImage ) ;
 + public ContactProtocolButton ( Image bgImage ) {
 + super ( bgImage , bgImage ) ;
 }

 COMMENT


<nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL

 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Improve WebAppContext classloading javadoc


<nb> public class EmbeddedThroughput
 STRING0 ,
 NUMBER_OF_MESSAGES , MESSAGE_LENGTH , CHANNEL , STREAM_ID ) ;

 + long backPressureCount = NUMBER0 ;
 +
 for ( long i = NUMBER0 ; i < NUMBER_OF_MESSAGES ; i ++ )
 {
 ATOMIC_BUFFER . putLong ( NUMBER0 , i ) ;

 while ( ! publication . offer ( ATOMIC_BUFFER , NUMBER0 , ATOMIC_BUFFER . capacity ( ) ) )
 {
 + backPressureCount ++ ;
 OFFER_IDLE_STRATEGY . idle ( NUMBER0 ) ;
 }
 }

 - System . out . println ( STRING1 ) ;
 + System . out . println ( STRING2 + ( ( double ) backPressureCount / NUMBER_OF_MESSAGES ) ) ;

 if ( NUMBER0 < LINGER_TIMEOUT_MS )
 {

Print the back pressure ratio to see what ratio of appends are back pressured


<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static < K , V > Map < K , V > subMap ( Map < K , V > map , K [ ] keys ) {
 + Map < K , V > answer = new LinkedHashMap < K , V > ( keys . length ) ;
 + for ( K key : keys ) {
 + answer . put ( key , map . get ( key ) ) ;
 + }
 + return answer ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

add DGM variant for Map subMap supporting an array of keys


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

 - import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class IdeBorderFactory {
 return new IdeaTitledBorder ( title ) ;
 }

 + @ deprecated
 + SINGLE
 + public static TitledBorder createTitledHeaderBorder ( String title ) {
 + return new IdeaTitledBorder ( title ) ;
 + }
 +
 private static Color getBorderColor ( ) {
 return UIUtil . getBorderColor ( ) ;
 }
 - }
 + }


<nb> public class GrMethodDefinitionImpl extends GroovyPsiElementImpl implements GrMe
 PsiClassType [ ] superClassTypes = psiClass . getSuperTypes ( ) ;

 for ( PsiClassType superClassType : superClassTypes ) {
 - assert superClassType instanceof GrInterfaceDefinition ;
 -
 PsiClass resolvedSuperClass = superClassType . resolve ( ) ;

 + assert resolvedSuperClass instanceof GrInterfaceDefinition ;
 +
 if ( resolvedSuperClass == null ) continue ;
 PsiMethod [ ] superClassMethods = resolvedSuperClass . getMethods ( ) ;


<nb> public class GeocodingUtilities {
 public boolean isCancelled ( ) {
 return result != null && result . isCancelled ( ) ;
 }
 - } , mainWord , StringMatcherMode . CHECK_EQUALS_FROM_SPACE ) ; SINGLE
 + } , mainWord , StringMatcherMode . CHECK_EQUALS_FROM_SPACE ) ;
 + req . setBBoxRadius ( road . getLocation ( ) . getLatitude ( ) , road . getLocation ( ) . getLongitude ( ) , NUMBER0 ) ;
 reader . searchAddressDataByName ( req ) ;
 }


<nb> class MailSubsystemParser implements XMLStreamConstants , XMLElementReader < List < M
 COMMENT
 for ( Property mailSession : sessions ) {
 String jndi = mailSession . getName ( ) ;
 - log . info ( STRING0 + jndi ) ;
 + log . debug ( STRING0 + jndi ) ;
 ModelNode sessionData = mailSession . getValue ( ) ;
 writer . writeStartElement ( Element . MAIL_SESSION . getLocalName ( ) ) ;

 <nb> class MailSubsystemParser implements XMLStreamConstants , XMLElementReader < List < M

 private MailSessionConfig parseMailSession ( final XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException {
 - log . info ( STRING1 ) ;
 + log . debug ( STRING1 ) ;
 MailSessionConfig cfg = new MailSessionConfig ( ) ;

 for ( int i = NUMBER0 ; i < reader . getAttributeCount ( ) ; i ++ ) {


<nb> public @ interface BugPattern {
 COMMENT
 public @ interface NoCustomSuppression { }

 -
 - SINGLE
 public class Instance {
 public String name ;
 public String summary ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ContextConfig implements LifecycleListener {

 try {
 source = new InputSource ( contextXml . toString ( ) ) ;
 - stream = contextXml . openStream ( ) ;
 + URLConnection xmlConn = contextXml . openConnection ( ) ;
 + xmlConn . setUseCaches ( false ) ;
 + stream = xmlConn . getInputStream ( ) ;
 } catch ( Exception e ) {
 log . error ( sm . getString ( STRING0 ,
 contextXml ) , e ) ;

Prevent possible WAR file locking when reading context xml from WAR


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 +
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CalculateDenseNodePrepareStep extends ProcessorStep < Batch < InputRela
 {
 if ( cursors [ i ] > NUMBER0 )
 {
 - sender . send ( inProgressBatches [ i ] ) ;
 + sender . send ( cursors [ i ] == batchSize
 + ? inProgressBatches [ i ]
 + : Arrays . copyOf ( inProgressBatches [ i ] , cursors [ i ] ) ) ;
 }
 }
 }

Fixed a counting issues for trailing batches


<nb> 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 TestMultimapAggAggregation
 Signature signature = new Signature ( NAME , AGGREGATE , mapType . getTypeSignature ( ) , keyType . getTypeSignature ( ) , valueType . getTypeSignature ( ) ) ;
 InternalAggregationFunction aggFunc = metadata . getFunctionRegistry ( ) . getAggregateFunctionImplementation ( signature ) ;

 - Map < K , List < V > > map = Maps . newHashMap ( ) ;
 + Map < K , List < V > > map = new HashMap < > ( ) ;
 for ( int i = NUMBER0 ; i < expectedKeys . size ( ) ; i ++ ) {
 if ( ! map . containsKey ( expectedKeys . get ( i ) ) ) {
 map . put ( expectedKeys . get ( i ) , new ArrayList < > ( ) ) ;

Replace Maps newHashMap with new HashMap


<nb> public class RealmAdapterTest extends AndroidTestCase {
 RealmAdapter realmAdapter = new RealmAdapter ( getContext ( ) , resultList , automaticUpdate ) ;

 testRealm . beginTransaction ( ) ;
 - try {
 - realmAdapter . getRealmResults ( ) . remove ( NUMBER0 ) ;
 - fail ( STRING0 ) ;
 - } catch ( RealmException ignore ) {
 - } finally {
 - testRealm . cancelTransaction ( ) ;
 - }
 + realmAdapter . getRealmResults ( ) . remove ( NUMBER0 ) ;
 + testRealm . commitTransaction ( ) ;
 + assertEquals ( TEST_DATA_SIZE - NUMBER1 , realmAdapter . getCount ( ) ) ;
 +
 + resultList = testRealm . where ( AllTypes . class ) . equalTo ( FIELD_STRING , STRING1 ) . findAll ( ) ;
 + assertEquals ( NUMBER0 , resultList . size ( ) ) ;
 }

 public void testSortWithAdapter ( ) {


<nb> public class AccountActivity extends Activity {
 settings . setTlsCertVerify ( true ) ;
 settings . setAllowPlainAuth ( false ) ;

 - } else if ( domain . equals ( STRING0 ) ) {
 - settings . setDoDnsSrv ( true ) ;
 - settings . setDomain ( domain ) ;
 + } else if ( domain . equals ( STRING1 ) ) {
 + settings . setDoDnsSrv ( false ) ;
 + settings . setDomain ( STRING0 ) ;
 settings . setPort ( DEFAULT_PORT ) ;
 - settings . setServer ( domain ) ;
 + settings . setServer ( STRING0 ) ;
 settings . setRequireTls ( false ) ;
 settings . setTlsCertVerify ( false ) ;
 settings . setAllowPlainAuth ( false ) ;

added new changes for support facebook accounts


<nb> import NAMESPACE ;

 import NAMESPACE ;

 - public class SQLiteGeneralTest extends AndroidTestCase {
 + public class SQLiteStatementTest extends AndroidTestCase {

 private SQLiteDatabase mDatabase ;
 private File mDatabaseFile ;


<nb> public class InnerHitsIT extends ESIntegTestCase {
 }

 @ test
 + @ awaitsfix ( bugUrl = STRING0 )
 + SINGLE
 public void testNestedInnerHitsWithStoredFieldsAndNoSourceBackcompat ( ) throws Exception {
 assertAcked ( prepareCreate ( STRING1 )
 . setSettings ( IndexMetaData . SETTING_VERSION_CREATED , Version . V_1_4_2 . id )
 <nb> public class InnerHitsIT extends ESIntegTestCase {
 }

 @ test
 + @ awaitsfix ( bugUrl = STRING0 )
 + SINGLE
 public void testNestedInnerHitsWithExcludeSourceBackcompat ( ) throws Exception {
 assertAcked ( prepareCreate ( STRING1 ) . setSettings ( IndexMetaData . SETTING_VERSION_CREATED , Version . V_1_4_2 . id )
 . addMapping ( STRING2 , jsonBuilder ( ) . startObject ( )
 <nb> public class InnerHitsIT extends ESIntegTestCase {
 }

 @ test
 + @ awaitsfix ( bugUrl = STRING0 )
 + SINGLE
 public void testNestedInnerHitsHiglightWithExcludeSourceBackcompat ( ) throws Exception {
 assertAcked ( prepareCreate ( STRING1 ) . setSettings ( IndexMetaData . SETTING_VERSION_CREATED , Version . V_1_4_2 . id )
 . addMapping ( STRING2 , jsonBuilder ( ) . startObject ( )


<nb> public class SummaryPage2 extends Request2 {
 names [ i ] = source . _names [ cols [ i ] ] ;
 }
 Frame fr = new Frame ( names , vecs ) ;
 +
 + Futures fs = new Futures ( ) ;
 + for ( Vec vec : vecs ) vec . rollupStats ( fs ) ;
 + fs . blockForPending ( ) ;
 +
 summaries = new Summary2 . SummaryTask2 ( ) . doAll ( fr ) . _summaries ;
 if ( summaries != null )
 for ( int i = NUMBER0 ; i < cols . length ; i ++ )

do basic stats rollup upfront in Summary2 to avoid stalling on nest mapreduce jobs


<nb> public abstract class BaseStructureConfigurable extends MasterDetailsComponent i

 protected class MyRemoveAction extends MyDeleteAction {
 public MyRemoveAction ( ) {
 + SINGLE
 super ( new Condition < Object [ ] > ( ) {
 @ override
 public boolean value ( final Object [ ] objects ) {


<nb> package NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ jsonignoreproperties ( ignoreUnknown = true )
 public class Deployment extends Descriptor {

 public static final String EMTPY_DEPLOYER_USER = null ;
 <nb> public class Deployment extends Descriptor {
 private final JobId jobId ;
 private final Goal goal ;
 private final String deployerUser ;
 +
 + @ jsoninclude ( JsonInclude . Include . NON_NULL )
 private final String deployerMaster ;
 +
 + @ jsoninclude ( JsonInclude . Include . NON_NULL )
 private final String deploymentGroupName ;

 COMMENT

Only include new Deployment fields if non null


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 -
 public class ConditionalRunRule implements TestRule {

 @ override

Added some helpful comments to ConditionalRunRule


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

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

 import NAMESPACE ;

Committed Sylvain s test case for OLockManager class


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ArgWriter implements ArgCollector {
 if ( args . isEmpty ( ) ) {
 return args ;
 }
 - GFileUtils . mkdirs ( argsFile . getParentFile ( ) ) ;
 + argsFile . getParentFile ( ) . mkdirs ( ) ;
 try {
 PrintWriter writer = new PrintWriter ( argsFile ) ;
 try {

Removed usage of GFileUtils pending move to baseServices project


<nb> public class PulseAudioSystem
 PA . context_connect (
 context ,
 null ,
 - PA . CONTEXT_NOFAIL ,
 + PA . CONTEXT_NOFLAGS ,
 NUMBER0 ) ;

 try

Fixes an application freeze when PulseAudio is disabled


<nb> public class ImageWallpaper extends WallpaperService {

 glDrawArrays ( GL_TRIANGLE_STRIP , NUMBER0 , NUMBER1 ) ;

 - if ( ! mEgl . eglSwapBuffers ( mEglDisplay , mEglSurface ) ) {
 - throw new RuntimeException ( STRING0 ) ;
 - }
 + boolean status = mEgl . eglSwapBuffers ( mEglDisplay , mEglSurface ) ;
 checkEglError ( ) ;

 finishGL ( ) ;

 - return true ;
 + return status ;
 }

 private FloatBuffer createMesh ( int left , int top , float right , float bottom ) {


<nb> public class StartupService {
 SINGLE
 ContextManager . setContext ( context ) ;

 - Crittercism . init ( context . getApplicationContext ( ) , Constants . CRITTERCISM_APP_ID ,
 - Constants . CRITTERCISM_OATH_KEY , Constants . CRITTERCISM_SECRET , StatisticsService . dontCollectStatistics ( ) ) ;
 + if ( ! StatisticsService . dontCollectStatistics ( ) )
 + Crittercism . init ( context . getApplicationContext ( ) , Constants . CRITTERCISM_APP_ID ,
 + Constants . CRITTERCISM_OATH_KEY , Constants . CRITTERCISM_SECRET ) ;

 database . openForWriting ( ) ;

Don t start the crittercism service ever


<nb> public class BaseKeyboard implements

 public void destroy ( ) {
 - showing = false ;
 - SINGLE
 - if ( emojiKeyboardView != null ) {
 - SINGLE
 - emojiKeyboardView = null ;
 - }
 + dismiss ( true ) ;
 +
 if ( keyboardStatusListener != null ) {
 keyboardStatusListener . onDismiss ( ) ;
 }


<nb> public class MimeUtility {
 COMMENT
 COMMENT
 public static final String [ ] [ ] MIME_TYPE_BY_EXTENSION_MAP = new String [ ] [ ] {
 - { STRING0 , STRING1 } ,
 + SINGLE
 + { STRING0 , DEFAULT_ATTACHMENT_MIME_TYPE } ,
 + { STRING2 , K9_SETTINGS_MIME_TYPE } ,
 + SINGLE
 { STRING3 , STRING4 } ,
 { STRING5 , STRING6 } ,
 { STRING7 , STRING8 } ,
 <nb> public class MimeUtility {
 { STRING9 , STRING10 } ,
 { STRING11 , STRING12 } ,
 { STRING13 , STRING14 } ,
 - { STRING2 , K9_SETTINGS_MIME_TYPE } ,
 { STRING15 , STRING16 } ,
 { STRING17 , STRING18 } ,
 { STRING19 , STRING20 } ,

Discourage accidental deletion of essential mime types


<nb> public class ProxyParser {

 if ( type . equals ( STRING0 ) ) {
 Node value = deJson ( map . get ( STRING1 ) ) ;
 - Name attr ;
 - if ( map . containsKey ( STRING2 ) ) {
 - attr = ( Name ) deJson ( map . get ( STRING2 ) ) ;
 - } else {
 + Name attr = ( Name ) deJson ( map . get ( STRING2 ) ) ;
 + if ( attr == null ) {
 attr = new Name ( ( String ) map . get ( STRING3 ) ) ;
 }
 return new Attribute ( value , attr , start , end ) ;


<nb> public class ApkMojo extends AbstractAndroidMojo
 continue ;
 }
 }
 -
 - zos . putNextEntry ( new ZipEntry ( zn ) ) ;
 + final ZipEntry ne ;
 + if ( ze . getMethod ( ) == ZipEntry . STORED )
 + {
 + ne = new ZipEntry ( ze ) ;
 + }
 + else
 + {
 + ne = new ZipEntry ( zn ) ;
 + }
 +
 + zos . putNextEntry ( ne ) ;

 InputStream is = zin . getInputStream ( ze ) ;

By default Android tooling does not compress certain assets and just puts them in as STORED


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

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ config ( emulateSdk = NUMBER0 )
 @ runwith ( RobolectricTestRunner . class )
 public class DebugLoggerTest {


<nb> public class Solo {
 }

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

 <nb> class ViewFetcher {
 }

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

Clarified javadoc for getImageButton in Solo and ViewFetcher


<nb> public class PythonSdkType extends SdkType {
 }

 public static LanguageLevel getLanguageLevelForSdk ( @ nullable Sdk sdk ) {
 - if ( sdk != null ) {
 + if ( sdk != null && sdk . getSdkType ( ) instanceof PythonSdkType ) {
 final PythonSdkFlavor flavor = PythonSdkFlavor . getFlavor ( sdk ) ;
 if ( flavor != null ) {
 return flavor . getLanguageLevel ( sdk ) ;

checking SDK flavor only makes sense for Python SDK type


<nb> import NAMESPACE ;
 public class TestSparkClient {

 SINGLE
 - private static final long TIMEOUT = NUMBER0 ;
 + private static final long TIMEOUT = NUMBER1 ;

 private Map < String , String > createConf ( boolean local ) {
 Map < String , String > conf = new HashMap < String , String > ( ) ;

TestSparkClient throws Timeoutexception Szehon reviewed by Brock


<nb> public class OQueryOperatorEquals extends OQueryOperatorEqualityNotNulls {
 }

 public static boolean equals ( final Object iLeft , final Object iRight ) {
 + if ( iLeft == null || iRight == null )
 + return false ;
 +
 if ( iLeft instanceof ORecord < ? > ) {
 SINGLE
 return comparesValues ( iRight , ( ORecord < ? > ) iLeft ) ;

fixed bug on equals operator against null left right


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

 <nb> public class ProviderTest {
 assertEquals ( STRING0 , sun . toString ( ) ) ;
 }

 + @ test
 + public void testProviderLookup ( ) {
 + PetiteContainer pc = new PetiteContainer ( ) ;
 +
 + pc . registerBean ( Solar3 . class ) ;
 +
 + Planet earth = ( Planet ) pc . getBean ( STRING1 ) ;
 +
 + assertEquals ( STRING2 , earth . toString ( ) ) ;
 + }
 +
 }


<nb> public class BatchProcessor {
 private TraverseModeSet modes = new TraverseModeSet ( STRING0 ) ;
 private String outputPath ;

 - static void main ( String [ ] args ) throws IOException {
 + public static void main ( String [ ] args ) throws IOException {

 GenericApplicationContext ctx = new GenericApplicationContext ( ) ;
 XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader ( ctx ) ;


<nb> public class PipRecentsOverlayManager {
 COMMENT
 public void requestFocus ( boolean allowRecentsFocusable ) {
 mRecentsView . setVisibility ( allowRecentsFocusable ? View . VISIBLE : View . GONE ) ;
 - if ( ! mIsRecentsShown || mIsPipFocusedInRecent ) {
 + if ( ! mIsPipRecentsOverlayShown || ! mIsRecentsShown || mIsPipFocusedInRecent ) {
 return ;
 }
 mIsPipFocusedInRecent = true ;
 <nb> public class PipRecentsOverlayManager {
 COMMENT
 COMMENT
 public void clearFocus ( ) {
 - if ( ! mIsRecentsShown || ! mIsPipFocusedInRecent ) {
 + if ( ! mIsPipRecentsOverlayShown || ! mIsRecentsShown || ! mIsPipFocusedInRecent ) {
 return ;
 }
 if ( ! mRecentsView . hasFocus ( ) ) {


<nb> public final class OperatorDebounceWithTime < T > implements Operator < T , T > {
 emitting = true ;
 }

 - if ( localHasValue ) {
 + if ( localHasValue ) {
 try {
 onNextAndComplete . onNext ( localValue ) ;
 } catch ( Throwable e ) {
 <nb> public class TestSubscriber < T > extends Subscriber < T > {

 @ override
 public void onStart ( ) {
 - if ( initialRequest >= NUMBER0 ) {
 + if ( initialRequest >= NUMBER0 ) {
 requestMore ( initialRequest ) ;
 }
 }

Remove double whitespace in if conditions


<nb> import NAMESPACE ;
 COMMENT
 public class SimpleMapCache < ModelClass extends Model > extends ModelCache < ModelClass , Map < Object , ModelClass > > {

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public SimpleMapCache ( int capacity ) {
 super ( new HashMap < Object , ModelClass > ( capacity ) ) ;
 }


<nb> class ModelCombiner implements ManagedServerBootConfiguration {
 if ( ! binding . get ( DEFAULT_INTERFACE ) . isDefined ( ) ) {
 binding . get ( DEFAULT_INTERFACE ) . set ( defaultInterface ) ;
 }
 - SocketBindingAddHandler . getOperation ( pathAddress ( PathElement . pathElement ( SOCKET_BINDING_GROUP , SOCKET_BINDING_GROUP_NAME ) ,
 - PathElement . pathElement ( SOCKET_BINDING , name ) ) , binding ) ;
 + updates . add ( SocketBindingAddHandler . getOperation ( pathAddress ( PathElement . pathElement ( SOCKET_BINDING_GROUP , SOCKET_BINDING_GROUP_NAME ) ,
 + PathElement . pathElement ( SOCKET_BINDING , name ) ) , binding ) ) ;

 }


<nb> public class PreparedQueryNotFoundException extends RequestValidationException

 private static String makeMsg ( MD5Digest id )
 {
 - return String . format ( STRING0 +
 + return String . format ( STRING1 +
 STRING2 +
 - STRING3 ,
 + STRING4 ,
 id , QueryProcessor . MAX_CACHE_PREPARED , id ) ;
 }
 }