<nb> public class NewPostActivity extends BaseActivity {
 private static final String TAG = STRING0 ;
 private static final String REQUIRED = STRING1 ;

 + SINGLE
 private DatabaseReference mDatabase ;
 + SINGLE

 private EditText mTitleField ;
 private EditText mBodyField ;
 <nb> public class NewPostActivity extends BaseActivity {
 super . onCreate ( savedInstanceState ) ;
 setContentView ( R . layout . activity_new_post ) ;

 + SINGLE
 mDatabase = FirebaseDatabase . getInstance ( ) . getReference ( ) ;
 + SINGLE

 mTitleField = ( EditText ) findViewById ( R . id . field_title ) ;
 mBodyField = ( EditText ) findViewById ( R . id . field_body ) ;


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

 + import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 <nb> public final class ActivityThread {
 }
 }

 + private static class EventLoggingReporter implements EventLogger . Reporter {
 + @ override
 + public void report ( int code , Object . . . list ) {
 + EventLog . writeEvent ( code , list ) ;
 + }
 + }
 +
 public static void main ( String [ ] args ) {
 SamplingProfilerIntegration . start ( ) ;

 <nb> public final class ActivityThread {
 SINGLE
 CloseGuard . setEnabled ( false ) ;

 + SINGLE
 + EventLogger . setReporter ( new EventLoggingReporter ( ) ) ;
 +
 Security . addProvider ( new AndroidKeyStoreProvider ( ) ) ;

 Process . setArgV0 ( STRING0 ) ;

Push event logging down into libcore EventLogger


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

 + import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 <nb> final class SplashScreenImpl implements SplashScreenCore {

 @ override
 public void close ( ) {
 - SplashScreen splashScreen = SplashScreen . getSplashScreen ( ) ;
 + SwingUtilities . invokeLater ( new Runnable ( ) {

 - if ( splashScreen != null && splashScreen . isVisible ( ) ) {
 - splashScreen . close ( ) ;
 - }
 + @ override
 + public void run ( ) {
 + SplashScreen splashScreen = SplashScreen . getSplashScreen ( ) ;
 +
 + if ( splashScreen != null ) {
 + splashScreen . close ( ) ;
 + }
 + }
 + } ) ;
 }

 private void update ( SplashScreen splashScreen ) {

Fix SplashScreen race condition on close


<nb> public class DigestAuthTest extends AbstractBasicTest {
 root . addAppender ( new ConsoleAppender (
 new PatternLayout ( PatternLayout . TTCC_CONVERSION_PATTERN ) ) ) ;

 - port1 = NUMBER0 ;
 + port1 = findFreePort ( ) ;
 Connector listener = new SelectChannelConnector ( ) ;

 listener . setHost ( STRING0 ) ;


<nb> public class PrivacyManager {

 SINGLE
 mMethods . get ( cAccounts ) . add ( STRING0 ) ;
 - mMethods . get ( cAccounts ) . add ( STRING1 ) ;
 + mMethods . get ( cAccounts ) . add ( STRING2 ) ;

 SINGLE
 String [ ] addrs = new String [ ] { STRING3 , STRING4 , STRING5 } ;


<nb> public class LoggingEvents {
 public static final String EXTRA_N_BEST_CHOOSE_INDEX = STRING0 ; SINGLE

 public static final int TEXT_MODIFIED = NUMBER0 ;
 + public static final String EXTRA_TEXT_MODIFIED_LENGTH = STRING1 ; SINGLE
 + public static final String EXTRA_TEXT_MODIFIED_TYPE = STRING2 ; SINGLE
 + public static final int TEXT_MODIFIED_TYPE_CHOOSE_SUGGESTION = NUMBER1 ;
 + public static final int TEXT_MODIFIED_TYPE_TYPING_DELETION = NUMBER2 ;
 + public static final int TEXT_MODIFIED_TYPE_TYPING_INSERTION = NUMBER3 ;
 + public static final int TEXT_MODIFIED_TYPE_TYPING_INSERTION_PUNCTUATION = NUMBER4 ;

 public static final int INPUT_ENDED = NUMBER5 ;

Add new LoggingEvents for more detailed text modification actions for voice input


<nb> public final class Key extends Iced implements Comparable {
 @ override public final AutoBuffer write ( AutoBuffer bb ) { return bb . putA1 ( _kb ) ; }
 @ override public final AutoBuffer writeJSON ( AutoBuffer bb ) {
 String s = toString ( ) ;
 - try { s = URLEncoder . encode ( s , STRING0 ) ; }
 - catch ( UnsupportedEncodingException e ) { }
 return bb . putJSONStr ( s ) ;
 }


<nb> public class OperationSetBasicInstantMessagingJabberImpl
 COMMENT
 COMMENT
 COMMENT
 - private static synchronized String nextThreadID ( ) {
 + public static synchronized String nextThreadID ( ) {
 return prefix + Long . toString ( id ++ ) ;
 }

Changes the visibility modifier of the method that generates thread IDs for XMPP


<nb> public abstract class ImmutableSortedSet < E > extends ImmutableSortedSetFauxveride
 COMMENT
 public static < E > ImmutableSortedSet < E > copyOfSorted ( SortedSet < E > sortedSet ) {
 Comparator < ? super E > comparator = SortedIterables . comparator ( sortedSet ) ;
 - E [ ] elements = ( E [ ] ) sortedSet . toArray ( ) ;
 + Object [ ] elements = sortedSet . toArray ( ) ;
 if ( elements . length == NUMBER0 ) {
 return emptySet ( comparator ) ;
 } else {

Eliminate an unchecked cast from ImmutableSortedSet that previously generated unsuppressed warnings


<nb> public class MetaClass {
 COMMENT
 COMMENT
 private static String [ ] decodeArray ( String encoded ) {
 + if ( encoded . length ( ) == NUMBER0 ) return new String [ ] { } ;
 char [ ] chars = encoded . trim ( ) . toCharArray ( ) ;

 SINGLE
 <nb> public class MetaClassTest {
 assertArrayEquals ( new Integer [ ] { NUMBER1 , NUMBER2 , NUMBER3 } , ints4 ) ;
 Integer [ ] ints5 = MetaClass . cast ( STRING0 , Integer [ ] . class ) ;
 assertArrayEquals ( new Integer [ ] { NUMBER1 , NUMBER2 , NUMBER3 } , ints5 ) ;
 +
 + Integer [ ] intsEmpty = MetaClass . cast ( STRING1 , Integer [ ] . class ) ;
 + assertArrayEquals ( new Integer [ ] { } , intsEmpty ) ;
 }

 private static enum Fruits {


<nb> public class PyDebugProcess extends XDebugProcess implements IPyDebugProcess , Pr
 XBreakpoint < ? > breakpoint = null ;
 if ( threadInfo . isStopOnBreakpoint ( ) ) {
 final PySourcePosition position = frames . get ( NUMBER0 ) . getPosition ( ) ;
 -
 breakpoint = myRegisteredBreakpoints . get ( position ) ;
 if ( breakpoint == null ) {
 - System . out . println ( STRING0 + position . getFile ( ) + STRING1 + position . getLine ( ) ) ;
 - System . out . println ( STRING2 ) ;
 - for ( PySourcePosition s : myRegisteredBreakpoints . keySet ( ) ) {
 - System . out . println ( s . getFile ( ) + STRING1 + s . getLine ( ) ) ;
 - }
 -
 myDebugger . removeTempBreakpoint ( position . getFile ( ) , position . getLine ( ) ) ;
 }
 }


<nb> public class XsltRefactoringSupport implements ApplicationComponent {
 final ActionManagerEx amgr = ActionManagerEx . getInstanceEx ( ) ;

 final AnAction action = amgr . getAction ( actionName ) ;
 - newAction . setHookedAction ( action ) ;
 + if ( action != null ) {
 + newAction . setHookedAction ( action ) ;

 - if ( full ) {
 - fullInstall ( action , newAction , amgr ) ;
 - }
 + if ( full ) {
 + fullInstall ( action , newAction , amgr ) ;
 + }

 - amgr . unregisterAction ( actionName ) ;
 + amgr . unregisterAction ( actionName ) ;
 + }
 amgr . registerAction ( actionName , newAction ) ;
 myActions . put ( actionName , newAction ) ;
 }


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

 COMMENT
 public class ItemviewActivity extends SherlockActivity {
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;

 public class FeedItemlistFragment extends SherlockListFragment {
 @ override
 <nb>
 - package NAMESPACE ;
 + package NAMESPACE ;

 import NAMESPACE ;

Moved FeedItemMenuHandler into the right package


<nb> public class JavaGenerator implements CodeGenerator
 indent + STRING0 +
 indent + STRING1 +
 indent + STRING2 +
 - indent + STRING3 +
 indent + STRING4 +
 indent + STRING5 ,
 parentMessageClassName ,
 <nb> public class JavaGenerator implements CodeGenerator
 indent + STRING6 +
 indent + STRING7 +
 indent + STRING8 +
 - indent + STRING9 +
 + indent + STRING10 +
 indent + STRING11 +
 indent + STRING12 +
 indent + STRING13 ,
 <nb> public class JavaGenerator implements CodeGenerator
 indent + STRING14 +
 indent + STRING15 +
 indent + STRING16 +
 - indent + STRING17 +
 indent + STRING18 +
 indent + STRING19 +
 indent + STRING20 ,

Java Remove the need for blockLength field in group encoders


<nb> public class EcobeeBinding extends AbstractActiveBinding < EcobeeBindingProvider >
 logger . error ( status . getMessage ( ) ) ;
 }

 + logger . error ( STRING0 ) ;
 +
 return ; SINGLE
 }

 + logger . debug ( STRING1 , response . getRevisionList ( ) . size ( ) ) ;
 +
 SINGLE

 Map < String , Revision > newRevisionMap = new HashMap < String , Revision > ( ) ;
 <nb> public class EcobeeBinding extends AbstractActiveBinding < EcobeeBindingProvider >
 try {
 final Thermostat thermostat = new Thermostat ( null ) ;

 + logger . debug ( STRING2 , property , newState ) ;
 +
 thermostat . setProperty ( property , newState ) ;

 logger . debug ( STRING3 , thermostat ) ;


<nb> public abstract class DefaultModuleResolutionFilter implements ModuleResolutionF
 merged . add ( moduleSpec1 ) ;
 }
 } else {
 - throw new UnsupportedOperationException ( ) ;
 + throw new UnsupportedOperationException ( String . format ( STRING0 , spec1 , spec2 ) ) ;
 }
 }

 <nb> public abstract class DefaultModuleResolutionFilter implements ModuleResolutionF
 merged . add ( spec2 ) ;
 }
 } else {
 - throw new UnsupportedOperationException ( ) ;
 - }
 + throw new UnsupportedOperationException ( String . format ( STRING0 , spec1 , spec2 ) ) ;
 + }
 }

 private void intersect ( ModuleNameSpec spec1 , DefaultModuleResolutionFilter spec2 , List < DefaultModuleResolutionFilter > merged ) {
 <nb> public abstract class DefaultModuleResolutionFilter implements ModuleResolutionF
 merged . add ( spec2 ) ;
 }
 } else {
 - throw new UnsupportedOperationException ( ) ;
 + throw new UnsupportedOperationException ( String . format ( STRING0 , spec1 , spec2 ) ) ;
 }
 }
 }

Added some additional context to UnsupportedOperationException


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class GroovyTraitFieldsFileIndex
 DataExternalizer < Collection < TraitFieldDescriptor > > {

 public static final ID < Integer , Collection < TraitFieldDescriptor > > INDEX_ID = ID . create ( STRING0 ) ;
 - public static final InputFilter INPUT_FILTER = new InputFilter ( ) {
 + public static final InputFilter INPUT_FILTER = new DefaultFileTypeSpecificInputFilter ( JavaClassFileType . INSTANCE ) {
 @ override
 public boolean acceptInput ( @ notnull VirtualFile file ) {
 - return file . getName ( ) . endsWith ( STRING1 ) ;
 + return StringUtil . endsWith ( file . getNameSequence ( ) , STRING1 ) ;
 }
 } ;


<nb> public abstract class GraphDatabaseSetting
 public static final String ANY = STRING0 ;

 SINGLE
 - public static final String SIZE = STRING1 ;
 + public static final String SIZE = STRING2 ;

 SINGLE
 - public static final String DURATION = STRING3 ;
 + public static final String DURATION = STRING4 ;

 public interface DefaultValue
 {


<nb> public class SourceWindow implements LastSourceDocClosedHandler ,
 {
 SINGLE
 SINGLE
 + markReadyToClose ( ) ;
 WindowEx . get ( ) . close ( ) ;
 }

 <nb> public class SourceWindow implements LastSourceDocClosedHandler ,

 private void closeSourceWindow ( )
 {
 -
 ApplicationQuit . QuitContext quitContext =
 new ApplicationQuit . QuitContext ( )
 {

closing last tab doesn t close source window on Qt


<nb> public class NotificationsDetailActivity extends AppCompatActivity implements
 getSupportActionBar ( ) . setTitle ( StringUtils . notNullStr ( savedInstanceState . getString ( ARG_TITLE ) ) ) ;
 }

 + SINGLE
 + if ( ! getIntent ( ) . getBooleanExtra ( NotificationsListFragment . NOTE_INSTANT_REPLY_EXTRA , false ) ) {
 + getWindow ( ) . setSoftInputMode ( WindowManager . LayoutParams . SOFT_INPUT_STATE_HIDDEN ) ;
 + }
 }

 @ override

Bring the code that hides the keyboard back since we re calling performClick programatically when needed


<nb> public class WifiStateTracker extends NetworkStateTracker {
 break ;

 case EVENT_DEFERRED_RECONNECT :
 - String BSSID = msg . obj . toString ( ) ;
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + String BSSID = ( msg . obj != null ) ? msg . obj . toString ( ) : null ;
 COMMENT
 COMMENT
 COMMENT


<nb> class ReaderBlogInfoView extends FrameLayout {
 new Handler ( ) . postDelayed ( new Runnable ( ) {
 @ override
 public void run ( ) {
 - ReaderAnim . scaleIn ( layoutInner , ReaderAnim . Duration . MEDIUM ) ;
 + ReaderAnim . scaleIn ( layoutInner , ReaderAnim . Duration . SHORT ) ;
 }
 } , NUMBER0 ) ;
 }

Decreased duration of blog preview animation


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ZoneShrinkageCLITest {
 AdminClient adminClient = new AdminClient ( bsURL , new AdminClientConfig ( ) , new ClientConfig ( ) ) ;
 assertEquals ( NUMBER0 , adminClient . getAdminClientCluster ( ) . getZoneIds ( ) . size ( ) ) ;
 }
 +
 + @ after
 + public void shutdown ( ) {
 + for ( VoldemortServer vserver : vservers . values ( ) ) {
 + vserver . stop ( ) ;
 + }
 + for ( SocketStoreFactory ssf : socketStoreFactories . values ( ) ) {
 + ssf . close ( ) ;
 + }
 + }
 }

Small addition to ZoneShrinkageCLITest to solve bind exception


<nb> public class AtomicBroadcastMap < K , V >

 private synchronized void checkUpToDate ( )
 {
 - while ( lastCommand != null )
 + int tries = NUMBER0 ;
 + while ( lastCommand != null && tries > NUMBER1 )
 {
 try
 {
 <nb> public class AtomicBroadcastMap < K , V >
 {
 e . printStackTrace ( ) ;
 }
 + tries -- ;
 }
 +
 + if ( tries == NUMBER1 )
 + throw new IllegalStateException ( STRING0 ) ;
 }

 public interface MapCommand
 <nb> public class NetworkMock
 }
 }

 + SINGLE
 + Thread . yield ( ) ;
 +
 return messageDeliveries . size ( ) ;
 }

Let main thread yield after a tick to allow executor threads to process


<nb> class DefaultBlurController implements BlurController {
 int scaledWidth = roundSize ( nonRoundedScaledWidth ) ;
 int scaledHeight = roundSize ( nonRoundedScaledHeight ) ;

 - roundingHeightScaleFactor = ( float ) scaledHeight / nonRoundedScaledHeight ;
 - roundingWidthScaleFactor = ( float ) scaledWidth / nonRoundedScaledWidth ;
 + roundingHeightScaleFactor = ( float ) nonRoundedScaledHeight / scaledHeight ;
 + roundingWidthScaleFactor = ( float ) nonRoundedScaledWidth / scaledWidth ;

 internalBitmap = Bitmap . createBitmap ( scaledWidth , scaledHeight , blurAlgorithm . getSupportedBitmapConfig ( ) ) ;
 }


<nb> public class SnakeTimer {

 public static void broadcast ( String message ) throws Exception {
 for ( Snake snake : SnakeTimer . getSnakes ( ) ) {
 - snake . sendMessage ( message ) ;
 - }
 + try {
 + snake . sendMessage ( message ) ;
 + }
 + catch ( Throwable ex ) {
 + SINGLE
 + }
 + }
 }

Added simple error hangling to SnakeTimer broadcast


<nb> public class PeerTest extends TestWithNetworkConnections {
 peerDisconnected . set ( null ) ;
 }
 } ) ;
 - final NetworkParameters params = TestNet3Params . testNet ( ) ;
 + final NetworkParameters params = TestNet3Params . get ( ) ;
 BitcoinSerializer serializer = new BitcoinSerializer ( params ) ;
 SINGLE
 ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ;

Remove usage of deprecated method in PeerTest


<nb> class SelectStatementPlanner {
 if ( querySpec . where ( ) . noMatch ( ) || ( querySpec . limit ( ) . isPresent ( ) && limits . finalLimit ( ) == NUMBER0 ) ) {
 return new NoopPlan ( context . jobId ( ) ) ;
 }
 - table . tableRelation ( ) . validateOrderBy ( querySpec . orderBy ( ) ) ;

 FetchPushDown fetchPushDown = new FetchPushDown ( querySpec , table . tableRelation ( ) ) ;
 QueriedDocTable subRelation = fetchPushDown . pushDown ( ) ;
 <nb> public class QueryAndFetchConsumer implements Consumer {
 List < Symbol > qsOutputs = querySpec . outputs ( ) ;
 List < Symbol > toCollect ;
 Optional < OrderBy > optOrderBy = querySpec . orderBy ( ) ;
 + table . tableRelation ( ) . validateOrderBy ( optOrderBy ) ;
 if ( optOrderBy . isPresent ( ) ) {
 toCollect = Lists2 . concatUnique ( qsOutputs , optOrderBy . get ( ) . orderBySymbols ( ) ) ;
 } else {

Move order by validation to QueryAndFetchConsumer


<nb> final class TargetRequest extends Request < Target > {
 String key ) {
 super ( picasso , uri , resourceId , null , bitmapOptions , transformations , skipCache , false , NUMBER0 , null ,
 key ) ;
 - this . weakTarget = new WeakReference < Target > ( target , picasso . referenceQueue ) ;
 + this . weakTarget = new RequestWeakReference < Target > ( this , target , picasso . referenceQueue ) ;
 }

 @ override Target getTarget ( ) {

Changed WeakReference to RequestWeakReference to avoid a Class Cast Exception


<nb> public class OSGiIntegrationTestSupport extends CamelTestSupport {

 equinox ( ) ,
 felix ( ) ) ;
 -
 +
 + SINGLE
 + SINGLE
 +
 return options ;
 }

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

 @ runwith ( JUnit4TestRunner . class )
 + @ ignore ( STRING0 )
 public class AwsS3IntegrationTest extends OSGiIntegrationSpringTestSupport {

 @ endpointinject ( uri = STRING1 )
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import static NAMESPACE ;
 import static NAMESPACE ;

 @ runwith ( JUnit4TestRunner . class )
 + @ ignore ( STRING0 )
 public class AwsS3Test extends OSGiIntegrationSpringTestSupport {

 @ endpointinject ( uri = STRING1 )


<nb> public class SearchDialog extends DialogWrapper implements ConfigurationCreator
 JPanel searchOptions = new JPanel ( ) ;
 searchOptions . setLayout ( new GridLayout ( getRowsCount ( ) , NUMBER0 , NUMBER1 , NUMBER1 ) ) ;
 searchOptions . setBorder ( IdeBorderFactory . createTitledBorder ( SSRBundle . message ( STRING0 ) , false ,
 - true ) ) ;
 + true , true ) ) ;

 myScopeChooserCombo = new ScopeChooserCombo (
 searchContext . getProject ( ) ,

added possibility setting large and small font for titled borders and separators


<nb> import NAMESPACE ;
 import NAMESPACE ;

 public class ProcessBootstrap {
 + COMMENT
 + COMMENT
 + COMMENT
 public void run ( String mainClassName , String [ ] args ) {
 try {
 runNoExit ( mainClassName , args ) ;
 <nb> public class ProcessBootstrap {
 ClassLoader runtimeClassLoader = new MutableURLClassLoader ( antClassLoader , runtimeClasspath ) ;
 Thread . currentThread ( ) . setContextClassLoader ( runtimeClassLoader ) ;
 Class < ? > mainClass = runtimeClassLoader . loadClass ( mainClassName ) ;
 - Method mainMethod = mainClass . getMethod ( STRING0 , String [ ] . class ) ;
 - mainMethod . invoke ( null , new Object [ ] { args } ) ;
 + Object entryPoint = mainClass . newInstance ( ) ;
 + Method mainMethod = mainClass . getMethod ( STRING1 , String [ ] . class ) ;
 + mainMethod . invoke ( entryPoint , new Object [ ] { args } ) ;
 }
 }

Changed ProcessBootstrap to assume the main class is a EntryPoint


<nb>
 COMMENT
 COMMENT

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

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

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

Fixed test package to match directory it s in Eclipse marked error


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;

 COMMENT
 COMMENT
 <nb> public interface PluginRequest {

 String getId ( ) ;

 + @ nullable
 String getVersion ( ) ;

 }


<nb> public class DashboardWidget implements EmbeddedPersistable {
 DashboardWidget that = ( DashboardWidget ) o ;

 if ( cacheTime != that . cacheTime ) return false ;
 - if ( type != that . type ) return false ;
 + if ( ! type . equals ( that . type ) ) return false ;
 if ( ! id . equals ( that . id ) ) return false ;
 if ( ! timeRange . equals ( that . timeRange ) ) return false ;
 if ( ! config . equals ( that . config ) ) return false ;


<nb> public final class WebInterfaceDownloadLocalServlet extends HttpServlet {
 }

 SINGLE
 - String baseDir = mTachyonConf . get ( Constants . TACHYON_HOME ) ;
 - File logsDir = new File ( baseDir , STRING0 ) ;
 + File logsDir = new File ( mTachyonConf . get ( Constants . LOGS_DIR ) ) ;

 SINGLE
 requestPath = new File ( requestPath ) . getName ( ) ;

SMALLFIX Fix possible wrong assumption to derive logs dir


<nb> public class ResourceManagementServiceImpl
 resourceString = firstPart . concat ( secondPart ) ;
 }

 + if ( resourceString . indexOf ( STRING0 ) > - NUMBER0 )
 + {
 + resourceString = resourceString . replaceAll ( STRING1 , STRING2 ) ;
 + }
 +
 if ( params != null )
 resourceString
 = MessageFormat . format ( resourceString , ( Object [ ] ) params ) ;


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ClassProto implements TypeProto {
 throw new UnresolvedClassException ( STRING0 , getType ( ) ) ;
 }

 - return FluentIterable . from ( getInterfaces ( ) . values ( ) ) . filter ( ClassDef . class ) ;
 + return FluentIterable . from ( getInterfaces ( ) . values ( ) ) . filter ( Predicates . notNull ( ) ) ;
 }

 COMMENT

Using Predicates notNull to filter for direct interfaces


<nb> public class TranslogTests extends ElasticsearchTestCase {
 translog . add ( op ) ;
 }

 -
 public void testIdParsingFromFile ( ) {
 long id = randomIntBetween ( NUMBER0 , Integer . MAX_VALUE ) ;
 Path file = translogDir . resolve ( Translog . TRANSLOG_FILE_PREFIX + id ) ;
 <nb> public class TranslogTests extends ElasticsearchTestCase {
 }

 private String randomNonTranslogPatternString ( int min , int max ) {
 - String string ;
 - boolean validPathString = false ;
 + String string ;
 + boolean validPathString ;
 do {
 validPathString = false ;
 string = randomRealisticUnicodeOfCodepointLength ( randomIntBetween ( min , max ) ) ;
 <nb> public class TranslogTests extends ElasticsearchTestCase {
 } catch ( InvalidPathException ex ) {
 SINGLE
 }
 - } while ( Translog . PARSE_ID_PATTERN . matcher ( string ) . matches ( ) && validPathString ) ;
 + } while ( Translog . PARSE_ID_PATTERN . matcher ( string ) . matches ( ) || validPathString == false ) ;
 return string ;
 }

TEST Draw a new path if the random file name contains an illegal character


<nb> public class TestNameTestDirectoryProvider implements MethodRule , TestRule , Test
 methodName = getClass ( ) . getSimpleName ( ) ;
 }
 if ( prefix == null ) {
 - String safeMethodName = methodName . replaceAll ( STRING0 , STRING1 ) . replace ( File . pathSeparator , STRING1 ) . replace ( STRING2 , STRING1 ) ;
 + String safeMethodName = methodName . replaceAll ( STRING0 , STRING1 ) . replace ( File . pathSeparator , STRING1 ) . replace ( STRING2 , STRING1 ) . replace ( STRING3 , STRING4 ) ;
 if ( safeMethodName . length ( ) > NUMBER0 ) {
 safeMethodName = safeMethodName . substring ( NUMBER1 , NUMBER2 ) + STRING5 + safeMethodName . substring ( safeMethodName . length ( ) - NUMBER2 ) ;
 }

Translate double quotes in test method names into underscores when naming the test directory


<nb> public class ForkLaunchMain {
 final List < URL > urls = new ArrayList < URL > ( ) ;
 for ( final File path : paths ) {
 try {
 - urls . add ( path . toURL ( ) ) ;
 + urls . add ( path . toURI ( ) . toURL ( ) ) ;
 } catch ( MalformedURLException e ) {
 throw new RuntimeException ( configSection + STRING0 + path . getAbsolutePath ( ) + STRING1 , e ) ;
 }


<nb> public abstract class VcsState
 return ;
 }

 - if ( status_ != null )
 + if ( status_ != null && status != null )
 {
 for ( int i = NUMBER0 ; i < status_ . size ( ) ; i ++ )
 {


<nb> public class Spr7839Tests {
 }

 @ test
 + @ ignore
 public void arrayOfLists ( ) throws Exception {
 SINGLE
 request . setRequestURI ( STRING0 ) ;


<nb> class Angle implements Comparable < Angle > , Cloneable {
 }

 public Angle ( double rise_temp , double run_temp ) {
 - if ( rise_temp == NUMBER0 && run_temp == NUMBER0 )
 - angle_radians = NUMBER0 ;
 SINGLE
 angle_radians = Math . atan2 ( rise_temp , run_temp ) ;
 SINGLE

remove useless special case this is actually a bug in the original code I think


<nb> public abstract class AbstractZipalignMojo extends AbstractAndroidMojo {
 COMMENT
 private File alignedApkFile ;

 - private static final List < String > SUPPORTED_PACKAGING_TYPES = new ArrayList < String > ( ) ;
 -
 - static {
 - SUPPORTED_PACKAGING_TYPES . add ( STRING0 ) ;
 - }
 -
 COMMENT
 COMMENT
 COMMENT

Remove the SUPPORTED_PACKAGING_TYPES as it s now inherited from AndroidAbstractMojo


<nb> public class Utility {

 private static final long MILISECONDS_IN_18_HOURS = NUMBER0 * NUMBER1 * NUMBER1 * NUMBER2 ;
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - public static boolean isDateToday ( Date date ) {
 - Date now = new Date ( ) ;
 + public static boolean isDateToday ( final Date date ) {
 + if ( date == null ) {
 + return false ;
 + }
 + final Date now = new Date ( ) ;
 if ( now . getTime ( ) - MILISECONDS_IN_18_HOURS > date . getTime ( ) || now . getTime ( ) + MILISECONDS_IN_18_HOURS < date . getTime ( ) ) {
 return false ;
 } else {

Add null check before attempting to do math on the date


<nb> public class Wallet implements Serializable {
 FileOutputStream stream = null ;
 File temp = null ;
 try {
 - File directory = f . getParentFile ( ) ;
 + File directory = f . getAbsoluteFile ( ) . getParentFile ( ) ;
 temp = File . createTempFile ( STRING0 , null , directory ) ;
 stream = new FileOutputStream ( temp ) ;
 saveToFileStream ( stream ) ;

Take the directory of the wallets absolute path name to avoid creating temporary wallets in the system default directory


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class LdapConnector {
 return connection ;
 }

 + @ nullable
 public LdapEntry search ( LdapNetworkConnection connection ,
 String searchBase ,
 String searchPattern ,


<nb> public class JUnitRuleTest {
 fail ( ) ;
 } catch ( AssertionError e ) {
 assertEquals ( STRING0 , e . getMessage ( ) ) ;
 - assertTrue ( logger . getLoggedInfo ( ) . startsWith ( STRING1 ) ) ;
 + assertTrue ( logger . getLoggedInfo ( ) . contains ( STRING1 ) ) ;
 }
 }


<nb>
 COMMENT
 package NAMESPACE ;

 - import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;

 COMMENT


<nb> import NAMESPACE ;
 + STRING0
 + STRING1
 + STRING2
 - + STRING3
 + + STRING4
 + STRING5
 + STRING6
 + STRING7


<nb> public class WXPerformance {
 + STRING0 + JSLibSize + STRING1 + templateUrl
 + STRING2 + JSTemplateSize + STRING3 + communicateTime
 + STRING4 + screenRenderTime
 + + STRING5 + WXEnvironment . sSDKInitInvokeTime + STRING6 + WXEnvironment . sSDKInitExecuteTime
 + STRING7 + totalTime + STRING8 + JSLibVersion + STRING9 + WXSDKVersion
 + STRING10 + errCode + STRING11 + renderFailedDetail
 + STRING12 + errMsg ;


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

change system out println to LOG debug because println will affect TfsShellTest


<nb> public class DeflatingStreamSinkConduit implements StreamSinkConduit {
 @ override
 public boolean flush ( ) throws IOException {
 if ( currentBuffer == null ) {
 - return true ;
 + if ( anyAreSet ( state , NEXT_SHUTDOWN ) ) {
 + return next . flush ( ) ;
 + } else {
 + return true ;
 + }
 }
 try {
 boolean nextCreated = false ;

Fix bug in deflating stream sink conduit


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

Modified some comments to reflect that these objects are thread safe but not reentrant


<nb> public class OauthAuthenticationFilter extends SpringSecurityFilter {
 String header = request . getHeader ( AUTHORIZATION ) ; SINGLE

 if ( header != null ) {
 - logger . debug ( STRING0 + header ) ;
 + if ( logger . isDebugEnabled ( ) ) {
 + logger . debug ( STRING0 + header ) ;
 + }
 Matcher matcher = OAUTH_TOKEN_PATTERN . matcher ( header ) ;
 if ( matcher . matches ( ) ) {
 String token = matcher . group ( NUMBER0 ) ;
 <nb> public class OauthAuthenticationFilter extends SpringSecurityFilter {
 Authentication authResult = authenticationManager . authenticate ( authenticationToken ) ;
 SecurityContextHolder . getContext ( ) . setAuthentication ( authResult ) ;
 } catch ( AuthenticationException e ) {
 - logger . debug ( STRING1 + token + STRING2 + e . toString ( ) ) ;
 + if ( logger . isDebugEnabled ( ) ) {
 + logger . debug ( STRING1 + token , e ) ;
 + }
 SecurityContextHolder . getContext ( ) . setAuthentication ( null ) ;
 }
 }

Enclosing debug logs with isDebugEnabled to prevent String object construction when unnecessary


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class RuleDaoTest extends AbstractDaoTestCase {
 @ test
 public void testSelectNonManual ( ) throws Exception {
 setupData ( STRING0 ) ;
 - List < RuleDto > ruleDtos = dao . selectNonManual ( getMyBatis ( ) . openSession ( ) ) ;
 + SqlSession session = getMyBatis ( ) . openSession ( ) ;
 + List < RuleDto > ruleDtos = dao . selectNonManual ( session ) ;
 + session . commit ( ) ;
 + session . close ( ) ;

 assertThat ( ruleDtos . size ( ) ) . isEqualTo ( NUMBER0 ) ;
 RuleDto ruleDto = ruleDtos . get ( NUMBER1 ) ;


<nb> public class Core implements GraylogServer , InputHost {
 deflector . setUp ( ) ;

 scheduler = Executors . newScheduledThreadPool ( SCHEDULED_THREADS_POOL_SIZE ,
 - new ThreadFactoryBuilder ( ) . setNameFormat ( STRING0 ) . build ( )
 + new ThreadFactoryBuilder ( )
 + . setNameFormat ( STRING0 )
 + . setDaemon ( true )
 + . build ( )
 ) ;

 SINGLE


<nb> public class ApplicationSqlDao extends AbstractSqlDao {
 COMMENT
 COMMENT
 public void writeKnownRemoteDatabases ( List < DatabaseRemoteFile > remoteDatabases ) throws SQLException {
 + if ( remoteDatabases . size ( ) == NUMBER0 ) {
 + SINGLE
 + return ;
 + }
 PreparedStatement preparedStatement = getStatement ( STRING0 ) ;

 for ( DatabaseRemoteFile databaseRemoteFile : remoteDatabases ) {


<nb> public abstract class Camera {
 COMMENT
 COMMENT
 public void rotate ( final Quaternion quat ) {
 - direction . mul ( quat ) ;
 - up . mul ( quat ) ;
 + quat . transform ( direction ) ;
 + quat . transform ( up ) ;
 }

 COMMENT

Change camera rotate to work without another pull request


<nb> class StringDeserialization implements Deserialization < String >
 else if ( value . getClass ( ) . isArray ( ) )
 {
 int length = Array . getLength ( value ) ;
 - builder . append ( STRING0 ) ;
 for ( int i = NUMBER0 ; i < length ; i ++ )
 {
 Object item = Array . get ( value , i ) ;
 <nb> class StringDeserialization implements Deserialization < String >
 }
 stringify ( entry , item ) ;
 }
 - builder . append ( STRING1 ) ;
 }
 else if ( value instanceof Number )
 {


<nb> public abstract class MultilanguageCodeStyleAbstractPanel extends CodeStyleAbstr

 public void setLanguageSelector ( LanguageSelector langSelector ) {
 myLanguageSelector = langSelector ;
 + setPanelLanguage ( langSelector . getLanguage ( ) ) ;
 }

 public void setPanelLanguage ( Language language ) {

Code style settings code refactoring clean up


<nb> public final class ActivityManagerService extends ActivityManagerNative
 intent . getBooleanExtra ( Intent . EXTRA_REPLACING , false ) ;
 mCompatModePackages . handlePackageAddedLocked ( ssp , replacing ) ;

 - if ( replacing ) {
 - removeTasksByRemovedPackageComponentsLocked ( ssp , userId ) ;
 - }
 try {
 ApplicationInfo ai = AppGlobals . getPackageManager ( ) .
 getApplicationInfo ( ssp , NUMBER0 , NUMBER0 ) ;


<nb> public class ScrollingModelImpl implements ScrollingModel {
 private Point calcOffsetsToScroll ( LogicalPosition pos , ScrollType scrollType , Rectangle viewRect ) {
 Point targetLocation = myEditor . logicalPositionToXY ( pos ) ;

 - if ( myEditor . getSettings ( ) . isRefrainFromScrolling ( ) ) {
 + if ( myEditor . getSettings ( ) . isRefrainFromScrolling ( ) && viewRect . contains ( targetLocation ) ) {
 if ( scrollType == ScrollType . CENTER ||
 scrollType == ScrollType . CENTER_DOWN ||
 scrollType == ScrollType . CENTER_UP ) {

Scrolling usability in precense of scroll as little as possible option


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class ModuleAwareProjectConfigurable < T extends UnnamedConfigurab
 for ( Module module : modules ) {
 final T configurable = createModuleConfigurable ( module ) ;
 myModuleConfigurables . put ( module , configurable ) ;
 - final JComponent component = new JBScrollPane ( configurable . createComponent ( ) ) ;
 - component . setBorder ( new EmptyBorder ( NUMBER0 , NUMBER0 , NUMBER0 , NUMBER0 ) ) ;
 + final JComponent component = configurable . createComponent ( ) ;
 cardPanel . add ( component , module . getName ( ) ) ;
 }
 moduleList . addListSelectionListener ( new ListSelectionListener ( ) {

we should not wrap configurables in scroll pane


<nb> public class NearestNeighborsResource extends FileResource {

 }
 else if ( path . getAbsolutePath ( ) . contains ( STRING0 ) ) {
 - WordVectors vectors = WordVectorSerializer . loadGoogleModel ( path , true , true ) ;
 + WordVectors vectors = WordVectorSerializer . loadGoogleModel ( path , true ) ;
 this . wordVectors = vectors ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public final class HazelcastClientCacheManager extends AbstractHazelcastCacheMan
 @ override
 protected void onShuttingDown ( ) {
 }
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public NearCacheManager getNearCacheManager ( ) {
 - return client . getNearCacheManager ( ) ;
 - }
 }

Removed unused method getNearCacheManager in HazelcastClientCacheManager


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

 public class DeepLearningAutoEncoderTest extends TestUtil {
 static final String PATH = STRING0 ;
 <nb> public class DeepLearningAutoEncoderTest extends TestUtil {
 p . autoencoder = true ;
 p . response = frame . lastVec ( ) ;

 - SINGLE
 p . seed = seed ;
 p . hidden = new int [ ] { NUMBER0 } ;
 p . adaptive_rate = true ;


<nb> public class SqlDataSourceRefTest extends ContextTestSupport {
 }

 public void testSimpleBody ( ) throws Exception {
 - SINGLE
 + SINGLE
 MockEndpoint mock = getMockEndpoint ( STRING0 ) ;
 mock . expectedMessageCount ( NUMBER0 ) ;

Added dataSourceRef option to lookup DS in registry


<nb> public class SnapshotRepository {
 COMMENT
 COMMENT
 public boolean isValidSnapshot ( File f ) {
 - if ( ! f . getName ( ) . matches ( STRING0 ) ) {
 + if ( ! f . getName ( ) . matches ( STRING1 ) ) {
 return false ;
 }

Expanded the filename filter for snapshot paths


<nb> public class StackScrollAlgorithm {
 float newYTranslation = state . yTranslation ;
 float newHeight = state . height ;
 float newNotificationEnd = newYTranslation + newHeight ;
 -
 - if ( newYTranslation < previousNotificationEnd ) {
 + boolean isHeadsUp = ( child instanceof ExpandableNotificationRow )
 + && ( ( ExpandableNotificationRow ) child ) . isPinned ( ) ;
 + if ( newYTranslation < previousNotificationEnd && ambientState . isShadeExpanded ( )
 + && ! isHeadsUp ) {
 SINGLE
 float overlapAmount = previousNotificationEnd - newYTranslation ;
 state . clipTopAmount = ( int ) overlapAmount ;

Don t show the shade background for heads up notifications


<nb> public class KafkaUtils {
 }
 long latestTimeOffset = getOffset ( consumer , _topic , partition . partition , kafka . api . OffsetRequest . LatestTime ( ) ) ;
 long earliestTimeOffset = getOffset ( consumer , _topic , partition . partition , kafka . api . OffsetRequest . EarliestTime ( ) ) ;
 - if ( latestTimeOffset == NUMBER0 ) {
 + if ( latestTimeOffset == KafkaUtils . NO_OFFSET ) {
 LOG . warn ( STRING0 + partition . getId ( ) ) ;
 return null ;
 }


<nb> public class JavaCompletionData extends CompletionData {
 new TextFilter ( STRING0 ) ) ) ) ) ) ;
 variant . includeScopeClass ( PsiAnnotationParameterList . class ) ;
 variant . includeScopeClass ( PsiVariable . class ) ;
 + variant . excludeScopeClass ( PsiJavaCodeReferenceCodeFragment . class ) ;
 variant . addCompletion ( PsiKeyword . CLASS , TailType . NONE ) ;
 registerVariant ( variant ) ;
 }
 <nb> public class PsiJavaCodeReferenceElementImpl extends CompositePsiElement impleme
 superParent = superParent . getParent ( ) ;
 }
 }
 - if ( ! smartCompletion ) {
 + if ( ! smartCompletion && getTreeParent ( ) . getElementType ( ) != CODE_FRAGMENT ) {
 COMMENT
 COMMENT
 filter . addFilter ( new AndFilter ( new ClassFilter ( PsiMethod . class ) , new NotFilter ( new ConstructorFilter ( ) ) ) ) ;

completion in target class field suggests class token and some registerNatives method


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


<nb> public abstract class NativeDepsHelper {
 SINGLE
 SINGLE
 for ( final Artifact runtimeInput : toolchain . getDynamicRuntimeLinkInputs ( ) ) {
 - final Artifact runtimeSymlink = ruleContext . getAnalysisEnvironment ( ) . getDerivedArtifact (
 + final Artifact runtimeSymlink = ruleContext . getPackageRelativeArtifact (
 getRuntimeLibraryPath ( ruleContext , runtimeInput ) , bindirIfShared ) ;
 SINGLE
 SINGLE
 <nb> public abstract class NativeDepsHelper {
 COMMENT
 COMMENT
 private static PathFragment getRuntimeLibraryPath ( RuleContext ruleContext , Artifact lib ) {
 - PathFragment relativePath = Util . getWorkspaceRelativePath ( ruleContext . getRule ( ) ) ;
 + PathFragment relativePath = new PathFragment ( ruleContext . getLabel ( ) . getName ( ) ) ;
 PathFragment libParentDir =
 relativePath . replaceName ( lib . getExecPath ( ) . getParentDirectory ( ) . getBaseName ( ) ) ;
 String libName = lib . getExecPath ( ) . getBaseName ( ) ;

Remove an AnalysisEnvironment getDerivedArtifact call from nativedeps


<nb> public class IndexingServiceTest

 SINGLE
 logger . assertExactly (
 - info ( STRING0 ) ,
 - info ( STRING1 ) ,
 - info ( STRING2 )
 + info ( STRING3 ) ,
 + info ( STRING4 ) ,
 + info ( STRING5 )
 ) ;
 }

 <nb> public class IndexingServiceTest
 SINGLE
 verify ( provider ) . getPopulationFailure ( NUMBER0 ) ;
 logger . assertAtLeastOnce (
 - info ( STRING6 ) ) ;
 + info ( STRING7 ) ) ;
 logger . assertAtLeastOnce (
 - info ( STRING8 ) ) ;
 + info ( STRING9 ) ) ;
 logger . assertAtLeastOnce (
 - info ( STRING10 ) ) ;
 + info ( STRING11 ) ) ;
 }

 @ test

Fixes a test relying on recently changed index logging


<nb> public abstract class BaseBpmnXMLConverter implements BpmnXMLConstants {
 }

 writeAdditionalAttributes ( flowElement , xtw ) ;
 + if ( StringUtils . isNotEmpty ( flowElement . getDocumentation ( ) ) ) {
 +
 + xtw . writeStartElement ( ELEMENT_DOCUMENTATION ) ;
 + xtw . writeCharacters ( flowElement . getDocumentation ( ) ) ;
 + xtw . writeEndElement ( ) ;
 + }
 writeAdditionalChildElements ( flowElement , xtw ) ;

 writeListeners ( flowElement , xtw ) ;
 <nb> public class BpmnXMLConverter implements BpmnXMLConstants {
 xtw . writeAttribute ( ATTRIBUTE_NAME , STRING0 ) ;
 }

 + if ( StringUtils . isNotEmpty ( subProcess . getDocumentation ( ) ) ) {
 +
 + xtw . writeStartElement ( ELEMENT_DOCUMENTATION ) ;
 + xtw . writeCharacters ( subProcess . getDocumentation ( ) ) ;
 + xtw . writeEndElement ( ) ;
 + }
 +
 for ( FlowElement subElement : subProcess . getFlowElements ( ) ) {
 createXML ( subElement , xtw ) ;
 }


<nb> public class OHazelcastPlugin extends ODistributedAbstractPlugin implements Memb
 if ( ! e . getMessage ( ) . endsWith ( STRING0 ) )
 throw e ;
 } catch ( Exception e ) {
 - ODistributedServerLog . error ( this , nodeName , null , DIRECTION . NONE , STRING1 ,
 - newClusterName , iClass ) ;
 - throw new ODistributedException ( STRING2 + newClusterName + STRING3 + iClass + STRING4 ) ;
 + ODistributedServerLog . error ( this , nodeName , null , DIRECTION . NONE , STRING5 ,
 + newClusterName , iClass , e ) ;
 + throw new ODistributedException ( STRING2 + newClusterName + STRING3 + iClass + STRING4 , e ) ;
 } finally {

 if ( currentDistributedMode != OScenarioThreadLocal . RUN_MODE . DEFAULT )

improved error management in distributed scenario


<nb> public class VectorizedRCFileRecordReader implements RecordReader < NullWritable ,

 @ override
 public VectorizedRowBatch createValue ( ) {
 - VectorizedRowBatch result = null ;
 + VectorizedRowBatch result ;
 try {
 result = rbCtx . createVectorizedRowBatch ( ) ;
 } catch ( HiveException e ) {
 - new RuntimeException ( STRING0 , e ) ;
 + throw new RuntimeException ( STRING0 , e ) ;
 }
 return result ;
 }
 <nb> public class VectorizedRCFileRecordReader implements RecordReader < NullWritable ,
 }
 }
 } catch ( Exception e ) {
 - new RuntimeException ( STRING1 , e ) ;
 + throw new RuntimeException ( STRING1 , e ) ;
 }
 value . size = i ;
 return more ;

VectorizedRCFileRecordReader creates Exception but does not throw it Alexander Pivovarov reviewed by Sergey Shelukhin


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DefaultGraphWalker implements GraphWalker {

 protected Stack < Node > opStack ;
 protected final List < Node > toWalk = new ArrayList < Node > ( ) ;
 - protected final HashMap < Node , Object > retMap = new HashMap < Node , Object > ( ) ;
 + protected final IdentityHashMap < Node , Object > retMap = new IdentityHashMap < Node , Object > ( ) ;
 protected final Dispatcher dispatcher ;

 COMMENT

Use object identity to prevent recursion instead of equality in the optimizer visitor pattern Gopal V reviewed by Sergey Shelukhin


<nb> public class Vec extends Keyed < Vec > {
 COMMENT
 COMMENT
 public static Vec makeCon ( double x , long len , int log_rows_per_chunk , boolean redistribute ) {
 - int nchunks = redistribute ? ( int ) Math . min ( NUMBER0 * H2O . NUMCPUS * H2O . CLOUD . size ( ) , len ) : ( int ) Math . max ( NUMBER1 , len > > log_rows_per_chunk ) ;
 + int chunks0 = ( int ) Math . max ( NUMBER1 , len > > log_rows_per_chunk ) ; SINGLE
 + int chunks1 = ( int ) Math . min ( NUMBER0 * H2O . NUMCPUS * H2O . CLOUD . size ( ) , len ) ; SINGLE
 + int nchunks = ( redistribute && chunks0 < chunks1 && len > NUMBER2 * chunks1 ) ? chunks1 : chunks0 ;
 long [ ] espc = new long [ nchunks + NUMBER1 ] ;
 espc [ NUMBER3 ] = NUMBER3 ;
 for ( int i = NUMBER1 ; i < nchunks ; i ++ )

Fix the makeCon logic for when to create more chunks broke after fix of memory leak


<nb> public class TachyonFS implements Closeable , TachyonFSCore {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setPin ( TachyonFile file , boolean pinned ) throws IOException {
 + FileSystemMasterClient masterClient = mContext . acquireMasterClient ( ) ;
 + try {
 + masterClient . setPinned ( file . getFileId ( ) , pinned ) ;
 + } finally {
 + mContext . releaseMasterClient ( masterClient ) ;
 + }
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class LockScreenActivity extends ActionBarActivity implements ICacheWordS
 return ;
 SINGLE
 try {
 - mCacheWord . setPassphrase ( mEnterPassphrase . getText ( ) . toString ( ) . toCharArray ( ) ) ;
 + char [ ] passphrase = mEnterPassphrase . getText ( ) . toString ( ) . toCharArray ( ) ;
 +
 + mCacheWord . setPassphrase ( passphrase ) ;
 ImApp . mUsingCacheword = true ;
 - } catch ( GeneralSecurityException e ) {
 + } catch ( Exception e ) {
 mEnterPassphrase . setText ( STRING0 ) ;
 SINGLE
 Log . e ( TAG , STRING1 + e . getMessage ( ) ) ;

improve code for handling cacheword unlock exceptions


<nb> public final class Constants {
 COMMENT
 COMMENT
 public static final String POST = STRING0 ;
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - @ deprecated
 - public static final boolean IS_SECURITY_ENABLED =
 - ( System . getSecurityManager ( ) != null ) ;
 }


<nb> public class GitblitReceivePack extends ReceivePack implements PreReceiveHook , P
 text = MessageFormat . format ( msg , objects ) ;
 super . sendMessage ( prefix + text ) ;
 }
 - LOGGER . info ( text + STRING0 + user . username + STRING1 ) ;
 + if ( ! StringUtils . isEmpty ( msg ) ) {
 + LOGGER . info ( text + STRING0 + user . username + STRING1 ) ;
 + }
 }

 protected void sendError ( String msg , Object . . . objects ) {
 <nb> public class GitblitReceivePack extends ReceivePack implements PreReceiveHook , P
 text = MessageFormat . format ( msg , objects ) ;
 super . sendError ( text ) ;
 }
 - LOGGER . error ( text + STRING0 + user . username + STRING1 ) ;
 + if ( ! StringUtils . isEmpty ( msg ) ) {
 + LOGGER . error ( text + STRING0 + user . username + STRING1 ) ;
 + }
 }

 COMMENT

Do not log empty messages in the receive pack


<nb> public final class Multimaps {

 SINGLE
 }
 -

Make the Maps Multimaps Iterator Iterable accepting overloads package private MOE public


<nb> public class LineStatusTrackerManager implements ProjectComponent {

 private class MyEditorFactoryListener extends EditorFactoryAdapter {
 public void editorCreated ( EditorFactoryEvent event ) {
 - trackAwtThread ( ) ;
 + SINGLE
 + SINGLE
 Editor editor = event . getEditor ( ) ;
 if ( editor . getProject ( ) != null && editor . getProject ( ) != myProject ) return ;
 Document document = editor . getDocument ( ) ;


<nb> public class C2Chunk extends Chunk {
 return this ;
 }
 @ override NewChunk inflate_impl ( NewChunk nc ) {
 + if ( nc == null ) { System . err . println ( STRING0 ) ; System . err . flush ( ) ; } SINGLE
 +
 for ( int i = NUMBER0 ; i < _len ; i ++ ) {
 long res = at8_impl ( i ) ;
 if ( _vec . valueIsNA ( res ) ) nc . setInvalid ( i ) ;


<nb> public abstract class AbstractThreadedSyncAdapter {
 if ( mAutoInitialize
 && extras != null
 && extras . getBoolean ( ContentResolver . SYNC_EXTRAS_INITIALIZE , false ) ) {
 - if ( ContentResolver . getIsSyncable ( account , authority ) < NUMBER0 ) {
 - ContentResolver . setIsSyncable ( account , authority , NUMBER1 ) ;
 + try {
 + if ( ContentResolver . getIsSyncable ( account , authority ) < NUMBER0 ) {
 + ContentResolver . setIsSyncable ( account , authority , NUMBER1 ) ;
 + }
 + } finally {
 + syncContextClient . onFinished ( new SyncResult ( ) ) ;
 }
 - syncContextClient . onFinished ( new SyncResult ( ) ) ;
 return ;
 }
 SyncThread syncThread = new SyncThread (

Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter


<nb> public class Realm {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public String getDomain ( ) {
 return domain ;
 <nb> public class JDKAsyncHttpProvider implements AsyncHttpProvider < HttpURLConnection
 }
 }

 - if ( realm != null && realm . getDomain ( ) != null ) {
 + if ( realm != null && realm . getDomain ( ) != null && realm . getScheme ( ) == Realm . AuthScheme . NTLM ) {
 System . setProperty ( STRING0 , realm . getDomain ( ) ) ;
 }


<nb> public class SvnConcurrentChangeListManagerTest extends SvnTestCase {
 SINGLE
 runSvn ( STRING0 , targetName , file . getPath ( ) ) ;

 + VcsDirtyScopeManager . getInstance ( myProject ) . markEverythingDirty ( ) ;
 changeListManager . ensureUpToDate ( false ) ;
 checkFilesAreInList ( new VirtualFile [ ] { file } , targetName , changeListManager ) ;
 }


<nb> public final class MtpCursor extends AbstractWindowedCursor {

 public MtpCursor ( MtpClient client , int queryType , int deviceID , long storageID , long objectID ,
 String [ ] projection ) {
 + if ( client == null ) {
 + throw new NullPointerException ( STRING0 ) ;
 + }
 mColumns = projection ;

 HashMap < String , Integer > map ;

Throw a NullPointerException if client is null in MtpCursor constructor


<nb> public class GpsLocationProvider implements LocationProviderInterface {
 private void reportAGpsStatus ( int type , int status ) {
 switch ( status ) {
 case GPS_REQUEST_AGPS_DATA_CONN :
 - int result = mConnMgr . startUsingNetworkFeature (
 + SINGLE
 + SINGLE
 + mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING ;
 + int result = mConnMgr . startUsingNetworkFeature (
 ConnectivityManager . TYPE_MOBILE , Phone . FEATURE_ENABLE_SUPL ) ;
 if ( result == Phone . APN_ALREADY_ACTIVE ) {
 if ( mAGpsApn != null ) {
 <nb> public class GpsLocationProvider implements LocationProviderInterface {
 mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN ;
 } else {
 Log . e ( TAG , STRING0 ) ;
 + mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED ;
 native_agps_data_conn_failed ( ) ;
 }
 } else if ( result == Phone . APN_REQUEST_STARTED ) {
 - mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING ;
 + SINGLE
 } else {
 + mAGpsDataConnectionState = AGPS_DATA_CONNECTION_CLOSED ;
 native_agps_data_conn_failed ( ) ;
 }
 break ;

Fix race condition while bringing up APN for SUPL


<nb> public class LocationTracker {
 lastKnownLocation ( ) ;
 lm . requestLocationUpdates ( LocationManager . GPS_PROVIDER , GPS_MIN_UPDATE_TIME ,
 GPS_MIN_UPDATE_DISTANCE , mLocationListener ) ;
 + lm . requestLocationUpdates ( LocationManager . PASSIVE_PROVIDER , GPS_MIN_UPDATE_TIME ,
 + GPS_MIN_UPDATE_DISTANCE , mLocationListener ) ;
 + lm . requestLocationUpdates ( LocationManager . NETWORK_PROVIDER , GPS_MIN_UPDATE_TIME ,
 + GPS_MIN_UPDATE_DISTANCE , mLocationListener ) ;
 }

 public void stop ( ) {

added more location providers to improve location acquire time


<nb> import NAMESPACE ;
 COMMENT
 public abstract class PlatformTestCase extends UsefulTestCase implements DataProvider {
 private static IdeaTestApplication ourApplication ;
 + private static boolean ourReportedLeakedProjects ;
 protected ProjectManagerEx myProjectManager ;
 protected Project myProject ;
 protected Module myModule ;
 <nb> public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
 return project ;
 }
 catch ( TooManyProjectLeakedException e ) {
 + if ( ourReportedLeakedProjects ) {
 + fail ( STRING0 ) ;
 + return null ;
 + }
 + ourReportedLeakedProjects = true ;
 +
 StringBuilder leakers = new StringBuilder ( ) ;
 leakers . append ( STRING1 ) ;
 for ( Project project : e . getLeakedProjects ( ) ) {

create only one memory snapshot after too many projects have been leaked


<nb> public class AsyncHttpServerResponseImpl implements AsyncHttpServerResponse {
 onEnd ( ) ;
 }
 else if ( ! mHasWritten ) {
 - send ( STRING0 , STRING1 ) ;
 + if ( ! mRequest . getMethod ( ) . equalsIgnoreCase ( AsyncHttpHead . METHOD ) )
 + send ( STRING0 , STRING1 ) ;
 + else
 + onEnd ( ) ;
 }
 }


<nb> public class FacebookProvider implements IdpProvider , FacebookCallback < LoginResu

 @ override
 public void onActivityResult ( int requestCode , int resultCode , Intent data ) {
 - sCallbackManager . onActivityResult ( requestCode , resultCode , data ) ;
 + if ( sCallbackManager != null ) {
 + sCallbackManager . onActivityResult ( requestCode , resultCode , data ) ;
 + }
 }

 @ override


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class JacksonifiedConnectionFactory extends ConnectionFactory
 {
 <nb> package NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 + COMMENT
 COMMENT
 public class RabbitMQFirehoseConfig
 {


<nb> public class Rewriter extends ErrorReportingASTVisitor {
 IMethodBinding binding = Types . getMethodBinding ( node ) ;

 if ( BindingUtil . hasAnnotation ( binding , AutoreleasePool . class ) ) {
 - if ( ! Types . isVoidType ( binding . getReturnType ( ) ) ) {
 + if ( ! binding . getReturnType ( ) . isPrimitive ( ) ) {
 J2ObjC . warning (
 - STRING0 ) ;
 + STRING1 ) ;
 } else if ( node . getBody ( ) != null ) {
 Types . addAutoreleasePool ( node . getBody ( ) ) ;
 }

Allow AutoreleasePool annotations on methods with primitive return types


<nb> public class CliCoordinator extends ServerRunnable
 JsonConfigProvider . bind ( binder , STRING0 , DatabaseSegmentManagerConfig . class ) ;
 JsonConfigProvider . bind ( binder , STRING1 , DatabaseRuleManagerConfig . class ) ;

 - SINGLE
 - SINGLE
 + binder . bind ( RedirectFilter . class ) . in ( LazySingleton . class ) ;
 + binder . bind ( RedirectInfo . class ) . to ( CoordinatorRedirectInfo . class ) . in ( LazySingleton . class ) ;

 binder . bind ( DatabaseSegmentManager . class )
 . toProvider ( DatabaseSegmentManagerProvider . class )
 <nb> class CoordinatorJettyServerInitializer implements JettyServerInitializer

 root . addServlet ( holderPwd , STRING2 ) ;
 root . setResourceBase ( DruidCoordinator . class . getClassLoader ( ) . getResource ( STRING3 ) . toExternalForm ( ) ) ;
 - SINGLE
 + root . addFilter ( new FilterHolder ( injector . getInstance ( RedirectFilter . class ) ) , STRING4 , null ) ;
 root . addFilter ( GzipFilter . class , STRING4 , null ) ;

 SINGLE


<nb> public interface ProtocolProviderService
 public void shutdown ( ) ;

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public int hashCode ( ) ;
 -
 - COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public abstract class AbstractTestResourceSet {
 SINGLE
 optional . add ( getMount ( ) + STRING0 ) ;
 optional . add ( STRING1 ) ;
 + SINGLE
 + optional . add ( STRING2 ) ;

 for ( String result : results ) {
 Assert . assertTrue ( result ,

Fix false failure when running tests in parallel


<nb> public class NullObject extends GroovyObjectSupport {
 return Collections . EMPTY_LIST . iterator ( ) ;
 }

 + public Object plus ( String s ) {
 + return STRING0 + s ;
 + }
 +
 }


<nb> public interface AgentBuilder {
 }

 @ override
 + @ suppressfbwarnings ( value = STRING0 , justification = STRING1 )
 public void onError ( String typeName , ClassLoader classLoader , JavaModule module , boolean loaded , Throwable throwable ) {
 if ( ! loaded && matcher . matches ( throwable ) ) {
 Set < String > types = this . types . get ( new LookupKey ( classLoader ) ) ;


<nb> class UniqueLuceneIndexAccessor extends LuceneIndexAccessor implements UniquePro
 }
 }

 + @ override
 public Long currentlyIndexedNode ( Object value ) throws IOException
 {
 IndexSearcher searcher = searcherManager . acquire ( ) ;
 <nb> class UniqueLuceneIndexAccessor extends LuceneIndexAccessor implements UniquePro
 for ( NodePropertyUpdate update : updates )
 {
 delegate . process ( update ) ;
 - delegate . close ( ) ;
 }
 + delegate . close ( ) ;
 }

 @ override

Flushes the index updater after all updates have been applied


<nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class JavaValue extends XNamedValue implements NodeDescriptorProvider , XV
 @ override
 public Priority getPriority ( ) {
 if ( navigatable instanceof XInlineSourcePosition ) {
 - return Priority . LOW ;
 + return Priority . LOWEST ;
 }
 return Priority . NORMAL ;
 }
 <nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> package NAMESPACE ;
 COMMENT
 public interface PrioritizedTask {
 enum Priority {
 - HIGH , NORMAL , LOW
 + HIGH , NORMAL , LOW , LOWEST
 }

 Priority getPriority ( ) ;

perform inline debugger calculations with lowest priority


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SingletonSecurityTestCase {
 JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , STRING0 ) ;
 jar . addPackage ( SingletonSecurityTestCase . class . getPackage ( ) ) ;
 jar . addPackage ( CommonCriteria . class . getPackage ( ) ) ;
 + jar . addAsResource ( new StringAsset ( STRING1 +
 + STRING2 +
 + STRING3 +
 + STRING4 +
 + STRING5 +
 + STRING6 +
 + STRING7 +
 + STRING8 +
 + STRING9 +
 + STRING1 ) , STRING10 ) ;
 log . info ( jar . toString ( true ) ) ;
 return jar ;
 }

Add permission for singleton security test case


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DerbyJdbcExpert extends MysqlJdbcExpert {
 return STRING0 ;
 case BOOLEAN :
 return STRING1 ;
 + case BINARY :
 + return STRING2 ;
 default :
 break ;
 }
 <nb> public class DerbyJdbcExpert extends MysqlJdbcExpert {
 protected String createResultSetMetaSql ( Entity < ? > en ) {
 return STRING3 + en . getViewName ( ) + STRING4 ;
 }
 +
 + public Pojo fetchPojoId ( Entity < ? > en , MappingField idField ) {
 + String autoSql = STRING5 + en . getTableName ( ) ;
 + Pojo autoInfo = new SqlFieldMacro ( idField , autoSql ) ;
 + autoInfo . setEntity ( en ) ;
 + return autoInfo ;
 + }
 }


<nb> public final class ViewRoot extends Handler implements ViewParent ,
 mWindowAttributes . copyFrom ( attrs ) ;
 attrs = mWindowAttributes ;

 - enableHardwareAcceleration ( attrs ) ;
 -
 if ( view instanceof RootViewSurfaceTaker ) {
 mSurfaceHolderCallback =
 ( ( RootViewSurfaceTaker ) view ) . willYouTakeTheSurface ( ) ;
 <nb> public final class ViewRoot extends Handler implements ViewParent ,
 mSurfaceHolder . setFormat ( PixelFormat . UNKNOWN ) ;
 }
 }
 +
 + SINGLE
 + if ( mSurfaceHolder == null ) {
 + enableHardwareAcceleration ( attrs ) ;
 + }
 +
 Resources resources = mView . getContext ( ) . getResources ( ) ;
 CompatibilityInfo compatibilityInfo = resources . getCompatibilityInfo ( ) ;
 mTranslator = compatibilityInfo . getTranslator ( ) ;

Don t enable hardware acceleration when the app owns the surface


<nb> public class PythonAllTestsSuite {
 PythonInspectionsTest . class ,
 PythonDemorganLawIntentionTest . class ,
 PyQuickFixTest . class ,
 + PyIntentionTest . class ,
 PySelectWordTest . class ,
 PyEditingTest . class ,
 PySurroundWithTest . class ,


<nb> class DefaultPomDependenciesConverter implements PomDependenciesConverter {
 for ( PublishArtifact artifactToPublish : dependencyConfig . getAllArtifacts ( ) ) {
 Dependency mavenDependency = new Dependency ( ) ;
 mavenDependency . setArtifactId ( artifactId ) ;
 - mavenDependency . setClassifier ( artifactToPublish . getClassifier ( ) ) ;
 + if ( artifactToPublish . getClassifier ( ) != null && artifactToPublish . getClassifier ( ) != STRING0 ) {
 + mavenDependency . setClassifier ( artifactToPublish . getClassifier ( ) ) ;
 + }
 mavenDependencies . add ( mavenDependency ) ;
 }
 } else {

Add a check for an empty or null classifier


<nb> public class GithubCheckoutProvider implements CheckoutProvider {

 final GitCloneDialog dialog = new GitCloneDialog ( project ) ;
 SINGLE
 + dialog . prependToHistory ( STRING0 ) ;
 for ( int i = availableRepos . size ( ) - NUMBER0 ; i >= NUMBER1 ; i -- ) {
 dialog . prependToHistory ( availableRepos . get ( i ) . getCloneUrl ( ) ) ;
 }

add separator between predefined items and history items


<nb> public class AsyncHttpClient {
 COMMENT
 COMMENT
 COMMENT
 - public void setBasicAuth ( String user , String pass ) {
 + public void setBasicAuth ( String username , String password ) {
 AuthScope scope = AuthScope . ANY ;
 - setBasicAuth ( user , pass , scope ) ;
 + setBasicAuth ( username , password , scope ) ;
 }

 COMMENT
 <nb> public class AsyncHttpClient {
 COMMENT
 COMMENT
 COMMENT
 - public void setBasicAuth ( String user , String pass , AuthScope scope ) {
 - UsernamePasswordCredentials credentials = new UsernamePasswordCredentials ( user , pass ) ;
 + public void setBasicAuth ( String username , String password , AuthScope scope ) {
 + UsernamePasswordCredentials credentials = new UsernamePasswordCredentials ( username , password ) ;
 this . httpClient . getCredentialsProvider ( ) . setCredentials ( scope , credentials ) ;
 }


<nb> public class OverrideImplementUtil {
 }

 public static boolean canInsertOverride ( PsiMethod superMethod , PsiClass targetClass ) {
 - if ( superMethod . isConstructor ( ) ) {
 + if ( superMethod . isConstructor ( ) || superMethod . hasModifierProperty ( PsiModifier . STATIC ) ) {
 return false ;
 }
 if ( ! PsiUtil . isLanguageLevel5OrHigher ( targetClass ) ) {

do not insert Override for static methods


<nb> public class Memtable implements Comparable < Memtable > , IFlushable
 }
 if ( newRatio > MAX_SANE_LIVE_RATIO )
 {
 - logger . warn ( STRING0 ) ;
 + logger . warn ( STRING1 , newRatio ) ;
 newRatio = MAX_SANE_LIVE_RATIO ;
 }
 cfs . liveRatio = Math . max ( cfs . liveRatio , newRatio ) ;


<nb> public class _LastInSuiteTest extends TestCase {
 LeakHunter . checkProjectLeak ( ) ;
 Disposer . assertIsEmpty ( true ) ;
 }
 + catch ( AssertionError e ) {
 + captureMemorySnapshot ( ) ;
 + throw e ;
 + }
 catch ( Exception e ) {
 captureMemorySnapshot ( ) ;
 throw e ;


<nb> public class BroadcastLayout extends LinearLayout {
 @ bindview ( R . id . text )
 TextView mTextText ;
 @ bindview ( R . id . like )
 - public CardIconButton mLikeButton ;
 + CardIconButton mLikeButton ;
 @ bindview ( R . id . comment )
 public CardIconButton mCommentButton ;
 @ bindview ( R . id . rebroadcast )
 - public CardIconButton mRebroadcastButton ;
 + CardIconButton mRebroadcastButton ;

 private HorizontalImageAdapter mImageListAdapter ;


<nb> import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class NotificationChildrenContainer extends ViewGroup {
 mChildren . remove ( row ) ;
 removeView ( row ) ;

 - View divider = mDividers . remove ( childIndex ) ;
 + final View divider = mDividers . remove ( childIndex ) ;
 removeView ( divider ) ;
 + getOverlay ( ) . add ( divider ) ;
 + CrossFadeHelper . fadeOut ( divider , new Runnable ( ) {
 + @ override
 + public void run ( ) {
 + getOverlay ( ) . remove ( divider ) ;
 + }
 + } ) ;

 row . setSystemChildExpanded ( false ) ;
 updateGroupOverflow ( ) ;

Fading out the divider now when removing children


<nb> public class SearchView extends LinearLayout implements CollapsibleActionView {
 inputType &= ~ InputType . TYPE_TEXT_FLAG_AUTO_COMPLETE ;
 if ( mSearchable . getSuggestAuthority ( ) != null ) {
 inputType |= InputType . TYPE_TEXT_FLAG_AUTO_COMPLETE ;
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + inputType |= InputType . TYPE_TEXT_FLAG_NO_SUGGESTIONS ;
 }
 }
 mQueryTextView . setInputType ( inputType ) ;

Do not run the spell checker in SearchView


<nb> public class ContextualUndoAdapter extends BaseAdapterDecorator implements Conte
 }
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void removePendingItem ( boolean animate ) {
 + if ( animate ) {
 + removePreviousContextualUndoIfPresent ( ) ;
 + }
 + else if ( mCurrentRemovedView != null ) {
 + new RemoveViewAnimatorListenerAdapter ( mCurrentRemovedView ) . onAnimationEnd ( null ) ;
 + clearCurrentRemovedView ( ) ;
 + }
 + }
 +
 COMMENT
 COMMENT
 COMMENT

Allow users of ContextualUndoAdapters to forcefully remove any pending item


<nb> public class WorkerModule extends BlazeModule {

 @ subscribe
 public void buildComplete ( BuildCompleteEvent event ) {
 - if ( workers != null && buildRequest . getOptions ( WorkerOptions . class ) . workerQuitAfterBuild ) {
 + if ( workers != null && buildRequest != null
 + && buildRequest . getOptions ( WorkerOptions . class ) != null
 + && buildRequest . getOptions ( WorkerOptions . class ) . workerQuitAfterBuild ) {
 if ( verbose ) {
 env
 . getReporter ( )


<nb> public class Spider implements Runnable , Task {
 if ( threadNum <= NUMBER0 ) {
 throw new IllegalArgumentException ( STRING0 ) ;
 }
 - if ( threadNum == NUMBER1 ) {
 - return this ;
 - }
 return this ;
 }


<nb> public final class VectorExpressionWriterFactory {
 @ override
 public Object writeValue ( byte [ ] value , int start , int length ) throws HiveException {
 this . text . set ( value , start , length ) ;
 - ( ( SettableStringObjectInspector ) this . objectInspector ) . set ( this . obj , this . text . toString ( ) ) ;
 + ( ( SettableStringObjectInspector ) this . objectInspector ) . set ( this . obj , this . text ) ;
 return this . obj ;
 }

 <nb> public final class VectorExpressionWriterFactory {
 field = initValue ( null ) ;
 }
 this . text . set ( value , start , length ) ;
 - ( ( SettableStringObjectInspector ) this . objectInspector ) . set ( field , this . text . toString ( ) ) ;
 + ( ( SettableStringObjectInspector ) this . objectInspector ) . set ( field , this . text ) ;
 return field ;
 }

Optimize writeValue setValue in VectorExpressionWriterFactory Rajesh Balamohan via Gopal V


<nb> public class DuplicatesFinder {

 @ nullable
 private Match isDuplicateFragment ( PsiElement candidate ) {
 - if ( candidate == myPattern [ NUMBER0 ] ) return null ;
 + if ( PsiTreeUtil . isAncestor ( myPattern [ NUMBER0 ] , candidate , false ) ) return null ;
 PsiElement sibling = candidate ;
 ArrayList < PsiElement > candidates = new ArrayList < PsiElement > ( ) ;
 for ( final PsiElement element : myPattern ) {


<nb>
 COMMENT
 package NAMESPACE ;

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

 import NAMESPACE ;
 import NAMESPACE ;


<nb> public class CommittedChangesCache implements PersistentStateComponent < Committed
 try {
 if ( cache . isEmpty ( ) ) {
 pendingUpdateProcessed ( ) ;
 - return ;
 + continue ;
 }
 debug ( STRING0 + cache . getLocation ( ) ) ;
 boolean needRefresh = cache . processUpdatedFiles ( updatedFiles , myNewIncomingChanges ) ;

when updating committed changes from updated files check all caches


<nb> public class ErrorReporter

 if ( column > NUMBER0 )
 {
 - sample = STRING0 + line . substring ( column - NUMBER1 , column + NUMBER2 ) + eol ( ) + STRING0 + marker . substring ( column - NUMBER1 , column + NUMBER2 ) ;
 + int start = column - NUMBER1 - NUMBER3 ;
 + int end = ( column + NUMBER2 > line . length ( ) ? line . length ( ) : column + NUMBER2 - NUMBER3 ) ;
 + sample = STRING0 + line . substring ( start , end ) + eol ( ) + STRING0 + marker . substring ( start , marker . length ( ) ) ;
 }
 else
 {

Fixed a bug producing samples of long lines


<nb> package NAMESPACE ;

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

 - @ targetapi ( NUMBER0 )
 public class PhotoView extends ImageView {

 private final PhotoViewAttacher mAttacher ;


<nb> public class GitVcsApplicationSettings implements PersistentStateComponent < GitVc
 COMMENT
 COMMENT
 public String getPathToGit ( ) {
 - return myPathToGit ;
 + return myPathToGit == null ? defaultGit ( ) : myPathToGit ;
 }

 COMMENT

fixed getGitExecutable according to ConfigurableModifiedTest


<nb> public abstract class AbstractSlideExpandableListAdapter extends WrapperListAdap

 private SavedState ( Parcel in ) {
 super ( in ) ;
 - in . writeInt ( lastOpenPosition ) ;
 - writeBitSet ( in , openItems ) ;
 + lastOpenPosition = in . readInt ( ) ;
 + openItems = readBitSet ( in ) ;
 }

 @ override
 public void writeToParcel ( Parcel out , int flags ) {
 super . writeToParcel ( out , flags ) ;
 - lastOpenPosition = out . readInt ( ) ;
 - openItems = readBitSet ( out ) ;
 + out . writeInt ( lastOpenPosition ) ;
 + writeBitSet ( out , openItems ) ;
 +
 }

 SINGLE

Fix RuntimeException when unmarshalling data


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 public @ interface ImportResource {

 String [ ] value ( ) ;
 -
 +
 Class < ? extends BeanDefinitionReader > reader ( ) default XmlBeanDefinitionReader . class ;

 }


<nb> public final class H2O {
 STATIC_H2OS . add ( SELF ) ;
 }

 + Log . info ( STRING0 + NAME + STRING1 ) ;
 +
 Log . info ( STRING2 + VERSION + STRING3 + NAME + STRING4 + SELF + ( OPT_ARGS . flatfile == null
 ? ( STRING5 + CLOUD_MULTICAST_GROUP + STRING6 + CLOUD_MULTICAST_PORT )
 : STRING7 + OPT_ARGS . flatfile ) ) ;


<nb> public class CxfRsProducer extends DefaultProducer {
 }

 public void start ( ) throws Exception {
 - SINGLE
 + cache . resetStatistics ( ) ;
 }

 public void stop ( ) throws Exception {

reset the cache when the CxfRsProducer is started


<nb> public abstract class GridSearchHandler < G extends Grid < MP > ,
 throw new IllegalArgumentException ( STRING0 + name + STRING1 , e ) ;
 } catch ( IllegalAccessException e ) {
 throw new IllegalArgumentException ( STRING2 + name + STRING1 , e ) ;
 + } catch ( RuntimeException e ) {
 + throw new IllegalArgumentException ( STRING2 + name + STRING1 , e ) ;
 }
 return this ;
 }

Fix error causing fail of grid if wrond hidden was specified


<nb> public final class MockRetrofit {
 COMMENT
 COMMENT
 public int calculateDelayForError ( ) {
 + if ( delayMs == NUMBER0 ) return NUMBER0 ;
 +
 return random . nextInt ( delayMs * ERROR_DELAY_FACTOR ) ;
 }

setDelay can set a value that would cause IllegalArgException to be thrown by random nextInt


<nb> public class CircuitBreakerServiceIT extends ESIntegTestCase {
 COMMENT
 COMMENT
 COMMENT
 + @ awaitsfix ( bugUrl = STRING0 )
 public void testParentChecking ( ) throws Exception {
 if ( noopBreakerUsed ( ) ) {
 logger . info ( STRING1 ) ;

TEST mute test for now we have an issue for it


<nb> public class ActivityTest {
 assertThat ( shadow . getManagedCursors ( ) . size ( ) ) . isEqualTo ( NUMBER0 ) ;
 }

 + @ org.junit.test
 + public void should ( ) throws Exception {
 + new Activity ( ) . checkCallingPermission ( STRING0 ) ;
 + }
 +
 private static class TestActivity extends Activity {
 Transcript transcript = new Transcript ( ) ;

reproducing NPE exception with checkCallingPermission


<nb> public class DefaultSecurityApi implements SecurityApi {
 }

 @ override
 + public void logout ( ) {
 + final Subject currentUser = SecurityUtils . getSubject ( ) ;
 + currentUser . logout ( ) ;
 + }
 +
 + @ override
 public Set < Permission > getCurrentUserPermissions ( final TenantContext context ) {
 final Permission [ ] killbillPermissions = Permission . values ( ) ;
 final String [ ] killbillPermissionsString = getAllPermissionsAsStrings ( ) ;


<nb> public class TestHCatClient {
 public static void startMetaStoreServer ( ) throws Exception {

 hcatConf = new HiveConf ( TestHCatClient . class ) ;
 - String metastoreUri = System . getProperty ( HiveConf . ConfVars . METASTOREURIS . varname ) ;
 + String metastoreUri = System . getProperty ( STRING0 + HiveConf . ConfVars . METASTOREURIS . varname ) ;
 if ( metastoreUri != null ) {
 hcatConf . setVar ( HiveConf . ConfVars . METASTOREURIS , metastoreUri ) ;
 useExternalMS = true ;

TestHCatClient should not accept external metastore param from Dhive metastore uris Sushanth Sowmyan reviewed by Thejas Nair


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class AzureSnapshotRestoreITest extends AbstractAzureTest {
 COMMENT
 COMMENT
 COMMENT
 - @ test @ lucenetestcase.awaitsfix ( bugUrl = STRING0 )
 + @ test
 public void testForbiddenContainerName ( ) {
 checkContainerName ( STRING1 , false ) ;
 checkContainerName ( STRING2 , false ) ;


<nb> public class PreviewTableCache
 {
 return queryRows ( buildQueryWithLimit ( key , previewLimit ) ) ;
 }
 -
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 } ;

 this . previewTableCache = CacheBuilder . newBuilder ( )


<nb> package NAMESPACE ;

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

 public class DefaultProjectLocator implements ProjectLocator {
 private final String projectPath ;
 <nb> public class DefaultProjectLocator implements ProjectLocator {
 ProjectInternal referencedProject = delegate . getProject ( path ) ;
 SINGLE
 referencedProject . evaluate ( ) ;
 + referencedProject . getModelRegistry ( ) . atStateOrLater ( TaskContainerInternal . MODEL_PATH , ModelNode . State . SelfClosed ) ;
 return referencedProject ;
 }
 }

Effectively realise the project model when resolving a cross project native library dependency


<nb> public class ConstantExpressionEvaluator extends PsiElementVisitor {
 private static final Key < CachedValue < Map < PsiElement , Object > > > CONSTANT_VALUE_MAP_KEY = new Key < CachedValue < Map < PsiElement , Object > > > ( STRING0 ) ;
 private static final Object NO_VALUE = new Object ( ) ;

 - private ConstantExpressionEvaluator ( Set < PsiVariable > visitedVars , boolean throwExceptionOnOverflow ) {
 + COMMENT
 + COMMENT
 + COMMENT
 + protected ConstantExpressionEvaluator ( Set < PsiVariable > visitedVars , boolean throwExceptionOnOverflow ) {
 myVisitedVars = visitedVars ;
 myThrowExceptionOnOverflow = throwExceptionOnOverflow ;
 }
 <nb> public class ConstantExpressionEvaluator extends PsiElementVisitor {
 return _compute ( evaluator , expression ) ;
 }

 - private static Object _compute ( ConstantExpressionEvaluator evaluator , PsiExpression expression ) {
 + COMMENT
 + COMMENT
 + COMMENT
 + protected static Object _compute ( ConstantExpressionEvaluator evaluator , PsiExpression expression ) {
 return evaluator . accept ( expression ) ;
 }

restored protected methods used in Fabrique


<nb> public class PGraphicsOpenGL extends PGraphics {

 @ override
 + public void setParent ( PApplet parent ) {
 + super . setParent ( parent ) ;
 + if ( pgl != null ) {
 + pgl . sketch = parent ;
 + }
 + }
 +
 +
 + @ override
 public void setPrimary ( boolean primary ) {
 super . setPrimary ( primary ) ;
 pgl . setPrimary ( primary ) ;


<nb> public class DaemonBuildActionExecuter implements BuildActionExecuter < ProviderOp
 Throwable t = e . getCause ( ) ;
 while ( t != null ) {
 if ( t instanceof BuildCancelledException ) {
 - throw new InternalBuildCancelledException ( t ) ;
 + throw new InternalBuildCancelledException ( e . getCause ( ) ) ;
 }
 t = t . getCause ( ) ;
 }

Don t discard the exception chain when adapting to an internal build cancelled exception


<nb> public class DBCollection {
 return new WriteResult ( result , writeConcernToUse ) ;
 }

 + public DBCursor find ( final DBObject filter ) {
 + return find ( filter , null ) ;
 + }
 +
 public DBCursor find ( final DBObject filter , final DBObject fields ) {
 return new DBCursor ( collection , new MongoFind ( ) .
 where ( DBObjects . toQueryFilterDocument ( filter ) ) .

Implemented another find method in DBCollection


<nb>
 COMMENT
 package NAMESPACE ;

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

 - import NAMESPACE ;
 -
 COMMENT
 public interface Kernel32 extends StdCallLibrary {

 <nb> public interface Kernel32 extends StdCallLibrary {
 COMMENT
 COMMENT
 int GetProcessVersion ( int processId ) ;
 -
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public interface Kernel32 extends StdCallLibrary {
 HANDLE CreateFile ( String lpFileName , int dwDesiredAccess , int dwShareMode ,
 WinBase . SECURITY_ATTRIBUTES lpSecurityAttributes , int dwCreationDisposition ,
 int dwFlagsAndAttributes , HANDLE hTemplateFile ) ;
 -
 +
 +
 COMMENT
 COMMENT
 COMMENT


<nb> public class PluginsService extends AbstractComponent {
 try ( DirectoryStream < Path > stream = Files . newDirectoryStream ( pluginsDirectory ) ) {
 for ( Path plugin : stream ) {
 try {
 + if ( Files . isHidden ( plugin ) ) {
 + logger . trace ( STRING0 , plugin . toAbsolutePath ( ) ) ;
 + continue ;
 + }
 logger . trace ( STRING1 , plugin . toAbsolutePath ( ) ) ;
 PluginInfo info = PluginInfo . readFromProperties ( plugin ) ;
 List < URL > urls = new ArrayList < > ( ) ;


<nb> public class SvnBranchPointsCalculator {
 }
 }

 - public static class BranchCopyData implements Invertor < BranchCopyData > {
 + public static class BranchCopyData {
 private final String mySource ;
 private final String myTarget ;
 private final long mySourceRevision ;
 <nb> public class SvnBranchPointsCalculator {
 }
 }

 - private interface Invertor < T > {
 - T invertSelf ( ) ;
 - }
 -
 public TaskDescriptor getFirstCopyPointTask ( final String repoUID , final String sourceUrl , final String targetUrl ,
 final Consumer < TransparentlyFailedValueI < WrapperInvertor , SVNException > > consumer ) {
 return myCalculator . getTask ( new KeyData ( repoUID , sourceUrl , targetUrl ) , consumer , SVNException . class ) ;

Removed unnecessary SvnBranchPointsCalculator Invertor interface


<nb> public interface TypeDescription extends TypeDefinition , TypeVariableSource {

 @ override
 public Generic get ( int index ) {
 - return Sort . describe ( bound [ index ] , annotationReader . ofParameter ( index ) ) ;
 + return Sort . describe ( bound [ index ] , annotationReader . ofTypeVariableBound ( index ) ) ;
 }

 @ override


<nb> public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme
 final boolean initialConnectionKeepAlive = future . getKeepAlive ( ) ;
 future . setURI ( uri ) ;
 String newUrl = uri . toString ( ) ;
 - if ( future . getNettyRequest ( ) . getUri ( ) . startsWith ( WEBSOCKET ) ) {
 + if ( request . getUrl ( ) . startsWith ( WEBSOCKET ) ) {
 newUrl = newUrl . replace ( HTTP , WEBSOCKET ) ;
 }

Fix wrong logic for redirecting websocket


<nb> public class PythonCompletionTest extends PyTestCase {
 }

 public void testEpydocParamTag ( ) {
 - doTest ( ) ;
 + final PyDocumentationSettings settings = PyDocumentationSettings . getInstance ( myFixture . getModule ( ) ) ;
 + settings . setFormat ( DocStringFormat . EPYTEXT ) ;
 + try {
 + doTest ( ) ;
 + }
 + finally {
 + settings . setFormat ( DocStringFormat . PLAIN ) ;
 + }
 }

 public void testEpydocTags ( ) {


<nb> public class UserPhotosFragment extends SherlockFragment implements LoaderManage

 @ override
 public void onActivityResult ( int requestCode , int resultCode , Intent data ) {
 - if ( requestCode == Activity . RESULT_OK ) {
 - switch ( requestCode ) {
 - case RESULT_CAMERA :
 + switch ( requestCode ) {
 + case RESULT_CAMERA :
 + if ( resultCode == Activity . RESULT_OK ) {
 Utils . sendMediaStoreBroadcast ( getActivity ( ) , mPhotoFile ) ;
 - mPhotoFile = null ;
 - return ;
 - }
 + } else {
 + if ( Constants . DEBUG ) {
 + Log . d ( STRING0 , STRING1 ) ;
 + }
 + mPhotoFile . delete ( ) ;
 + }
 + mPhotoFile = null ;
 + return ;
 }

 super . onActivityResult ( requestCode , resultCode , data ) ;

Delete Photo File if Camera doesn t result OK


<nb> public class AutomaticBean
 this . useDefault = false ;
 }

 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public StrArrayConverter ( Object aDefaultValue )
 - {
 - this . defaultValue = aDefaultValue ;
 - this . useDefault = true ;
 - }
 -
 @ suppresswarnings ( STRING0 )
 @ override
 public Object convert ( Class aType , Object aValue )


<nb> public class GoogleToken extends Token {
 super ( token , secret , rawResponse ) ;
 this . openIdToken = openIdToken ;
 }
 +
 + public String getOpenIdToken ( ) {
 + return openIdToken ;
 + }

 @ override
 public String toString ( ) {

add a getter for GoogleToken openIdToken


<nb> public class StopwatchBenchmark extends SimpleBenchmark {
 for ( int i = NUMBER0 ; i < reps ; i ++ ) {
 Stopwatch s = new Stopwatch ( ) . start ( ) ;
 SINGLE
 - total += s . elapsedTime ( TimeUnit . NANOSECONDS ) ;
 + total += s . elapsed ( TimeUnit . NANOSECONDS ) ;
 }
 return total ;
 }

Fix calls to deprecated Stopwatch elapsedTime TimeUnit by inlining that method s implementation elapsed TimeUnit


<nb> public class OTokenHandlerImplTest {
 try {
 OSecurityUser original = db . getUser ( ) ;
 OTokenHandlerImpl handler = new OTokenHandlerImpl ( STRING0 . getBytes ( ) , NUMBER0 , STRING1 ) ;
 + byte [ ] token = handler . getSignedWebToken ( db , original ) ;
 +
 try {
 SINGLE
 Thread . sleep ( NUMBER1 ) ;
 } catch ( InterruptedException e ) {
 }
 - byte [ ] token = handler . getSignedWebToken ( db , original ) ;

 OToken tok = handler . parseWebToken ( token ) ;


<nb> public class HiveConf extends Configuration {
 STRING0 +
 STRING1 ) ,
 LLAP_CACHE_ENABLE_ORC_GAP_CACHE ( STRING2 , true ,
 - STRING3 +
 - STRING4 +
 - STRING5 ) ,
 + STRING6 +
 + STRING7 +
 + STRING8 ) ,
 LLAP_IO_USE_FILEID_PATH ( STRING9 , true ,
 STRING10 +
 STRING11 ) ,

Incremental Caching marks some small chunks as incomplete CB Sergey Shelukhin reviewed by Prasanth Jayachandran ADDENDUM


<nb> public class PropertiesConfigurationFactoryTests {
 @ test
 public void propertyWithAllUpperCaseSuffixCanBeBound ( ) throws Exception {
 Foo foo = createFoo ( STRING0 ) ;
 - assertEquals ( STRING1 , foo . fooBarURI ) ;
 + assertThat ( foo . fooBarURI ) . isEqualTo ( STRING1 ) ;
 }

 private Foo createFoo ( final String values ) throws Exception {


<nb> public class AppCompatSpinner extends Spinner implements TintableBackgroundView

 @ override
 public boolean performClick ( ) {
 - if ( mPopup != null && ! mPopup . isShowing ( ) ) {
 - mPopup . show ( ) ;
 + if ( mPopup != null ) {
 + SINGLE
 + if ( ! mPopup . isShowing ( ) ) {
 + mPopup . show ( ) ;
 + }
 return true ;
 }
 +
 + SINGLE
 return super . performClick ( ) ;
 }


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

 @ bean
 public FilterRegistrationBean oauth2ClientFilterRegistration (
 - OAuth2ClientContextFilter filter ) {
 + OAuth2ClientContextFilter filter , SecurityProperties security ) {
 FilterRegistrationBean registration = new FilterRegistrationBean ( ) ;
 registration . setFilter ( filter ) ;
 - registration . setOrder ( - NUMBER0 ) ;
 + registration . setOrder ( security . getFilterOrder ( ) - NUMBER1 ) ;
 return registration ;
 }

Move OAuth2ClientContextFilter back before the main security filter


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

 COMMENT
 <nb> public abstract class AbstractTransferOperation extends Operation {
 }

 private TransactionAwareTransferManager createReliableTransferManager ( Config config ) {
 - return new TransactionAwareTransferManager ( new RetriableTransferManager ( config . getTransferPlugin ( ) . createTransferManager (
 - config . getConnection ( ) , config ) ) , config ) ;
 + return new TransactionAwareTransferManager ( createRetriableTransferManager ( config ) , config ) ;
 + }
 +
 + private TransferManager createRetriableTransferManager ( Config config ) {
 + return new RetriableTransferManager ( config . getTransferPlugin ( ) . createTransferManager (
 + config . getConnection ( ) , config ) ) ;
 }

 protected void startOperation ( ) throws Exception {


<nb> public class FirstWizardPage
 ProtocolProviderFactory . FORCE_P2P_MODE , false ) ;

 boolean enabledDefaultEncryption = accountID . getAccountPropertyBoolean (
 - ProtocolProviderFactory . DEFAULT_ENCRYPTION , false ) ;
 + ProtocolProviderFactory . DEFAULT_ENCRYPTION , true ) ;

 String pollingPeriod = accountID . getAccountPropertyString (
 ProtocolProviderFactory . POLLING_PERIOD ) ;

When loading an already stored SIP account we set the encryption property to true if there s no stored value


<nb> public class Http11OutputBuffer implements OutputBuffer {
 }

 + public void registerWriteInterest ( ) {
 + socketWrapper . registerWriteInterest ( ) ;
 + }
 +
 +
 SINGLE

 COMMENT
 <nb> public class Http11Processor extends AbstractProcessor {

 if ( outputBuffer . hasDataToWrite ( ) ) {
 if ( outputBuffer . flushBuffer ( false ) ) {
 - SINGLE
 - SINGLE
 - response . checkRegisterForWrite ( ) ;
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + outputBuffer . registerWriteInterest ( ) ;
 return SocketState . LONG ;
 }
 }

Fix broken non blocking unit test on Linux


<nb> class WindowSurfaceController {
 }
 }

 + @ override
 + public void setTransparentRegionHint ( Region region ) {
 + if ( LOG_SURFACE_TRACE ) Slog . v ( SURFACE_TAG , STRING0 + region
 + + STRING1 + this + STRING2 + Debug . getCallers ( NUMBER0 ) ) ;
 + super . setTransparentRegionHint ( region ) ;
 + }
 +
 static void dumpAllSurfaces ( PrintWriter pw , String header ) {
 synchronized ( sSurfaces ) {
 final int N = sSurfaces . size ( ) ;


<nb> public class TestNGCucumberRunner {
 RuntimeOptionsFactory runtimeOptionsFactory = new RuntimeOptionsFactory ( clazz , new Class [ ] { CucumberOptions . class } ) ;
 RuntimeOptions runtimeOptions = runtimeOptionsFactory . create ( ) ;

 - SINGLE
 - List < String > uniqueGlue = new ArrayList < String > ( new HashSet < String > ( runtimeOptions . getGlue ( ) ) ) ;
 - runtimeOptions . getGlue ( ) . clear ( ) ;
 - runtimeOptions . getGlue ( ) . addAll ( uniqueGlue ) ;
 -
 TestNgReporter reporter = new TestNgReporter ( System . out ) ;
 runtimeOptions . getFormatters ( ) . add ( reporter ) ;
 ClassFinder classFinder = new ResourceLoaderClassFinder ( resourceLoader , classLoader ) ;

Remove the unique glue work around from TestNGCucumberRunner


<nb> public class CreateFrame extends Job < Frame > {
 if ( value != NUMBER0 )
 throw new IllegalArgumentException ( STRING0 ) ;
 }
 - if ( _dest == null ) throw new IllegalArgumentException ( STRING1 ) ;
 + if ( _dest == null ) throw new IllegalArgumentException ( STRING2 ) ;

 FrameCreator fc = new FrameCreator ( this , this . _key ) ;
 start ( fc , fc . nChunks ( ) * NUMBER1 , true ) ;


<nb> public class FMLDeobfTweaker implements ITweaker {
 @ override
 public String getLaunchTarget ( )
 {
 - return null ;
 + throw new RuntimeException ( STRING0 ) ;
 }

 @ override
 public String [ ] getLaunchArguments ( )
 {
 - return null ;
 + return new String [ NUMBER0 ] ;
 }

 }


<nb> public class SegmentGeneratorConfig {
 }

 public void setIndexOutputDir ( String dir ) {
 - if ( new File ( dir ) . exists ( ) ) {
 -
 + final File outputDirectory = new File ( dir ) ;
 + if ( ! outputDirectory . exists ( ) ) {
 + outputDirectory . mkdirs ( ) ;
 }
 indexOutputDir = dir ;
 }
 <nb> public class SegmentGeneratorConfig {
 }

 public void setInputFilePath ( String path ) {
 - inputDataFilePath = new File ( path ) ;
 - if ( ! inputDataFilePath . exists ( ) ) {
 - throw new RuntimeException ( STRING0 ) ;
 + if ( path != null ) {
 + inputDataFilePath = new File ( path ) ;
 + if ( ! inputDataFilePath . exists ( ) ) {
 + throw new RuntimeException ( STRING0 ) ;
 + }
 }
 }

Fixed RealtimeFileBasedReaderTest that was broken


<nb> public class Testing {
 SINGLE
 SINGLE
 SINGLE
 - SINGLE
 + SINGLE
 + SINGLE
 <nb>
 public class Testing {
 public static void test ( ) {
 - mockLib . foo . FooPackage . < caret >
 + mockLib . foo . MainKt . < caret >
 }
 }

 SINGLE
 SINGLE
 SINGLE
 - SINGLE

Fix test data for completion in java of source compiled kotlin


<nb> public class HttpFields implements Iterable < HttpField >
 }
 return false ;
 }
 -
 +
 + @ deprecated
 + public String getStringField ( HttpHeader header )
 + {
 + return get ( header ) ;
 + }

 public String get ( HttpHeader header )
 {
 <nb> public class HttpFields implements Iterable < HttpField >
 return null ;
 }

 + @ deprecated
 + public String getStringField ( String name )
 + {
 + return get ( name ) ;
 + }
 +
 public String get ( String header )
 {
 for ( int i = NUMBER0 ; i < _size ; i ++ )
 <nb> public class HttpFields implements Iterable < HttpField >
 }
 return null ;
 }
 -
 +
 COMMENT
 COMMENT
 COMMENT

reverted and deprecated getStringField methods


<nb> public class LayerDrawable extends Drawable implements Drawable . Callback {
 final Drawable clone ;
 if ( dr != null ) {
 final ConstantState cs = dr . getConstantState ( ) ;
 - if ( res != null ) {
 + if ( cs == null ) {
 + clone = dr ;
 + } else if ( res != null ) {
 clone = cs . newDrawable ( res ) ;
 } else {
 clone = cs . newDrawable ( ) ;

If LayerDrawable child doesn t have constant state use shallow copy


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class NotificationManagerService extends SystemService {
 }
 checkCallerIsSystemOrSameApp ( pkg ) ;
 final boolean isSystemNotification = isUidSystem ( callingUid ) || ( STRING0 . equals ( pkg ) ) ;
 + final boolean isNotificationFromListener = mEnabledListenerPackageNames . contains ( pkg ) ;

 final int userId = ActivityManager . handleIncomingUser ( callingPid ,
 callingUid , incomingUserId , true , false , STRING1 , pkg ) ;
 final UserHandle user = new UserHandle ( userId ) ;

 SINGLE
 - SINGLE
 - if ( ! isSystemNotification ) {
 + SINGLE
 + if ( ! isSystemNotification && ! isNotificationFromListener ) {
 synchronized ( mNotificationList ) {
 int count = NUMBER0 ;
 final int N = mNotificationList . size ( ) ;

DO NOT MERGE Readd removal of notification listener limit on posting


<nb> import NAMESPACE ;
 COMMENT
 public class DefaultServerSocketFactory implements ServerSocketFactory {

 - private AbstractEndpoint endpoint ;
 -
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public DefaultServerSocketFactory ( AbstractEndpoint endpoint ) {
 - this . endpoint = endpoint ;
 }

 @ override


<nb> public class JobExecutionContext implements CompletionListenable {
 }

 public void start ( ) throws Throwable {
 - assert failure == null ;
 for ( Integer id : orderedContextIds ) {
 ExecutionSubContext subContext = subContexts . get ( id ) ;
 if ( subContext == null || closed . get ( ) ) {

removes invalid assertion which was thrown by a valid race condition


<nb> public class TestQueries
 @ test
 public void testCountWithAndPredicate ( )
 {
 - List < Tuple > expected = computeExpected ( STRING0 , FIXED_INT_64 ) ;
 + List < Tuple > expected = computeExpected ( STRING1 , FIXED_INT_64 ) ;

 TupleStream discount = createTupleStream ( lineitemData , Column . LINEITEM_DISCOUNT , DOUBLE ) ;
 TupleStream filteredDiscount = new ApplyPredicateOperator ( discount , new Predicate < Cursor > ( )
 <nb> public class TestQueries
 @ override
 public boolean apply ( Cursor input )
 {
 - return input . getDouble ( NUMBER0 ) < FLOAT0 ;
 + return input . getDouble ( NUMBER0 ) < FLOAT1 ;
 }
 } ) ;

Fix query so that all predicates affect the output


<nb> public class InputDevice {
 while ( start != end ) {
 int soff = poff + ( start * MotionEvent . NUM_SAMPLE_DATA ) ;
 int pressure = mHistoryData [ soff + MotionEvent . SAMPLE_PRESSURE ] ;
 + if ( pressure <= NUMBER0 ) pressure = NUMBER1 ;
 x += mHistoryData [ soff + MotionEvent . SAMPLE_X ] * pressure ;
 y += mHistoryData [ soff + MotionEvent . SAMPLE_Y ] * pressure ;
 totalPressure += pressure ;
 <nb> public class InputDevice {
 }
 int eoff = poff + ( end * MotionEvent . NUM_SAMPLE_DATA ) ;
 int pressure = mHistoryData [ eoff + MotionEvent . SAMPLE_PRESSURE ] ;
 + if ( pressure <= NUMBER0 ) pressure = NUMBER1 ;
 x += mHistoryData [ eoff + MotionEvent . SAMPLE_X ] * pressure ;
 y += mHistoryData [ eoff + MotionEvent . SAMPLE_Y ] * pressure ;
 totalPressure += pressure ;


<nb> public interface VcsLogUi {
 @ notnull
 VcsLogDataPack getDataPack ( ) ;

 - void addHighlighter ( @ notnull VcsLogHighlighter highlighter ) ;
 -
 - void removeHighlighter ( @ notnull VcsLogHighlighter highlighter ) ;
 -
 void addLogListener ( @ notnull VcsLogListener listener ) ;

 void removeLogListener ( @ notnull VcsLogListener listener ) ;
 <nb> public class VcsLogUiImpl implements VcsLogUi , Disposable {
 }

 @ override
 - public void addHighlighter ( @ notnull VcsLogHighlighter highlighter ) {
 - getTable ( ) . addHighlighter ( highlighter ) ;
 - repaintUI ( ) ;
 - }
 -
 - @ override
 - public void removeHighlighter ( @ notnull VcsLogHighlighter highlighter ) {
 - getTable ( ) . removeHighlighter ( highlighter ) ;
 - repaintUI ( ) ;
 - }
 -
 - @ override
 public void addLogListener ( @ notnull VcsLogListener listener ) {
 ApplicationManager . getApplication ( ) . assertIsDispatchThread ( ) ;
 myLogListeners . add ( listener ) ;

vcs log remove add remove Highlighter methods from VcsLogUi


<nb> public class TcpHiccupMain {
 heading . append ( STRING0 ) . append ( perc ) . append ( STRING1 ) ;
 long value = findPercentile ( histograms , perc ) ;
 values . append ( STRING0 ) . append ( inNanos ( value ) ) ;
 - if ( RUNS >= oneIn * oneIn - NUMBER0 )
 + if ( RUNS <= oneIn * oneIn )
 break ;
 }
 heading . append ( STRING2 ) ;


<nb> public abstract class ModelAdapter < ModelClass extends Model > extends InstanceAda
 COMMENT
 COMMENT
 public DatabaseStatement getCompiledStatement ( ) {
 - if ( insertStatement == null ) {
 - insertStatement = getCompiledStatement (
 + if ( compiledStatement == null ) {
 + compiledStatement = getCompiledStatement (
 FlowManager . getDatabaseForTable ( getModelClass ( ) ) . getWritableDatabase ( ) ) ;
 }

 - return insertStatement ;
 + return compiledStatement ;
 }

 COMMENT


<nb> public class PayloadSerializer {
 }

 public Object deserialize ( SerializedPayload payload ) {
 + SINGLE
 final DeserializeMap map = classLoaderRegistry . newDeserializeSession ( ) ;
 try {
 final ClassLoader systemClassLoader = SYSTEM_CLASS_LOADER ;
 <nb> public class PayloadSerializer {
 return objectStream . readObject ( ) ;
 } catch ( Exception e ) {
 throw UncheckedException . throwAsUncheckedException ( e ) ;
 - } finally {
 - map . close ( ) ;
 }
 }
 }

Don t close classloaders following deserialize just yet we have unit tests that expect these to persist


<nb> class OkHttpClientStream extends Http2ClientStream {

 @ guardedby ( STRING0 )
 public void start ( int id ) {
 - checkNotNull ( id , STRING1 ) ;
 checkState ( this . id == ABSENT_ID , STRING2 , this . id ) ;
 this . id = id ;


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

 -
 public class DefaultResourceAwareStrategy implements IStrategy {
 private static final Logger LOG = LoggerFactory . getLogger ( DefaultResourceAwareStrategy . class ) ;
 private Cluster _cluster ;


<nb> import static NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> final class ModelBackedDocumentsAdapter extends DocumentsAdapter {
 return hiddenItems ;
 }

 + @ visiblefortesting
 @ override
 public void unhide ( SparseArray < String > ids ) {
 if ( DEBUG ) Log . d ( TAG , STRING0 + ids ) ;


<nb> public class PhotoViewAttacher implements IPhotoView , View . OnTouchListener , Vers
 COMMENT
 COMMENT
 private static void setImageViewScaleTypeMatrix ( ImageView imageView ) {
 - if ( null != imageView ) {
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + if ( null != imageView && ! ( imageView instanceof PhotoView ) ) {
 if ( ! ScaleType . MATRIX . equals ( imageView . getScaleType ( ) ) ) {
 imageView . setScaleType ( ScaleType . MATRIX ) ;
 }

added check back fixing ViewPager example


<nb> public class MediaActionSound {
 } ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public void release ( ) {
 - mSoundPool . release ( ) ;
 - mSoundPool = null ;
 + if ( mSoundPool != null ) {
 + mSoundPool . release ( ) ;
 + mSoundPool = null ;
 + }
 }
 }

Allow multiple releases to be called on MediaActionSound


<nb> public class OperationToObservableFuture {
 @ override
 public Subscription call ( Observer < ? super T > observer ) {
 try {
 - T value = ( time == null ) ? that . get ( ) : that . get ( time , unit ) ;
 + T value = ( time == null ) ? ( T ) that . get ( ) : ( T ) that . get ( time , unit ) ;

 if ( ! that . isCancelled ( ) ) {
 observer . onNext ( value ) ;

added an unnecessary explicit cast because the Jenkins java compiler is unhappy otherwise


<nb> public class TieredBlockStore implements BlockStore {
 private final BlockLockManager mLockManager ;
 private final Allocator mAllocator ;
 private final Evictor mEvictor ;
 - private List < BlockStoreEventListener > mBlockStoreEventListeners =
 + private final List < BlockStoreEventListener > mBlockStoreEventListeners =
 new ArrayList < BlockStoreEventListener > ( ) ;
 COMMENT
 private final Set < Integer > mPinnedInodes = new HashSet < Integer > ( ) ;


<nb> public class TileSourceManager {
 }

 public static TileSourceTemplate getMapnikSource ( ) {
 - return new TileSourceTemplate ( STRING0 , STRING1 , STRING2 , NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 ) ; SINGLE
 + return new TileSourceTemplate ( STRING3 , STRING4 , STRING2 , NUMBER0 , NUMBER1 , NUMBER5 , NUMBER3 , NUMBER4 ) ; SINGLE
 }

 public static TileSourceTemplate getCycleMapSource ( ) {


<nb> public abstract class BaseRefactoringAction extends AnAction {
 PsiFile file = e . getData ( LangDataKeys . PSI_FILE ) ;
 if ( file != null ) {
 if ( file instanceof PsiCompiledElement || ! isAvailableForFile ( file ) ) {
 - disableAction ( e ) ;
 + hideAction ( e ) ;
 return ;
 }
 }
 <nb> public abstract class BaseRefactoringAction extends AnAction {

 private static void disableAction ( final AnActionEvent e ) {
 e . getPresentation ( ) . setEnabled ( false ) ;
 - if ( ActionPlaces . isPopupPlace ( e . getPlace ( ) ) && e . getPresentation ( ) . isVisible ( ) ) {
 - hideAction ( e ) ;
 - }
 }

 protected boolean isAvailableForLanguage ( Language language ) {

do not show not available in current file and do not hide disabled in popups


<nb> public class ForsetiClient implements Locks . Client
 }
 else if ( existingLock instanceof SharedLock )
 {
 + SINGLE
 + SINGLE
 + SINGLE
 if ( ( ( SharedLock ) existingLock ) . acquire ( this ) )
 {
 SINGLE
 break ;
 }
 - else
 + else if ( ( ( SharedLock ) existingLock ) . isUpdateLock ( ) )
 {
 return false ;
 }


<nb> public class NeuralUtilsTest {
 assertEquals ( FLOAT0 , NeuralUtils . cosine ( vector1 , vector2 ) , FLOAT1 ) ;
 }

 + public void testIsZero ( ) {
 + double [ ] [ ] values = new double [ ] [ ] { { FLOAT2 , FLOAT3 , FLOAT4 , FLOAT5 , FLOAT6 } , { FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 } } ;
 + SimpleMatrix vector1 = new SimpleMatrix ( values ) ;
 + assertFalse ( NeuralUtils . isZero ( vector1 ) ) ;
 +
 + values = new double [ ] [ ] { { FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 } , { FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 , FLOAT7 } } ;
 + vector1 = new SimpleMatrix ( values ) ;
 + assertTrue ( NeuralUtils . isZero ( vector1 ) ) ;
 + }
 +
 }


<nb> public class PlaybackControlsRow extends Row {
 COMMENT
 COMMENT
 public ClosedCaptioningAction ( Context context , int highlightColor ) {
 - super ( R . id . lb_control_high_quality ) ;
 + super ( R . id . lb_control_closed_captioning ) ;
 BitmapDrawable uncoloredDrawable = ( BitmapDrawable ) getStyledDrawable ( context ,
 R . styleable . lbPlaybackControlsActionIcons_closed_captioning ) ;
 Drawable [ ] drawables = new Drawable [ NUMBER0 ] ;