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

 <nb> public class PageInspector {
 private String mLastYouTubeEmbedResultString = null ;
 private OnItemFoundListener mOnItemFoundListener ;

 - private static final int TOUCH_ICON_MAX_SIZE = NUMBER0 ;
 private static final int MAX_FAVICON_ENTRIES = NUMBER1 ;
 private TouchIconEntry [ ] mTouchIconEntries = new TouchIconEntry [ MAX_FAVICON_ENTRIES ] ;
 private int mTouchIconEntryCount = NUMBER2 ;
 <nb> public class PageInspector {
 int w = source . getWidth ( ) ;

 Bitmap result = source ;
 - if ( w > TOUCH_ICON_MAX_SIZE ) {
 + if ( w > Constant . TOUCH_ICON_MAX_SIZE ) {
 try {
 - result = Bitmap . createScaledBitmap ( source , TOUCH_ICON_MAX_SIZE , TOUCH_ICON_MAX_SIZE , true ) ;
 + result = Bitmap . createScaledBitmap ( source , Constant . TOUCH_ICON_MAX_SIZE , Constant . TOUCH_ICON_MAX_SIZE , true ) ;
 } catch ( OutOfMemoryError e ) {

 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {

 @ override
 public void mapActivityPause ( MapActivity activity ) {
 - groups . addUiListeners ( olayer ) ;
 + groups . removeUiListener ( olayer ) ;
 mapActivity = activity ;
 }


<nb> public final class PackageIdentifier implements Comparable < PackageIdentifier > , S
 }
 }

 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - SINGLE
 - @ deprecated
 - public static PackageIdentifier createInDefaultRepo ( String name ) {
 - return create ( MAIN_REPOSITORY_NAME , new PathFragment ( name ) ) ;
 - }
 -
 public static PackageIdentifier createInMainRepo ( String name ) {
 return createInMainRepo ( new PathFragment ( name ) ) ;
 }

Remove PackageIdentifier createInDefaultRepo now that all the callers have been migrated


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class GroovyRefactoringSupportProvider extends RefactoringSupportProvider
 public static final GroovyRefactoringSupportProvider INSTANCE = new GroovyRefactoringSupportProvider ( ) ;

 public boolean isSafeDeleteAvailable ( PsiElement element ) {
 - return element instanceof GrTypeDefinition ;
 + return element instanceof GrTypeDefinition ||
 + element instanceof GrField ||
 + element instanceof GrMethod ;
 }

 COMMENT

enable safe delete for groovy methods and fields


<nb> public class OCommandExecutorSQLSelect extends OCommandExecutorSQLResultsetAbstr
 tempResult = new ArrayList < OIdentifiable > ( ) ;

 for ( Entry < Object , ORuntimeResult > g : groupedResult . entrySet ( ) ) {
 - if ( g . getKey ( ) != null || groupedResult . size ( ) == NUMBER0 ) {
 + if ( g . getKey ( ) != null || ( groupedResult . size ( ) == NUMBER0 && groupByFields == null ) ) {
 final ODocument doc = g . getValue ( ) . getResult ( ) ;
 if ( doc != null && ! doc . isEmpty ( ) )
 ( ( List < OIdentifiable > ) tempResult ) . add ( doc ) ;


<nb> public class DirectFileCache implements FileCache {
 Channels . transferBlocking ( channel , fileChannel , NUMBER0 , length ) ;
 channel . shutdownWrites ( ) ;
 Channels . flushBlocking ( channel ) ;
 + completionHandler . handleComplete ( ) ;
 } catch ( IOException ignored ) {
 IoUtils . safeClose ( fileChannel ) ;
 completionHandler . handleComplete ( ) ;

Call completion handler from direct file cache


<nb> public class MetricRegistryTest {
 assertThat ( registry . getTimers ( ) )
 . contains ( entry ( STRING0 , timer ) ) ;
 }
 +
 + @ test
 + public void hasASetOfRegisteredMetricNames ( ) throws Exception {
 + registry . register ( STRING1 , gauge ) ;
 + registry . register ( STRING2 , counter ) ;
 + registry . register ( STRING3 , histogram ) ;
 + registry . register ( STRING4 , meter ) ;
 + registry . register ( STRING0 , timer ) ;
 +
 + assertThat ( registry . getNames ( ) )
 + . containsOnly ( STRING1 , STRING2 , STRING3 , STRING4 , STRING0 ) ;
 + }
 }

Added a test for MetricRegistry getNames


<nb> public class CropImageView extends ImageView {
 int height = cropped . getHeight ( ) ;
 int outWidth = NUMBER0 ;
 int outHeight = NUMBER0 ;
 - float imageRatio = getRatioX ( ) / getRatioY ( ) ;
 + float imageRatio = getRatioX ( mFrameRect . width ( ) ) / getRatioY ( mFrameRect . height ( ) ) ;

 if ( mOutputWidth > NUMBER0 ) {
 outWidth = mOutputWidth ;


<nb> public class ValidatorParameterHelper {
 }

 public V anyType ( ) {
 - return extendsType ( CanonicalNameConstants . OBJECT ) ;
 + return param ( new AnyTypeParameterRequirement ( ) ) ;
 }

 public V annotatedWith ( Class < ? extends Annotation > annotationClass ) {


<nb> public class RangeQueryBuilderTest extends BaseQueryTestCase < RangeQueryBuilder >
 } else {
 SINGLE
 query = new RangeQueryBuilder ( DATE_FIELD_NAME ) ;
 - query . from ( new DateTime ( System . currentTimeMillis ( ) - randomIntBetween ( NUMBER0 , NUMBER1 ) ) . toString ( ) ) ;
 - query . to ( new DateTime ( System . currentTimeMillis ( ) + randomIntBetween ( NUMBER0 , NUMBER1 ) ) . toString ( ) ) ;
 + query . from ( new DateTime ( System . currentTimeMillis ( ) - randomIntBetween ( NUMBER0 , NUMBER1 ) , DateTimeZone . UTC ) . toString ( ) ) ;
 + query . to ( new DateTime ( System . currentTimeMillis ( ) + randomIntBetween ( NUMBER0 , NUMBER1 ) , DateTimeZone . UTC ) . toString ( ) ) ;
 SINGLE
 if ( createContext ( ) . mapperService ( ) . smartNameFieldType ( DATE_FIELD_NAME ) != null ) {
 if ( randomBoolean ( ) ) {

Using UTC time zone in RangeQueryBuilderTest to make forbidden apis checker happy


<nb> public class PersistFileSourcesStepTest {
 assertThat ( dbTester . countRowsOfTable ( STRING0 ) ) . isEqualTo ( NUMBER_OF_FILES ) ;
 LOGGER . info ( String . format ( STRING1 , duration ) ) ;

 - benchmark . expectAround ( STRING2 , duration , NUMBER0 , Benchmark . DEFAULT_ERROR_MARGIN_PERCENTS ) ;
 + benchmark . expectAround ( STRING2 , duration , NUMBER1 , Benchmark . DEFAULT_ERROR_MARGIN_PERCENTS ) ;
 }

 private File prepareReport ( ) throws IOException {
 <nb> public class SourceDbBenchmarkTest {
 long period = end - start ;
 long throughputPerSecond = NUMBER2 * counter . get ( ) / period ;
 LOGGER . info ( String . format ( STRING3 , counter . get ( ) , period , throughputPerSecond ) ) ;
 - benchmark . expectBetween ( STRING4 , throughputPerSecond , NUMBER3 , NUMBER4 ) ;
 + benchmark . expectBetween ( STRING4 , throughputPerSecond , NUMBER5 , NUMBER6 ) ;

 } finally {
 timer . cancel ( ) ;

Adjust performance timing due to new environment


<nb> public class RtpStreamReceiver {
 packetReceivedCounter ++ ;
 transcoder . transcode ( rtpPacket . getPayload ( ) ) ;
 } catch ( IOException e ) {
 - log . error ( STRING0 ) ;
 + SINGLE
 receivePackets = false ;
 }
 }

remove error log as it s not an error to get the exception


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import static NAMESPACE ;
 + import static NAMESPACE ;

 public class WhenThingsGoWrongTests extends ScriptTestCase {
 public void testNullPointer ( ) {
 <nb> public class WhenThingsGoWrongTests extends ScriptTestCase {
 PatternSyntaxException e = expectScriptThrows ( PatternSyntaxException . class , ( ) - > {
 exec ( STRING0 ) ; SINGLE
 } ) ;
 - assertEquals ( STRING1 , e . getMessage ( ) ) ;
 + assertThat ( e . getMessage ( ) , containsString ( STRING2 ) ) ;
 + assertThat ( e . getMessage ( ) , containsString ( STRING3 ) ) ;
 }

 }


<nb> public class MaterialCalendarView extends FrameLayout {
 return view == object ;
 }

 + @ override
 + public CharSequence getPageTitle ( int position ) {
 + return view . titleChanger . getTitleFormatter ( ) . format ( getItem ( position ) ) ;
 + }
 +
 public void setCallbacks ( MonthView . Callbacks callbacks ) {
 this . callbacks = callbacks ;
 for ( MonthView monthView : currentViews ) {

Implemented getPageTitle to MonthPageAdapter


<nb> public class Allocation extends BaseObj {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public void setIoInputNotificationHandler ( IoInputNotifier callback ) {


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - final class ImmediateExecutor implements Executor {
 + public final class ImmediateExecutor implements Executor {

 COMMENT
 COMMENT
 <nb> final class ImmediateExecutor implements Executor {
 public void execute ( Runnable command ) {
 command . run ( ) ;
 }
 +
 + private ImmediateExecutor ( ) {
 + }
 }

Fix visibily of ImmediateExecutor and add private constructor


<nb> public class HazelcastClientListTest {
 }
 assertTrue ( list . isEmpty ( ) ) ;

 - for ( int i = NUMBER0 ; i < count ; i ++ ) {
 - assertFalse ( list . remove ( ( Object ) i ) ) ;
 - }

 for ( int i = count ; i < NUMBER1 * count ; i ++ ) {


<nb> public class UISettings extends SimpleModificationTracker implements PersistentS
 IconLoader . setFilter ( MatrixFilter . get ( COLOR_BLINDNESS ) ) ;
 }

 - COMMENT
 - COMMENT
 - COMMENT
 - public void removeUISettingsListener ( UISettingsListener listener ) {
 - myDispatcher . removeListener ( listener ) ;
 - }
 -
 private void setSystemFontFaceAndSize ( ) {
 if ( FONT_FACE == null || FONT_SIZE <= NUMBER0 ) {
 final Pair < String , Integer > fontData = getSystemFontFaceAndSize ( ) ;


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

 + import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class TraverseOptions implements Cloneable , Serializable {
 if ( graph == null )
 throw new IllegalStateException ( STRING0 ) ;
 findEndpointVertices ( ) ;
 - setCalendarService ( graph . getService ( CalendarService . class ) ) ;
 + CalendarServiceData csData = graph . getService ( CalendarServiceData . class ) ;
 + if ( csData != null ) {
 + CalendarServiceImpl calendarService = new CalendarServiceImpl ( ) ;
 + calendarService . setData ( csData ) ;
 + setCalendarService ( calendarService ) ;
 + }
 setTransferTable ( graph . getTransferTable ( ) ) ;
 setServiceDays ( ) ;
 if ( getModes ( ) . isTransit ( )


<nb> public class DeterministicCorefAnnotator implements Annotator {
 @ override
 public Set < Class < ? extends CoreAnnotation > > requires ( ) {
 return Collections . unmodifiableSet ( new ArraySet < > ( Arrays . asList (
 - CoreAnnotations . MentionTokenAnnotation . class ,
 + edu . stanford . nlp . hcoref . CorefCoreAnnotations . CorefMentionsAnnotation . class ,
 SemanticGraphCoreAnnotations . AlternativeDependenciesAnnotation . class
 ) ) ) ;
 }
 <nb> public class HybridCorefAnnotator extends TextAnnotationCreator implements Annot
 @ override
 public Set < Class < ? extends CoreAnnotation > > requires ( ) {
 return Collections . unmodifiableSet ( new ArraySet < > ( Arrays . asList (
 - CoreAnnotations . MentionTokenAnnotation . class ,
 CoreAnnotations . TokensAnnotation . class ,
 CoreAnnotations . SentencesAnnotation . class ,
 SemanticGraphCoreAnnotations . BasicDependenciesAnnotation . class ,
 SemanticGraphCoreAnnotations . CollapsedDependenciesAnnotation . class ,
 - SemanticGraphCoreAnnotations . CollapsedCCProcessedDependenciesAnnotation . class
 + SemanticGraphCoreAnnotations . CollapsedCCProcessedDependenciesAnnotation . class ,
 + CorefCoreAnnotations . CorefMentionsAnnotation . class
 ) ) ) ;
 }


<nb> public class GceComputeServiceImpl extends AbstractLifecycleComponent < GceCompute
 }
 } ) ;
 SINGLE
 - return instanceList . isEmpty ( ) || instanceList . getItems ( ) == null ? Collections . < Instance > emptyList ( ) : instanceList . getItems ( ) ;
 + return instanceList . isEmpty ( ) || instanceList . getItems ( ) == null ?
 + Collections . < Instance > emptyList ( ) : instanceList . getItems ( ) ;
 } catch ( PrivilegedActionException e ) {
 logger . warn ( STRING0 , e , zoneId ) ;
 logger . debug ( STRING1 , e ) ;


<nb> package NAMESPACE ;
 COMMENT
 public enum WeightInit {
 COMMENT
 - Variance normalized initialization ( VI ) ( Glorot )
 - Sparse initialization ( SI ) ( Martens )
 - Zeros: straight zeros
 - Sample weights from a distribution
 + Distribution: Sample weights from a distribution based on shape of input
 + Normalized: Normalize sample weights
 + Size: Sample weights from bound uniform distribution using shape for min and max
 + Uniform: Sample weights from bound uniform distribution ( specify min and max )
 + VI: Sample weights from variance normalized initialization ( Glorot )
 + Zeros: Generate weights as zeros
 +
 + TBD: Sparse initialization ( SI ) ( Martens )
 COMMENT
 - VI , ZERO , SIZE , DISTRIBUTION , NORMALIZED , UNIFORM
 + DISTRIBUTION , NORMALIZED , SIZE , UNIFORM , VI , ZERO

 }

Added comments to clarify weight init options


<nb>
 package NAMESPACE ;

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

 + import NAMESPACE ;
 import NAMESPACE ;

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

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

Remove bad imports of org codehaus plexus util StringUtils


<nb> public class JarHell {
 if ( clazz . startsWith ( STRING0 ) ) {
 return ; SINGLE
 }
 + if ( clazz . equals ( STRING1 ) )
 + return ; SINGLE
 if ( clazz . equals ( STRING2 ) ) {
 return ; SINGLE
 }

Ignore InternalSettingsPreparer in JarHell check


<nb> public class JavaScriptProtocol extends AtmosphereInterceptorAdapter {

 if ( enforceAtmosphereVersion ) {
 String javascriptVersion = request . getHeader ( HeaderConfig . X_ATMOSPHERE_FRAMEWORK ) ;
 - int version = parseVersion ( javascriptVersion . split ( STRING0 ) [ NUMBER0 ] ) ;
 + int version = NUMBER0 ;
 + if ( javascriptVersion != null ) {
 + version = parseVersion ( javascriptVersion . split ( STRING0 ) [ NUMBER0 ] ) ;
 + }
 +
 if ( version < NUMBER1 ) {
 logger . error ( STRING1 , javascriptVersion ) ;
 response . setStatus ( NUMBER2 ) ;


<nb> import static NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class PaymentChannelClient {
 - SINGLE
 private static final org . slf4j . Logger log = LoggerFactory . getLogger ( PaymentChannelClient . class ) ;

 protected final ReentrantLock lock = Threading . lock ( STRING0 ) ;
 <nb> public class PaymentChannelClient {
 public void sendToServer ( Protos . TwoWayChannelMessage msg ) ;

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

Add some comments for stateless protocols


<nb> public class ElasticDownloadView extends FrameLayout implements IntroView . EnterA

 SINGLE
 }
 +
 +
 + SINGLE
 + SINGLE
 + SINGLE
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setBackgroundColor ( int passedColor ) {
 + this . mBackgroundColor = passedColor ;
 + this . mProgressDownloadView . setBackgroundColor ( mBackgroundColor ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setBackgroundColor ( String passedColor ) {
 + if ( passedColor == null ) {
 + return ;
 + }
 + try {
 + int color = Color . parseColor ( passedColor ) ;
 + this . setBackgroundColor ( color ) ;
 + } catch ( Exception e ) { }
 + }

 }

Added the ability to set the background color


<nb> public class YoutubeExtractor implements Extractor {
 try {
 URI uri = new URI ( videoUrl ) ;
 if ( uri . getHost ( ) . contains ( STRING0 ) ) {
 - String query = uri . getQuery ( ) ;
 - String queryElements [ ] = query . split ( STRING1 ) ;
 + String fragment = uri . getFragment ( ) ;
 + fragment = fragment . replace ( STRING2 , STRING3 ) ;
 + String queryElements [ ] = fragment . split ( STRING1 ) ;
 Map < String , String > queryArguments = new HashMap < > ( ) ;
 for ( String e : queryElements ) {
 String [ ] s = e . split ( STRING4 ) ;


<nb> public class RxPermissions {
 COMMENT
 public Observable < Boolean > request ( final String . . . permissions ) {
 if ( permissions == null || permissions . length == NUMBER0 ) {
 - throw new IllegalArgumentException ( STRING0 ) ;
 + throw new IllegalArgumentException ( STRING1 ) ;
 }
 if ( isGranted ( permissions ) ) {
 SINGLE
 <nb> public class RxPermissions {
 PublishSubject < Boolean > subject = mSubjects . get ( permissions [ i ] ) ;
 if ( subject == null ) {
 SINGLE
 - throw new IllegalStateException ( STRING2 ) ;
 + throw new IllegalStateException ( STRING3 ) ;
 }
 mSubjects . remove ( permissions [ i ] ) ;
 subject . onNext ( grantResults [ i ] == PackageManager . PERMISSION_GRANTED ) ;


<nb> public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements
 position . set ( Balloon . Position . atLeft ) ;
 }

 - Icon actualIcon = icon != null ? icon : type . getDefaultIcon ( ) ;
 -
 final BalloonHyperlinkListener listenerWrapper = new BalloonHyperlinkListener ( listener ) ;
 final Balloon balloon =
 - JBPopupFactory . getInstance ( ) . createHtmlTextBalloonBuilder ( text . replace ( STRING0 , STRING1 ) , actualIcon , type . getPopupBackground ( ) , listenerWrapper )
 + JBPopupFactory . getInstance ( ) . createHtmlTextBalloonBuilder ( text . replace ( STRING0 , STRING1 ) , icon , type . getPopupBackground ( ) , listenerWrapper )
 . setHideOnClickOutside ( false ) . setHideOnFrameResize ( false ) . createBalloon ( ) ;
 FrameStateManager . getInstance ( ) . getApplicationActive ( ) . doWhenDone ( new Runnable ( ) {
 @ override

no default icon in balloon notifications the background tells everything


<nb> public class NodeTool
 System . out . println ( STRING0 + format ( ( Long ) probe . getColumnFamilyMetric ( keyspaceName , cfName , STRING1 ) , humanReadable ) ) ;
 System . out . println ( STRING2 + format ( offHeapSize , humanReadable ) ) ;
 System . out . println ( STRING3 + probe . getColumnFamilyMetric ( keyspaceName , cfName , STRING4 ) ) ;
 + int numberOfKeys = NUMBER0 ;
 + for ( long keys : ( long [ ] ) probe . getColumnFamilyMetric ( keyspaceName , cfName , STRING5 ) )
 + numberOfKeys += keys ;
 + System . out . println ( STRING6 + numberOfKeys ) ;
 System . out . println ( STRING7 + probe . getColumnFamilyMetric ( keyspaceName , cfName , STRING8 ) ) ;
 System . out . println ( STRING9 + format ( ( Long ) probe . getColumnFamilyMetric ( keyspaceName , cfName , STRING10 ) , humanReadable ) ) ;
 System . out . println ( STRING11 + format ( memtableOffHeapSize , humanReadable ) ) ;


<nb> public class TestNonBlockingAPI extends TomcatBaseTest {
 @ override
 protected void doGet ( HttpServletRequest request , HttpServletResponse response )
 throws ServletException , IOException {
 - boolean notify = Boolean . valueOf ( request . getParameter ( STRING0 ) ) ;
 + boolean notify = Boolean . parseBoolean ( request . getParameter ( STRING0 ) ) ;
 AsyncContext ctx = request . startAsync ( ) ;
 ctx . setTimeout ( NUMBER0 ) ;
 if ( ! notify ) {


<nb> public class MediaUtils
 Constants . TELEPHONE_EVENT ,
 NUMBER0 ) ;

 + COMMENT
 addMediaFormats ( ( byte ) SdpConstants . JPEG ,
 STRING0 ,
 MediaType . VIDEO ,
 VideoFormat . JPEG_RTP ) ;
 -
 - COMMENT
 addMediaFormats (
 ( byte ) SdpConstants . H263 ,
 STRING1 ,

Disables JPEG since it doesn t really work


<nb> public class StatsService extends Service {
 public void run ( ) {
 numberOfFinishedNetworkCalls ++ ;
 AppLog . d ( T . STATS , STRING0 + date + STRING1 ) ;
 - if ( response == null || ! response . has ( STRING2 ) ) {
 + if ( response == null || ! response . has ( STRING3 ) ) {
 notifyResponseReceived ( ) ;
 return ;
 }

Fix an issue where country views doesn t correctly show today yesterday


<nb> public class BTreeMap < K , V > extends AbstractMap < K , V >
 final long next = DataInput2 . unpackLong ( in ) ;
 final Object [ ] keys = keySerializer . deserialize ( in , start , end , size ) ;
 assert ( keys . length == size ) ;
 - assert ( keys . length == size ) ;
 Object [ ] vals = new Object [ size - NUMBER0 ] ;
 if ( hasValues ) {
 for ( int i = NUMBER1 ; i < size - NUMBER0 ; i ++ ) {


<nb> public abstract class ScrollDirectionDetector implements AbsListView . OnScrollLis
 mPreviousFirstVisibleItem = firstVisibleItem ;
 }
 }
 -
 }

 public ScrollDirectionListener getScrollDirectionListener ( ) {


<nb> public class PhilmMovie {

 Images images = movie . images ;
 if ( images != null ) {
 - fanartUrl = images . fanart ;
 - posterUrl = images . poster ;
 - fanartType = TYPE_TRAKT ;
 - posterType = TYPE_TRAKT ;
 + if ( TextUtils . isEmpty ( fanartUrl ) ) {
 + fanartUrl = images . fanart ;
 + fanartType = TYPE_TRAKT ;
 + }
 + if ( TextUtils . isEmpty ( posterUrl ) ) {
 + posterUrl = images . poster ;
 + posterType = TYPE_TRAKT ;
 + }
 }

 if ( movie . genres != null ) {

Don t overwrite TMDB backdrops from Trakt


<nb> public class RandomizingClient extends FilterClient {
 SearchType . DFS_QUERY_THEN_FETCH ,
 SearchType . QUERY_THEN_FETCH ) ) ;
 if ( random . nextInt ( NUMBER0 ) == NUMBER1 ) {
 - defaultPreference = RandomPicks . randomFrom ( random , EnumSet . of ( Preference . PRIMARY_FIRST , Preference . PRIMARY , Preference . LOCAL ) ) . type ( ) ;
 + defaultPreference = RandomPicks . randomFrom ( random , EnumSet . of ( Preference . PRIMARY_FIRST , Preference . LOCAL ) ) . type ( ) ;
 } else if ( random . nextInt ( NUMBER0 ) == NUMBER1 ) {
 String s = TestUtil . randomRealisticUnicodeString ( random , NUMBER2 , NUMBER0 ) ;
 defaultPreference = s . startsWith ( STRING0 ) ? null : s ; SINGLE

TEST Don t randomize preference PRIMARY it might not try replicas depending on the clusterstate


<nb> public class DefaultMethodsTest {
 return STRING0 ;
 }
 }
 - assertThat ( new Foo ( ) . foo ( ) , is ( STRING0 ) ) ;
 + assertThat ( STRING1 , new Foo ( ) . foo ( ) , is ( STRING0 ) ) ;
 + assertThat ( STRING2 , ( ( Parent ) new Foo ( ) ) . foo ( ) , is ( ( Object ) STRING0 ) ) ;
 }

 public interface Parent {

Improved test to double check that the bridge method is not needed


<nb> public class CanvasView extends FrameLayout {
 @ suppresswarnings ( STRING0 )
 @ subscribe
 public void onBeginCollapseTransition ( MainController . BeginCollapseTransitionEvent e ) {
 + if ( ! mExpanded ) {
 + return ;
 + }
 mExpanded = false ;
 if ( mContentView != null ) {
 mContentView . onAnimateOffscreen ( ) ;
 <nb> public class CanvasView extends FrameLayout {
 @ suppresswarnings ( STRING0 )
 @ subscribe
 public void onEndCollapseTransition ( MainController . EndCollapseTransitionEvent e ) {
 - fadeOut ( ) ;
 + if ( mExpanded ) {
 + fadeOut ( ) ;
 + }
 }

 @ suppresswarnings ( STRING0 )


<nb> public class HiveOpConverter {
 WindowingComponentizer groups = new WindowingComponentizer ( wSpec ) ;
 RowResolver rr = new RowResolver ( ) ;
 for ( ColumnInfo ci : input . getSchema ( ) . getSignature ( ) ) {
 - rr . put ( ci . getTabAlias ( ) , ci . getInternalName ( ) , ci ) ;
 + rr . put ( inputOpAf . tabAlias , ci . getInternalName ( ) , ci ) ;
 }

 while ( groups . hasNext ( ) ) {

Fix table alias propagation for windowing Jesus Camacho Rodriguez reviewed by Pengcheng Xiong


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class MySqlValidConnectionChecker implements ValidConnectionChecker , Seri
 try {
 ping . invoke ( conn ) ;
 return true ;
 + } catch ( InvocationTargetException e ) {
 + Throwable cause = e . getCause ( ) ;
 + if ( cause instanceof SQLException ) {
 + return false ;
 + }
 +
 + LOG . warn ( STRING0 , e ) ;
 + return false ;
 } catch ( Exception e ) {
 LOG . warn ( STRING0 , e ) ;
 return false ;


<nb> public abstract class JoglAbstractDisplay extends JoglContext implements GLEvent

 renderer = new JoglRenderer ( ) ;

 - renderer . setMainFrameBufferSrgb ( settings . getGammaCorrection ( ) ) ;
 + canvas . invoke ( false , new GLRunnable ( ) {
 + public boolean run ( GLAutoDrawable glad ) {
 + renderer . setMainFrameBufferSrgb ( settings . getGammaCorrection ( ) ) ;
 + return true ;
 + }
 + } ) ;
 }

 protected void startGLCanvas ( ) {
 <nb> public abstract class JoglNewtAbstractDisplay extends JoglContext implements GLE

 renderer = new JoglRenderer ( ) ;

 - renderer . setMainFrameBufferSrgb ( settings . getGammaCorrection ( ) ) ;
 + canvas . invoke ( false , new GLRunnable ( ) {
 + public boolean run ( GLAutoDrawable glad ) {
 + renderer . setMainFrameBufferSrgb ( settings . getGammaCorrection ( ) ) ;
 + return true ;
 + }
 + } ) ;
 }

 protected void startGLCanvas ( ) {

Fixes a GLException caused by a regression on the management of the gamma correction in the JOGL backend


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;

 public class SampleApplication extends ZLApplication {
 public SampleApplication ( ) {
 super ( STRING0 ) ;
 setView ( new SampleView ( this , getContext ( ) ) ) ;
 }
 +
 + public ZLKeyBindings keyBindings ( ) {
 + return null ;
 + }
 }
 <nb> import NAMESPACE ;

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

 import NAMESPACE ;
 <nb> public class ZLSwingApplicationWindow extends ZLApplicationWindow {
 return viewWidget ;
 }

 + public void addToolbarItem ( Item item ) {
 + SINGLE
 + }
 +
 + public void setToolbarItemState ( Item item , boolean visible , boolean enabled ) {
 + SINGLE
 + }
 +
 + public void setToggleButtonState ( ButtonItem item ) {
 + SINGLE
 + }
 +
 private JFrame myFrame ;
 }


<nb> public class DroidGap extends PhonegapActivity {
 this . ctx . loadUrlTimeout ++ ;

 SINGLE
 - this . ctx . pluginManager . exec ( STRING0 , STRING1 , null , STRING2 , false ) ;
 + this . ctx . spinnerStop ( ) ;

 SINGLE
 this . ctx . onReceivedError ( errorCode , description , failingUrl ) ;


<nb> public class JavaParserDefinition implements ParserDefinition {
 lexer = new JavaLexer ( ( ( PsiJavaFile ) containingFile ) . getLanguageLevel ( ) ) ;
 else lexer = new JavaLexer ( LanguageLevel . HIGHEST ) ;
 if ( right . getElementType ( ) == JavaDocTokenType . DOC_TAG_VALUE_SHARP_TOKEN ) return SpaceRequirements . MUST_NOT ;
 + if ( left . getElementType ( ) == JavaDocTokenType . DOC_TAG_VALUE_SHARP_TOKEN ) return SpaceRequirements . MUST_NOT ;
 final SpaceRequirements spaceRequirements = LanguageUtil . canStickTokensTogetherByLexer ( left , right , lexer , NUMBER0 ) ;
 if ( left . getElementType ( ) == JavaTokenType . END_OF_LINE_COMMENT ) return SpaceRequirements . MUST_LINE_BREAK ;


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

 import NAMESPACE ;


<nb> public abstract class OrientBaseGraph implements IndexableGraph , MetaGraph < OData
 msg . append ( s ) ;

 SINGLE
 - OLogManager . instance ( ) . warn ( this ,
 - STRING0 , msg . toString ( ) ) ;
 + OLogManager
 + . instance ( )
 + . warn ( this , STRING1 , msg . toString ( ) ) ;
 }
 raw . commit ( ) ;
 committed = true ;


<nb> public interface PyClass extends PsiNamedElement , PyStatement , NameDefiner , PyDo
 Iterable < PyClass > iterateAncestors ( ) ;

 COMMENT
 - COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public final class AppSettings extends HashMap < String , Object > {
 COMMENT
 COMMENT
 public static final String ANDROID_OPENAL_SOFT = STRING0 ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String JOGL = STRING1 ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String JOAL = STRING2 ;

 static {
 defaults . put ( STRING3 , NUMBER0 ) ;

Adds some options into AppSettings for JogAmp s JOGL and JOAL


<nb> public class HystrixCollapserTest {
 private final Collection < CollapsedRequest < String , String > > requests ;

 TestCollapserCommand ( Collection < CollapsedRequest < String , String > > requests ) {
 - super ( testPropsBuilder ( ) . setCommandPropertiesDefaults ( HystrixCommandPropertiesTest . getUnitTestPropertiesSetter ( ) . withExecutionTimeoutInMilliseconds ( NUMBER0 ) ) ) ;
 + super ( testPropsBuilder ( ) . setCommandPropertiesDefaults ( HystrixCommandPropertiesTest . getUnitTestPropertiesSetter ( ) . withExecutionTimeoutInMilliseconds ( NUMBER1 ) ) ) ;
 this . requests = requests ;
 }

Increased batch command timeout in HystrixCollapserTest to accommodate Travis slowness


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class SubjectDnX509PrincipalExtractor implements X509PrincipalExtractor {
 private Pattern subjectDnPattern ;

 public SubjectDnX509PrincipalExtractor ( ) {
 - setSubjectDnRegex ( STRING0 ) ;
 + setSubjectDnRegex ( STRING1 ) ;
 }

 public Object extractPrincipal ( X509Certificate clientCert ) {
 <nb> public class SubjectDnX509PrincipalExtractor implements X509PrincipalExtractor {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

SubjectDnX509PrincipalExtractor supports CN as last segement


<nb> public class Linkify {

 return NUMBER0 ;
 }
 -
 - public final boolean equals ( Object o ) {
 - return false ;
 - }
 } ;

 Collections . sort ( links , c ) ;


<nb> public class SenderChannel
 try
 {
 buffers . rotate ( ) ;
 - cleanedTermId . incrementAndGet ( ) ;
 + cleanedTermId . incrementAndGet ( ) ; SINGLE
 }
 catch ( final IOException ex )
 {


<nb> public class IndexingStamp {
 }
 catch ( RuntimeException e ) {
 final Throwable cause = e . getCause ( ) ;
 - if ( cause instanceof IOException ) {
 - FileBasedIndex . getInstance ( ) . requestRebuild ( indexName , cause ) ;
 + if ( ! ( cause instanceof IOException ) ) {
 + throw e ; SINGLE
 }
 }

in case of IO exceptions consider file unindexed


<nb> public class FormatTest {
 assertEquals ( STRING0 , Printf . str ( STRING1 , FLOAT0 ) ) ;
 assertEquals ( STRING2 , Printf . str ( STRING3 , FLOAT0 ) ) ;
 assertEquals ( STRING4 , Printf . str ( STRING3 , FLOAT1 ) ) ;
 -
 - assertEquals ( STRING5 , Printf . str ( STRING6 , FLOAT2 ) ) ;
 + assertEquals ( STRING5 , Printf . str ( STRING6 , FLOAT3 ) ) ;
 + assertEquals ( STRING7 , Printf . str ( STRING6 , FLOAT2 ) ) ;
 assertEquals ( STRING7 , Printf . str ( STRING6 , FLOAT4 ) ) ;
 assertEquals ( STRING8 , Printf . str ( STRING9 , FLOAT5 ) ) ;
 assertEquals ( STRING8 , Printf . str ( STRING9 , FLOAT6 ) ) ;


<nb> public class GrapeEngineInstaller {
 try {
 Field instanceField = Grape . class . getDeclaredField ( STRING0 ) ;
 instanceField . setAccessible ( true ) ;
 -
 - GrapeEngine existingGrapeEngine = ( GrapeEngine ) instanceField . get ( null ) ;
 -
 - if ( existingGrapeEngine == null ) {
 - instanceField . set ( null , this . grapeEngine ) ;
 - }
 - else if ( ! existingGrapeEngine . getClass ( ) . equals (
 - this . grapeEngine . getClass ( ) ) ) {
 - throw new IllegalStateException (
 - STRING1 ) ;
 - }
 + instanceField . set ( null , this . grapeEngine ) ;
 }
 catch ( Exception ex ) {
 throw new IllegalStateException ( STRING2 , ex ) ;


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;


<nb> public class Matchers {
 COMMENT
 COMMENT
 COMMENT
 - public static < T > T anyObject ( ) {
 - return reportMatcher ( Any . ANY ) . returnNull ( ) ;
 + @ suppresswarnings ( STRING0 )
 + public static < T > T anyObject ( ) {
 + return ( T ) reportMatcher ( Any . ANY ) . returnNull ( ) ;
 }

 COMMENT


<nb> public class AgentBuilderDefaultApplicationTest {
 . withTypeStrategy ( AgentBuilder . TypeStrategy . REDEFINE )
 . withRedefinitionStrategy ( AgentBuilder . RedefinitionStrategy . REDEFINITION )
 . type ( isAnnotatedWith ( ShouldRebase . class ) , ElementMatchers . is ( classLoader ) ) . transform ( new FooTransformer ( ) )
 - . withListener ( new AgentBuilder . Listener ( ) {
 - @ override
 - public void onTransformation ( TypeDescription typeDescription , DynamicType dynamicType ) {
 -
 - }
 -
 - @ override
 - public void onIgnored ( TypeDescription typeDescription ) {
 -
 - }
 -
 - @ override
 - public void onError ( String typeName , Throwable throwable ) {
 - throwable . printStackTrace ( System . err ) ;
 - }
 -
 - @ override
 - public void onComplete ( String typeName ) {
 -
 - }
 - } )
 . installOnByteBuddyAgent ( ) ;
 try {
 Class < ? > type = classLoader . loadClass ( Foo . class . getName ( ) ) ;

Removed listener again as Travis seems to be happy on this rebuild for whatever reason


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;

 <nb> public class Cloud extends Request {
 response . add ( NODES , nodes ) ;
 response . addProperty ( CONSENSUS , Paxos . _commonKnowledge ) ; SINGLE
 response . addProperty ( LOCKED , Paxos . _cloudLocked ) ; SINGLE
 + Log . info ( STRING0 ) ;
 + for ( String s : response . toString ( ) . split ( STRING1 ) ) if ( ! s . equals ( STRING2 ) && s . length ( ) > NUMBER0 ) Log . info ( s ) ; SINGLE
 Response r = Response . done ( response ) ;
 r . setBuilder ( CONSENSUS , new BooleanStringBuilder ( STRING3 , STRING4 ) ) ;
 r . setBuilder ( LOCKED , new BooleanStringBuilder ( STRING5 , STRING6 ) ) ;

Log the cloud status everytime it s called


<nb> public class TestMaxConnections extends TomcatBaseTest {
 tomcat . getConnector ( ) . setProperty ( STRING0 , STRING1 ) ;
 tomcat . getConnector ( ) . setProperty ( STRING2 , STRING3 ) ;
 tomcat . start ( ) ;
 + Thread . currentThread ( ) . sleep ( NUMBER0 ) ;
 }

 private class TestClient extends SimpleHttpClient {


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 +
 import NAMESPACE ;

 COMMENT
 <nb> public class CountDownLatch {
 COMMENT
 COMMENT
 COMMENT
 + @ suspendable
 public void await ( ) throws InterruptedException {
 sync . acquireSharedInterruptibly ( NUMBER0 ) ;
 }
 <nb> public class CountDownLatch {
 COMMENT
 COMMENT
 COMMENT
 + @ suspendable
 public boolean await ( long timeout , TimeUnit unit )
 throws InterruptedException {
 return sync . tryAcquireSharedNanos ( NUMBER0 , unit . toNanos ( timeout ) ) ;

Add suspendable annotations to appropriate countdownlatch methods


<nb> public class StickyListHeadersListView extends ListView {
 COMMENT
 public View getItemView ( View wrapperView ) {
 if ( ! ( wrapperView instanceof WrapperView ) )
 - return null ;
 + throw new ClassCastException ( STRING0 ) ;

 return ( ( WrapperView ) wrapperView ) . mItem ;

Changed getItemView method to crash with a ClassCastException if the view given is not a WrapperView


<nb> public class MultiWaveView extends View {
 private void startChevronAnimation ( ) {
 final float chevronStartDistance = mHandleDrawable . getWidth ( ) * FLOAT0 ;
 final float chevronStopDistance = mOuterRadius * FLOAT1 / FLOAT2 ;
 - mChevronAnimations . clear ( ) ;
 final float startScale = FLOAT3 ;
 final float endScale = FLOAT2 ;
 -
 final int directionCount = mFeedbackCount > NUMBER0 ? mChevronDrawables . size ( ) / mFeedbackCount : NUMBER0 ;

 mChevronAnimations . stop ( ) ;

Fix glitch in chevron animation in MultiWaveView


<nb> class DetectorOptions {
 private boolean ignoreCase ;
 COMMENT
 private MatchSuppressor suppressor = NeverSuppress . INSTANCE ;
 + COMMENT
 + private Pattern pattern ;

 COMMENT
 COMMENT
 <nb> class DetectorOptions {
 COMMENT
 public DetectorOptions setFormat ( String format ) {
 this . format = format ;
 + pattern = null ;
 return this ;
 }

 <nb> class DetectorOptions {
 COMMENT
 public DetectorOptions setIgnoreCase ( boolean ignore ) {
 ignoreCase = ignore ;
 + pattern = null ;
 return this ;
 }

 <nb> class DetectorOptions {
 COMMENT
 COMMENT
 public Pattern getPattern ( ) {
 + if ( pattern != null ) {
 + return pattern ;
 + }
 int options = compileFlags ;

 if ( ignoreCase ) {
 options |= Pattern . CASE_INSENSITIVE ;
 }
 - return Pattern . compile ( format , options ) ;
 + pattern = Pattern . compile ( format , options ) ;
 + return pattern ;
 }
 }

Do not recompile Pattern for each file line


<nb>
 COMMENT
 package NAMESPACE ;

 - import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class LSH < E > implements NearestNeighborSearch < double [ ] , E > , KNNSearch < do
 COMMENT
 COMMENT
 private Set < Integer > obtainCandidates ( double [ ] q ) {
 - Set < Integer > candidates = new HashSet < Integer > ( ) ;
 + Set < Integer > candidates = new LinkedHashSet < Integer > ( ) ;
 for ( Hash h : hash ) {
 BucketEntry bucket = h . get ( q ) ;
 if ( bucket != null ) {

optimize the import use Linked one will be more efficient


<nb> public class PyControlFlowBuilder extends PyRecursiveElementVisitor {
 if ( callNode != null ) {
 final PsiElement element = callNode . getPsi ( ) ;
 if ( element instanceof PyCallExpression ) {
 - withSelfAssertRaises = ( ( PyCallExpression ) element ) . isCalleeText ( SELF_ASSERT_RAISES ) ;
 + final PyExpression callee = ( ( PyCallExpression ) element ) . getCallee ( ) ;
 + if ( callee != null ) {
 + final String repr = PyUtil . getReadableRepr ( callee , true ) ;
 + withSelfAssertRaises = SELF_ASSERT_RAISES . equals ( repr ) ;
 + }
 }
 if ( element instanceof PyReferenceExpression ) {
 withSelfAssertRaises = SELF_ASSERT_RAISES . equals ( element . getText ( ) ) ;

Fixed regression in unreachable inspection for with self assertRaises blocks


<nb> public class ClassPathPackageInfoSource {
 SINGLE
 topLevelClasses . add ( Class . forName ( className , false ,
 ( classLoader != null ) ? classLoader : CLASS_LOADER ) ) ;
 - } catch ( ClassNotFoundException e ) {
 + } catch ( ClassNotFoundException | NoClassDefFoundError e ) {
 SINGLE
 SINGLE
 Log . w ( STRING0 , STRING1

Fix test framework to allow Mockito tests to run successfully on ART


<nb> public class PythonAPIGenerator {
 } else {
 out . write ( STRING0 + element . getName ( ) + STRING1 ) ;
 }
 + } else {
 + out . write ( STRING2 ) ;
 }
 out . write ( STRING3 ) ;

Python generate wasnt closing brackets it there were no params


<nb> public class ProjectAdministrationTest {
 ) . build ( ) ;
 new SeleneseTest ( selenese ) . runOn ( orchestrator ) ;

 + SINGLE
 assertThat ( orchestrator . getServer ( ) . getAdminWsClient ( ) . find ( PropertyQuery . createForResource ( STRING0 , STRING1 ) ) . getValue ( ) )
 . isEqualTo ( STRING2 ) ;
 +
 + SINGLE
 + SINGLE
 + assertThat ( orchestrator . getServer ( ) . getAdminWsClient ( ) . findAll ( PropertyQuery . createForResource ( null , STRING1 ) ) ) . isNotEmpty ( ) ;
 }

 COMMENT

Add integration test for WS GET api properties


<nb> public class DatabaseChangeLog implements Comparable < DatabaseChangeLog > , Conditi
 return new Comparator < String > ( ) {
 @ override
 public int compare ( String o1 , String o2 ) {
 - return o1 . compareTo ( o2 ) ;
 + SINGLE
 + SINGLE
 + return o1 . replace ( STRING0 , STRING1 ) . compareTo ( o2 . replace ( STRING0 , STRING1 ) ) ;
 }
 } ;
 }

by ignoring WEB INF classes in path all changelog Files independent


<nb> public abstract class Drawable {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class InternalEngine extends Engine {
 manager = createSearcherManager ( ) ;
 this . searcherManager = manager ;
 this . versionMap . setManager ( searcherManager ) ;
 - try {
 - if ( openMode == EngineConfig . OpenMode . OPEN_INDEX_CREATE_TRANSLOG ) {
 - SINGLE
 - commitIndexWriter ( writer , translog , lastCommittedSegmentInfos . getUserData ( ) . get ( SYNC_COMMIT_ID ) ) ;
 - }
 - } catch ( IOException | EngineException ex ) {
 - throw new EngineCreationFailureException ( shardId , STRING0 , ex ) ;
 - }
 - SINGLE
 + SINGLE
 allowCommits . compareAndSet ( true , openMode != EngineConfig . OpenMode . OPEN_INDEX_AND_TRANSLOG ) ;
 success = true ;
 } finally {

Remove redundant commit openTranslog already commits in that case


<nb> public class GitRememberedInputs implements PersistentStateComponent < GitRemember
 }

 public void addUrl ( @ notnull String url , @ notnull String userName ) {
 + for ( UrlAndUserName visitedUrl : myState . visitedUrls ) {
 + if ( visitedUrl . url . equalsIgnoreCase ( url ) ) { SINGLE
 + if ( ! userName . isEmpty ( ) ) { SINGLE
 + visitedUrl . userName = userName ;
 + }
 + return ;
 + }
 + }
 +
 UrlAndUserName urlAndUserName = new UrlAndUserName ( ) ;
 urlAndUserName . url = url ;
 urlAndUserName . userName = userName ;

don t add multiple entries for a single url


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

 import NAMESPACE ;
 <nb>

 package NAMESPACE ;

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


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public abstract class SafeAsyncTask < ResultT > implements Callable < ResultT > {
 - public static final int DEFAULT_POOL_SIZE = NUMBER0 ;
 + public static final int DEFAULT_POOL_SIZE = NUMBER1 ;
 protected static final Executor DEFAULT_EXECUTOR = Executors . newFixedThreadPool ( DEFAULT_POOL_SIZE ) ;

 protected Handler handler ;

revert pool size change since some groupon tests now hang because of it


<nb> public class TheTVDB {
 } ) ;
 show . getChild ( STRING0 ) . setEndTextElementListener ( new EndTextElementListener ( ) {
 public void end ( String body ) {
 - currentShow . poster = body ;
 - if ( body . length ( ) != NUMBER0 ) {
 - fetchArt ( body , true , context ) ;
 + currentShow . poster = body != null ? body . trim ( ) : STRING1 ;
 + if ( Utils . isAllowedLargeDataConnection ( context , false ) ) {
 + fetchArt ( currentShow . poster , true , context ) ;
 }
 }
 } ) ;
 <nb> public class TheTVDB {
 COMMENT
 COMMENT
 public static boolean fetchArt ( String fileName , boolean isPoster , Context context ) {
 - if ( TextUtils . isEmpty ( fileName ) || context == null ) {
 + if ( context == null || TextUtils . isEmpty ( fileName ) ) {
 return true ;
 }

Don t download show poster if large data is restricted to Wi Fi


<nb> public class Mesh implements Savable , Cloneable {
 return bufSize ;
 case LineStrip :
 return bufSize - NUMBER0 ;
 + case Patch :
 + return bufSize / patchVertexCount ;
 default :
 throw new UnsupportedOperationException ( ) ;
 }
 <nb> public class Mesh implements Savable , Cloneable {
 getBuffer ( Type . HWBoneIndex ) != null ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setPatchVertexCount ( int patchVertexCount ) {
 + this . patchVertexCount = patchVertexCount ;
 + }

 public void write ( JmeExporter ex ) throws IOException {
 OutputCapsule out = ex . getCapsule ( this ) ;

Modified computeNumElements to support n Patches


<nb> public enum Effect {
 DOOR_TOGGLE ( NUMBER0 ) ,
 EXTINGUISH ( NUMBER1 ) ,
 RECORD_PLAY ( NUMBER2 ) ,
 + GHAST_SHRIEK ( NUMBER3 ) ,
 + GHAST_SHOOT ( NUMBER4 ) ,
 + BLAZE_SHOOT ( NUMBER5 ) ,
 SMOKE ( NUMBER6 ) ,
 - STEP_SOUND ( NUMBER7 ) ;
 + STEP_SOUND ( NUMBER7 ) ,
 + POTION_BREAK ( NUMBER8 ) ,
 + ENDER_SIGNAL ( NUMBER9 ) ,
 + MOBSPAWNER_FLAMES ( NUMBER10 ) ;

 private final int id ;

Added the missing effects to the Effect enum


<nb> public class BuildManager implements ApplicationComponent {
 return projectTaskQueue . submit ( new Callable < Pair < RequestFuture < PreloadedProcessMessageHandler > , OSProcessHandler > > ( ) {
 public Pair < RequestFuture < PreloadedProcessMessageHandler > , OSProcessHandler > call ( ) throws Exception {
 if ( project . isDisposed ( ) ) {
 - throw new Exception ( STRING0 + project . getName ( ) + STRING1 ) ;
 + return null ;
 }
 final RequestFuture < PreloadedProcessMessageHandler > future = new RequestFuture < PreloadedProcessMessageHandler > ( new PreloadedProcessMessageHandler ( ) , UUID . randomUUID ( ) , new CancelBuildSessionAction < PreloadedProcessMessageHandler > ( ) ) ;
 try {

do not throw exception on explicit isDisposed check


<nb> public final class KeyValueOutputCommitter extends FileOutputCommitter {
 COMMENT
 COMMENT
 public static String getPendingDirName ( ) {
 - return FileOutputCommitter . PENDING_DIR_NAME ;
 + SINGLE
 + SINGLE
 + return FileOutputCommitter . TEMP_DIR_NAME ;
 }
 }


<nb> public class BeanPropertyWriter
 COMMENT
 @ deprecated
 public Class < ? > getPropertyType ( ) {
 - return ( _accessorMethod != null ) ? _accessorMethod . getReturnType ( ) : _field . getType ( ) ;
 + if ( _accessorMethod != null ) {
 + return _accessorMethod . getReturnType ( ) ;
 + }
 + if ( _field != null ) {
 + return _field . getType ( ) ;
 + }
 + return null ;
 }

 COMMENT

Resolve a minor NPE problem for virtual properties


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class JavadocApiMethodGeneratorMojo extends AbstractApiMethodGeneratorMoj
 if ( href != null ) {
 String hrefAttr = ( String ) href ;
 if ( hrefAttr . contains ( hrefPattern ) ) {
 - methodWithTypes = hrefAttr . substring ( hrefAttr . indexOf ( STRING0 ) + NUMBER0 ) ;
 + try {
 + methodWithTypes = URLDecoder . decode ( hrefAttr . substring ( hrefAttr . indexOf ( STRING0 ) + NUMBER0 ) , STRING1 ) ;
 + } catch ( UnsupportedEncodingException e ) {
 + throw new IllegalStateException ( e ) ;
 + }
 }
 }
 }

Support handling URL encoded HREF attribute in parsed Javadoc


<nb> public class FsUtils {
 String [ ] files = d . list ( ) ;
 for ( int i = NUMBER0 ; i < files . length ; i ++ ) {
 String s = dir + STRING0 + files [ i ] ;
 + if ( s . endsWith ( STRING1 ) ) {
 + continue ;
 + }
 if ( FileFilter . ignoreTest ( s ) ) {
 Log . v ( LOGTAG , STRING2 + s ) ;
 continue ;

Ignore TEMPLATE html in LayoutTest directories


<nb> public final class Jimfs {
 private static FileSystem newFileSystem ( JimfsConfiguration config ) {
 ImmutableMap < String , ? > env = ImmutableMap . of ( JimfsFileSystemProvider . CONFIG_KEY , config ) ;
 try {
 - return FileSystems . newFileSystem ( newRandomUri ( ) , env ) ;
 + SINGLE
 + SINGLE
 + return FileSystems . newFileSystem ( newRandomUri ( ) , env , Jimfs . class . getClassLoader ( ) ) ;
 } catch ( IOException e ) {
 throw new AssertionError ( e ) ;
 }

Change Jimfs to use FileSystems newFileSystem with its own ClassLoader


<nb> public class ParameterDeclarationList implements GroovyElementTypes {
 public static GroovyElementType parse ( PsiBuilder builder , IElementType ending ) {
 SINGLE

 - if ( ParserUtils . lookAhead ( builder , mRPAREN ) ) return NONE ;
 + if ( ParserUtils . lookAhead ( builder , mRPAREN ) ) {
 + PsiBuilder . Marker pdlMarker = builder . mark ( ) ;
 + pdlMarker . done ( PARAMETERS_LIST ) ;
 + return NONE ;
 + }

 PsiBuilder . Marker pdlMarker = builder . mark ( ) ;


<nb> public class SQLEvalVisitorUtils {
 wallConditionContext . setConstArithmetic ( true ) ;
 }

 + leftValue = processValue ( leftValue ) ;
 + rightValue = processValue ( rightValue ) ;
 +
 if ( leftValue == null || rightValue == null ) {
 return false ;
 }
 <nb> public class SQLEvalVisitorUtils {
 return false ;
 }

 + @ suppresswarnings ( STRING0 )
 + private static Object processValue ( Object value ) {
 + if ( value instanceof List ) {
 + List list = ( List ) value ;
 + if ( list . size ( ) == NUMBER0 ) {
 + return processValue ( list . get ( NUMBER1 ) ) ;
 + }
 + }
 + return value ;
 + }
 +
 private static boolean isAlwayTrueLikePattern ( SQLExpr x ) {
 if ( x instanceof SQLCharExpr ) {
 String text = ( ( SQLCharExpr ) x ) . getText ( ) ;


<nb> public class SettingsDialog {
 dlgSettings . dismiss ( ) ;

 SINGLE
 - Intent intent = new Intent ( context , ActivityApp . class ) ;
 - intent . putExtra ( ActivityApp . cUid , uid ) ;
 - intent . putExtra ( ActivityApp . cAction , ActivityApp . cActionRefresh ) ;
 - context . startActivity ( intent ) ;
 + if ( uid != NUMBER0 ) {
 + Intent intent = new Intent ( context , ActivityApp . class ) ;
 + intent . putExtra ( ActivityApp . cUid , uid ) ;
 + intent . putExtra ( ActivityApp . cAction , ActivityApp . cActionRefresh ) ;
 + context . startActivity ( intent ) ;
 + }
 }
 } ) ;

Do not refresh app view if main settings


<nb> public final class AgentIndexRunner implements AgentIndexRunnerMBean , Notificati
 private final static String NOTIFICATIONEXCEPTIONTYPE = STRING0 ;
 private final static String NOTIFICATIONINFOSTRINGTYPE = STRING1 ;
 private final static String NOTIFICATIONINFOLONGTYPE = STRING2 ;
 - private static boolean enabled = true ;
 + private boolean enabled ;
 private transient Thread indexThread = null ;
 private final static Logger log = Logger . getLogger ( STRING3 ) ;
 private final Management jagmgt ;

Fixed high priority FindBugs warnings in AgentIndexRunner


<nb> public class TransferSettingsTest {
 DummyTransferSettings testTransferSettings = new DummyTransferSettings ( ) ;
 testTransferSettings . setField ( STRING0 , enumValue ) ;
 assertEquals ( DummyTransferSettings . DummyEnum . A , testTransferSettings . enumField ) ;
 +
 + final String enumValueLower = STRING1 ;
 +
 + testTransferSettings = new DummyTransferSettings ( ) ;
 + testTransferSettings . setField ( STRING0 , enumValueLower ) ;
 + assertEquals ( DummyTransferSettings . DummyEnum . A , testTransferSettings . enumField ) ;
 }

 @ test ( expected = StorageException . class )


<nb> public class WindowAnimator {
 boolean applyExistingExitAnimation = mPostKeyguardExitAnimation != null
 && ! winAnimator . mKeyguardGoingAwayAnimation
 && win . hasDrawnLw ( )
 - && win . mAttachedWindow == null ;
 + && win . mAttachedWindow == null
 + && ! win . mIsImWindow
 + && displayId == Display . DEFAULT_DISPLAY ;

 SINGLE
 SINGLE

Don t apply existing keyguard animation to IME window


<nb> public class AnnotatorImplementations {
 NERClassifierCombiner . DEFAULT_PASS_DOWN_PROPERTIES ) ;
 if ( useSUTime ) {
 SINGLE
 - Properties sutimeProps = PropertiesUtils . extractPrefixedProperties ( properties , NumberSequenceClassifier . SUTIME_PROPERTY + STRING0 ) ;
 + Properties sutimeProps = PropertiesUtils . extractPrefixedProperties ( properties , NumberSequenceClassifier . SUTIME_PROPERTY + STRING0 , true ) ;
 PropertiesUtils . overWriteProperties ( combinerProperties , sutimeProps ) ;
 }
 NERClassifierCombiner nerCombiner = new NERClassifierCombiner ( applyNumericClassifiers ,
 <nb> public class PropertiesUtils {
 for ( String keyStr : properties . stringPropertyNames ( ) ) {
 if ( keyStr . startsWith ( prefix ) ) {
 if ( keepPrefix ) {
 + ret . setProperty ( keyStr , properties . getProperty ( keyStr ) ) ;
 + } else {
 String newStr = keyStr . substring ( prefix . length ( ) ) ;
 ret . setProperty ( newStr , properties . getProperty ( keyStr ) ) ;
 - } else {
 - ret . setProperty ( keyStr , properties . getProperty ( keyStr ) ) ;
 }
 }
 }


<nb> public class MatchPath extends TableFunctionEvaluator
 rowResult = symbolFn . match ( row , pItr ) ;
 }

 - result . nextRow = pItr . getIndex ( ) - NUMBER0 ;
 + result . nextRow = pItr . getIndex ( ) ;
 + if ( pItr . hasNext ( ) ) {
 + result . nextRow -= NUMBER0 ;
 + }
 return result ;
 }

MatchPath misses the last matched row from the final result set Mohammad Kamrul Islam via Ashutosh Chauhan


<nb> public interface ColumnListMutation < C > {
 ColumnListMutation < C > deleteColumn ( C columnName ) ;

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class MediaStreamImpl
 {
 if ( logger . isTraceEnabled ( ) )
 logger . trace ( STRING0 + hashCode ( )
 - + STRING1 + getDeviceSession ( ) . getFormat ( )
 + SINGLE
 + SINGLE
 + SINGLE
 + STRING2 + format ) ;

 setAdvancedAttributes ( format . getAdvancedAttributes ( ) ) ;

Fix issue where camera is activated in an audio only SIP call


<nb> public abstract class RoutingResource {
 COMMENT
 @ defaultvalue ( STRING0 ) @ queryparam ( STRING1 ) protected List < String > preferredRoutes ;

 - COMMENT
 + COMMENT
 + COMMENT
 @ defaultvalue ( STRING2 ) @ queryparam ( STRING3 ) protected List < Integer > otherThanPreferredRoutesPenalty ;

 COMMENT

Fix a copy paste error in apidoc parameter description


<nb> public class PyTypeChecker {
 }

 public static boolean isUnknown ( @ nullable PyType type ) {
 - if ( type == null || type instanceof PyGenericType ) {
 + if ( type == null || type instanceof PyGenericType ||
 + ( type instanceof PyStructuralType && ( ( PyStructuralType ) type ) . isInferredFromUsages ( ) ) ) {
 return true ;
 }
 if ( type instanceof PyUnionType ) {

Suppress type and attribute inspections for structural types


<nb> public class CometEventImpl implements CometEvent {

 private static final Object threadCheckHolder = new Object ( ) ;

 - protected boolean readable = false ;
 -
 - protected boolean writeable = false ;
 SINGLE

 COMMENT
 <nb> public class CometEventImpl implements CometEvent {
 }

 public boolean isReadable ( ) {
 - return readable ;
 - }
 -
 - public void setReadable ( boolean r ) {
 - this . readable = r ;
 - }
 -
 + return request . isReadable ( ) ;
 + }
 public boolean isWriteable ( ) {
 - return writeable ;
 - }
 -
 - public void setWriteable ( boolean w ) {
 - this . writeable = w ;
 + return response . isWriteable ( ) ;
 }

 public void configure ( CometEvent . CometConfiguration . . . options )


<nb> public class MaterialDialog extends DialogBase implements View . OnClickListener {
 break ;
 }
 case MULTI : {
 - if ( mBuilder . selectedIndices != null ) {
 - @ suppresslint ( STRING0 )
 - CheckBox checkbox = ( CheckBox ) view . findViewById ( R . id . control ) ;
 - checkbox . setChecked ( selectedIndicesList . contains ( index ) ) ;
 - }
 + @ suppresslint ( STRING0 )
 + CheckBox checkbox = ( CheckBox ) view . findViewById ( R . id . control ) ;
 + checkbox . setChecked ( selectedIndicesList . contains ( index ) ) ;
 break ;
 }
 }

Fix multichoice list items not updating correctly if no pre selected indices given


<nb> public class X509ProcessingFilterTests extends TestCase {
 super . setUp ( ) ;
 }

 + public void tearDown ( ) {
 + ContextHolder . setContext ( null ) ;
 + }
 +
 public void testNormalOperation ( ) throws Exception {
 MockHttpServletRequest request = new MockHttpServletRequest ( null , new MockHttpSession ( ) ) ;
 MockHttpServletResponse response = new MockHttpServletResponse ( ) ;

Added tearDown method which resets the context to null to prevent occasional breaking of other test classes


<nb> public final class Calendar {
 SINGLE
 SINGLE
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final class SyncState implements SyncStateContract . Columns {
 + COMMENT
 + COMMENT
 + COMMENT
 + private SyncState ( ) { }
 +
 + public static final String CONTENT_DIRECTORY =
 + SyncStateContract . Constants . CONTENT_DIRECTORY ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final Uri CONTENT_URI =
 + Uri . withAppendedPath ( Calendar . CONTENT_URI , CONTENT_DIRECTORY ) ;
 + }
 }

Add SyncState class for calendar provider


<nb> public class Setup {
 return className . startsWith ( STRING0 )
 || className . startsWith ( STRING1 )
 || className . startsWith ( STRING2 )
 - || className . startsWith ( STRING3 )
 + || className . startsWith ( STRING4 )
 || className . startsWith ( STRING5 ) ;
 }

Allow shadows for Google Play Services classes


<nb> public class WebView extends AbsoluteLayout
 return ;
 }

 - if ( sGoogleApps . contains ( packageName ) ) {
 + if ( sGoogleApps . contains ( packageName ) && mWebViewCore != null ) {
 if ( Intent . ACTION_PACKAGE_ADDED . equals ( action ) ) {
 mWebViewCore . sendMessage ( EventHub . ADD_PACKAGE_NAME , packageName ) ;
 } else {
 <nb> public class WebView extends AbsoluteLayout
 SINGLE
 @ override
 protected void onPostExecute ( Set < String > installedPackages ) {
 - mWebViewCore . sendMessage ( EventHub . ADD_PACKAGE_NAMES , installedPackages ) ;
 + if ( mWebViewCore != null ) {
 + mWebViewCore . sendMessage ( EventHub . ADD_PACKAGE_NAMES , installedPackages ) ;
 + }
 }
 } ;
 task . execute ( ) ;

Fix NPE when WebView is being destroyed prior to callback completion


<nb> public class HttpTraceHandler implements HttpHandler {
 }
 }
 body . append ( STRING0 ) ;
 + exchange . getResponseSender ( ) . send ( body . toString ( ) ) ;
 } else {
 handler . handleRequest ( exchange ) ;
 }


<nb> public class BallsView extends RSSurfaceView {
 }

 void setAccel ( float x , float y , float z ) {
 - if ( mRender == null ) {
 + if ( ( mRender == null ) || ( mRS == null ) ) {
 return ;
 }
 mRender . setAccel ( x , - y ) ;

Add RS context check for RsBalls setAccel


<nb> public class SettingsFragment extends PreferenceFragment implements SharedPrefer

 AlertDialog . Builder builder = new AlertDialog . Builder ( context ) ;
 builder . setView ( layout ) ;
 - builder . setIcon ( NUMBER0 ) ;
 + builder . setIcon ( R . drawable . ic_alert_icon ) ;
 builder . setPositiveButton ( android . R . string . ok , new DialogInterface . OnClickListener ( ) {
 public void onClick ( DialogInterface dialog , int which ) {

Display icon on Intercept links from dialog


<nb> public class InsufficientThreadsDetectionTest {

 @ test SINGLE
 public void testCaseForMultipleConnectors ( ) throws Exception {
 - SINGLE
 - _server = new Server ( new QueuedThreadPool ( NUMBER0 ) ) ;
 + SINGLE
 + _server = new Server ( new QueuedThreadPool ( NUMBER1 ) ) ;

 - SINGLE
 + SINGLE
 _server . addConnector ( new ServerConnector ( _server , null , null , null , NUMBER2 , NUMBER2 , new HttpConnectionFactory ( ) ) ) ;

 - SINGLE
 - final QueuedThreadPool connectorPool = new QueuedThreadPool ( NUMBER0 , NUMBER0 ) ;
 + SINGLE
 + final QueuedThreadPool connectorPool = new QueuedThreadPool ( NUMBER1 , NUMBER1 ) ;
 _server . addConnector ( new ServerConnector ( _server , connectorPool , null , null , NUMBER2 , NUMBER2 , new HttpConnectionFactory ( ) ) ) ;

 SINGLE

Fixed test to correctly count minimum required server threads


<nb> class EqualsPredicate implements Predicate {

 private final ExchangeAttribute [ ] attributes ;

 - EqualsPredicate ( final ExchangeAttribute [ ] attribute ) {
 - this . attributes = attribute ;
 + EqualsPredicate ( final ExchangeAttribute [ ] attributes ) {
 + this . attributes = attributes ;
 }

 @ override


<nb>

 package NAMESPACE ;

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

 COMMENT
 COMMENT
 <nb> public abstract class Stanza implements TopLevelStreamElement {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public Set < PacketExtension > getExtensions ( String elementName , String namespace ) {
 + requireNotNullOrEmpty ( elementName , STRING0 ) ;
 + requireNotNullOrEmpty ( namespace , STRING1 ) ;
 + String key = XmppStringUtils . generateKey ( elementName , namespace ) ;
 + return packetExtensions . getAll ( key ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> abstract class OccurenceNavigatorActionBase extends AnAction implements DumbAwar
 }
 Navigatable descriptor = occurenceInfo . getNavigateable ( ) ;
 if ( descriptor != null && descriptor . canNavigate ( ) ) {
 - descriptor . navigate ( false ) ;
 + descriptor . navigate ( true ) ;
 }
 if ( occurenceInfo . getOccurenceNumber ( ) == - NUMBER0 || occurenceInfo . getOccurencesCount ( ) == - NUMBER0 ) {
 return ;

next prev occurrence shall leave focus in editor


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

 + import NAMESPACE ;
 +
 import static NAMESPACE ;

 COMMENT
 <nb> public class MapperQueryParser extends QueryParser {
 return super . getWildcardQuery ( indexedNameField , termStr ) ;
 }

 + @ override protected Query getBooleanQuery ( List < BooleanClause > clauses , boolean disableCoord ) throws ParseException {
 + Query q = super . getBooleanQuery ( clauses , disableCoord ) ;
 + if ( q == null ) {
 + return null ;
 + }
 + return fixNegativeQueryIfNeeded ( q ) ;
 + }
 +
 protected FieldMapper fieldMapper ( String smartName ) {
 if ( mapperService == null ) {
 return null ;


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

Fix typo If an activity is in the foreground


<nb> public abstract class Pool < T > implements Closeable {
 }
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 public void returnResourceObject ( final T resource ) {
 if ( resource == null ) {
 return ;


<nb> public interface WTypes {
 }

 public LPOLESTR ( String value ) {
 - this ( ) ;
 + super ( new Memory ( ( value . length ( ) + NUMBER0 ) * Native . WCHAR_SIZE ) ) ;
 this . setValue ( value ) ;
 }

LPOLESTR constructor with a string doesn t allocate memory


<nb> import NAMESPACE ;
 public class DependencyBank {

 SINGLE
 - static String libgdxVersion = STRING0 ;
 + static String libgdxVersion = STRING1 ;
 SINGLE
 - static String libgdxNightlyVersion = STRING2 ;
 - static String roboVMVersion = STRING3 ;
 + static String libgdxNightlyVersion = STRING4 ;
 + static String roboVMVersion = STRING5 ;
 static String buildToolsVersion = STRING6 ;
 static String androidAPILevel = STRING7 ;
 static String gwtVersion = STRING8 ;


<nb> public class JsonObjectHashing {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public static void hashJsonObject ( Hasher hasher , @ nullable Object obj ) {

I thought my days of fixing Eclipse warnings were over


<nb> public class ManifestConfigSource implements ConfigSource {
 if ( DBG ) {
 Log . d ( LOG_TAG , STRING0 ) ;
 }
 - source = new DefaultConfigSource ( ) ;
 + boolean usesCleartextTraffic =
 + ( info . flags & ApplicationInfo . FLAG_USES_CLEARTEXT_TRAFFIC ) != NUMBER0 ;
 + source = new DefaultConfigSource ( usesCleartextTraffic ) ;
 }
 mConfigSource = source ;
 return mConfigSource ;
 <nb> public class ManifestConfigSource implements ConfigSource {
 }

 private static final class DefaultConfigSource implements ConfigSource {
 +
 + private final NetworkSecurityConfig mDefaultConfig ;
 +
 + public DefaultConfigSource ( boolean usesCleartextTraffic ) {
 + mDefaultConfig = NetworkSecurityConfig . getDefaultBuilder ( )
 + . setCleartextTrafficPermitted ( usesCleartextTraffic )
 + . build ( ) ;
 + }
 +
 @ override
 public NetworkSecurityConfig getDefaultConfig ( ) {
 - return NetworkSecurityConfig . DEFAULT ;
 + return mDefaultConfig ;
 }

 @ override

Use the application s usesCleartextTraffic flag


<nb> public class DefaultWebSocketProcessor implements WebSocketProcessor , Serializab

 Object o = r . getAttribute ( ASYNCHRONOUS_HOOK ) ;
 AsynchronousProcessor . AsynchronousProcessorHook h ;
 - if ( o != null && AsynchronousProcessor . class . isAssignableFrom ( o . getClass ( ) ) ) {
 + if ( o != null && AsynchronousProcessor . AsynchronousProcessorHook . class . isAssignableFrom ( o . getClass ( ) ) ) {
 h = ( AsynchronousProcessor . AsynchronousProcessorHook ) o ;
 if ( ! resource . isCancelled ( ) ) {
 if ( closeCode == NUMBER0 ) {


<nb> public abstract class Contacts
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 COMMENT
 COMMENT


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

 import NAMESPACE ;


<nb> public class LockPatternUtils {

 private void setLong ( String secureSettingKey , long value , int userHandle ) {
 try {
 - getLockSettings ( ) . setLong ( secureSettingKey , value , getCurrentOrCallingUserId ( ) ) ;
 + getLockSettings ( ) . setLong ( secureSettingKey , value , userHandle ) ;
 } catch ( RemoteException re ) {
 SINGLE
 Log . e ( TAG , STRING0 + secureSettingKey + re ) ;

Fix setLong so it actualy uses userHandle passed in


<nb> public class WordPress extends Application {
 EventBus . builder ( )
 . logNoSubscriberMessages ( false )
 . sendNoSubscriberEvent ( false )
 + . throwSubscriberException ( true )
 . installDefaultEventBus ( ) ;

 RestClientUtils . setUserAgent ( getUserAgent ( ) ) ;


<nb> package NAMESPACE ;
 import NAMESPACE ;

 public enum HighlightPolicy {
 - DO_NOT_HIGHLIGHT ( STRING0 ) ,
 BY_LINE ( STRING1 ) ,
 BY_WORD ( STRING2 ) ,
 - BY_WORD_SPLIT ( STRING3 ) ;
 + BY_WORD_SPLIT ( STRING3 ) ,
 + DO_NOT_HIGHLIGHT ( STRING0 ) ;

 @ notnull private final String myText ;

move Do not highlight option to the bottom of list


<nb>
 COMMENT
 package NAMESPACE ;

 + import static NAMESPACE ;
 +
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public interface Client {
 int status = connection . getResponseCode ( ) ;
 String reason = connection . getResponseMessage ( ) ;

 + if ( status < NUMBER0 || reason == null ) {
 + SINGLE
 + throw new IOException ( format ( STRING0 , connection . getRequestMethod ( ) ,
 + connection . getURL ( ) ) ) ;
 + }
 +
 Map < String , Collection < String > > headers = new LinkedHashMap < String , Collection < String > > ( ) ;
 for ( Map . Entry < String , List < String > > field : connection . getHeaderFields ( ) . entrySet ( ) ) {
 SINGLE

Handle invalid HTTP received from server


<nb> public final class StringUtils {
 SINGLE

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - public static String join ( Collection collection , String separator ) {
 - return collection == null ? null : join ( collection . iterator ( ) , separator ) ;
 + public static String join ( Iterable iterable , String separator ) {
 + return iterable == null ? null : join ( iterable . iterator ( ) , separator ) ;
 }
 -
 +
 COMMENT
 COMMENT
 COMMENT


<nb> public class WifiStateTracker extends NetworkStateTracker {
 }
 handleDisconnectedState ( newDetailedState , true ) ;
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - if ( mRunState == RUN_STATE_RUNNING && ! mIsScanOnly && networkId != - NUMBER0 ) {
 + if ( mRunState == RUN_STATE_RUNNING && ! mIsScanOnly ) {
 sendMessageDelayed ( reconnectMsg , RECONNECT_DELAY_MSECS ) ;
 } else if ( mRunState == RUN_STATE_STOPPING ) {
 stopDriver ( ) ;

DO NOT MERGE Dont let supplicant stay in DORMANT state


<nb> public class AsyncByteBufferInputStreamTest {
 reader . join ( ) ;
 writer . join ( ) ;

 - await ( ) . atMost ( NUMBER0 , TimeUnit . SECONDS ) . untilTrue ( caughtExceptionInReader ) ;
 + await ( ) . atMost ( NUMBER1 , TimeUnit . SECONDS ) . untilTrue ( caughtExceptionInReader ) ;
 assertTrue ( stream . getFailed ( ) instanceof Exception ) ;
 assertEquals ( STRING0 , stream . getFailed ( ) . getMessage ( ) ) ;
 }
 <nb> public class AsyncByteBufferInputStreamTest {
 reader . join ( ) ;
 writer . join ( ) ;

 - await ( ) . atMost ( NUMBER0 , TimeUnit . SECONDS ) . until ( new Callable < Boolean > ( ) {
 + await ( ) . atMost ( NUMBER1 , TimeUnit . SECONDS ) . until ( new Callable < Boolean > ( ) {
 @ override
 public Boolean call ( ) throws Exception {
 return stream . isDone ( ) ;

bump timeouts to allow for slower build box


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

 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PersistentTokenBasedRememberMeServices extends AbstractRememberMeSe
 newToken . getDate ( ) ) ;
 addCookie ( newToken , request , response ) ;
 }
 - catch ( DataAccessException e ) {
 + catch ( Exception e ) {
 logger . error ( STRING0 , e ) ;
 throw new RememberMeAuthenticationException (
 STRING1 ) ;
 <nb> public class PersistentTokenBasedRememberMeServices extends AbstractRememberMeSe
 tokenRepository . createNewToken ( persistentToken ) ;
 addCookie ( persistentToken , request , response ) ;
 }
 - catch ( DataAccessException e ) {
 + catch ( Exception e ) {
 logger . error ( STRING2 , e ) ;
 }
 }

Remove DataAccessException import from Persistent RememberMe


<nb> public class ClientCommandHandler extends CommandHandler
 message = message . substring ( NUMBER0 ) ;
 }

 - String [ ] args = message . split ( STRING0 ) ;
 - String commandName = args [ NUMBER1 ] ;
 - System . arraycopy ( args , NUMBER0 , args , NUMBER1 , args . length - NUMBER0 ) ;
 + String [ ] temp = message . split ( STRING0 ) ;
 + String [ ] args = new String [ temp . length - NUMBER0 ] ;
 + String commandName = temp [ NUMBER1 ] ;
 + System . arraycopy ( temp , NUMBER0 , args , NUMBER1 , args . length ) ;
 ICommand icommand = ( ICommand ) getCommands ( ) . get ( commandName ) ;

 try


<nb> public class BeanInfo {

 String name = exchange . getIn ( ) . getHeader ( Exchange . BEAN_METHOD_NAME , String . class ) ;
 if ( name != null ) {
 - if ( operations . get ( name ) . size ( ) == NUMBER0 ) {
 - methodInfo = operations . get ( name ) . get ( NUMBER1 ) ;
 + if ( operations . containsKey ( name ) ) {
 + List < MethodInfo > methods = operations . get ( name ) ;
 + if ( methods != null && methods . size ( ) == NUMBER0 ) {
 + methodInfo = methods . get ( NUMBER1 ) ;
 + }
 }
 }
 if ( methodInfo == null ) {


<nb> public class HtmlTagCanBeJavadocTagInspection extends BaseInspection {
 }

 private static void appendElementText ( String text , int startOffset , int endOffset , StringBuilder out ) {
 - if ( out . length ( ) == NUMBER0 && endOffset - startOffset > NUMBER1 && ! Character . isWhitespace ( text . charAt ( startOffset ) ) ) {
 + if ( out . length ( ) == STRING0 . length ( ) && endOffset - startOffset > NUMBER1 && ! Character . isWhitespace ( text . charAt ( startOffset ) ) ) {
 out . append ( STRING1 ) ;
 }
 out . append ( text , startOffset , endOffset ) ;


<nb> public abstract class BaseStatusBar extends SystemUI implements
 logUpdate ( entry , n ) ;
 }
 boolean applyInPlace = shouldApplyInPlace ( entry , n ) ;
 - boolean shouldInterrupt = shouldInterrupt ( entry ) ;
 + boolean shouldInterrupt = shouldInterrupt ( entry , notification ) ;
 boolean alertAgain = alertAgain ( entry , n ) ;

 entry . notification = notification ;
 <nb> public abstract class BaseStatusBar extends SystemUI implements
 }

 protected boolean shouldInterrupt ( Entry entry ) {
 - StatusBarNotification sbn = entry . notification ;
 + return shouldInterrupt ( entry , entry . notification ) ;
 + }
 +
 + protected boolean shouldInterrupt ( Entry entry , StatusBarNotification sbn ) {
 if ( mNotificationData . shouldFilterOut ( sbn ) ) {
 if ( DEBUG ) {
 Log . d ( TAG , STRING0 + sbn . getKey ( ) + STRING1 ) ;

decide interruptions based on current data not previous data


<nb> import static NAMESPACE ;
 import static NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> final class InternalServletModule extends AbstractModule {
 static class BackwardsCompatibleServletContextProvider implements Provider < ServletContext > {
 private ServletContext injectedServletContext ;

 + @ inject BackwardsCompatibleServletContextProvider ( ) { }
 +
 SINGLE
 void set ( ServletContext injectedServletContext ) {
 this . injectedServletContext = injectedServletContext ;


<nb> public class UnknownType extends LiquibaseDataType {
 || getName ( ) . equalsIgnoreCase ( STRING0 )
 || getName ( ) . equalsIgnoreCase ( STRING1 )
 || getName ( ) . equalsIgnoreCase ( STRING2 )
 + || getName ( ) . equalsIgnoreCase ( STRING3 )
 || getName ( ) . equalsIgnoreCase ( STRING4 )
 ) {
 parameters = new Object [ NUMBER0 ] ;

ANYDATA datatype setting length in Snapshot


<nb> public class Rectangle implements Serializable {
 this . height = height ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + public void setSize ( float width , float height ) {
 + this . width = width ;
 + this . height = height ;
 + }
 +
 + COMMENT
 + COMMENT
 + public void setSize ( float sizeXY ) {
 + this . width = sizeXY ;
 + this . height = sizeXY ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT


<nb> final class CdmaSMSDispatcher extends SMSDispatcher {
 PendingIntent intent = tracker . mDeliveryIntent ;
 Intent fillIn = new Intent ( ) ;
 fillIn . putExtra ( STRING0 , sms . getPdu ( ) ) ;
 + fillIn . putExtra ( STRING1 , android . telephony . SmsMessage . FORMAT_3GPP2 ) ;
 try {
 intent . send ( mContext , Activity . RESULT_OK , fillIn ) ;
 } catch ( CanceledException ex ) { }
 <nb> public final class GsmSMSDispatcher extends SMSDispatcher {
 PendingIntent intent = tracker . mDeliveryIntent ;
 Intent fillIn = new Intent ( ) ;
 fillIn . putExtra ( STRING0 , IccUtils . hexStringToBytes ( pduString ) ) ;
 + fillIn . putExtra ( STRING1 , android . telephony . SmsMessage . FORMAT_3GPP ) ;
 try {
 intent . send ( mContext , Activity . RESULT_OK , fillIn ) ;
 } catch ( CanceledException ex ) { }

Add format extra to SMS delivery report intents


<nb> public class XaLogicalLog implements LogLoader
 positionCache . putHeader ( logVersion , lastTx ) ;
 instantiateCorrectWriteBuffer ( ) ;
 msgLog . logMessage ( STRING0 +
 - writeBuffer . getFileChannelPosition ( ) + STRING1 + logVersion , true ) ;
 + writeBuffer . getFileChannelPosition ( ) + STRING2 + logVersion +
 + STRING3 + previousLogLastCommittedTx , true ) ;
 return lastTx ;
 }

Added useful information during rotation


<nb> public class TransportSQLActionSingleNodeTest extends SQLTransportIntegrationTes
 }

 @ test
 - public void testInsertBulkNullArray ( ) throws Exception {
 + public void testInsertDynamicNullArrayInBulk ( ) throws Exception {
 execute ( STRING0 ) ;
 ensureYellow ( ) ;
 SQLBulkRequest request = new SQLBulkRequest ( STRING1 ,
 <nb> public class TransportSQLActionSingleNodeTest extends SQLTransportIntegrationTes

 waitForConcreteMappingsOnAll ( STRING2 , Constants . DEFAULT_MAPPING_TYPE , STRING3 ) ;
 execute ( STRING4 ) ;
 - assertThat ( ( String ) response . rows ( ) [ NUMBER0 ] [ NUMBER0 ] , is ( STRING5 ) ) ;
 + assertThat ( ( String ) response . rows ( ) [ NUMBER0 ] [ NUMBER0 ] , is ( STRING5 ) ) ;
 }

 private void assertBulkResponseWithTypes ( String stmt , Object [ ] [ ] bulkArgs ) {


<nb> public class LanguageManagerDialog implements ActionListener {

 static class XMLFileFilter extends FileFilter {
 public boolean accept ( final File f ) {
 - if ( f . getName ( ) . toLowerCase ( ) . endsWith ( STRING0 ) )
 + if ( f . getName ( ) . toLowerCase ( ) . endsWith ( STRING0 ) || f . isDirectory ( ) )
 return true ;
 return false ;
 }

don t hide directories in the file dialog


<nb> public class ComponentList extends CamelCommandSupport {

 @ option ( name = STRING0 , aliases = STRING1 , description = STRING2 ,
 required = false , multiValued = false , valueToShowInHelp = STRING3 )
 - boolean verbose = false ;
 + boolean verbose ;

 protected Object doExecute ( ) throws Exception {
 List < Map < String , String > > components = camelController . listComponents ( name ) ;

Fixed the CS error of camel karaf component


<nb> public class PropertyFileConfiguratorTest
 public void shouldSetStoreDirSetting ( ) throws Exception
 {
 SINGLE
 - String dbLocation = STRING0 ;
 + String dbLocation = new File ( STRING0 ) . getAbsolutePath ( ) ;
 File propertyFile = PropertyFileBuilder . builder ( folder . getRoot ( ) ) . withNameValue ( Configurator . DATABASE_LOCATION_PROPERTY_KEY , dbLocation ) . build ( ) ;
 PropertyFileConfigurator serverConfig = new PropertyFileConfigurator ( propertyFile ) ;

Fixed OS specific path comparison in a test


<nb> public class Main {
 for ( ModelResult < GradleProject > gradleProjectModelResult : gradleProjects ) {
 GradleProject gradleProject = gradleProjectModelResult . getModel ( ) ;
 if ( gradleProject . getProjectDirectory ( ) . equals ( interestingProjectDir ) ) {
 - buildIdentifier = gradleProject . getIdentifier ( ) . getBuildIdentifier ( ) ;
 + buildIdentifier = gradleProject . getProjectIdentifier ( ) . getBuildIdentifier ( ) ;
 }
 }
 return buildIdentifier ;
 <nb> public class Main {

 private static boolean interestedInProject ( GradleProject gradleProject , BuildIdentifier buildIdentifier ) {
 SINGLE
 - return gradleProject . getIdentifier ( ) . getBuildIdentifier ( ) . equals ( buildIdentifier ) ;
 + return gradleProject . getProjectIdentifier ( ) . getBuildIdentifier ( ) . equals ( buildIdentifier ) ;
 }

 private static List < Launchable > getBuildTasksFromGradleProject ( GradleProject gradleProject ) {


<nb> public class ProtocolProviderServiceJabberImpl
 }
 }
 else
 - logger . error ( STRING0 ) ;
 + logger . error ( STRING1
 + + domain ) ;

 return ConnectState . CONTINUE_TRYING ;
 }


<nb> public abstract class Layer extends Iced {

 Dropout ( int units ) {
 _bits = new byte [ ( units + NUMBER0 ) / NUMBER1 ] ;
 - _rand = new Random ( ) ;
 + _rand = new Random ( NUMBER2 ) ;
 }

 SINGLE
 <nb> public class Dropout {

 Dropout ( int units ) {
 _bits = new byte [ ( units + NUMBER0 ) / NUMBER1 ] ;
 - _rand = new Random ( ) ;
 + _rand = new Random ( NUMBER2 ) ;
 }

 SINGLE

Always create deterministic RNG even though it is seeded later


<nb> public class DisassembleCommand extends DexInputCommand {
 }

 if ( analysisArguments . classPathDirectories == null || analysisArguments . classPathDirectories . isEmpty ( ) ) {
 - analysisArguments . classPathDirectories = Lists . newArrayList ( new File ( input ) . getParent ( ) ) ;
 + analysisArguments . classPathDirectories = Lists . newArrayList ( inputFile . getAbsoluteFile ( ) . getParent ( ) ) ;
 }

 if ( ! Baksmali . disassembleDexFile ( dexFile , outputDirectoryFile , jobs , getOptions ( ) ) ) {

Fix the default classpath dir for an input file in the current directory


<nb> public class TopChildrenQuery extends Query {
 ParentDoc [ ] _parentDocs = value . v ( ) . values ( ) . toArray ( ParentDoc . class ) ;
 Arrays . sort ( _parentDocs , PARENT_DOC_COMP ) ;
 parentDocs . v ( ) . put ( keys [ i ] , _parentDocs ) ;
 - value . release ( ) ;
 + RecyclerUtils . release ( value ) ;
 }
 }
 - parentDocsPerReader . release ( ) ;
 + RecyclerUtils . release ( parentDocsPerReader ) ;
 return parentHitsResolved ;
 }

 <nb> public class MatchedQueriesFetchSubPhase implements FetchSubPhase {
 }
 } catch ( IOException e ) {
 SINGLE
 + } finally {
 + SearchContext . current ( ) . clearReleasables ( ) ;
 }
 }
 }

Release SearchContext releaseables also post match filters queries


<nb> class ImageUtil {
 int actualHeight = options . outHeight ;
 int actualWidth = options . outWidth ;

 - float imgRatio = actualWidth / actualHeight ;
 + float imgRatio = ( float ) actualWidth / actualHeight ;
 float maxRatio = maxWidth / maxHeight ;

 SINGLE

Prevent integral division for float variable


<nb> public final class NativeDecimalFormat implements Cloneable {
 [ formatter setNotANumberSymbol : nan ] ;
 [ formatter setPercentSymbol : [ NSString stringWithCharacters : & percent length : NUMBER0 ] ] ;
 [ formatter setPerMillSymbol : [ NSString stringWithCharacters : & perMill length : NUMBER0 ] ] ;
 - [ formatter setZeroSymbol : [ NSString stringWithCharacters : & zeroDigit length : NUMBER0 ] ] ;
 + if ( zeroDigit != STRING0 ) {
 + [ formatter setZeroSymbol : [ NSString stringWithCharacters : & zeroDigit length : NUMBER0 ] ] ;
 + }
 ] - * / ;

 COMMENT

added workaround for NSNumberFormatter not using minimum digit setting when zero character is reset


<nb> public class BuckConfig {
 Path getCacheDir ( ) {
 String cacheDir = getValue ( STRING0 , STRING1 ) . or ( DEFAULT_CACHE_DIR ) ;
 if ( ! cacheDir . isEmpty ( ) ) {
 - if ( cacheDir . charAt ( NUMBER0 ) == STRING2 ) {
 + if ( cacheDir . startsWith ( STRING3 ) ) {
 return Paths . get ( cacheDir ) ;
 - } else if ( cacheDir . charAt ( NUMBER0 ) == STRING4 ) {
 + } else if ( cacheDir . startsWith ( STRING5 ) ) {
 return Paths . get ( cacheDir . replace ( STRING6 , System . getProperty ( STRING7 ) ) ) ;
 }
 }

Require tilde expansion in home cache dirs to start with


<nb> public class LayerDrawable extends Drawable implements Drawable . Callback {
 @ override
 public Drawable mutate ( ) {
 if ( ! mMutated && super . mutate ( ) == this ) {
 - if ( ! mLayerState . canConstantState ( ) ) {
 - throw new IllegalStateException ( STRING0 +
 - STRING1 ) ;
 - }
 mLayerState = new LayerState ( mLayerState , this , null ) ;
 final ChildDrawable [ ] array = mLayerState . mChildren ;
 final int N = mLayerState . mNum ;

Remove overzealous mutate sanity check in LayerDrawable


<nb> class Scroller {
 COMMENT
 COMMENT

 + @ suppresswarnings ( STRING0 )
 public void scrollToSide ( Side side ) {
 int screenHeight = activityUtils . getCurrentActivity ( ) . getWindowManager ( ) . getDefaultDisplay ( )
 . getHeight ( ) ;
 <nb> class ViewFetcher {
 COMMENT
 COMMENT

 + @ suppresswarnings ( STRING0 )
 public float getScrollListWindowHeight ( View view ) {
 final int [ ] xyParent = new int [ NUMBER0 ] ;
 View parent = getScrollOrListParent ( view ) ;

Suppressed deprecated warnings in Scroller java and ViewFetcher java


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class Main {
 STRING0 ,
 STRING1 ,
 STRING2 ,
 - STRING3 ,
 + STRING4 ,
 STRING5 ,
 STRING6 ,
 STRING7 ,


<nb> public class AntBeforeRunTaskProvider extends BeforeRunTaskProvider < AntBeforeRun

 public AntBeforeRunTaskProvider ( Project project ) {
 myProject = project ;
 - AntConfigurationImpl . getInstance ( myProject ) ; SINGLE
 }

 public Key < AntBeforeRunTask > getId ( ) {

avoid preventive loading of heavy ant model


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

 COMMENT
 COMMENT
 <nb> public class ModClusterNodeDefinition extends SimpleResourceDefinition {

 @ override
 protected void handleNode ( OperationContext context , ModClusterStatus . Node ctx , ModelNode operation ) throws OperationFailedException {
 - ModelNode list = new ModelNode ( ModelType . LIST ) ;
 - for ( String alias : ctx . getAliases ( ) ) {
 - list . add ( alias ) ;
 + final ModelNode result = new ModelNode ( ) ;
 + for ( String alias : ctx . getAliases ( ) ) {
 + UndertowLogger . ROOT_LOGGER . tracef ( STRING0 , alias ) ;
 + result . add ( alias ) ;
 }
 - context . getResult ( ) . set ( list ) ;
 + context . getResult ( ) . set ( result ) ;
 }
 } ) ;
 resourceRegistration . registerReadOnlyAttribute ( ELECTED , new AbstractNodeOperation ( ) {

Fixing IllegalArgumentException on listing aliases


<nb> public class ORecordLazyList extends ORecordTrackedList implements ORecordLazyMu

 @ override
 public Object [ ] toArray ( ) {
 - lazyLoad ( false ) ;
 convertLinks2Records ( ) ;
 return super . toArray ( ) ;
 }
 <nb> public class ORecordLazySet implements Set < OIdentifiable > , ORecordLazyMultiValue

 public void sort ( ) {
 if ( ! sorted && ! delegate . isEmpty ( ) ) {
 + final boolean prevConvert = delegate . isAutoConvertToRecord ( ) ;
 + if ( prevConvert )
 + delegate . setAutoConvertToRecord ( false ) ;
 +
 Collections . sort ( delegate ) ;
 +
 + if ( prevConvert )
 + SINGLE
 + delegate . setAutoConvertToRecord ( true ) ;
 +
 sorted = true ;
 }
 }


<nb> public final class HdmiControlService extends SystemService {
 SINGLE
 SINGLE
 default :
 - Slog . w ( TAG , STRING0 + message . toString ( ) ) ;
 - return false ;
 + return dispatchMessageToAction ( message ) ;
 }
 }

 <nb> public final class HdmiControlService extends SystemService {
 }
 }

 + private boolean dispatchMessageToAction ( HdmiCecMessage message ) {
 + for ( FeatureAction action : mActions ) {
 + if ( action . processCommand ( message ) ) {
 + return true ;
 + }
 + }
 + Slog . w ( TAG , STRING0 + message ) ;
 + return false ;
 + }
 +
 SINGLE
 SINGLE
 private final class HotplugEventListenerRecord implements IBinder . DeathRecipient {

Dispatch incoming CEC messages to feature actions


<nb> public IPersistentMap meta ( ) {
 return null ;
 }

 + public IObj withMeta ( final IPersistentMap meta ) {
 + return new RestFn ( ) {
 + protected Object doInvoke ( Object args ) throws Exception {
 + return AFunction . this . applyTo ( ( ISeq ) args ) ;
 + }
 +
 + public IPersistentMap meta ( ) {
 + return meta ;
 + }
 +
 + public IObj withMeta ( IPersistentMap meta ) {
 + return AFunction . this . withMeta ( meta ) ;
 + }
 +
 + public int getRequiredArity ( ) {
 + return NUMBER0 ;
 + }
 + } ;
 + }
 +
 public int compare ( Object o1 , Object o2 ) {
 try
 {

default impl of with meta in AFunction generates forwarding wrapper


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import static NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class JdbcTokenRepositoryImplTests {
 dataSource = new DriverManagerDataSource ( STRING0 , STRING1 , STRING2 , STRING3 ) ;
 }

 + @ afterclass
 + public static void clearDataSource ( ) {
 + dataSource = null ;
 + }
 +
 @ before
 public void populateDatabase ( ) {
 repo = new JdbcTokenRepositoryImpl ( ) ;

Added method to clear datasource field after use


<nb> public class ApplicationEx extends Application {

 @ override
 public void onCreate ( ) {
 - Util . log ( null , Log . WARN , STRING0 ) ;
 + Util . log ( null , Log . WARN , STRING1 + Util . getSelfVersionName ( this ) ) ;
 mPrevHandler = Thread . getDefaultUncaughtExceptionHandler ( ) ;
 Thread . setDefaultUncaughtExceptionHandler ( new Thread . UncaughtExceptionHandler ( ) {
 @ override


<nb> public class WebApplicationHeader extends Composite
 toolbar_ . addRightSeparator ( ) ;
 }

 + @ override
 + public AppMenuBar getMainMenu ( )
 + {
 + return mainMenu_ ;
 + }
 +

 public Widget asWidget ( )
 {
 <nb>

 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 <nb> public class WebApplicationHeaderOverlay
 void addProjectCommandSeparator ( ) ;
 void addProjectRightCommand ( Widget widget ) ;
 void addProjectRightCommandSeparator ( ) ;
 + AppMenuBar getMainMenu ( ) ;
 }

 public WebApplicationHeaderOverlay ( )


<nb> public class Bag < T > {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 public Bag ( T [ ] features , boolean binary ) {
 this . binary = binary ;
 this . features = new HashMap < T , Integer > ( ) ;
 - for ( int i = NUMBER0 ; i < features . length ; i ++ ) {
 - this . features . put ( features [ i ] , i ) ;
 + for ( int i = NUMBER0 , k = NUMBER0 ; i < features . length ; i ++ ) {
 + if ( ! this . features . containsKey ( features [ i ] ) ) {
 + this . features . put ( features [ i ] , k ++ ) ;
 + }
 }
 }


<nb> public class ConstraintsUtil {
 }
 addToValuesIfDifferent ( superTypeOfLowerBounds , values ) ;

 - if ( values . isEmpty ( ) ) {
 - Collection < JetType > upperBounds = typeConstraintsWithoutErrorTypes . getUpperBounds ( ) ;
 - for ( JetType upperBound : upperBounds ) {
 - if ( trySuggestion ( upperBound , typeConstraints ) ) {
 - return Collections . singleton ( upperBound ) ;
 - }
 + Collection < JetType > upperBounds = typeConstraintsWithoutErrorTypes . getUpperBounds ( ) ;
 + for ( JetType upperBound : upperBounds ) {
 + if ( trySuggestion ( upperBound , typeConstraints ) ) {
 + return Collections . singleton ( upperBound ) ;
 }
 }
 SINGLE

check all upper bounds even if there are some error types in bounds


<nb> public class AddOpenModifierToClassDeclarationFix extends JetIntentionAction < Jet
 @ notnull
 @ override
 public String getText ( ) {
 - return JetBundle . message ( STRING0 , classDeclaration . getName ( ) , STRING1 ) ;
 + return JetBundle . message ( STRING0 , classDeclaration != null ? classDeclaration . getName ( ) : STRING2 , STRING1 ) ;
 }

 @ notnull

Make getText work even if action was recognized as inapplicable


<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public static String reverse ( String self ) {
 - int size = self . length ( ) ;
 - StringBuilder buffer = new StringBuilder ( size ) ;
 - for ( int i = size - NUMBER0 ; i >= NUMBER1 ; i -- ) {
 - buffer . append ( self . charAt ( i ) ) ;
 - }
 - return buffer . toString ( ) ;
 + return new StringBuilder ( self ) . reverse ( ) . toString ( ) ;
 }

 COMMENT

DefaultGroovyMethods reverse String does not reverse strings correctly


<nb> public abstract class FetchableSubQueryBase < T , Q extends FetchableSubQueryBase < T
 public BooleanExpression in ( T . . . right ) {
 return this . in ( Arrays . asList ( right ) ) ;
 }
 - }
 + }


<nb> public class RestAdapter {
 log . log ( STRING0 ) ;
 }
 for ( int i = NUMBER0 ; i < args . length ; i ++ ) {
 - log . log ( STRING1 + i + STRING2 + args [ i ] . toString ( ) ) ;
 + log . log ( STRING1 + i + STRING2 + args [ i ] ) ;
 }
 }
 }

Avoid an NPE when logging a null request arg


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


<nb> public abstract class ClassUtils {
 while ( clazz != null ) {
 Class [ ] ifcs = clazz . getInterfaces ( ) ;
 for ( Class ifc : ifcs ) {
 - if ( ! interfaces . contains ( ifc ) && Modifier . isPublic ( ifc . getModifiers ( ) ) &&
 + if ( ! interfaces . contains ( ifc ) &&
 ( classLoader == null || isVisible ( ifc , classLoader ) ) ) {
 interfaces . add ( ifc ) ;
 }

reverted non public proxy interface change


<nb> public abstract class AbstractSoftwareComponent < T extends SoftwareArtifact > impl
 }

 @ override
 - public boolean equals ( Object other ) {
 + public final boolean equals ( Object other ) {
 if ( this == other ) {
 return true ;
 }
 <nb> public abstract class AbstractSoftwareComponent < T extends SoftwareArtifact > impl
 }

 @ override
 - public int hashCode ( ) {
 + public final int hashCode ( ) {
 return componentId . hashCode ( ) ;
 }
 }
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class ShadowHandler {
 }

 @ implementation
 - public final Looper getLooper ( ) {
 - return looper ;
 - }
 -
 - @ implementation
 public final void removeCallbacks ( java . lang . Runnable r ) {
 shadowOf ( looper ) . getScheduler ( ) . remove ( r ) ;
 }


<nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class LayeredIcon implements Icon {

 @ override
 public int getIconWidth ( ) {
 + if ( myWidth == NUMBER0 ) {
 + recalculateSize ( ) ;
 + }
 return myWidth ;
 }

 @ override
 public int getIconHeight ( ) {
 + if ( myHeight == NUMBER0 ) {
 + recalculateSize ( ) ;
 + }
 return myHeight ;
 }


<nb> public final class ParsedReaderResultTestCase extends TestCase {
 public void testTextType ( ) {
 doTestResult ( STRING0 , STRING0 , ParsedResultType . TEXT ) ;
 doTestResult ( STRING1 , STRING1 , ParsedResultType . TEXT ) ;
 + doTestResult ( STRING2 , STRING2 , ParsedResultType . TEXT ) ;
 doTestResult ( STRING3 , STRING3 , ParsedResultType . TEXT ) ;
 doTestResult ( STRING4 , STRING4 ,
 ParsedResultType . TEXT ) ;

Improve URL detection rule to exclude stuff like Hi


<nb> public class VFileCreateEvent extends VFileEvent {
 private final boolean myDirectory ;
 private final String myChildName ;
 private final boolean myReCreation ;
 + private VirtualFile myCreatedFile ;

 public VFileCreateEvent ( Object requestor ,
 @ notnull VirtualFile parent ,
 <nb> public class VFileCreateEvent extends VFileEvent {

 @ override
 public VirtualFile getFile ( ) {
 - return myParent . findChild ( myChildName ) ;
 + if ( myCreatedFile != null ) return myCreatedFile ;
 + return myCreatedFile = myParent . findChild ( myChildName ) ;
 }

 @ notnull

we evaluate store created file instance once per event


<nb> public class ApiMethodHelperTest {
 properties . put ( STRING0 , STRING1 ) ;
 properties . put ( STRING2 , STRING3 ) ;
 assertEquals ( STRING4 , STRING5 , apiMethodHelper . invokeMethod ( proxy , TestMethod . GREETUS , properties ) ) ;
 +
 + properties . clear ( ) ;
 + properties . put ( STRING6 , new String [ ] { STRING1 , STRING3 } ) ;
 + assertEquals ( STRING7 , STRING5 , apiMethodHelper . invokeMethod ( proxy , TestMethod . GREETALL , properties ) ) ;
 +
 + SINGLE
 + proxy = new TestProxy ( ) {
 + @ override
 + public String sayHi ( String name ) {
 + return STRING8 + name ;
 + }
 + } ;
 + properties . clear ( ) ;
 + properties . put ( STRING9 , STRING1 ) ;
 + assertEquals ( STRING10 , STRING11 , apiMethodHelper . invokeMethod ( proxy , TestMethod . SAYHI_1 , properties ) ) ;
 }

 static enum TestMethod implements ApiMethod {

Added test for invoking a derived proxy class


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class HttpClientConfiguration {
 private int retries = NUMBER0 ;

 @ notnull
 + @ unwrapvalidatedvalue ( false )
 private Optional < String > userAgent = Optional . absent ( ) ;

 @ valid


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import static NAMESPACE ;
 @ category ( QuickTest . class )
 public class HazelcastTest extends HazelcastTestSupport {

 + @ before
 + @ after
 + public void cleanup ( ) {
 + Hazelcast . shutdownAll ( ) ;
 + }
 +
 @ test ( expected = NullPointerException . class )
 public void getOrCreateHazelcastInstance_nullConfig ( ) {
 Hazelcast . getOrCreateHazelcastInstance ( null ) ;

Fixed cleanup problem in the HazelcastTest the hazelcastInstances were not shutdown


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

 import NAMESPACE ;

 <nb> import NAMESPACE ;

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

 - import static NAMESPACE ;
 + import static NAMESPACE ;

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


<nb> public class AppInitializer implements IProgress {

 private void saveGPXTracks ( ) {
 - if ( app . getSettings ( ) . SAVE_GLOBAL_TRACK_TO_GPX . get ( ) ) {
 - app . startNavigationService ( NavigationService . USED_BY_GPX ) ;
 - }
 if ( app . savingTrackHelper . hasDataToSave ( ) ) {
 long timeUpdated = app . savingTrackHelper . getLastTrackPointTime ( ) ;
 if ( System . currentTimeMillis ( ) - timeUpdated >= NUMBER0 * NUMBER1 * NUMBER2 ) {
 <nb> public class AppInitializer implements IProgress {
 app . savingTrackHelper . loadGpxFromDatabase ( ) ;
 }
 }
 + if ( app . getSettings ( ) . SAVE_GLOBAL_TRACK_TO_GPX . get ( ) ) {
 + app . startNavigationService ( NavigationService . USED_BY_GPX ) ;
 + }
 }

revert task order did not solve the issue


<nb> public abstract class HealthCheck {
 return HEALTHY ;
 }

 + public static Result healthy ( String message ) {
 + return new Result ( true , message , null ) ;
 + }
 +
 public static Result unhealthy ( String errorMessage ) {
 return new Result ( false , errorMessage , null ) ;
 }


<nb> public class RemoteImageViewTest {
 public void testCorrectAttributeInflationAndDefaulting ( ) {
 RemoteImageView imageView = ( RemoteImageView ) activity . findViewById ( R . id . image1 ) ;

 - imageView . setupViewSwitcher ( ) ;
 -
 SINGLE
 assertTrue ( imageView . isAutoLoad ( ) ) ;

 <nb> public class RemoteImageViewTest {
 RemoteImageView view4 = ( RemoteImageView ) activity . findViewById ( R . id . image4 ) ;
 RemoteImageView view5 = ( RemoteImageView ) activity . findViewById ( R . id . image5 ) ;

 - view1 . setupViewSwitcher ( ) ;
 - view2 . setupViewSwitcher ( ) ;
 - view3 . setupViewSwitcher ( ) ;
 - view4 . setupViewSwitcher ( ) ;
 - view5 . setupViewSwitcher ( ) ;
 -
 assertTrue ( view1 . isAutoLoad ( ) ) ;
 assertTrue ( imageLoader . isLoadImageCalled ( view1 ) ) ;


<nb> public class RankingToolbar extends JToolBar implements PropertyChangeListener {
 return new DecoratedIcon ( icon , decoration , new DecoratedIcon . DecorationController ( ) {

 public boolean isDecorated ( ) {
 - return model . isAutoTransformer ( transformer ) ;
 + return model != null && model . isAutoTransformer ( transformer ) ;
 }
 } ) ;
 }


<nb> public class ListTest extends HazelcastTestSupport {
 final int insCount = NUMBER0 ;
 TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory ( insCount ) ;
 final HazelcastInstance [ ] instances = factory . newInstances ( config ) ;
 -
 + assertTrue ( getList ( instances , name ) . isEmpty ( ) ) ;
 for ( int i = NUMBER1 ; i < count ; i ++ ) {
 assertTrue ( getList ( instances , name ) . add ( STRING0 + i ) ) ;
 }
 + assertFalse ( getList ( instances , name ) . isEmpty ( ) ) ;

 SINGLE
 SINGLE

added test for isEmpty method of collections


<nb> public class CompactionIterator extends ReducingIterator < SSTableIdentityIterator

 if ( rowSize > DatabaseDescriptor . getInMemoryCompactionLimit ( ) )
 {
 - logger . info ( STRING0 + rowSize + STRING1 ) ;
 + logger . info ( String . format ( STRING2 ,
 + FBUtilities . bytesToHex ( rows . get ( NUMBER0 ) . getKey ( ) . key ) , rowSize ) ) ;
 return new LazilyCompactedRow ( rows , major , gcBefore ) ;
 }
 return new PrecompactedRow ( rows , major , gcBefore ) ;

include row key in compacting large row log message


<nb> public interface Value < T > extends Iterable < T > {
 COMMENT
 COMMENT
 COMMENT
 - default < U extends T > CompletableFuture < T > toCompletableFuture ( ) {
 + default CompletableFuture < T > toCompletableFuture ( ) {
 final CompletableFuture < T > completableFuture = new CompletableFuture < > ( ) ;
 try {
 completableFuture . complete ( get ( ) ) ;
 <nb> public interface Future < T > extends Value < T > {
 }

 @ override
 - default < U extends T > CompletableFuture < T > toCompletableFuture ( ) {
 + default CompletableFuture < T > toCompletableFuture ( ) {
 final CompletableFuture < T > future = new CompletableFuture < > ( ) ;
 onSuccess ( future : : complete ) ;
 onFailure ( future : : completeExceptionally ) ;