<nb> public class ConfusionSetLoader {
 }
 String [ ] parts = line . replaceFirst ( STRING0 , STRING1 ) . split ( STRING2 ) ;
 if ( parts . length != NUMBER0 ) {
 - throw new RuntimeException ( STRING3 + line ) ;
 + throw new RuntimeException ( STRING4 + line + STRING5 ) ;
 }
 List < ConfusionString > confusionStrings = new ArrayList < > ( ) ;
 for ( String part : Arrays . asList ( parts ) . subList ( NUMBER1 , parts . length - NUMBER2 ) ) {


<nb> class FileHistoryCache implements HistoryCache {
 }
 }

 - private void storeFile ( History history , File file , Repository repository )
 - throws HistoryException {
 + private void storeFile ( History history , File file ) throws HistoryException {

 File cache = getCachedFile ( file ) ;

 <nb> class FileHistoryCache implements HistoryCache {
 hist . setHistoryEntries ( e . getValue ( ) ) ;
 File file = new File ( root , e . getKey ( ) ) ;
 if ( ! file . isDirectory ( ) ) {
 - storeFile ( hist , file , repository ) ;
 + storeFile ( hist , file ) ;
 }
 }
 }
 <nb> class FileHistoryCache implements HistoryCache {
 ( cache . exists ( ) ||
 ( time > env . getHistoryReaderTimeLimit ( ) ) ) ) {
 SINGLE
 - storeFile ( history , file , repository ) ;
 + storeFile ( history , file ) ;
 }
 }
 return history ;


<nb> public class ClientConductor extends Agent implements DriverListener
 final int sessionId = publication . sessionId ( ) ;

 activeCorrelationId = driverProxy . removePublication ( channel , streamId , sessionId ) ;
 + publicationMap . remove ( channel , sessionId , streamId ) ;

 awaitOperationSucceeded ( ) ;
 -
 - publicationMap . remove ( channel , sessionId , streamId ) ;
 }

 public synchronized Subscription addSubscription ( final String channel , final int streamId , final DataHandler handler )
 <nb> public class ClientConductor extends Agent implements DriverListener
 if ( null == subscription )
 {
 activeCorrelationId = driverProxy . addSubscription ( channel , streamId ) ;
 -
 subscription = new Subscription ( this , handler , channel , streamId , activeCorrelationId ) ;
 -
 subscriptionMap . put ( channel , streamId , subscription ) ;

 awaitOperationSucceeded ( ) ;

Java Remove publication from client map while waiting on the driver


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

 import NAMESPACE ;


<nb> public class AtmosphereRequest extends HttpServletRequestWrapper {
 return b . request . getLocale ( ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public AtmosphereResource resource ( ) {
 + return ( AtmosphereResource ) getAttribute ( FrameworkConfig . ATMOSPHERE_RESOURCE ) ;
 + }

 COMMENT
 COMMENT
 <nb> public class AtmosphereResponse extends HttpServletResponseWrapper {
 return this ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public AtmosphereResource resource ( ) {
 + if ( atmosphereRequest != null ) {
 + return ( AtmosphereResource ) atmosphereRequest . getAttribute ( FrameworkConfig . ATMOSPHERE_RESOURCE ) ;
 + } else {
 + return null ;
 + }
 + }
 +
 public void setResponse ( ServletResponse response ) {
 super . setResponse ( response ) ;
 if ( HttpServletResponse . class . isAssignableFrom ( response . getClass ( ) ) ) {

add a useful resource method to get the associated AtmosphereResource


<nb> public class WPRestClient {
 private static final String APP_SECRET_PROPERTY = STRING0 ;
 private static final String APP_REDIRECT_PROPERTY = STRING1 ;

 + private static final String NOTIFICATION_FIELDS = STRING2 ;
 +
 private Oauth mOauth ;
 private RestClient mRestClient ;
 private SharedPreferences mPrefs ;
 <nb> public class WPRestClient {
 COMMENT
 COMMENT
 COMMENT
 - public void getNotifications ( AsyncHttpResponseHandler handler ) {
 - RequestParams params = new RequestParams ( ) ;
 + public void getNotifications ( RequestParams params , AsyncHttpResponseHandler handler ) {
 params . put ( STRING3 , STRING4 ) ;
 + params . put ( STRING5 , NOTIFICATION_FIELDS ) ;
 get ( STRING6 , params , handler ) ;
 }
 + public void getNotifications ( AsyncHttpResponseHandler handler ) {
 + getNotifications ( new RequestParams ( ) , handler ) ;
 + }
 COMMENT
 COMMENT
 COMMENT


<nb> public final class Cookies {
 while ( pos >= NUMBER0 ) {
 MessageBytes cookieValue = headers . getValue ( pos ) ;

 - if ( cookieValue != null && cookieValue . isNull ( ) ) {
 + if ( cookieValue != null && ! cookieValue . isNull ( ) ) {
 if ( cookieValue . getType ( ) != MessageBytes . T_BYTES ) {
 Exception e = new Exception ( ) ;
 log . warn ( STRING0 , e ) ;
 <nb> public final class Cookies {
 COMMENT
 COMMENT
 COMMENT
 - protected final void processCookieHeader ( byte bytes [ ] , int off , int len ) {
 + final void processCookieHeader ( byte bytes [ ] , int off , int len ) {
 if ( len <= NUMBER0 || bytes == null ) {
 return ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CommentListAdapter extends AbstractAppListAdapter < CommentBean > {
 getActivity ( ) . startActivity ( intent ) ;
 }
 } ) ;
 + holder . content . setMovementMethod ( LinkMovementMethod . getInstance ( ) ) ;
 }
 }


<nb> public class ZWaveConfiguration implements OpenHABConfigurationService , ZWaveEve
 List < ZWaveDbAssociationGroup > groupList = database . getProductAssociationGroups ( ) ;

 if ( groupList != null ) {
 - SINGLE
 + SINGLE
 SINGLE
 for ( ZWaveDbAssociationGroup group : groupList ) {
 - SINGLE
 + SINGLE
 record = new OpenHABConfigurationRecord ( domain , STRING0 + group . Index + STRING1 ,
 database . getLabel ( group . Label ) , group . SetToController ) ;

 SINGLE
 record . description = database . getLabel ( group . Help ) ;
 +
 + SINGLE
 + ZWaveAssociationCommandClass associationCommandClass = ( ZWaveAssociationCommandClass ) node
 + . getCommandClass ( CommandClass . ASSOCIATION ) ;
 + int memberCnt = NUMBER0 ;
 + List < Integer > members = associationCommandClass . getGroupMembers ( group . Index ) ;
 + if ( members != null )
 + memberCnt = members . size ( ) ;
 + record . value = memberCnt + STRING2 + group . Maximum + STRING3 ;

 SINGLE
 record . addAction ( STRING4 , STRING4 ) ;


<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
 getSpellChecker ( ) . addSpellCheckSpan ( ( SpellCheckSpan ) what ) ;
 }
 }
 -
 - if ( what instanceof SuggestionSpan ) {
 - if ( newStart < NUMBER0 ) {
 - Log . d ( STRING0 , STRING1 + mText . subSequence ( oldStart , oldEnd ) ) ;
 - }
 - }
 }

 COMMENT

Remove spell log that exposes typed text in the logs


<nb> public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
 doAutoPopupTest ( STRING0 , null ) ;
 }

 - public void testDoNotAutoCompleteCompletionElementIfTemplateUnique ( ) {
 + public void testDoNotAutoCompleteCompletionElementIfTemplateUnique ( ) {
 LiveTemplateCompletionContributor . ourShowTemplatesInTests = true ;
 configureByFile ( ) ;
 myFixture . completeBasic ( ) ;


<nb> import NAMESPACE ;
 public final class Count extends MongoCommand {
 public Count ( final MongoFind find , final String collectionName ) {
 super ( asCommandDocument ( find , collectionName ) ) ;
 + readPreference ( find . getReadPreference ( ) ) ;
 }

 private static CommandDocument asCommandDocument ( final MongoFind find , final String collectionName ) {

Setting readPreference property for count command


<nb> public class GitBlit implements ServletContextListener {
 UserModel model = HttpUtils . getUserModelFromCertificate ( httpRequest , checkValidity , oids ) ;
 if ( model != null ) {
 UserModel user = GitBlit . self ( ) . getUserModel ( model . username ) ;
 - logger . info ( STRING0 , user . username , httpRequest . getRemoteAddr ( ) ) ;
 + logger . info ( MessageFormat . format ( STRING0 ,
 + user . username , httpRequest . getRemoteAddr ( ) ) ) ;
 return user ;
 }
 return null ;

Fixed missing format call for certificate authentication logging


<nb>

 package NAMESPACE ;

 + @ suppresswarnings ( STRING0 )
 public interface DraggableItemConstants {
 COMMENT
 COMMENT
 <nb>
 package NAMESPACE ;

 class SwipeReactionUtils {
 + @ suppresswarnings ( STRING0 )
 public static int extractLeftReaction ( int type ) {
 return ( ( type > > > InternalConstants . BIT_SHIFT_AMOUNT_LEFT ) & InternalConstants . REACTION_CAPABILITY_MASK ) ;
 }
 <nb> package NAMESPACE ;

 import NAMESPACE ;

 + @ suppresswarnings ( STRING0 )
 public interface SwipeableItemConstants {
 COMMENT
 COMMENT

Lint Suppress some PointlessBitwiseExpression warnings


<nb>
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> final class FMLLogFormatter extends Formatter
 String name = lvl . getLocalizedName ( ) ;
 if ( name == null )
 {
 - name = lvl . getName ( ) ;
 + name = lvl . getName ( ) ;
 }

 if ( ( name != null ) && ( name . length ( ) > NUMBER0 ) )
 <nb> final class FMLLogFormatter extends Formatter
 {
 msg . append ( STRING0 ) ;
 }
 - msg . append ( record . getMessage ( ) ) ;
 + msg . append ( formatMessage ( record ) ) ;
 msg . append ( LINE_SEPARATOR ) ;
 Throwable thr = record . getThrown ( ) ;

Format the log messages through MessageFormat


<nb> public final class RegExpLanguageHosts extends ClassExtension < RegExpLanguageHost
 return true ;
 }
 final RegExpLanguageHost host = findRegExpHost ( regExpChar ) ;
 - return host != null && host . supportsExtendedHexCharacter ( regExpChar ) ;
 + try {
 + return host != null && host . supportsExtendedHexCharacter ( regExpChar ) ;
 + } catch ( AbstractMethodError e ) {
 + SINGLE
 + return false ;
 + }
 }

 public boolean supportsNamedGroupSyntax ( @ nullable final RegExpGroup group ) {

catch AbstractMethodError for old api clients


<nb> public class RouteSpec implements Cloneable {
 return agency . hashCode ( ) ^ routeName . hashCode ( ) ;
 }

 + @ override
 + public String toString ( ) {
 + return String . format ( STRING0 , agency , routeName ) ;
 + }
 +
 public RouteSpec clone ( ) {
 try {
 return ( RouteSpec ) super . clone ( ) ;


<nb> public class WireMock {
 return new RequestPatternBuilder ( RequestMethod . TRACE , urlPattern ) ;
 }

 + public static RequestPatternBuilder anyRequestedFor ( UrlPattern urlPattern ) {
 + return new RequestPatternBuilder ( RequestMethod . ANY , urlPattern ) ;
 + }
 +
 public static RequestPatternBuilder requestMadeFor ( String customMatcherName , Parameters parameters ) {
 return RequestPatternBuilder . forCustomMatcher ( customMatcherName , parameters ) ;
 }
 <nb> import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 + import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 <nb> public class VerificationAcceptanceTest {
 verify ( getRequestedFor ( urlEqualTo ( STRING0 ) ) ) ;
 }

 + @ test
 + public void anyRequestedForMatchesAnyHttpMethod ( ) {
 + testClient . get ( STRING0 ) ;
 + verify ( anyRequestedFor ( urlEqualTo ( STRING0 ) ) ) ;
 + }
 +
 @ test ( expected = VerificationException . class )
 public void throwsVerificationExceptionOnUrlEqualsWhenQueryMissing ( ) {
 testClient . get ( STRING0 ) ;

Adding verification method for any HTTP method


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

 <nb> public class PreconditionFactoryTest {

 }

 + @ after
 + public void after ( ) {
 + PreconditionFactory . reset ( ) ;
 +
 + }
 +
 @ test
 public void getInstance ( ) {
 assertNotNull ( PreconditionFactory . getInstance ( ) ) ;

Preconditions factory not cleaning itself up


<nb> public abstract class ListenerDiffViewerBase extends DiffViewerBase {
 super ( context , request ) ;
 myDocumentListener = createDocumentListener ( ) ;
 myFileListener = createFileListener ( request ) ;
 + }

 + @ override
 + protected void onInit ( ) {
 + super . onInit ( ) ;
 if ( myFileListener != null ) VirtualFileManager . getInstance ( ) . addVirtualFileListener ( myFileListener ) ;

 for ( Document document : getDocuments ( ) ) {


<nb> public class ContentExchange extends CachedExchange
 public String getResponseContent ( ) throws UnsupportedEncodingException
 {
 if ( _responseContent != null )
 - {
 return _responseContent . toString ( _encoding ) ;
 - }
 + return null ;
 + }
 +
 + public byte [ ] getResponseContentBytes ( )
 + {
 + if ( _responseContent != null )
 + return _responseContent . toByteArray ( ) ;
 return null ;
 }

Added byte getter for the response content


<nb> public class CassandraArtifactCache implements ArtifactCache {

 private void reportConnectionFailure ( String context , ConnectionException exception ) {
 if ( numConnectionExceptionReports . incrementAndGet ( ) < MAX_CONNECTION_FAILURE_REPORTS ) {
 - buckEventBus . post ( ThrowableLogEvent . create ( exception ,
 - STRING0 ,
 - context ,
 - exception . getMessage ( ) ) ) ;
 + buckEventBus . post ( new CassandraConnectionExceptionEvent (
 + exception ,
 + String . format (
 + STRING0 ,
 + context ,
 + exception . getMessage ( ) ) ) ) ;
 + }
 + }
 +
 + public static class CassandraConnectionExceptionEvent extends ThrowableLogEvent {
 +
 + public CassandraConnectionExceptionEvent ( Throwable throwable , String message ) {
 + super ( throwable , message ) ;
 }
 }
 }

Log cassandra connection failures to scuba


<nb> public final class PrimitiveCodecs implements Codec < Object > {
 . otherEncoder ( new ShortCodec ( ) )
 . otherEncoder ( new ByteCodec ( ) )
 . otherEncoder ( new ByteArrayCodec ( ) )
 + . otherEncoder ( new UUIDCodec ( ) )
 . build ( ) ;
 }


<nb> public class GitCheckoutProcessor extends VcsCheckoutProcessor {
 Project project = frame == null || frame . getProject ( ) == null ? ProjectManager . getInstance ( ) . getDefaultProject ( ) : frame . getProject ( ) ;
 return GitCheckoutProvider . doClone ( project ,
 ServiceManager . getService ( Git . class ) ,
 - directoryName , parentDirectory . getPath ( ) , parameters ) ;
 + directoryName , parentDirectory . getPath ( ) , parameters . get ( STRING0 ) ) ;
 }
 }


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

 COMMENT
 <nb> public class ForgeMinecraftCommandWrapper extends MinecraftCommandWrapper {
 }
 return super . throwEvent ( sender , args ) ;
 }
 +
 + @ override
 + public boolean suppressDuplicateAlias ( String alias ) {
 + SpongeImpl . getLogger ( ) . warn ( STRING0 , this . getOwner ( ) . getId ( ) , alias ) ;
 + return true ;
 + }
 }

Allow mods to register duplicate command aliases


<nb> public abstract class DateTimeZone implements Serializable {
 try {
 try {
 cDefault = getInstance ( System . getProperty ( STRING0 ) ) ;
 - } catch ( RuntimeException e ) {
 + } catch ( RuntimeException ignored ) {
 }
 - cDefault = getInstance ( java . util . TimeZone . getDefault ( ) ) ;
 - } catch ( IllegalArgumentException e ) {
 + if ( cDefault == null ) {
 + cDefault = getInstance ( java . util . TimeZone . getDefault ( ) ) ;
 + }
 + } catch ( IllegalArgumentException ignored ) {
 }

 if ( cDefault == null ) {


<nb> public final class HeaderValues extends AbstractCollection < String > implements De
 public void clear ( ) {
 final byte size = this . size ;
 if ( size == NUMBER0 ) return ;
 - clearInternal ( size ) ;
 + clearInternal ( ) ;
 }

 - private void clearInternal ( byte size ) {
 + private void clearInternal ( ) {
 final Object value = this . value ;
 if ( value instanceof String [ ] ) {
 final String [ ] strings = ( String [ ] ) value ;

Removed unused parameter in HeaderValues clearInternal


<nb> public class PrivacyService {
 }
 }

 - if ( db . needUpgrade ( NUMBER0 ) ) {
 + if ( db . needUpgrade ( NUMBER1 ) ) {
 mLock . writeLock ( ) . lock ( ) ;
 db . beginTransaction ( ) ;
 try {


<nb> public class StandardJarScanFilter implements JarScanFilter {
 private Set < String [ ] > pluggabilityScanSet = new HashSet < > ( ) ;
 private boolean defaultPluggabilityScan = true ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public StandardJarScanFilter ( ) {
 SINGLE
 defaultSkip = System . getProperty ( Constants . SKIP_JARS_PROPERTY ) ;


<nb> public class MailConsumer extends ScheduledPollConsumer implements BatchConsumer

 SINGLE
 if ( maxMessagesPerPoll > NUMBER0 && total > maxMessagesPerPoll ) {
 - LOG . debug ( STRING0 + maxMessagesPerPoll + STRING1 + total + STRING2 ) ;
 + if ( LOG . isDebugEnabled ( ) ) {
 + LOG . debug ( STRING0 + maxMessagesPerPoll + STRING1 + total + STRING2 ) ;
 + }
 total = maxMessagesPerPoll ;
 }

 <nb> public class MailConsumer extends ScheduledPollConsumer implements BatchConsumer
 COMMENT
 COMMENT
 protected void processRollback ( Exchange exchange ) throws MessagingException {
 - LOG . warn ( STRING3 + exchange ) ;
 + Exception cause = exchange . getException ( ) ;
 + if ( cause != null ) {
 + LOG . warn ( STRING3 + exchange , cause ) ;
 + } else {
 + LOG . warn ( STRING3 + exchange ) ;
 + }
 }

 private void ensureIsConnected ( ) throws MessagingException {

Log caused exception in case of rollback


<nb> public class URLReference implements PsiReference , QuickFixProvider , EmptyResolv
 return null ;
 }

 - if ( tag == rootTag && tag . getNamespace ( ) . equals ( XmlUtil . XML_SCHEMA_URI ) ) {
 + if ( tag == rootTag && ( tag . getNamespace ( ) . equals ( XmlUtil . XML_SCHEMA_URI ) || tag . getNamespace ( ) . equals ( XmlUtil . WSDL_SCHEMA_URI ) ) ) {
 for ( XmlTag t : tag . getSubTags ( ) ) {
 final String name = t . getLocalName ( ) ;
 if ( STRING0 . equals ( name ) ) {
 <nb> public class XmlUtil {
 @ nonnls public static final String VALUE_ATTR_NAME = STRING1 ;
 @ nonnls public static final String ENUMERATION_TAG_NAME = STRING2 ;
 public static final String HTML4_LOOSE_URI = STRING3 ;
 + public static final String WSDL_SCHEMA_URI = STRING4 ;

 private XmlUtil ( ) {


<nb> public class DTree extends Iced {
 int treesInForest = NUMBER0 ;
 SB forest = new SB ( ) ;
 SINGLE
 - COMMENT
 + COMMENT
 bodySb . i ( ) . p ( STRING0 ) . nl ( ) ;
 for ( int c = NUMBER0 ; c < nclasses ( ) ; c ++ ) {
 toJavaForestBegin ( bodySb , forest , c , fidx ++ , maxfsize ) ;

Removed accidently commented line from generated code


<nb> public class AndroidCallableTest {
 }
 }

 + @ test
 + public void shouldCrashAppForExceptionInOnPreExecuteOrOnSuccessOrOnFinally ( ) {
 + throw new UnsupportedOperationException ( ) ;
 + }
 +
 +
 + @ test
 + public void shouldCallOnExceptionForExceptionInOnPreExecute ( ) {
 + throw new UnsupportedOperationException ( ) ;
 + }
 +
 +
 private static class StringAndroidCallable extends AndroidCallable < String > {
 Thread [ ] answers ;
 boolean shouldThrowException ;


<nb> public abstract class AsyncHttpResponseHandler implements ResponseHandlerInterfa
 Message msg ;
 if ( handler == null ) {
 msg = Message . obtain ( ) ;
 - msg . what = responseMessageId ;
 - msg . obj = responseMessageData ;
 + if ( msg != null ) {
 + msg . what = responseMessageId ;
 + msg . obj = responseMessageData ;
 + }
 } else {
 msg = Message . obtain ( handler , responseMessageId , responseMessageData ) ;
 }

Fixed possible NPE on Message dereference


<nb> static class LocalBinding {
 }

 public boolean hasJavaClass ( ) throws Exception {
 + if ( init != null && init . hasJavaClass ( ) && init . getJavaClass ( ) . isPrimitive ( )
 + && ! ( init instanceof MaybePrimitiveExpr ) )
 + return false ;
 return tag != null
 || ( init != null && init . hasJavaClass ( ) ) ;
 }

fixed local binding of non primitive emitting exprs of primitive flow through type


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

 import NAMESPACE ;


<nb> public class NestedQueryParser implements QueryParser {

 Filter childFilter = parseContext . cacheFilter ( objectMapper . nestedTypeFilter ( ) , null ) ;
 usAsParentFilter . filter = childFilter ;
 - if ( usAsParentFilter . filter == null ) {
 - System . out . println ( STRING0 ) ;
 - }
 SINGLE
 query = new FilteredQuery ( query , childFilter ) ;


<nb> public abstract class OutputBuffer {
 COMMENT
 COMMENT
 public abstract int size ( ) ;
 -
 +
 COMMENT
 COMMENT
 COMMENT
 public abstract int pipe ( OutputStream out )
 throws IOException ;
 -
 +
 COMMENT
 COMMENT
 COMMENT
 - public byte [ ] toByteArray ( ) {
 + public byte [ ] toByteArray ( ) {
 try {
 - ByteArrayOutputStream bout = new ByteArrayOutputStream ( size ( ) ) ;
 + final ByteArrayOutputStream bout = new ByteArrayOutputStream ( size ( ) ) ;
 pipe ( bout ) ;
 return bout . toByteArray ( ) ;
 }


<nb> public class AntProjectImpl extends AntStructuredElementImpl implements AntProje
 try {
 for ( final AntFile imported : project . getImportedFiles ( ) ) {
 final AntProject importedProject = imported . getAntProject ( ) ;
 - if ( importedProject != null ) {
 + if ( importedProject != null && ! elementsDepthStack . contains ( importedProject ) ) {
 for ( final AntTarget target : importedProject . getTargets ( ) ) {
 targets . add ( target ) ;
 }

getImportedTargets doesn t return duplicates in case of importing graph of any complexity


<nb> public class CoreProgressManager extends ProgressManager implements Disposable {
 finishTask ( task , finalCanceled , finalException ) ;
 }
 else {
 - ApplicationManager . getApplication ( ) . invokeLater ( new Runnable ( ) {
 + ApplicationManager . getApplication ( ) . invokeAndWait ( new Runnable ( ) {
 @ override
 public void run ( ) {
 finishTask ( task , finalCanceled , finalException ) ;

call callbacks synchronously when running headless tasks from non EDT thread


<nb> public class ConnectionsPresenter extends BasePresenter
 {
 exploreConnection ( event . getConnection ( ) ) ;
 }
 + activate ( ) ;
 }

 public void onConnectionUpdated ( ConnectionUpdatedEvent event )

activate connections tab when new connection is opened


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public abstract class AbstractHeaderCheck extends AbstractFileSetCheck {
 + COMMENT
 + private static final Pattern ESCAPED_LINE_FEED_PATTERN = Pattern . compile ( STRING0 ) ;
 COMMENT
 private String filename ;

 <nb> public abstract class AbstractHeaderCheck extends AbstractFileSetCheck {

 checkHeaderNotInitialized ( ) ;

 - final String headerExpandedNewLines = header . replaceAll ( STRING0 , STRING1 ) ;
 + final String headerExpandedNewLines = ESCAPED_LINE_FEED_PATTERN
 + . matcher ( header ) . replaceAll ( STRING1 ) ;

 final Reader headerReader = new StringReader ( headerExpandedNewLines ) ;
 try {

Use compiled pattern instead of dynamic regexp


<nb> public class GCDocument extends JInternalFrame {
 final ModelChartImpl modelChart = ( ModelChartImpl ) chartPanelView . getModelChart ( ) ;
 final ModelPanel modelPanel = chartPanelView . getModelPanel ( ) ;
 final JTabbedPane modelChartAndDetails = chartPanelView . getModelChartAndDetails ( ) ;
 + modelChart . resetPolygonCache ( ) ;
 modelChart . invalidate ( ) ;
 GridBagConstraints constraints = new GridBagConstraints ( ) ;
 constraints . fill = GridBagConstraints . HORIZONTAL ;
 <nb> public class ModelChartImpl extends JScrollPane implements ModelChart {
 chart . invalidate ( ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + public void resetPolygonCache ( ) {
 + chart . resetPolygons ( ) ;
 + }
 +
 public double getScaleFactor ( ) {
 return scaleFactor ;
 }

reset polygon cache when timer is running


<nb> public class ContextScope implements Scope {
 public < T > Provider < T > scope ( final Key < T > key , final Provider < T > unscoped ) {
 return new Provider < T > ( ) {
 public T get ( ) {
 - Map < Key < ? > , WeakReference < Object > > scopedObjects = getScopedObjectMap ( key ) ;
 + final Map < Key < ? > , WeakReference < Object > > scopedObjects = getScopedObjectMap ( key ) ;

 - T current = ( T ) scopedObjects . get ( key ) . get ( ) ;
 + final WeakReference < Object > ref = scopedObjects . get ( key ) ;
 + T current = ( T ) ( ref != null ? ref . get ( ) : null ) ;
 if ( current == null && ! scopedObjects . containsKey ( key ) ) {
 current = unscoped . get ( ) ;
 scopedObjects . put ( key , new WeakReference < Object > ( current ) ) ;


<nb> public class RealtimePlumber implements Plumber
 @ override
 public QueryRunner < T > apply ( FireHydrant input )
 {
 - SINGLE
 - SINGLE
 - SINGLE
 - if ( input == null || input . getSegment ( ) == null ) {
 - return new ReportTimelineMissingSegmentQueryRunner < T > ( descriptor ) ;
 - }
 -
 if ( skipIncrementalSegment && ! input . hasSwapped ( ) ) {
 return new NoopQueryRunner < T > ( ) ;
 }


<nb> public abstract class AbstractDomainExporter {
 Set < Supertype > additions = Sets . newHashSet ( ) ;
 for ( Map . Entry < Class < ? > , EntityType > entry : allTypes . entrySet ( ) ) {
 EntityType entityType = entry . getValue ( ) ;
 - if ( entityType . getSuperType ( ) != null && ! allTypes . containsKey ( entityType . getSuperType ( ) . getType ( ) ) ) {
 + if ( entityType . getSuperType ( ) != null && ! allTypes . containsKey ( entityType . getSuperType ( ) . getType ( ) . getJavaClass ( ) ) ) {
 additions . add ( entityType . getSuperType ( ) ) ;
 }
 }


<nb> public class Wallet implements Serializable {
 boolean isDead = false ;
 SINGLE
 SINGLE
 - Set < Transaction > connectedTransactions = new TreeSet < Transaction > ( ) ;
 + Set < Transaction > connectedTransactions = new HashSet < Transaction > ( ) ;
 for ( TransactionInput input : tx . getInputs ( ) ) {
 TransactionInput . ConnectionResult result = input . connect ( pool , TransactionInput . ConnectMode . ABORT_ON_CONFLICT ) ;
 if ( result == TransactionInput . ConnectionResult . SUCCESS ) {


<nb>

 package NAMESPACE ;

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

 import NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class KeyguardTouchDelegate {

 private static KeyguardTouchDelegate sInstance ;
 private static final List < OnKeyguardConnectionListener > sConnectionListeners =
 - Lists . newArrayList ( ) ;
 + new ArrayList < OnKeyguardConnectionListener > ( ) ;

 private volatile IKeyguardService mService ;

Remove only com google reference from SystemUI


<nb> public class ArrayMath {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public static void pairwiseDivideInPlace ( double [ ] a , double [ ] b ) {
 <nb> public class ArrayMath {
 shuffle ( a , rand ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public static void shuffle ( int [ ] a , Random rand ) {
 - for ( int i = a . length - NUMBER0 ; i >= NUMBER0 ; i -- ) {
 + for ( int i = a . length - NUMBER0 ; i > NUMBER1 ; i -- ) {
 int j = rand . nextInt ( i + NUMBER0 ) ; SINGLE
 int tmp = a [ i ] ;
 a [ i ] = a [ j ] ;


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

 <nb> public class GroovyFindUsagesProvider implements FindUsagesProvider {
 if ( element instanceof PsiVariable || element instanceof GrReferenceExpression ) return STRING0 ;
 if ( element instanceof GrLabeledStatement ) return STRING1 ;
 if ( element instanceof PropertyForRename ) return STRING2 ;
 + if ( element instanceof GrClosableBlock ) return STRING3 ;
 return STRING4 ;
 }

 <nb> public class GroovyFindUsagesProvider implements FindUsagesProvider {
 return ( ( GrLabeledStatement ) element ) . getLabelName ( ) ;
 } else if ( element instanceof PropertyForRename ) {
 return ( ( PropertyForRename ) element ) . getPropertyName ( ) ;
 + } else if ( element instanceof GrClosableBlock ) {
 + return STRING3 ;
 }

 return STRING4 ;

Undo Introduce Closure Parameter shows confusing message


<nb> public class AprEndpoint extends AbstractEndpoint < Long > implements SNICallBack {
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ override
 public void run ( ) {


<nb> public final class Util {
 return Uri . parse ( stringUri ) ;
 }
 if ( stringUri . startsWith ( STRING0 ) ) {
 + stringUri = stringUri . substring ( NUMBER0 ) ;
 return new Uri . Builder ( )
 . scheme ( baseUri . getScheme ( ) )
 . authority ( baseUri . getAuthority ( ) )


<nb> public interface ListenableFuture < V > extends Future < V > {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Clarify statement in addListener documentation


<nb> public class OStorageLocal extends OStorageEmbedded {
 OMMapManagerLocator . getInstance ( ) . flush ( ) ;

 super . close ( iForce ) ;
 + uninstallProfilerHooks ( ) ;

 Orient . instance ( ) . unregisterStorage ( this ) ;
 status = STATUS . CLOSED ;
 <nb> public class OStorageLocal extends OStorageEmbedded {
 } ) ;
 }

 + private void uninstallProfilerHooks ( ) {
 + Orient . instance ( ) . getProfiler ( ) . unregisterHookValue ( STRING0 + name + STRING1 ) ;
 + Orient . instance ( ) . getProfiler ( ) . unregisterHookValue ( STRING0 + name + STRING2 ) ;
 + }
 +
 private void formatMessage ( final boolean iVerbose , final OCommandOutputListener iListener , final String iMessage ,
 final Object . . . iArgs ) {
 if ( iVerbose )

Fixed memory leak on unregistering hooks


<nb> public class LocaleUtils {
 }
 }
 catch ( java . util . MissingResourceException mre ) {
 - Log . error ( STRING0 + key
 + Log . warn ( STRING0 + key
 + STRING1 + locale . toString ( ) ) ;
 value = STRING2 ;
 }

Modified level of logging to warn when a resource bundle is missing


<nb> public class DataLiberationFragment extends Fragment implements OnTaskFinishedLi
 private static final int REQUEST_CODE_IMPORT_AUTOBACKUP = NUMBER0 ;
 private static final int REQUEST_CODE_SHOWS_EXPORT_URI = NUMBER1 ;
 private static final int REQUEST_CODE_SHOWS_IMPORT_URI = NUMBER2 ;
 - public static final String APPLICATION_OCTET_STREAM = STRING0 ;

 @ bind ( R . id . containerDataLibExportFiles ) View containerCustomExportFiles ;
 @ bind ( R . id . textViewDataLibShowsExportFile ) TextView textShowsExportFile ;
 <nb> public class DataLiberationFragment extends Fragment implements OnTaskFinishedLi
 intent . addCategory ( Intent . CATEGORY_OPENABLE ) ;

 SINGLE
 - intent . setType ( APPLICATION_OCTET_STREAM ) ;
 + intent . setType ( STRING1 ) ;
 intent . putExtra ( Intent . EXTRA_TITLE , JsonExportTask . EXPORT_JSON_FILE_SHOWS ) ;

 startActivityForResult ( intent , REQUEST_CODE_SHOWS_EXPORT_URI ) ;
 <nb> public class DataLiberationFragment extends Fragment implements OnTaskFinishedLi
 intent . addCategory ( Intent . CATEGORY_OPENABLE ) ;
 SINGLE
 SINGLE
 - SINGLE
 - intent . setType ( APPLICATION_OCTET_STREAM ) ;
 + SINGLE
 + intent . setType ( STRING2 ) ;

 startActivityForResult ( intent , REQUEST_CODE_SHOWS_IMPORT_URI ) ;
 }

Open any application file for import store as json mime type


<nb> public abstract class DiffWindowBase {
 public void actionPerformed ( final AnActionEvent e ) {
 myWrapper . close ( ) ;
 }
 - } . registerCustomShortcutSet ( CommonShortcuts . getCloseActiveWindow ( ) , myProcessor . getComponent ( ) ) ;
 + } . registerCustomShortcutSet ( CommonShortcuts . getCloseActiveWindow ( ) , myProcessor . getComponent ( ) , myWrapper ) ;
 }

 public void show ( ) {


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SSTableReader extends SSTable
 assert components . contains ( Component . DATA ) : STRING0 + descriptor ;
 assert components . contains ( Component . PRIMARY_INDEX ) : STRING1 + descriptor ;

 - long start = System . nanoTime ( ) ;
 logger . info ( STRING2 , descriptor , new File ( descriptor . filenameFor ( COMPONENT_DATA ) ) . length ( ) ) ;

 SSTableMetadata sstableMetadata = SSTableMetadata . serializer . deserialize ( descriptor ) . left ;


<nb> public class SerializableORB extends ORB implements Serializable {
 return delegate . create_operation_list ( oper ) ;
 }

 - @ override
 + SINGLE
 public NVList create_operation_list ( OperationDef operationDef ) {
 return delegate . create_operation_list ( operationDef ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class VcsLogDataHolder implements Disposable , VcsLogDataProvider {
 myDataPackUpdateHandler , new Consumer < Exception > ( ) {
 @ override
 public void consume ( Exception e ) {
 - LOG . error ( e ) ;
 + if ( ! ( e instanceof ProcessCanceledException ) ) {
 + LOG . error ( e ) ;
 + }
 }
 } , mySettings . getRecentCommitsCount ( ) ) ;
 }


<nb> class TagFileProcessor {
 new JspUtil . ValidAttribute ( STRING0 ) ,
 new JspUtil . ValidAttribute ( STRING1 ) ,
 new JspUtil . ValidAttribute ( STRING2 ) ,
 + new JspUtil . ValidAttribute ( STRING3 ) , SINGLE
 + new JspUtil . ValidAttribute ( STRING4 ) , SINGLE
 new JspUtil . ValidAttribute ( STRING5 ) } ;

 private static final JspUtil . ValidAttribute [ ] attributeDirectiveAttrs = {


<nb> import NAMESPACE ;

 public class NinjaBootup {

 - private final String APPLICATION_GUICE_MODULE_CONVENTION_LOCATION = STRING0 ;
 + private final String APPLICATION_GUICE_MODULE_CONVENTION_LOCATION = STRING1 ;
 private final String ROUTES_CONVENTION_LOCATION = STRING2 ;

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

 - public class Configuration extends AbstractModule {
 + public class Module extends AbstractModule {

 protected void configure ( ) {

renamed configuration to module as it is a guice module


<nb> import NAMESPACE ;
 COMMENT
 public class XHTMLText {

 + private static final String NAMESPACE = STRING0 ;
 +
 private StringBuilder text = new StringBuilder ( NUMBER0 ) ;

 COMMENT
 <nb> public class XHTMLText {
 COMMENT
 COMMENT
 private void appendOpenBodyTag ( String style , String lang ) {
 - StringBuilder sb = new StringBuilder ( STRING1 ) ;
 + StringBuilder sb = new StringBuilder ( STRING2 + NAMESPACE + STRING3 ) ;
 if ( style != null ) {
 sb . append ( STRING4 ) ;
 sb . append ( style ) ;

Add namespace attribute to XHTML IM body tags


<nb> public class ShowUsagesAction extends AnAction implements PopupAction {
 private static FindUsagesOptions getDefaultOptions ( @ notnull FindUsagesHandler handler ) {
 FindUsagesOptions options = handler . getFindUsagesOptions ( DataManager . getInstance ( ) . getDataContext ( ) ) ;
 SINGLE
 - options . searchScope = FindUsagesManager . getMaximalScope ( handler ) ;
 + SINGLE
 return options ;
 }

make show usages consistent with Find usages


<nb> public class StreamCharBuffer implements Writable , CharSequence , Externalizable ,
 addChunk ( new StringChunk ( str , NUMBER0 , str . length ( ) ) ) . setEncodingState ( encodingState ) ;
 }
 }
 - if ( encodingState != null && encodingState . getEncoders ( ) . size ( ) > NUMBER0 ) {
 + if ( encodingState != null && encodingState . getEncoders ( ) != null && encodingState . getEncoders ( ) . size ( ) > NUMBER0 ) {
 Encoder encoder = encodingState . getEncoders ( ) . iterator ( ) . next ( ) ;
 if ( encoder != null )
 encoder . markEncoded ( str ) ;


<nb> import NAMESPACE ;
 public class TitleComparator implements Comparator < Title > {
 @ override
 public int compare ( Title title0 , Title title1 ) {
 - return title0 . getKeySort ( ) . compareTo ( title1 . getKeySort ( ) ) ;
 + return title0 . getSortKey ( ) . compareTo ( title1 . getSortKey ( ) ) ;
 }
 }


<nb> public class JGitUtils {
 String target = null ;
 try {
 target = repository . getFullBranch ( ) ;
 - if ( ! target . startsWith ( Constants . R_HEADS ) ) {
 - SINGLE
 - SINGLE
 - List < RefModel > tagModels = getTags ( repository , true , - NUMBER0 ) ;
 - if ( tagModels . size ( ) > NUMBER1 ) {
 - RefModel tag = null ;
 - Date lastDate = new Date ( NUMBER1 ) ;
 - for ( RefModel tagModel : tagModels ) {
 - if ( tagModel . getReferencedObjectId ( ) . getName ( ) . equals ( target ) &&
 - tagModel . getDate ( ) . after ( lastDate ) ) {
 - tag = tagModel ;
 - lastDate = tag . getDate ( ) ;
 - }
 - }
 - target = tag . getName ( ) ;
 - }
 - }
 } catch ( Throwable t ) {
 error ( t , repository , STRING0 ) ;
 }


<nb> public class TaskController extends AbstractController {

 SINGLE
 RepeatInfo repeatInfo = model . getRepeat ( ) ;
 - if ( repeatInfo != null )
 + if ( repeatInfo != null ) {
 model . repeatTaskBy ( context , this , repeatInfo ) ;
 + database . update ( TASK_TABLE_NAME , values , KEY_ROWID + STRING0 +
 + task . getTaskIdentifier ( ) . getId ( ) , null ) ;
 + }

 SINGLE
 if ( ( model . getFlags ( ) & TaskModelForHandlers . FLAG_SYNC_ON_COMPLETE ) > NUMBER0 ) {


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class NodeCmd
 {
 throw new RuntimeException ( e ) ;
 }
 +
 + if ( DatabaseDescriptor . getNumTokens ( ) > NUMBER0 )
 + {
 + outs . println ( STRING0 ) ;
 + outs . println ( STRING1 ) ;
 + }
 }

 private void printDc ( PrintStream outs , String format , String dc , LinkedHashMultimap < String , String > endpointsToTokens ,

Print a warning when using nodetool ring with vnodes


<nb> public class ChangeJVMFrame
 + STRING0 ;

 private String macLink
 - = STRING1 +
 - STRING2 ;
 + = STRING3 +
 + STRING4 ;

 private String defaultLink
 = STRING5 +


<nb> public class EditPeopleControlSet extends PopupControlSet {
 int taskRabbitIndex = addUnassigned ? NUMBER0 : NUMBER1 ;
 if ( ! addContactPicker )
 taskRabbitIndex -- ;
 - coreUsers . add ( taskRabbitIndex , taskRabbitUser ) ;
 if ( l . didPostToTaskRabbit ( ) ) {
 + coreUsers . add ( taskRabbitIndex , taskRabbitUser ) ;
 assignedIndex = taskRabbitIndex ;
 }
 }
 <nb> public class AstridOrderedListFragmentHelper < LIST > implements OrderedListFragmen
 updater . onCreateTask ( list , getFilter ( ) , task . getId ( ) ) ;
 fragment . reconstructCursor ( ) ;
 fragment . loadTaskListContent ( true ) ;
 + fragment . selectCustomId ( task . getId ( ) ) ;
 }

 public void onDeleteTask ( Task task ) {


<nb> public final class CameraManager {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public static abstract class AvailabilityCallback {

Fix javadoc for CameraManager AvailabilityCallback


<nb> public class ReaderPostAdapter extends RecyclerView . Adapter < RecyclerView . ViewHol
 private final int mPhotonHeight ;
 private final int mAvatarSzMedium ;
 private final int mAvatarSzSmall ;
 - private final int mAvatarSzTiny ;
 private final int mMarginLarge ;

 private boolean mCanRequestMorePosts ;
 <nb> public class ReaderPostAdapter extends RecyclerView . Adapter < RecyclerView . ViewHol
 mPostListType = postListType ;
 mAvatarSzMedium = context . getResources ( ) . getDimensionPixelSize ( R . dimen . avatar_sz_medium ) ;
 mAvatarSzSmall = context . getResources ( ) . getDimensionPixelSize ( R . dimen . avatar_sz_small ) ;
 - mAvatarSzTiny = context . getResources ( ) . getDimensionPixelSize ( R . dimen . avatar_sz_tiny ) ;
 mMarginLarge = context . getResources ( ) . getDimensionPixelSize ( R . dimen . margin_large ) ;
 mIsLoggedOutReader = ReaderUtils . isLoggedOutReader ( ) ;


<nb> public class Animation3D {
 setHasStarted ( true ) ;

 applyTransformation ( interpolatedTime > NUMBER0 ? NUMBER0 : interpolatedTime < NUMBER1 ? NUMBER1 : interpolatedTime ) ;
 +
 + for ( Animation3DListener listener : mAnimationListeners ) {
 + listener . onAnimationUpdate ( mInstance , interpolatedTime ) ;
 + }
 }
 }
 }
 <nb> public interface Animation3DListener {
 public void onAnimationEnd ( Animation3D animation ) ;
 public void onAnimationRepeat ( Animation3D animation ) ;
 public void onAnimationStart ( Animation3D animation ) ;
 + public void onAnimationUpdate ( Animation3D animation , float interpolatedTime ) ;
 }
 <nb> public class Animation3DQueue implements Animation3DListener {

 }

 + public void onAnimationUpdate ( Animation3D animation , float interpolatedTime ) {
 +
 + }
 +
 public void start ( ) {
 if ( mAnimations . size ( ) == NUMBER1 ) return ;
 Animation3D animation = mAnimations . get ( NUMBER1 ) ;

Added onAnimationUpdate to Animation3DListener


<nb> public class GrailsParameterMap implements Map {

 private Map parameterMap ;
 private Map controllerParamsMap = new HashMap ( ) ;
 - private HttpServletRequest request ;
 -
 -
 +
 public GrailsParameterMap ( HttpServletRequest request ) {
 super ( ) ;
 - this . request = request ;
 +
 this . parameterMap = request . getParameterMap ( ) ;
 }

 <nb> public class GrailsParameterMap implements Map {
 if ( valueArray == null )
 return null ;

 - if ( valueArray . length == NUMBER0 )
 - return request . getParameter ( ( String ) key ) ;
 + if ( valueArray . length == NUMBER0 ) {
 + return valueArray [ NUMBER1 ] ;
 + }

 return parameterMap . get ( key ) ;
 }

changed to use array index to look up parameter instead of unecessary additional method call


<nb> final class SampleMediaRouteProvider extends MediaRouteProvider {
 && intent . getData ( ) != null ) {
 mPlaybackCount += NUMBER0 ;

 + SINGLE
 Uri uri = intent . getData ( ) ;
 - double contentPosition = intent . getDoubleExtra (
 + long contentPositionMillis = intent . getLongExtra (
 MediaControlIntent . EXTRA_ITEM_CONTENT_POSITION , NUMBER1 ) ;
 Bundle metadata = intent . getBundleExtra ( MediaControlIntent . EXTRA_ITEM_METADATA ) ;
 Bundle headers = intent . getBundleExtra (
 MediaControlIntent . EXTRA_ITEM_HTTP_HEADERS ) ;

 Log . d ( TAG , mRouteId + STRING0 + uri
 - + STRING1 + contentPosition
 + + STRING2 + contentPositionMillis
 + STRING3 + metadata
 + STRING4 + headers ) ;

 <nb> final class SampleMediaRouteProvider extends MediaRouteProvider {
 if ( callback != null ) {
 MediaItemStatus status = new MediaItemStatus . Builder (
 MediaItemStatus . PLAYBACK_STATE_PLAYING )
 - . setContentPosition ( contentPosition )
 + . setContentPosition ( contentPositionMillis )
 . build ( ) ;

 Bundle result = new Bundle ( ) ;

Redefine content position in milliseconds instead of seconds


<nb> public class AvoidSpecificRoads {
 }

 } ) ;
 + bld . setPositiveButton ( R . string . default_buttons_ok , null ) ;
 bld . show ( ) ;
 }


<nb> public @ interface DefaultCall {

 @ override
 public String toString ( ) {
 - return STRING0 + typeDescription + STRING1 ;
 + return STRING2 + typeDescription + STRING1 ;
 }
 }
 }


<nb> public class AllField extends AbstractField {

 @ override public TokenStream tokenStreamValue ( ) {
 try {
 + allEntries . reset ( ) ; SINGLE
 return AllTokenStream . allTokenStream ( name , allEntries , analyzer ) ;
 } catch ( IOException e ) {
 throw new ElasticSearchException ( STRING0 ) ;

reset stream when getting all stream so it can be reused


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


<nb> public class AssetManager implements Disposable {
 return ;
 }

 - SINGLE
 + SINGLE
 + SINGLE
 if ( tasks . size ( ) > NUMBER0 ) {
 AssetLoadingTask currAsset = tasks . firstElement ( ) ;
 if ( currAsset . assetDesc . fileName . equals ( fileName ) ) {

fixed improved code comments of asset manager


<nb> public class MotionGroup extends AbstractActionGroup
 {
 case NUMBER0 :
 int offset = editor . getCaretModel ( ) . getOffset ( ) ;
 - int clean = EditorHelper . normalizeOffset ( editor , offset , false ) ;
 + int clean = EditorHelper . normalizeOffset ( editor , offset ,
 + CommandState . getInstance ( ) . getMode ( ) == CommandState . MODE_INSERT ||
 + CommandState . getInstance ( ) . getMode ( ) == CommandState . MODE_REPLACE ) ;
 if ( offset != clean )
 {
 editor . getCaretModel ( ) . moveToOffset ( clean ) ;

Allow mouse click to move cursor to end of line while in Insert or Replace modes


<nb> public class GraphDatabaseShellServer extends SimpleAppServer
 {
 this . graphDb . shutdown ( ) ;
 }
 + super . shutdown ( ) ;
 }
 }

Added a super shutdown so that it unexports the RMI object as well


<nb> public class HibernateAnnotationScanner implements Scanner {
 }
 Index index = getJarFileIndex ( jartoScan , pu ) ;
 if ( index == null ) {
 - throw new RuntimeException ( STRING0 ) ;
 + throw new RuntimeException ( STRING1 +
 + jartoScan . getPath ( ) + STRING2 + pu . getAnnotationIndex ( ) . keySet ( ) + STRING3 ) ;
 }
 if ( jartoScan == null ) {
 throw new IllegalArgumentException ( STRING4 ) ;
 <nb> public class HibernateAnnotationScanner implements Scanner {
 }
 Index index = getJarFileIndex ( jartoScan , pu ) ;
 if ( index == null ) {
 - throw new RuntimeException ( STRING0 ) ;
 + throw new RuntimeException ( STRING1 +
 + jartoScan . getPath ( ) + STRING2 + pu . getAnnotationIndex ( ) . keySet ( ) + STRING3 ) ;
 }
 if ( jartoScan == null ) {
 throw new IllegalArgumentException ( STRING4 ) ;


<nb> public class Delombok {
 try {
 result . print ( writer ) ;
 } finally {
 - writer . close ( ) ;
 + if ( output != null ) {
 + writer . close ( ) ;
 + } else {
 + writer . flush ( ) ;
 + }
 }
 }
 delegate . close ( ) ;

print option with multiple input files would only print one file


<nb> public class DraggableView extends RelativeLayout {
 COMMENT
 private boolean smoothSlideTo ( float slideOffset ) {
 final int topBound = getPaddingTop ( ) ;
 - int y = ( int ) ( topBound + slideOffset * getVerticalDragRange ( ) ) ;
 int x = ( int ) ( slideOffset * ( getWidth ( ) - transformer . getMinWidth ( ) ) ) ;
 + int y = ( int ) ( topBound + slideOffset * getVerticalDragRange ( ) ) ;
 if ( viewDragHelper . smoothSlideViewTo ( dragView , x , y ) ) {
 ViewCompat . postInvalidateOnAnimation ( this ) ;
 return true ;
 <nb> class ScaleTransformer extends Transformer {
 public int getMinWidth ( ) {
 return ( int ) getOriginalWidth ( ) ;
 }
 +
 + @ override
 + public int getLastLeftPosition ( ) {
 + return NUMBER0 ;
 + }
 +
 }
 <nb> public abstract class Transformer {
 public abstract int getWidthPlusMarginRight ( ) ;

 public abstract int getMinWidth ( ) ;
 +
 }


<nb> public class RCompletionManager implements CompletionManager
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class RCompletionManager implements CompletionManager
 if ( value != null )
 {
 if ( value . type == RCompletionType . DIRECTORY )
 - {
 context_ . suggestOnAccept_ = true ;

 - context_ . onSelection ( value ) ;
 - return true ;
 - }
 - else
 - {
 - return false ;
 - }
 + context_ . onSelection ( value ) ;
 + return true ;
 }
 }

 <nb> public class CppCompletionManager implements CompletionManager
 return false ;
 }

 + SINGLE
 + else if ( event . getKeyCode ( ) == KeyCodes . KEY_TAB )
 + {
 + popup . acceptSelected ( ) ;
 + return true ;
 + }
 +
 SINGLE
 else if ( ! CppCompletionUtils . isCppIdentifierKey ( event ) )
 {


<nb> public abstract class BaseComponentSpec implements ComponentSpecInternal {
 this . identifier = info . componentIdentifier ;
 this . typeName = info . typeName ;
 this . mainSourceSet = info . sourceSets ;
 - source = new DefaultDomainObjectSet < LanguageSourceSet > ( LanguageSourceSet . class , mainSourceSet ) ;
 + this . source = new DefaultDomainObjectSet < LanguageSourceSet > ( LanguageSourceSet . class , mainSourceSet ) ;
 }

 public String getName ( ) {

Assign fields in constructor in a consistent way


<nb> public class GwtMusic implements Music , SMSoundCallback {

 @ override
 public boolean isPlaying ( ) {
 - isPlaying &= sound . getPlayState ( ) == NUMBER0 ;
 + isPlaying = ! sound . getPaused ( ) && sound . getPlayState ( ) == NUMBER0 ;
 return isPlaying ;
 }


<nb> public class GroovyManager {
 player . getInventory ( ) . addItem ( new ItemBlock ( group ) , quantity ) ;
 }
 }
 +
 + public void fullHealth ( ) {
 + Player player = Terasology . getInstance ( ) . getActiveWorldRenderer ( ) . getPlayer ( ) ;
 + player . heal ( player . getMaxHealthPoints ( ) - player . getHealthPoints ( ) ) ;
 + }
 +
 + public void teleport ( double x , double y , double z ) {
 + Player player = Terasology . getInstance ( ) . getActiveWorldRenderer ( ) . getPlayer ( ) ;
 + player . setPosition ( x , y , z ) ;
 + }
 +
 }
 }

Added fullHealth and teleport console commands although teleport is is a bit iffy when going to an unloaded chunk


<nb> public class ChatConversationPanel
 COMMENT
 public static String getDateString ( long date )
 {
 - if ( GuiUtils . compareDates ( date , System . currentTimeMillis ( ) ) < NUMBER0 )
 + if ( GuiUtils . compareDatesOnly ( date , System . currentTimeMillis ( ) ) < NUMBER0 )
 {
 StringBuffer dateStrBuf = new StringBuffer ( ) ;

Messages on the current date should only show the hour when the messages was sent received


<nb> public class PSqlConnection extends BaseObject {

 @ signature
 public PSqlStatement query ( Environment env , String sql , @ nullable ArrayMemory args ) throws Throwable {
 - PreparedStatement statement = connection . prepareStatement ( sql , Statement . RETURN_GENERATED_KEYS ) ;
 + PreparedStatement statement = connection . prepareStatement ( sql , Statement . NO_GENERATED_KEYS ) ;
 PSqlStatement sqlStatement = new PSqlStatement ( env , statement ) ;

 if ( args != null ) {


<nb> public class ActFmSyncThread {
 } ;

 private void incrementProgress ( ) {
 - if ( activity != null ) {
 - activity . runOnUiThread ( incrementProgressRunnable ) ;
 + synchronized ( progressBarLock ) {
 + if ( activity != null ) {
 + activity . runOnUiThread ( incrementProgressRunnable ) ;
 + }
 }
 }


<nb> public class Exec2 {
 SINGLE
 global . add ( new ASTId ( Type . DBL , STRING0 , NUMBER0 , global . size ( ) ) ) ; env . push ( FLOAT0 ) ;
 global . add ( new ASTId ( Type . DBL , STRING1 , NUMBER0 , global . size ( ) ) ) ; env . push ( FLOAT1 ) ;
 + global . add ( new ASTId ( Type . DBL , STRING2 , NUMBER0 , global . size ( ) ) ) ; env . push ( Double . NaN ) ;

 SINGLE
 int argcnt = global . size ( ) ;


<nb> public class ThreadWithAttributes extends Thread {
 }

 public final Object [ ] getThreadData ( Object control ) {
 + if ( this . control != control ) return null ;
 return thData ;
 }

 public final void setThreadData ( Object control , Object thData [ ] ) {
 + if ( this . control != control ) return ;
 this . thData = thData ;
 }


<nb> import static NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public abstract class ViewGroup extends View implements ViewParent , ViewManager {
 private static final String TAG = STRING0 ;
 <nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public void setMotionEventSplittingEnabled ( boolean split ) {
 SINGLE
 <nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public void setLayoutMode ( int layoutMode ) {
 if ( mLayoutMode != layoutMode ) {

add attributes reference for splimotionevents and layoutmode


<nb> public class RecyclerViewPager extends RecyclerView {
 }
 }
 }
 + mPositionBeforeScroll = mSmoothScrollTargetPosition ;
 }
 SINGLE
 mMaxLeftWhenDragging = Integer . MIN_VALUE ;

Set mPositionBeforeScroll to page we notify switched to


<nb> public class OnlineBackupKernelExtension implements Lifecycle
 try
 {
 ClusterMemberAvailability ha = graphDatabaseAPI . getDependencyResolver ( ) . resolveDependency ( ClusterMemberAvailability . class ) ;
 - backupUri = URI . create ( STRING0 + server . getSocketAddress ( ) . getHostName ( ) + STRING1 + server . getSocketAddress ( ) . getPort ( ) ) ;
 + backupUri = URI . create ( STRING0 + server . getSocketAddress ( ) . getHostString ( ) + STRING1 + server . getSocketAddress ( ) . getPort ( ) ) ;
 ha . memberIsAvailable ( BACKUP , backupUri ) ;
 }
 catch ( NoClassDefFoundError e )

Uses getHostString so that the host name instead of IP gets published


<nb> public class IgnoredWhenDetachedHandler extends BaseAnnotationHandler < EComponent

 @ override
 public void validate ( Element element , AnnotationElements validatedElements , IsValid valid ) {
 + validatorHelper . isNotPrivate ( element , valid ) ;
 + validatorHelper . isNotFinal ( element , valid ) ;
 + validatorHelper . returnTypeIsVoid ( ( ExecutableElement ) element , valid ) ;
 validatorHelper . enclosingElementHasEFragment ( element , validatedElements , valid ) ;
 }

Adding additional validation to IgnoredWhenDetachedHandler as suggested by yDelouis


<nb> import NAMESPACE ;
 import NAMESPACE ;

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


<nb> public final class CookieManager {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void flushCookieStore ( ) {
 + if ( useChromiumHttpStack ( ) ) {
 + nativeFlushCookieStore ( ) ;
 + }
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class CookieManager {
 private static native void nativeRemoveSessionCookie ( ) ;
 private static native void nativeSetAcceptCookie ( boolean accept ) ;
 private static native void nativeSetCookie ( String url , String value ) ;
 + private static native void nativeFlushCookieStore ( ) ;
 }

Add FlushCookieStore method to CookieManager Java side


<nb> abstract class AbstractEvictableRecordStore extends AbstractRecordStore {
 return null ;
 }

 - long idlenessStartTime = getIdlenessStartTime ( record ) ;
 long maxIdleMillis = calculateMaxIdleMillis ( mapContainer . getMapConfig ( ) ) ;
 + if ( maxIdleMillis == Long . MAX_VALUE ) {
 + return record ;
 + }
 + long idlenessStartTime = getIdlenessStartTime ( record ) ;
 long idleMillis = calculateExpirationWithDelay ( maxIdleMillis , expiryDelayMillis , backup ) ;
 long elapsedMillis = now - idlenessStartTime ;
 return elapsedMillis >= idleMillis ? null : record ;
 <nb> abstract class AbstractEvictableRecordStore extends AbstractRecordStore {
 return null ;
 }
 long ttl = record . getTtl ( ) ;
 - SINGLE
 - if ( ttl < NUMBER0 ) {
 + SINGLE
 + if ( ttl < NUMBER0 || ttl == Long . MAX_VALUE ) {
 return record ;
 }
 long ttlStartTime = getLifeStartTime ( record ) ;

Add shortcuts to ttl and idle checks for HD


<nb> public class DynamicMemberUtils {
 return true ;
 }

 - public static boolean checkVersion ( PsiMethod method , String grailsVersion ) {
 - String since = getCommentValue ( method , STRING0 ) ;
 + public static boolean checkVersion ( PsiMethod method , String version ) {
 + String since = getCommentValue ( method , STRING1 ) ;
 if ( since == null ) return true ;

 - return grailsVersion . compareTo ( since ) >= NUMBER0 ;
 + return version . compareTo ( since ) >= NUMBER0 ;
 }
 -
 +
 @ nullable
 public static String getCommentValue ( PsiMethod method , String commentTagName ) {
 Map < String , String > commentMap = method . getUserData ( COMMENT_KEY ) ;


<nb> public class AccountManagerService
 File systemDir = Environment . getSystemSecureDirectory ( ) ;
 File databaseFile = new File ( systemDir , STRING0 + userId + STRING1 + DATABASE_NAME ) ;
 if ( userId == NUMBER0 ) {
 - SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 File oldFile = new File ( systemDir , DATABASE_NAME ) ;
 - if ( oldFile . exists ( ) ) {
 + if ( oldFile . exists ( ) && ! databaseFile . exists ( ) ) {
 SINGLE
 File userDir = new File ( systemDir , STRING0 + userId ) ;
 if ( ! userDir . exists ( ) ) {

Don t migrate accounts db if already migrated


<nb> public final class ContactsContract {
 public static final String DEFERRED_SNIPPETING_QUERY = STRING0 ;

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String REMOVE_DUPLICATE_ENTRIES = STRING1 ;
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Allow ContactsProvider to remove dulicates


<nb> public class TransportMultiPercolateAction extends TransportAction < MultiPercolat
 @ override
 @ suppresswarnings ( STRING0 )
 public void onFailure ( Throwable e ) {
 + logger . debug ( STRING1 , e ) ;
 try {
 TIntArrayList slots = shardToSlots . get ( shardId ) ;
 for ( int i = NUMBER0 ; i < slots . size ( ) ; i ++ ) {


<nb> public class ImageWallpaper extends WallpaperService {
 updateWallpaperLocked ( ) ;
 }

 - if ( mBackground == null ) {
 - SINGLE
 - SINGLE
 - SINGLE
 - updateWallpaperLocked ( ) ;
 - }
 -
 SurfaceHolder sh = getSurfaceHolder ( ) ;
 final Rect frame = sh . getSurfaceFrame ( ) ;
 final int dw = frame . width ( ) ;

Remove duplicate code to update wallpaper


<nb> public class AdvancedEditPoiFragment extends Fragment
 HashSet < String > valueKeys = new HashSet < > ( ) ;
 for ( AbstractPoiType abstractPoiType : result . values ( ) ) {
 if ( abstractPoiType instanceof PoiType &&
 - ( ( PoiType ) abstractPoiType ) . isNotEditableOsm ( ) ) continue ;
 + ( ( PoiType ) abstractPoiType ) . isNotEditableOsm ( ) ) {
 + continue ;
 + }
 addPoiToStringSet ( abstractPoiType , tagKeys , valueKeys ) ;
 }
 addPoiToStringSet ( mapPoiTypes . getOtherMapCategory ( ) , tagKeys , valueKeys ) ;


<nb> public final class Trace {
 public static final long TRACE_TAG_GRAPHICS = NUMBER0 < < NUMBER1 ;
 public static final long TRACE_TAG_INPUT = NUMBER0 < < NUMBER2 ;
 public static final long TRACE_TAG_VIEW = NUMBER0 < < NUMBER3 ;
 + public static final long TRACE_TAG_WEBVIEW = NUMBER0 < < NUMBER4 ;

 private static final long sEnabledTags = nativeGetEnabledTags ( ) ;


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

 import NAMESPACE ;


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

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class AliasConfiguredTarget implements ConfiguredTarget , ClassObjec
 private final ImmutableMap < Class < ? extends TransitiveInfoProvider > , TransitiveInfoProvider >
 overrides ;

 - public AliasConfiguredTarget ( BuildConfiguration configuration , ConfiguredTarget actual ,
 + public AliasConfiguredTarget (
 + BuildConfiguration configuration ,
 + @ nullable ConfiguredTarget actual ,
 ImmutableMap < Class < ? extends TransitiveInfoProvider > , TransitiveInfoProvider > overrides ) {
 this . configuration = Preconditions . checkNotNull ( configuration ) ;
 - this . actual = Preconditions . checkNotNull ( actual ) ;
 + this . actual = actual ;
 this . overrides = Preconditions . checkNotNull ( overrides ) ;
 }


<nb> public class TestNGTestClassProcessor implements TestClassProcessor {
 testNg . setSourcePath ( CollectionUtils . join ( File . pathSeparator , options . getTestResources ( ) ) ) ;
 }

 + SINGLE
 SINGLE
 SINGLE
 + SINGLE
 testNg . setUseDefaultListeners ( ! testReportOn && options . getUseDefaultListeners ( ) ) ;

 testNg . addListener ( ( Object ) adaptListener ( testResultProcessor ) ) ;


<nb> public class StringUtils {
 SINGLE
 }
 }
 - value = new String ( content , Charset . forName ( STRING0 ) ) ;
 if ( value . startsWith ( STRING1 ) ) {
 SINGLE
 return value . substring ( NUMBER0 ) ;

Fixed string encoding regression introduced with fix for BOM


<nb> public class ParsedModuleStringNotation {
 private void assignValuesFromModuleNotation ( String moduleNotation ) {
 String [ ] moduleNotationParts = moduleNotation . split ( STRING0 ) ;
 if ( moduleNotationParts . length < NUMBER0 || moduleNotationParts . length > NUMBER1 ) {
 - throw new IllegalDependencyNotation ( STRING1 + moduleNotation + STRING2 ) ;
 + throw new IllegalDependencyNotation ( STRING3 + moduleNotation + STRING4 ) ;
 }
 group = GUtil . elvis ( moduleNotationParts [ NUMBER2 ] , null ) ;
 name = moduleNotationParts [ NUMBER3 ] ;

Improved the exception message after being bit


<nb> final class ConcreteResourceRegistration extends AbstractResourceRegistration {
 return subregistry . getOperationDescription ( iterator , next . getValue ( ) , operationName , inheritance ) ;
 } else {
 final OperationEntry entry = operationsUpdater . get ( this , operationName ) ;
 - return entry == null ? null : entry . getDescriptionProvider ( ) ;
 + return entry == null ? inherited : entry . getDescriptionProvider ( ) ;
 }
 }


<nb> public class MvpNullObjectBasePresenterTest {

 @ test public void pickingCorrectViewInterface ( ) {

 - ViewWithMulitpleInterfaces view = new ViewWithMulitpleInterfaces ( ) ;
 + TestView view = new ViewWithMulitpleInterfaces ( ) ;
 TestNullObjectPresenter presenter = new TestNullObjectPresenter ( ) ;

 presenter . attachView ( view ) ;
 <nb> public class MvpNullObjectBasePresenterTest {

 presenter . detachView ( false ) ;
 Assert . assertNotNull ( presenter . getView ( ) ) ;
 - Assert . assertTrue ( presenter . getView ( ) instanceof TestView ) ;
 Assert . assertFalse ( presenter . getView ( ) == view ) ;
 }
 }


<nb> public class DumpCommand implements AdminCommand
 @ override
 public Optional < String > arguments ( )
 {
 - return Optional . of ( STRING0 ) ;
 + return Optional . of ( STRING1 ) ;
 }

 @ override
 public String description ( )
 {
 - return STRING0 ;
 + return STRING2 +
 + STRING3 +
 + STRING4 ;
 }

 @ override
 <nb> public class LoadCommand implements AdminCommand
 @ override
 public Optional < String > arguments ( )
 {
 - return Optional . of ( STRING0 ) ;
 + return Optional . of ( STRING5 ) ;
 }

 @ override
 public String description ( )
 {
 - return STRING0 ;
 + return STRING6 +
 + STRING7 +
 + STRING8 +
 + STRING9 ;
 }

 @ override


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;

 public class BinHeap < T > implements OTPPriorityQueue < T > {

 public static OTPPriorityQueueFactory FACTORY = new BinHeapFactory ( ) ;
 - SINGLE
 - public static List < double [ ] > prioPool ;
 - public static List < Object [ ] > elemPool ;
 private static final double GROW_FACTOR = FLOAT0 ;

 private double [ ] prio ;
 private T [ ] elem ;
 private int size ;
 private int capacity ;
 - private int [ ] dir ; SINGLE

 public BinHeap ( ) {
 this ( NUMBER0 ) ;

remove decrease key and pooling cruft from binheap


<nb> public class ConversationFragment extends Fragment {

 @ override
 public void onClick ( View v ) {
 - activity . hideConversationsOverview ( ) ;
 + if ( activity != null ) {
 + activity . hideConversationsOverview ( ) ;
 + }
 }
 } ) ;
 mEditMessage . setOnEditorActionListener ( mEditorActionListener ) ;


<nb> public class AssetManager implements Disposable {

 COMMENT
 public synchronized void clear ( ) {
 - if ( loadQueue . size > NUMBER0 || tasks . size ( ) != NUMBER0 ) {
 - try {
 - while ( ! updateTask ( ) )
 - ;
 - } catch ( Throwable t ) {
 - handleTaskError ( t ) ;
 - }
 - }
 + loadQueue . clear ( ) ;
 + while ( ! update ( ) ) ;

 Array < String > assets = assetTypes . keys ( ) . toArray ( ) ;
 for ( String asset : assets ) {


<nb> public class PluginOptionSpec {
 private String defaultValue ;

 public PluginOptionSpec ( String id , String description , ValueType type , boolean mandatory , boolean sensitive , String defaultValue ) {
 + if ( ! mandatory && sensitive ) {
 + throw new IllegalArgumentException ( STRING0 ) ;
 + }
 + if ( ! mandatory && defaultValue == null ) {
 + throw new IllegalArgumentException ( STRING1 ) ;
 + }
 +
 this . id = id ;
 this . description = description ;
 this . type = type ;


<nb> public class AdHocCommandHandler extends IQHandler
 addCommand ( new AddGroup ( ) ) ;
 addCommand ( new UpdateGroup ( ) ) ;
 addCommand ( new DeleteGroup ( ) ) ;
 + addCommand ( new ChangeUserPassword ( ) ) ;
 }

 private void startCommand ( AdHocCommand command ) {


<nb> public class TestingModelBasePlugin implements Plugin < Project > {
 }
 }
 }
 - }

 - @ mutate
 - void attachBinariesToCheckLifecycle ( @ path ( STRING0 ) Task checkTask , ModelMap < TestSuiteBinarySpec > binaries ) {
 - for ( TestSuiteBinarySpec testBinary : binaries ) {
 - checkTask . dependsOn ( ( ( TestSuiteTaskCollection ) testBinary . getTasks ( ) ) . getRun ( ) ) ;
 + @ mutate
 + void attachBinariesToCheckLifecycle ( @ path ( STRING0 ) Task checkTask , ModelMap < TestSuiteBinarySpec > binaries ) {
 + for ( TestSuiteBinarySpec testBinary : binaries ) {
 + checkTask . dependsOn ( ( ( TestSuiteTaskCollection ) testBinary . getTasks ( ) ) . getRun ( ) ) ;
 + }
 }
 }
 }


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

 package NAMESPACE ;

 <nb> public class TriangleRaycastTest extends BaseBulletTest {
 tmpSetTo . setValue ( value . x , value . y , value . z ) ;
 super . setTo ( tmpSetTo ) ;
 }
 +
 + @ override
 + public void dispose ( ) {
 + tmpSetFrom . dispose ( ) ;
 + tmpSetTo . dispose ( ) ;
 + super . dispose ( ) ;
 + }
 }

 private Model model ;

Properly dispose things that need to be disposed


<nb> public class ViewPropertyAnimatorCompat {

 @ override
 public void run ( ) {
 - startAnimation ( mVpa , mViewRef . get ( ) ) ;
 + final View view = mViewRef . get ( ) ;
 + if ( view != null ) {
 + startAnimation ( mVpa , view ) ;
 + }
 }
 } ;

Avoid NPE when an animated View disappears before animation starts


<nb> public class WindowManagerService extends IWindowManager . Stub
 winAnimator . mEnterAnimationPending = true ;
 }
 if ( toBeDisplayed ) {
 + if ( ( win . mAttrs . softInputMode & SOFT_INPUT_MASK_ADJUST )
 + == SOFT_INPUT_ADJUST_RESIZE ) {
 + win . mLayoutNeeded = true ;
 + }
 if ( win . isDrawnLw ( ) && okToDisplay ( ) ) {
 winAnimator . applyEnterAnimationLocked ( ) ;
 }

Layout the window to be displayed if it would be resized


<nb> public class Wallet implements Serializable , BlockChainListener {
 }

 List < Sha256Hash > oldBlockHashes = new ArrayList < Sha256Hash > ( oldBlocks . size ( ) ) ;
 - List < Sha256Hash > newBlockHashes = new ArrayList < Sha256Hash > ( newBlocks . size ( ) ) ;
 log . info ( STRING0 ) ;
 for ( StoredBlock b : oldBlocks ) {
 log . info ( STRING1 , b . getHeader ( ) . getHashAsString ( ) ) ;
 <nb> public class Wallet implements Serializable , BlockChainListener {
 log . info ( STRING2 ) ;
 for ( StoredBlock b : newBlocks ) {
 log . info ( STRING1 , b . getHeader ( ) . getHashAsString ( ) ) ;
 - newBlockHashes . add ( b . getHeader ( ) . getHash ( ) ) ;
 }

 SINGLE

remove an unused variable from reorganize


<nb> public class ContextConfig implements LifecycleListener {
 }
 FragmentJarScannerCallback callback =
 new FragmentJarScannerCallback ( webXmlParser , delegate ) ;
 - if ( ! callback . isOk ( ) ) {
 - ok = false ;
 - }

 jarScanner . scan ( JarScanType . PLUGGABILITY ,
 context . getServletContext ( ) , callback ) ;

 + if ( ! callback . isOk ( ) ) {
 + ok = false ;
 + }
 return callback . getFragments ( ) ;
 }

Check needs to happen after call to scan


<nb> public class XMLScriptBuilder extends BaseBuilder {
 || child . getNode ( ) . getNodeType ( ) == Node . TEXT_NODE ) {
 String data = child . getStringBody ( STRING0 ) ;
 contents . add ( new TextSqlNode ( data ) ) ;
 - } else if ( ! STRING1 . equals ( nodeName ) ) {
 + } else if ( child . getNode ( ) . getNodeType ( ) == Node . ELEMENT_NODE && ! STRING1 . equals ( nodeName ) ) { SINGLE
 NodeHandler handler = nodeHandlers . get ( nodeName ) ;
 if ( handler == null ) {
 throw new BuilderException ( STRING2 + nodeName + STRING3 ) ;

Parsing SQL Mapper Configuration failes for some XML Parsers due to comment nodes


<nb> public class RemoteSiteTest extends AbstractBasicTest {
 }
 }

 - @ test ( groups = STRING0 )
 - public void testMailGoogleCom ( ) throws Exception {
 - try ( AsyncHttpClient c = asyncHttpClient ( config ( ) . setRequestTimeout ( NUMBER0 ) ) ) {
 - Response response = c . prepareGet ( STRING1 ) . execute ( ) . get ( NUMBER1 , TimeUnit . SECONDS ) ;
 - assertNotNull ( response ) ;
 - assertEquals ( response . getStatusCode ( ) , NUMBER2 ) ;
 - }
 - }
 -
 @ test ( groups = STRING0 , enabled = false )
 SINGLE
 public void testMicrosoftCom ( ) throws Exception {


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

 public class MockUtil {

In order to put additional reflection classes in consistent folder I did some package rename job


<nb> public final class GraphvizPrinter
 SORT ,
 SAMPLE ,
 MARK_DISTINCT ,
 - MATERIALIZE_SAMPLE ,
 INDEX_SOURCE ,
 UNNEST
 }
 <nb> public final class GraphvizPrinter
 . put ( NodeType . WINDOW , STRING0 )
 . put ( NodeType . UNION , STRING1 )
 . put ( NodeType . MARK_DISTINCT , STRING2 )
 - . put ( NodeType . MATERIALIZE_SAMPLE , STRING3 )
 . put ( NodeType . INDEX_SOURCE , STRING4 )
 . put ( NodeType . UNNEST , STRING5 )
 . put ( NodeType . SAMPLE , STRING6 )


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

 <nb> public class TextureView extends View {
 synchronized ( mLock ) {
 mUpdateLayer = true ;
 }
 - postInvalidate ( ) ;
 +
 + if ( Looper . myLooper ( ) == Looper . getMainLooper ( ) ) {
 + invalidate ( ) ;
 + } else {
 + postInvalidate ( ) ;
 + }
 }
 } ;
 mSurface . setOnFrameAvailableListener ( mUpdateListener ) ;

Call invalidate immediately when a frame is available


<nb> public class PojoMethodMapping {
 m . getName ( ) , m . getDeclaringClass ( ) . getName ( ) ) ) ;
 }
 } else {
 - if ( decoderMatch != null || decoderMatch . hasMatches ( ) ) {
 + if ( decoderMatch != null && decoderMatch . hasMatches ( ) ) {
 throw new IllegalArgumentException ( sm . getString (
 STRING0 ,
 m . getName ( ) , m . getDeclaringClass ( ) . getName ( ) ) ) ;

Fix logic error that triggered an NPE and associated test failures


<nb> public class TableParam extends AbstractTable {
 SINGLE
 DbUtils . executeAndClose (
 conn . prepareStatement ( STRING0 +
 - STRING1 ) ) ;
 + STRING2 ) ) ;
 }

 psRead = conn . prepareStatement ( STRING3 + PARAMID + STRING4 ) ;

Increased the size of the field vals of the table PARAM


<nb> public class RoundRobinConnectionPoolImplTest extends BaseConnectionPoolTest {
 }

 @ test
 + @ ignore
 public void testAddingNewHost ( ) {
 CountingConnectionPoolMonitor monitor = new CountingConnectionPoolMonitor ( ) ;


<nb> public class XSON extends DefaultHandler {

 public class NullHandler extends Handler {
 public void endElement ( String uri , String localName , String qName ) throws SAXException {
 - _currentDoc . put ( cleanName ( ) , ( Object ) null ) ;
 + _currentDoc . put ( cleanName ( ) , null ) ;
 super . endElement ( uri , localName , qName ) ;
 }
 }


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

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public final class ZLAndroidPaintContext extends ZLPaintContext {
 myCanvas . drawText ( string , offset , offset + length , x , y , myPaint ) ;
 }

 - SINGLE
 - SINGLE
 - SINGLE
 + public int imageWidth ( ZLImage image ) {
 + SINGLE
 + return NUMBER0 ;
 + }
 +
 + public int imageHeight ( ZLImage image ) {
 + SINGLE
 + return NUMBER0 ;
 + }
 +
 + public void drawImage ( int x , int y , ZLImage image ) {
 + SINGLE
 + }

 public void drawLine ( int x0 , int y0 , int x1 , int y1 ) {
 myCanvas . drawLine ( x0 , y0 , x1 , y1 , myPaint ) ;

added dummy implementation for ZLImage related methods


<nb> public class EditAuthorsDialogActivity extends EditListDialogActivity {
 }

 private void addAuthor ( String author , int position ) {
 - if ( author . length ( ) != NUMBER0 && author . matches ( STRING0 ) ) {
 + if ( author . length ( ) != NUMBER0 && author . matches ( STRING1 ) ) {
 if ( position < NUMBER0 ) {
 if ( ! myEditList . contains ( author ) ) {
 myEditList . add ( author ) ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public abstract class BaseCacheResolver implements CacheResolver , InitializingBean {

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public abstract class CacheOperation implements BasicCacheOperation {

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 @ suppresswarnings ( STRING0 )
 public class NameMatchCacheOperationSource implements CacheOperationSource , Serializable {
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public class NamedCacheResolver extends BaseCacheResolver {


<nb> public final class ReilInstruction implements IInstruction , Comparable < ReilInstr
 stringBuilder . append ( thirdOperand . getSize ( ) ) ;
 stringBuilder . append ( STRING0 ) ;
 stringBuilder . append ( thirdOperand ) ;
 - stringBuilder . append ( STRING1 ) ;
 + stringBuilder . append ( STRING1 ) ;
 return stringBuilder . toString ( ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class Viterbi implements Persistable {

 <nb> public class Viterbi implements Persistable {
 private double logOfDiangnalTProb ;
 private double logStates ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT

 public Viterbi ( DoubleMatrix possibleLabels ) {
 this . possibleLabels = possibleLabels ;
 <nb> public class Viterbi implements Persistable {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public Pair < Double , DoubleMatrix > decode ( DoubleMatrix labels ) {
 return decode ( labels , true ) ;


<nb> public class ContentView extends FrameLayout {

 SINGLE
 metUrl . requestFocus ( ) ;
 + metUrl . selectAll ( ) ;
 SINGLE
 InputMethodManager imm = ( InputMethodManager ) getContext ( ) . getSystemService ( Context . INPUT_METHOD_SERVICE ) ;
 imm . showSoftInput ( metUrl , InputMethodManager . SHOW_IMPLICIT ) ;


<nb> import NAMESPACE ;
 COMMENT
 public class TruePredicate implements DataSerializable , Predicate {

 + COMMENT
 + COMMENT
 + COMMENT
 public static final TruePredicate INSTANCE = new TruePredicate ( ) ;

 @ override


<nb> public abstract class GoReferenceBase extends PsiReferenceBase < PsiElement > {

 @ nullable
 protected PsiDirectory resolvePackage ( @ notnull String str ) {
 + if ( str . startsWith ( STRING0 ) ) return null ;
 for ( VirtualFile file : getPathsToLookup ( ) ) {
 VirtualFile child = file != null ? file . findFileByRelativePath ( str ) : null ;
 if ( child != null ) return PsiManager . getInstance ( myElement . getProject ( ) ) . findDirectory ( child ) ;
 <nb> public abstract class GoReferenceBase extends PsiReferenceBase < PsiElement > {
 return null ;
 }

 -
 @ notnull
 @ override
 public Object [ ] getVariants ( ) {


<nb> public class SmaliMethodReference extends SmaliCompositeElement implements PsiRe
 @ nullable
 public SmaliTypeElement getReturnType ( ) {
 SmaliTypeElement [ ] types = findChildrenByClass ( SmaliTypeElement . class ) ;
 - assert types . length == NUMBER0 ;
 + if ( types . length < NUMBER0 ) {
 + return null ;
 + }
 return types [ NUMBER1 ] ;
 }

Fix SmaliMethodReference getReturnType on missing return type


<nb> class ShowcaseViewBuilder {
 return this ;
 }

 - public ShowcaseView build ( ) {
 + public ShowcaseView build ( ) {
 return showcaseView ;
 }

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class ActionBarReflector extends BaseReflector {
 + class ActionBarReflector extends BaseReflector {

 private Activity mActivity ;

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class AppCompatReflector extends BaseReflector {
 + class AppCompatReflector extends BaseReflector {

 private Activity mActivity ;

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class SherlockReflector extends BaseReflector {
 + class SherlockReflector extends BaseReflector {

 private Activity mActivity ;


<nb> public final class ConfigValidator {
 public static void checkNearCacheConfig ( NearCacheConfig nearCacheConfig , boolean isClient ) {
 checkNotNative ( nearCacheConfig . getInMemoryFormat ( ) ) ;

 - checkNoCacheLocalEntriesOnClients ( nearCacheConfig , isClient ) ;
 + if ( isClient && nearCacheConfig . isCacheLocalEntries ( ) ) {
 + throw new IllegalArgumentException (
 + STRING0 ) ;
 + }
 }

 COMMENT
 <nb> public final class ConfigValidator {
 }
 }

 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - private static void checkNoCacheLocalEntriesOnClients ( NearCacheConfig nearCacheConfig , boolean isClient ) {
 - if ( isClient && nearCacheConfig . isCacheLocalEntries ( ) ) {
 - throw new IllegalArgumentException (
 - STRING0 ) ;
 - }
 - }
 -
 @ suppresswarnings ( STRING1 )
 private static void logIgnoredConfig ( MapConfig mapConfig ) {
 if ( mapConfig . getMinEvictionCheckMillis ( ) != DEFAULT_MIN_EVICTION_CHECK_MILLIS


<nb> public class CRFLabel implements Serializable {
 private static final long serialVersionUID = NUMBER0 ;

 private final int [ ] label ;
 - int hashCode = - NUMBER1 ;
 + private int hashCode = - NUMBER1 ;

 SINGLE
 private static final int maxNumClasses = NUMBER2 ;


<nb> public class ScriptExtensionClassNameProvider extends ExtensionClassNameProvider
 result . put ( String . class , StringUtils . class ) ;
 result . put ( String . class , URLEncoder . class ) ;
 result . put ( Item . class , PersistenceExtensions . class ) ;
 + result . put ( Item . class , BusEvent . class ) ;
 return result ;
 }
 }

allow bus event actions to be used as item extensions as well


<nb> public class WorldEdit {
 private final static Integer [ ] DEFAULT_ALLOWED_BLOCKS = {
 NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , NUMBER7 , NUMBER8 , NUMBER9 , NUMBER10 , NUMBER11 , NUMBER12 , NUMBER13 , NUMBER14 , NUMBER15 , NUMBER16 , NUMBER17 , NUMBER18 ,
 NUMBER19 , NUMBER20 , NUMBER21 , NUMBER22 , NUMBER23 , NUMBER24 , NUMBER25 , NUMBER26 , NUMBER27 , NUMBER28 , NUMBER29 , NUMBER30 , NUMBER31 , NUMBER32 , NUMBER33 , NUMBER34 , NUMBER35 ,
 - NUMBER36 , NUMBER37 , NUMBER38 , NUMBER39 , NUMBER40 , NUMBER41 , NUMBER42 , NUMBER43 , NUMBER44 , NUMBER45
 + NUMBER36 , NUMBER37 , NUMBER38 , NUMBER39 , NUMBER40 , NUMBER41 , NUMBER42 , NUMBER44 , NUMBER45
 } ;

 COMMENT

Removed cactus from the default list of allowed blocks


<nb> public class Tomcat7CometSupport extends AsynchronousProcessor {
 try {
 Class . forName ( CometEvent . class . getName ( ) ) ;
 } catch ( Throwable e ) {
 + logger . error ( STRING0 , e ) ;
 throw new IllegalStateException ( unableToDetectComet ( ) ) ;
 }
 }
 <nb> public class TomcatCometSupport extends AsynchronousProcessor {
 try {
 Class . forName ( CometEvent . class . getName ( ) ) ;
 } catch ( Throwable e ) {
 + logger . error ( STRING0 , e ) ;
 throw new IllegalStateException ( unableToDetectComet ( ) ) ;
 }
 }


<nb> public class CallHistoryServiceImpl
 private static List < String > getCSVs ( String str )
 {
 List < String > result = new LinkedList < String > ( ) ;
 +
 + if ( str == null )
 + return result ;
 +
 StringTokenizer toks = new StringTokenizer ( str , DELIM ) ;
 while ( toks . hasMoreTokens ( ) )
 {
 <nb> public class HistoryReaderImpl
 SINGLE
 Node nodeValue = propertyNode . getFirstChild ( ) ;

 + if ( nodeValue == null )
 + continue ;
 +
 nameVals . add ( propertyNode . getNodeName ( ) ) ;
 - nameVals . add ( nodeValue == null ?
 - null : nodeValue . getNodeValue ( ) ) ;
 + nameVals . add ( nodeValue . getNodeValue ( ) ) ;
 }
 }


<nb> public class ClientConfig {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class TemporaryQueueReplyHandler implements ReplyHandler {
 }

 public void onReply ( String correlationId , Message reply ) {
 - SINGLE
 - SINGLE
 + SINGLE
 ReplyHolder holder = new ReplyHolder ( exchange , callback , originalCorrelationId , reply ) ;
 - SINGLE
 + SINGLE
 replyManager . processReply ( holder ) ;
 }

JmsProducer supports non blocking async routing engine for InOut Exchanges request reply over JMS


<nb> public final class Settings {
 public static final String DEVICE_PROVISIONED = STRING0 ;

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED =
 + STRING1 ;
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class DctConstants {
 public static final int CMD_NET_STAT_POLL = BASE + NUMBER0 ;
 public static final int EVENT_DATA_RAT_CHANGED = BASE + NUMBER1 ;
 public static final int CMD_CLEAR_PROVISIONING_SPINNER = BASE + NUMBER2 ;
 + public static final int EVENT_DEVICE_PROVISIONED_CHANGE = BASE + NUMBER3 ;

 COMMENT


<nb> public interface ChannelHandlerContext extends AttributeMap {
 void connect ( SocketAddress remoteAddress , ChannelFuture future ) ;
 void connect ( SocketAddress remoteAddress , SocketAddress localAddress , ChannelFuture future ) ;
 void disconnect ( ChannelFuture future ) ;
 - void closeInbound ( ChannelFuture future ) ;
 - void closeOutbound ( ChannelFuture future ) ;
 void close ( ChannelFuture future ) ;
 void deregister ( ChannelFuture future ) ;
 ChannelBufferHolder < Object > out ( ) ;

Remove the methods related with half close


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

 public class BSONLoader extends LoadFunc {

 <nb> public class BSONLoader extends LoadFunc {
 return ( ( Date ) o ) . getTime ( ) ;
 } else if ( o instanceof ObjectId ) {
 return o . toString ( ) ;
 + } else if ( o instanceof UUID ) {
 + return o . toString ( ) ;
 } else if ( o instanceof BasicBSONList ) {
 BasicBSONList bl = ( BasicBSONList ) o ;
 Tuple t = tupleFactory . newTuple ( bl . size ( ) ) ;

Add capability of BSONLoader java to parse UUID


<nb> public class DefaultHttp2Connection implements Http2Connection {
 COMMENT
 COMMENT
 final class DefaultPropertyKey implements PropertyKey {
 - private final int index ;
 + final int index ;

 DefaultPropertyKey ( int index ) {
 this . index = index ;

DefaultPropertyKey private member variable accessed outside scope


<nb> public class ThemeableActivity extends SherlockActivity {
 options . inSampleSize = NUMBER0 ;

 Bitmap b = BitmapFactory . decodeFile ( themebg , options ) ;
 -
 - b = Bitmap . createBitmap ( b , NUMBER1 , NUMBER1 , Math . min ( b . getWidth ( ) , width ) , Math . min ( b . getHeight ( ) , height ) ) ;
 +
 + float ratio = ( ( float ) width ) / ( ( float ) height ) ;
 + int bgHeight = b . getHeight ( ) ;
 + int bgWidth = ( int ) ( ( ( float ) b . getHeight ( ) ) * ratio ) ;
 +
 + b = Bitmap . createBitmap ( b , NUMBER1 , NUMBER1 , Math . min ( b . getWidth ( ) , bgWidth ) , bgHeight ) ;

 mThemeDrawable = new BitmapDrawable ( b ) ;

 }

 - SINGLE
 - SINGLE
 +
 activity . getWindow ( ) . setBackgroundDrawable ( mThemeDrawable ) ;
 }

renders background at proper aspect ratio


<nb> public abstract class DictionaryUtil {

 intent . addFlags ( Intent . FLAG_ACTIVITY_NO_HISTORY ) ;
 intent . addFlags ( Intent . FLAG_ACTIVITY_NO_ANIMATION ) ;
 - SINGLE
 + intent . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK ) ;

 final String key = get ( STRING0 ) ;
 if ( key != null ) {


<nb> abstract class ContextLoaderUtils {
 throw new IllegalStateException ( msg , e ) ;
 }

 - if ( resolver != null ) {
 - profiles = resolver . resolve ( declaringClass ) ;
 - if ( profiles == null ) {
 - String msg = String . format (
 - STRING0 ,
 - resolverClass . getName ( ) ) ;
 - logger . error ( msg ) ;
 - throw new IllegalStateException ( msg ) ;
 - }
 + profiles = resolver . resolve ( declaringClass ) ;
 + if ( profiles == null ) {
 + String msg = String . format (
 + STRING0 ,
 + resolverClass . getName ( ) ) ;
 + logger . error ( msg ) ;
 + throw new IllegalStateException ( msg ) ;
 }
 }
 else if ( valueDeclared ) {

Remove superfluous not null check in ContextLoaderUtils


<nb> public abstract class BaseStubbing < T > implements OngoingStubbing < T > , DeprecatedO
 public OngoingStubbing < T > thenReturn ( T value , T . . . values ) {
 OngoingStubbing < T > stubbing = thenReturn ( value ) ;
 if ( values == null ) {
 + SINGLE
 return stubbing . thenReturn ( null ) ;
 }
 for ( T v : values ) {


<nb> public class ImageManager {
 }

 if ( result != null ) {
 + if ( ! isInDiskCache && useDiskCache ) {
 + putInDiskCache ( key , result ) ;
 + }
 +
 final Bitmap finalResult = result ;
 mainHandler . post ( new Runnable ( ) {
 @ override
 <nb> public class ImageManager {
 putInMemoryCache ( key , finalResult ) ;
 cb . onLoadCompleted ( finalResult ) ;
 }
 +
 } ) ;
 - SINGLE
 - if ( ! isInDiskCache && useDiskCache ) {
 - putInDiskCache ( key , result ) ;
 - }
 }
 }


<nb> public final class PersistNFS extends Persist {
 @ override
 public void importFiles ( String path , ArrayList < String > files , ArrayList < String > keys , ArrayList < String > fails , ArrayList < String > dels ) {
 File f = new File ( path ) ;
 - if ( ! f . exists ( ) ) throw new H2ONotFoundArgumentException ( STRING0 + path + STRING1 ) ;
 + if ( ! f . exists ( ) ) throw new H2ONotFoundArgumentException ( STRING2 + path + STRING1 ) ;
 FileIntegrityChecker . check ( f ) . syncDirectory ( files , keys , fails , dels ) ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class MySiteFragment extends Fragment

 private void showSitePicker ( ) {
 if ( isAdded ( ) ) {
 + ReaderAnim . showFab ( mFabView , false ) ;
 int localBlogId = ( mBlog != null ? mBlog . getLocalTableBlogId ( ) : NUMBER0 ) ;
 ActivityLauncher . showSitePickerForResult ( getActivity ( ) , localBlogId ) ;
 }
 <nb> public class MySiteFragment extends Fragment
 if ( resultCode == Activity . RESULT_OK ) {
 setBlog ( WordPress . getCurrentBlog ( ) ) ;
 }
 + SINGLE
 + long delayMs = getResources ( ) . getInteger ( android . R . integer . config_shortAnimTime ) ;
 + ReaderAnim . showFabDelayed ( mFabView , true , delayMs ) ;
 break ;
 default :
 break ;

FAB on My Site animates in out with site picker


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

 import NAMESPACE ;

 <nb> public class AudioVideoNotesPlugin extends OsmandPlugin {
 String additional = STRING0 ;
 if ( duration > NUMBER0 ) {
 int d = ( int ) ( duration / NUMBER1 ) ;
 -
 - String min ;
 - if ( d % NUMBER2 < NUMBER3 ) {
 - min = STRING1 + ( d % NUMBER2 ) ;
 - } else {
 - min = ( d % NUMBER2 ) + STRING0 ;
 - }
 - additional += ( d / NUMBER2 ) + STRING2 + min ;
 + additional += Algorithms . formatDuration ( d ) ;
 }
 if ( ! available ) {
 additional += STRING3 + ctx . getString ( R . string . recording_unavailable ) + STRING4 ;
 }
 return additional ;
 }
 -
 +

 }


<nb> public abstract class Chunk extends Iced implements Cloneable {
 private void setWrite ( ) {
 if ( _chk2 != null ) return ; SINGLE
 assert ! ( this instanceof NewChunk ) : STRING0 ;
 - if ( _vec == null )
 - System . out . println ( STRING1 ) ;
 _vec . preWriting ( ) ; SINGLE
 _chk2 = clone ( ) ; SINGLE
 assert _chk2 . _chk2 == null ; SINGLE
 <nb> public class Vec extends Iced {
 transient Chunk _cache ;
 private Chunk c ( long i ) {
 Chunk c = _cache ;
 - if ( c != null && c . _start == - NUMBER0 )
 - System . out . println ( STRING1 ) ;
 return ( c != null && c . _chk2 == null && c . _start <= i && i < c . _start + c . _len ) ? c : ( _cache = chunkForRow ( i ) ) ;
 }
 COMMENT


<nb> OF THE POSSIBILITY OF SUCH DAMAGE .
 COMMENT

 import NAMESPACE ;
 + import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BaseMarkupBuilder extends Builder {
 return new Document ( root , this . namespaceMethodMap ) ;
 }

 - private static class Document extends Built {
 + private static class Document extends Built implements GroovyInterceptable {
 private Object out ;
 private final Map pendingNamespaces = new HashMap ( ) ;
 private final Map namespaces = new HashMap ( ) ;

Add GroovyInterceptable so that the builder catches all the calls and works properly again


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

 private NSDictionary < NSString , NSObject > data ;

 + public UIPageViewControllerOptions ( ) {
 + this . data = new NSMutableDictionary < > ( ) ;
 + }
 protected UIPageViewControllerOptions ( NSDictionary < NSString , NSObject > data ) {
 this . data = data ;
 }

Added public constructor UIPageViewController


<nb> public class TwoWayView extends AdapterView < ListAdapter > implements
 private static final int NO_POSITION = - NUMBER0 ;
 private static final int INVALID_POINTER = - NUMBER0 ;

 + public static final int [ ] STATE_NOTHING = new int [ ] { NUMBER1 } ;
 +
 private static final int TOUCH_MODE_REST = - NUMBER0 ;
 private static final int TOUCH_MODE_DOWN = NUMBER1 ;
 private static final int TOUCH_MODE_TAP = NUMBER0 ;
 <nb> public class TwoWayView extends AdapterView < ListAdapter > implements
 if ( shouldShowSelector ( ) ) {
 mSelector . setState ( getDrawableState ( ) ) ;
 } else {
 - mSelector . setState ( new int [ ] { NUMBER1 } ) ;
 + mSelector . setState ( STATE_NOTHING ) ;
 }
 }
 }

library Define a private STATE_NOTHING constant for selector


<nb>
 package NAMESPACE ;

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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - < < < < < < < . mine
 -
 -
 -
 - == == == =
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 - > > > > > > > . theirs
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 +
 public class XMLChangeLogParserTest {

 @ test

Fixed a test that had accidentally been checked in with the conflict tags still in place in the imports


<nb> public class CommandFailureException extends MongoException {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 + @ deprecated
 public CommandResult getCommandResult ( ) {
 return commandResult ;
 }


<nb> public class EncodedImage implements Closeable {
 }

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - public static boolean isJpegMetaDataAvailable ( EncodedImage encodedImage ) {
 - Preconditions . checkArgument ( encodedImage . getImageFormat ( ) == ImageFormat . JPEG ) ;
 + public static boolean isMetaDataAvailable ( EncodedImage encodedImage ) {
 return encodedImage . mRotationAngle >= NUMBER0
 && encodedImage . mWidth >= NUMBER0
 && encodedImage . mHeight >= NUMBER0 ;

Removed precondition in isJpegMetaDataAvailable in EncodedImage


<nb> public enum CreatureType {
 COW ( STRING0 ) ,
 CREEPER ( STRING1 ) ,
 GHAST ( STRING2 ) ,
 + GIANT ( STRING3 ) ,
 PIG ( STRING4 ) ,
 PIG_ZOMBIE ( STRING5 ) ,
 SHEEP ( STRING6 ) ,


<nb> public class SwipeHelper implements Gefingerpoken {
 public void removeLongPressCallback ( ) {
 if ( mWatchLongPress != null ) {
 mHandler . removeCallbacks ( mWatchLongPress ) ;
 + mWatchLongPress = null ;
 }
 }

 <nb> public class SwipeHelper implements Gefingerpoken {
 mCurrView = null ;
 mCurrAnimView = null ;
 mLongPressSent = false ;
 + removeLongPressCallback ( ) ;
 break ;
 }
 return mDragging ;


<nb> import NAMESPACE ;
 public class RebalanceController {

 private static final int MAX_TRIES = NUMBER0 ;
 -
 + private static final long SEED = NUMBER1 ;
 private static Logger logger = Logger . getLogger ( RebalanceController . class ) ;

 private final AdminClient adminClient ;
 + private final Random random = new Random ( SEED ) ;
 RebalanceClientConfig rebalanceConfig ;

 public RebalanceController ( String bootstrapUrl , RebalanceClientConfig rebalanceConfig ) {
 <nb> public class RebalanceController {

 ExecutorService executor = createExecutors ( rebalanceConfig . getMaxParallelRebalancing ( ) ) ;

 - SINGLE
 - final Random random = new Random ( ) ;
 -
 SINGLE
 for ( int nThreads = NUMBER2 ; nThreads < this . rebalanceConfig . getMaxParallelRebalancing ( ) ; nThreads ++ ) {
 executor . execute ( new Runnable ( ) {


<nb> public class CxfEndpointBeanWithBusTest extends CxfEndpointBeanTest {
 public void testBusInjectedBySpring ( ) throws Exception {
 CamelContext camelContext = ( CamelContext ) ctx . getBean ( STRING0 ) ;
 CxfEndpoint endpoint = ( CxfEndpoint ) camelContext . getEndpoint ( STRING1 ) ;
 -
 +
 SINGLE
 - assertTrue ( endpoint . getBus ( ) . getInInterceptors ( ) . size ( ) == NUMBER0 ) ;
 + SINGLE
 + SINGLE
 + assertTrue ( endpoint . getBus ( ) . getInInterceptors ( ) . size ( ) >= NUMBER0 ) ;
 assertEquals ( LoggingInInterceptor . class , endpoint . getBus ( ) . getInInterceptors ( ) . get ( NUMBER1 ) . getClass ( ) ) ;
 }

Fixed the CxfEndpointBeanWithBusTest error


<nb> public class OperationSerializationTest extends HazelcastTestSupport {
 op . setServiceName ( DUMMY_SERVICE_NAME ) ;
 assertSame ( DUMMY_SERVICE_NAME , op . getRawServiceName ( ) ) ;
 assertSame ( DUMMY_SERVICE_NAME , op . getServiceName ( ) ) ;
 - assertTrue ( STRING0 , op . isFlagSet ( Operation . BITMASK_SERVICE_NAME_SET ) ) ;
 + assertTrue ( STRING1 , op . isFlagSet ( Operation . BITMASK_SERVICE_NAME_SET ) ) ;

 Operation copy = copy ( op ) ;
 assertCopy ( DUMMY_SERVICE_NAME , copy . getServiceName ( ) ) ;
 assertCopy ( DUMMY_SERVICE_NAME , copy . getRawServiceName ( ) ) ;
 - assertTrue ( STRING0 , copy . isFlagSet ( Operation . BITMASK_SERVICE_NAME_SET ) ) ;
 + assertTrue ( STRING1 , copy . isFlagSet ( Operation . BITMASK_SERVICE_NAME_SET ) ) ;
 }

 public void assertCopy ( String expected , String actual ) {


<nb>
 package NAMESPACE ;

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

 <nb> public class RemoteImageLoaderHandler extends Handler {
 this . imageView = imageView ;
 this . imageUrl = imageUrl ;
 this . errorDrawable = errorDrawable ;
 + init ( imageView , imageUrl , errorDrawable ) ;
 + }
 +
 + public RemoteImageLoaderHandler ( Looper looper , ImageView imageView , String imageUrl ,
 + Drawable errorDrawable ) {
 + super ( looper ) ;
 + init ( imageView , imageUrl , errorDrawable ) ;
 + }
 +
 + private void init ( ImageView imageView , String imageUrl , Drawable errorDrawable ) {
 + this . imageView = imageView ;
 + this . imageUrl = imageUrl ;
 + this . errorDrawable = errorDrawable ;
 }

 @ override

Provide a constructor in RemoteImageLoaderHandler that accepts a custom looper


<nb> public class SessionState {
 Utilities . createDirsWithPermission ( conf , rootHDFSDirPath , writableHDFSDirPermission , true ) ;
 }
 FsPermission currentHDFSDirPermission = fs . getFileStatus ( rootHDFSDirPath ) . getPermission ( ) ;
 - LOG . debug ( STRING0 + rootHDFSDirPath + STRING1
 - + currentHDFSDirPermission ) ;
 + if ( rootHDFSDirPath != null && rootHDFSDirPath . toUri ( ) != null ) {
 + String schema = rootHDFSDirPath . toUri ( ) . getScheme ( ) ;
 + LOG . debug (
 + STRING0 + rootHDFSDirPath + STRING2 + schema + STRING1 +
 + currentHDFSDirPermission ) ;
 + } else {
 + LOG . debug (
 + STRING0 + rootHDFSDirPath + STRING1 + currentHDFSDirPermission ) ;
 + }
 SINGLE
 if ( ! ( ( currentHDFSDirPermission . toShort ( ) & writableHDFSDirPermission
 . toShort ( ) ) == writableHDFSDirPermission . toShort ( ) ) ) {

Refine debug log with schema information for the method of creating session directories Ferdinand Xu via Szehon


<nb> public class URLITest extends WithJetty {
 }
 }

 - @ ignore ( STRING0 )
 @ test
 public void whenBaseURIEndsWithSlashAndPathBeginsWithSlashThenOneSlashIsRemoved ( ) throws Exception {
 RestAssured . baseURI = STRING1 ;


<nb> public class AttributeEqualBuilder implements CategoryBuilder {
 }
 Object [ ] valuesArray = vals . toArray ( ) ;
 min = AttributeUtils . getDefault ( ) . getMin ( column , valuesArray ) ;
 - max = AttributeUtils . getDefault ( ) . getMin ( column , valuesArray ) ;
 + max = AttributeUtils . getDefault ( ) . getMax ( column , valuesArray ) ;
 }

 public String getName ( ) {

Fix AttributeEqualFilter min max computing


<nb> public class WebView extends AbsoluteLayout
 COMMENT
 COMMENT
 public void selectAll ( ) {
 - SINGLE
 - SINGLE
 + mWebViewCore . sendMessage ( EventHub . SELECT_ALL ) ;
 }

 COMMENT
 <nb> public final class WebViewCore {
 static final int INSERT_TEXT = NUMBER0 ;
 static final int SELECT_TEXT = NUMBER1 ;
 static final int SELECT_WORD_AT = NUMBER2 ;
 + static final int SELECT_ALL = NUMBER3 ;

 SINGLE
 private Handler mHandler ;
 <nb> public final class WebViewCore {
 nativeSelectWordAt ( mNativeClass , x , y ) ;
 break ;
 }
 + case SELECT_ALL :
 + nativeSelectAll ( mNativeClass ) ;
 + break ;
 }
 }
 } ;
 <nb> public final class WebViewCore {
 int startX , int startY , int endX , int endY ) ;
 private native void nativeClearTextSelection ( int nativeClass ) ;
 private native void nativeSelectWordAt ( int nativeClass , int x , int y ) ;
 + private native void nativeSelectAll ( int nativeClass ) ;
 }


<nb> public class PImage implements PConstants , Cloneable {
 loadPixels ( ) ;
 if ( src == this ) {
 if ( intersect ( sx , sy , sx2 , sy2 , dx , dy , dx2 , dy2 ) ) {
 - blit_resize ( get ( sx , sy , sx2 - sx , sy2 - sy ) ,
 - NUMBER0 , NUMBER0 , sx2 - sx - NUMBER1 , sy2 - sy - NUMBER1 ,
 + blit_resize ( get ( sx , sy , sw , sh ) ,
 + NUMBER0 , NUMBER0 , sw , sh ,
 pixels , pixelWidth , pixelHeight , dx , dy , dx2 , dy2 , mode ) ;
 } else {
 SINGLE

Fix off by one error when blending onto itself


<nb> public class XbmcConnector {
 @ override
 public void onError ( Throwable e ) {
 if ( e instanceof ConnectException ) {
 - logger . debug ( STRING0 , xbmc . getHostname ( ) ) ;
 + logger . debug ( STRING1 , xbmc . getHostname ( ) , e . getMessage ( ) ) ;
 } else if ( e instanceof TimeoutException ) {
 logger . debug ( STRING2 , xbmc . getHostname ( ) ) ;
 } else {

Added cause of connect exception to the log call


<nb> public class MetaContactGroupImpl
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public MetaContactGroupImpl getMetaContactSubgroupByUID ( String groupUID )
 + {
 + Iterator groupsIter = getSubgroups ( ) ;
 +
 + while ( groupsIter . hasNext ( ) )
 + {
 + MetaContactGroupImpl mcGroup
 + = ( MetaContactGroupImpl ) groupsIter . next ( ) ;
 +
 + if ( mcGroup . getGroupName ( ) . equals ( groupUID ) )
 + return mcGroup ;
 + }
 +
 + return null ;
 + }
 +
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Added a get meta contact group method with a meta uid param


<nb> public class Platform extends processing . app . Platform {
 }
 COMMENT
 }
 + SINGLE
 com . apple . eio . FileManager . openURL ( url ) ;
 }