<nb> public class HttpRequestEncoder extends HttpObjectEncoder < HttpRequest > {

 @ override
 protected void encodeInitialLine ( ByteBuf buf , HttpRequest request ) throws Exception {
 - buf . writeBytes ( request . getMethod ( ) . toString ( ) . getBytes ( CharsetUtil . US_ASCII ) ) ;
 + encodeAscii ( request . getMethod ( ) . toString ( ) , buf ) ;
 buf . writeByte ( SP ) ;

 SINGLE
 <nb> public class HttpRequestEncoder extends HttpObjectEncoder < HttpRequest > {
 buf . writeBytes ( uri . getBytes ( CharsetUtil . UTF_8 ) ) ;

 buf . writeByte ( SP ) ;
 - buf . writeBytes ( request . getProtocolVersion ( ) . toString ( ) . getBytes ( CharsetUtil . US_ASCII ) ) ;
 + encodeAscii ( request . getProtocolVersion ( ) . toString ( ) , buf ) ;
 buf . writeBytes ( CRLF ) ;
 }
 }

Improve performance of HttpRequestEncoder encodeInitialLine


<nb> public class AuthenticationProcessingFilter extends AbstractProcessingFilter {

 UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken ( username ,
 password ) ;
 - authRequest . setDetails ( request . getRemoteAddr ( ) ) ;
 +
 + SINGLE
 + setDetails ( request , authRequest ) ;

 return this . getAuthenticationManager ( ) . authenticate ( authRequest ) ;
 }

Fix bug where class should delegate to setDetails method not set the details directly


<nb> public class StringPropertyCodeGenerator extends PropertyCodeGenerator implement
 if ( myHaveSetDisplayedMnemonicIndex ) {
 generator . loadLocal ( componentLocal ) ;
 generator . push ( textWithMnemonic . myMnemonicIndex ) ;
 - generator . invokeStatic ( Type . getType ( SupportCode . class ) ,
 - new Method ( STRING0 ,
 - Type . VOID_TYPE , new Type [ ] { Type . getType ( JComponent . class ) , Type . INT_TYPE } ) ) ;
 + generator . invokeVirtual ( Type . getType ( componentClass ) ,
 + new Method ( STRING0 ,
 + Type . VOID_TYPE , new Type [ ] { Type . INT_TYPE } ) ) ;
 }
 return true ;
 }

don t use SupportCode for generating setDisplayedMnemonicIndex


<nb> public class JacocoAntInitializer extends Initializer implements CoverageExtensi
 @ override
 public boolean shouldExecuteOnProject ( org . sonar . api . resources . Project project ) {
 return project . getAnalysisType ( ) . equals ( Project . AnalysisType . DYNAMIC ) ;
 - SINGLE
 }

 @ override
 <nb> public class JacocoAntInitializer extends Initializer implements CoverageExtensi
 }
 }
 SINGLE
 - SINGLE
 target . performTasks ( ) ;
 }
 }
 <nb> public class Filter {
 return ! isNumericMetric || sortedByLanguage || sortedByName || sortedByVersion ;
 }

 - SINGLE
 - SINGLE
 - SINGLE
 -
 public Filter setSortedMetricId ( Integer id , boolean isNumericValue , Boolean isVariation ) {
 unsetSorts ( ) ;
 this . sortedMetricId = id ;


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

 public class DialogWrapperPeerImpl extends DialogWrapperPeer {
 <nb> public class DialogWrapperPeerImpl extends DialogWrapperPeer {
 myFocusTrackback . dispose ( ) ;
 myFocusTrackback = null ;
 }
 + final BufferStrategy strategy = getBufferStrategy ( ) ;
 + if ( strategy != null ) {
 + try {
 + Method method = strategy . getClass ( ) . getMethod ( STRING0 ) ; SINGLE
 + method . invoke ( strategy ) ;
 + }
 + catch ( Exception ex ) {
 + SINGLE
 + }
 + }
 super . dispose ( ) ;

 if ( rootPane != null ) { SINGLE

dispose buffer strategy on closing dialog


<nb> import NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> class WebConnectorService implements Service < Connector > {
 boolean nativeSSL = false ;
 if ( connector . getProtocolHandler ( ) instanceof Http11AprProtocol ) {
 nativeSSL = true ;
 - } else if ( ! ( connector . getProtocolHandler ( ) instanceof Http11Protocol ) ) {
 + } else if ( ( connector . getProtocolHandler ( ) instanceof AjpProtocol ) || ( connector . getProtocolHandler ( ) instanceof AjpAprProtocol ) ) {
 throw new StartException ( MESSAGES . noSSLWithNonHTTPConnectors ( ) ) ;
 }
 SINGLE

Allow non AJP connectors to support SSL by default


<nb> public class ServletOutputStreamImpl extends ServletOutputStream implements Buff
 if ( channel == null ) {
 channel = servletRequestContext . getExchange ( ) . getResponseChannel ( ) ;
 }
 - StreamSinkChannel channel = this . channel ;
 - channel . shutdownWrites ( ) ;
 state |= FLAG_DELEGATE_SHUTDOWN ;
 - Channels . flushBlocking ( channel ) ;
 + StreamSinkChannel channel = this . channel ;
 + if ( channel != null ) { SINGLE
 + channel . shutdownWrites ( ) ;
 + Channels . flushBlocking ( channel ) ;
 + }
 } finally {
 if ( pooledBuffer != null ) {
 pooledBuffer . free ( ) ;


<nb> public class PathBaseDirBuilder implements BaseDirBuilder {
 fileSystem . close ( ) ;
 }

 + System . gc ( ) ;
 +
 Files . walkFileTree ( toDelete , new SimpleFileVisitor < Path > ( ) {
 @ override
 public FileVisitResult visitFile ( Path file , BasicFileAttributes attrs ) throws IOException {

Explicitly call System gc to fix tests on Windows platform


<nb> public class SerialMessage {
 COMMENT
 @ override
 public String toString ( ) {
 - return String . format ( STRING0 ,
 + return String . format ( STRING1 ,
 new Object [ ] { messageClass , messageClass . key , messageType , messageType . ordinal ( ) ,
 - SerialMessage . bb2hex ( this . getMessageBuffer ( ) ) } ) ;
 + SerialMessage . bb2hex ( this . getMessagePayload ( ) ) } ) ;
 } ;

 COMMENT

Change printout of message to payload to avoid modifying the packet


<nb> public class ClockwiseRotate implements LayoutBuilder {
 private ClockwiseRotateLayoutUI ui = new ClockwiseRotateLayoutUI ( ) ;

 public Layout buildLayout ( ) {
 - return new RotateLayout ( this , - NUMBER0 ) ;
 + return new RotateLayout ( this , NUMBER0 ) ;
 }

 public String getName ( ) {

Fix the initial value of the rotate parameter for Clockwise layout


<nb> public class AzureStorageServiceImpl extends AbstractLifecycleComponent < AzureSto
 options . setRetryPolicyFactory ( new RetryNoRetry ( ) ) ;
 blob_container . deleteIfExists ( options , null ) ;
 COMMENT
 + if ( logger . isTraceEnabled ( ) ) {
 + logger . trace ( STRING0 , container ) ;
 + }
 blob_container . deleteIfExists ( ) ;
 }


<nb> public class RegionCommands {
 desc = STRING0 ,
 help =
 STRING1 +
 - STRING2 +
 + STRING3 +
 STRING4 +
 STRING5 ,
 flags = STRING6 ,


<nb> public class UsageInfo2UsageAdapter implements Usage , UsageInModule , UsageInLibr
 }

 public TextChunk [ ] getText ( ) {
 - final PsiElement element = getElement ( ) ;
 - if ( element != null && element . isValid ( ) ) {
 + if ( isValid ( ) ) {
 SINGLE
 final long currentModificationStamp = getCurrentModificationStamp ( ) ;
 if ( currentModificationStamp != myModificationStamp ) {


<nb>

 package NAMESPACE ;

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> package NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ threadsafe
 public abstract class IndexDefinition < T > {
 COMMENT
 SINGLE
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 + @ threadsafe
 class NonUniqueFieldIndex < T > implements FieldIndex < T > {
 private final IndexDefinition < T > mIndexDefinition ;
 private final ConcurrentHashMap < Object , ConcurrentHashSet < T > > mIndexMap ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 + @ threadsafe
 class UniqueFieldIndex < T > implements FieldIndex < T > {
 private final IndexDefinition < T > mIndexDefinition ;
 private final ConcurrentHashMap < Object , T > mIndexMap ;


<nb> public class RecyclerView extends ViewGroup {
 COMMENT
 public void clear ( ) {
 mAttachedScrap . clear ( ) ;
 - mCachedViews . clear ( ) ;
 + recycleCachedViews ( ) ;
 }

 COMMENT
 <nb> public class RecyclerView extends ViewGroup {
 recycleViewHolder ( getChildViewHolderInt ( view ) ) ;
 }

 + void recycleCachedViews ( ) {
 + final int count = mCachedViews . size ( ) ;
 + for ( int i = count - NUMBER0 ; i >= NUMBER1 ; i -- ) {
 + final ViewHolder cachedView = mCachedViews . get ( i ) ;
 + if ( cachedView . isRecyclable ( ) ) {
 + getRecycledViewPool ( ) . putRecycledView ( cachedView ) ;
 + dispatchViewRecycled ( cachedView ) ;
 + }
 + mCachedViews . remove ( i ) ;
 + }
 + }
 +
 void recycleViewHolder ( ViewHolder holder ) {
 if ( holder . isScrap ( ) || holder . itemView . getParent ( ) != null ) {
 throw new IllegalArgumentException (

Recycle cached views when clearing the cache


<nb> public abstract class UltimateViewAdapter extends RecyclerView . Adapter < RecyclerV
 @ override
 public long getHeaderId ( int position ) {
 if ( customHeaderView != null && position == NUMBER0 ) return - NUMBER1 ;
 - return generateHeaderId ( position ) ;
 + if ( getAdapterItemCount ( ) > NUMBER0 )
 + return generateHeaderId ( position ) ;
 + else return - NUMBER1 ;
 }

 public abstract long generateHeaderId ( int position ) ;


<nb>
 SINGLE
 SINGLE
 SINGLE
 + SINGLE

 package NAMESPACE ;

 <nb> public class HttpSender {
 public static final int BEAN_SHELL_INITIATOR = NUMBER0 ;
 public static final int ACCESS_CONTROL_SCANNER_INITIATOR = NUMBER1 ;
 public static final int AJAX_SPIDER_INITIATOR = NUMBER2 ;
 + public static final int FORCED_BROWSE_INITIATOR = NUMBER3 ;

 private static Logger log = Logger . getLogger ( HttpSender . class ) ;

Add initiator constant for Forced Browse requests


<nb> public abstract class LoadBalancerContext < T extends ClientRequest , S extends IRe
 host = svc . getHost ( ) ;

 if ( shouldUseOverridePort ) {
 - logger . debug ( STRING0 , clientName ) ;
 + logger . debug ( STRING0 , overridePort , clientName ) ;
 port = overridePort ;
 } else {
 port = svc . getPort ( ) ;


<nb> import NAMESPACE ;

 import NAMESPACE ;

 + COMMENT
 + COMMENT
 + COMMENT
 public class Logger extends LogListenerAdapter {

 private static final String TAG = STRING0 ;


<nb> public class CompletionPopupPanel extends ThemedPopupPanel
 private void hideAll ( )
 {
 SINGLE
 - help_ . setPopupPosition ( - NUMBER0 , - NUMBER0 ) ;
 - setPopupPosition ( - NUMBER0 , - NUMBER0 ) ;
 - help_ . clearHelp ( false ) ;
 + setVisible ( false ) ;
 help_ . setVisible ( false ) ;
 }

 <nb> public class CompletionPopupPanel extends ThemedPopupPanel
 {
 return help_ . isVisible ( ) && help_ . isShowing ( ) ;
 }
 -
 +
 private HTML setText ( String text )
 {
 HTML contents = new HTML ( ) ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 public class ChangeBaseParserWeight {


<nb> package NAMESPACE ;
 import NAMESPACE ;

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


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


<nb> public abstract class AbstractProject implements ProjectInternal , DynamicObjectA
 return fileOperations . delete ( paths ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 public Directory dir ( String path ) {
 + DeprecationLogger . nagUserOfReplacedMethod ( STRING0 , STRING1 ) ;
 String [ ] pathElements = path . split ( STRING2 ) ;
 String name = STRING3 ;
 Directory dirTask = null ;


<nb> public abstract class AbstractConnector extends ContainerLifeCycle implements Co

 SINGLE
 long stopTimeout = getStopTimeout ( ) ;
 - if ( stopTimeout > NUMBER0 && _stopping != null )
 - _stopping . await ( stopTimeout , TimeUnit . MILLISECONDS ) ;
 + CountDownLatch stopping = _stopping ;
 + if ( stopTimeout > NUMBER0 && stopping != null )
 + stopping . await ( stopTimeout , TimeUnit . MILLISECONDS ) ;
 _stopping = null ;

 super . doStop ( ) ;
 <nb> public abstract class AbstractConnector extends ContainerLifeCycle implements Co
 {
 _acceptors [ _acceptor ] = null ;
 }
 - _stopping . countDown ( ) ;
 + CountDownLatch stopping = _stopping ;
 + if ( stopping != null )
 + stopping . countDown ( ) ;
 }
 }
 }

improved shutdown handling for travis CI


<nb> public abstract class XDebuggerUtil {
 COMMENT
 COMMENT
 public abstract void iterateLine ( @ notnull Project project , @ notnull Document document , int line , @ notnull Processor < PsiElement > processor ) ;
 +
 + public abstract void showBreakpointsDialog ( @ notnull Project project , @ nullable XBreakpoint < ? > breakpointToSelect ) ;
 }
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class XDebuggerUtilImpl extends XDebuggerUtil {
 }
 }
 }
 +
 + @ override
 + public void showBreakpointsDialog ( @ notnull Project project , @ nullable XBreakpoint < ? > breakpointToSelect ) {
 + BreakpointsConfigurationDialogFactory . getInstance ( project ) . createDialog ( breakpointToSelect ) . show ( ) ;
 + }
 }


<nb> public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
 if ( clazz . equals ( SessionImplementor . class ) ) {
 return ( T ) getSession ( ) ;
 }
 - SINGLE
 - return null ; SINGLE
 + else {
 + SINGLE
 + throw new PersistenceException ( STRING0 + clazz ) ;
 + }
 }

 private void joinTransaction ( boolean ignoreNotJoining ) {

unwrap should raise a PE if the type is not unwrappable by the provider


<nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class UserManager implements IQResultListener {
 static {
 SINGLE
 userCache = CacheFactory . createCache ( STRING0 ) ;
 - remoteUsersCache = CacheFactory . createCache ( STRING1 ) ;
 + remoteUsersCache = CacheFactory . createCache ( STRING2 ) ;

 SINGLE
 initProvider ( ) ;


<nb> public class SummaryPage extends Request {
 Response r = Response . done ( res ) ;
 r . setBuilder ( ROOT_OBJECT , new Builder ( ) {
 @ override public String build ( Response response , JsonElement element , String contextName ) {
 - StringBuilder pageBldr = new StringBuilder ( STRING0 ) ;
 - StringBuilder sb = new StringBuilder ( STRING1 ) ;
 + StringBuilder pageBldr = new StringBuilder ( STRING2 ) ;
 + StringBuilder sb = new StringBuilder ( STRING3 ) ;
 JsonArray cols = element . getAsJsonObject ( ) . get ( STRING4 ) . getAsJsonObject ( ) . get ( STRING5 ) . getAsJsonArray ( ) ;
 Iterator < JsonElement > it = cols . iterator ( ) ;


<nb> public interface Symbolizable extends Perspective {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 void newReference ( Symbol symbol , int fromOffset , int toOffset ) ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CmdStatusClient extends BaseSvnClient implements StatusClient {

 if ( StringUtil . isEmptyOrSpaces ( result ) ) {
 throw new SVNException ( SVNErrorMessage . create ( SVNErrorCode . FS_GENERAL , STRING0 +
 - command . myCommandLine . getCommandLineString ( ) ) ) ;
 + command . getCommandText ( ) ) ) ;
 }

 try {

Refactored CmdStatusClient do not use CommandExecutor myCommandLine directly use corresponding CommandExecutor methods instead


<nb> public class DispatcherTest {
 verify ( service ) . shutdown ( ) ;
 }

 + @ test public void shutdownUnregistersReceiver ( ) throws Exception {
 + dispatcher . shutdown ( ) ;
 + verify ( context ) . unregisterReceiver ( dispatcher . receiver ) ;
 + }
 +
 @ test public void performSubmitWithNewRequestQueuesHunter ( ) throws Exception {
 Action action = TestUtils . mockAction ( URI_KEY_1 , URI_1 ) ;
 dispatcher . performSubmit ( action ) ;

Added test to verify that recevier is in fact unregistered


<nb> class InferJSDocInfo extends AbstractPostOrderCallback
 break ;

 case Token . STRING_KEY :
 + case Token . GETTER_DEF :
 + case Token . SETTER_DEF :
 docInfo = n . getJSDocInfo ( ) ;
 if ( docInfo == null ) {
 return ;
 <nb> public class CheckAccessControlsTest extends CompilerTestCase {
 } , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
 }

 + public void testNoPrivateAccessForProperties11 ( ) {
 + test ( new String [ ] {
 + STRING0 +
 + STRING1 +
 + STRING2 +
 + STRING3 ,
 + STRING4
 + } , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
 + }
 +
 + public void testNoPrivateAccessForProperties12 ( ) {
 + test ( new String [ ] {
 + STRING0 +
 + STRING1 +
 + STRING5 +
 + STRING3 ,
 + STRING6
 + } , null , BAD_PRIVATE_PROPERTY_ACCESS ) ;
 + }
 +
 public void testProtectedAccessForProperties1 ( ) {
 testSame ( new String [ ] {
 STRING0 +


<nb> public class PostNewDesignerNewsStory extends Activity {

 SINGLE
 if ( getIntent ( ) != null && Intent . ACTION_SEND . equals ( getIntent ( ) . getAction ( ) ) ) {
 - url . setText ( ShareCompat . IntentReader . from ( this ) . getText ( ) ) ;
 + ShareCompat . IntentReader intentReader = ShareCompat . IntentReader . from ( this ) ;
 + url . setText ( intentReader . getText ( ) ) ;
 + title . setText ( intentReader . getSubject ( ) ) ;

 SINGLE
 SINGLE


<nb> public class HistoryStrategy {
 }
 }
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public boolean hasChangedSubject ( ) {
 + return roomSubject != null ;
 + }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class WorkerProcessClassPathProvider implements ClassPathProvider , Closea
 GradleWorkerMain . class ,
 BootstrapSecurityManager . class ,
 EncodedStream . EncodedInput . class ,
 + ClassLoaderUtils . class ,
 FilteringClassLoader . class ,
 FilteringClassLoader . Spec . class ,
 ClassLoaderHierarchy . class ,

Fixed construction of worker process launcher jar


<nb> public abstract class NanoHTTPD {

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 void parseBody ( Map < String , String > files ) throws IOException , ResponseException ;
 }


<nb> public class LexicalizedParserServer {
 model = ParserGrammar . loadModel ( parserModel ) ;
 } else {
 model = ParserGrammar . loadModel ( parserModel , STRING0 , STRING1 , taggerModel ) ;
 + SINGLE
 + model . loadTagger ( ) ;
 }
 model . setOptionFlags ( model . defaultCoreNLPFlags ( ) ) ;
 return model ;

Preload tagger in LexicalizedParserServer


<nb> public class BinaryBlockWriter < M > {
 private int numRecordsWritten_ = NUMBER0 ;
 private List < ByteString > protoBlobs_ ;

 - public BinaryBlockWriter ( OutputStream out , Class < M > protoClass , BinaryConverter < M > binaryConverter , int numRecordsPerBlock ) {
 + protected BinaryBlockWriter ( OutputStream out , Class < M > protoClass , BinaryConverter < M > binaryConverter , int numRecordsPerBlock ) {
 out_ = out ;
 numRecordsPerBlock_ = numRecordsPerBlock ;
 innerClass_ = protoClass ;


<nb> public class IndicesClusterStateService extends AbstractLifecycleComponent < Indic
 SINGLE
 continue ;
 }
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 List < String > typesToRefresh = null ;
 String index = indexMetaData . index ( ) ;
 IndexService indexService = indicesService . indexServiceSafe ( index ) ;

checking on index metadata does not make sense for mappings


<nb> public interface ProtectACLCreateModePathAndBytesable < T > extends
 ACLPathAndBytesable < T > ,
 CreateModable < ACLPathAndBytesable < T > >
 {
 + 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 ACLCreateModePathAndBytesable < String > withProtection ( ) ;
 }


<nb> public final class ExpressionUtils {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static < D > Predicate in ( Expression < D > left , SubQueryExpression < ? extends D > right ) {
 + return predicate ( Ops . IN , left , right ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ExpressionUtils {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static < D > Predicate notIn ( Expression < D > left , SubQueryExpression < ? extends D > right ) {
 + return predicate ( Ops . NOT_IN , left , right ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public final class Monitor {
 COMMENT
 COMMENT
 public boolean enter ( long time , TimeUnit unit ) {
 + long timeoutNanos = unit . toNanos ( time ) ;
 final ReentrantLock lock = this . lock ;
 if ( ! fair && lock . tryLock ( ) ) {
 return true ;
 }
 long startNanos = System . nanoTime ( ) ;
 - long timeoutNanos = unit . toNanos ( time ) ;
 long remainingNanos = timeoutNanos ;
 boolean interruptIgnored = false ;
 try {


<nb> public abstract class DBCollection {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 public void ensureIndex ( DBObject keys , String name , boolean unique )
 throws MongoException {
 DBObject options = defaultOptions ( keys ) ;
 - options . put ( STRING0 , name ) ;
 + if ( name != null && ! name . isEmpty ( ) )
 + options . put ( STRING0 , name ) ;
 if ( unique )
 options . put ( STRING1 , Boolean . TRUE ) ;
 ensureIndex ( keys , options ) ;

improved ensureIndex to use default index name if null is provided instead of getting mongoexception


<nb> public class MavenJDOMUtil {
 return doRead ( CharsetToolkit . bytesToString ( bytes ) , handler ) ;
 }

 + SINGLE
 @ nullable
 private static Element doRead ( String text , final ErrorHandler handler ) {
 final LinkedList < Element > stack = new LinkedList < Element > ( ) ;


<nb> public class SQLFileChange extends AbstractSQLChange {
 try {
 innputStream = openFromFileSystem ( path ) ;
 if ( innputStream == null ) {
 - throw new IOException ( STRING0 ) ;
 + return null ;
 }
 } catch ( IOException e ) {
 throw new IOException ( STRING1 + path + STRING2 , e ) ;
 <nb> public class SQLFileChangeTest extends StandardChangeTest {
 SINGLE
 SINGLE

 - @ test
 - public void generateStatementFileNotFound ( ) throws Exception {
 - try {
 - change . setPath ( STRING3 ) ;
 - change . finishInitialization ( ) ;
 - change . generateStatements ( new OracleDatabase ( ) ) ;
 -
 - fail ( STRING4 ) ;
 - } catch ( SetupException fnfe ) {
 - SINGLE
 - }
 - }
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE

 SINGLE
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class K2JSCompiler extends CLICompiler < K2JSCompilerArguments , K2JSCompile
 return ExitCode . INTERNAL_ERROR ;
 }

 - JetCoreEnvironment environmentForJS = JetCoreEnvironment . createCoreEnvironmentForJS ( rootDisposable ) ;
 + JetCoreEnvironment environmentForJS = JetCoreEnvironment . createCoreEnvironmentForJS ( rootDisposable , new CompilerConfiguration ( ) ) ;

 for ( String sourceFile : arguments . sourceFiles ) {
 environmentForJS . addSources ( sourceFile ) ;
 <nb> public class JetCoreEnvironment extends JavaCoreEnvironment {
 private final CoreAnnotationsProvider annotationsProvider ;

 @ notnull
 - public static JetCoreEnvironment createCoreEnvironmentForJS ( Disposable disposable ) {
 - return new JetCoreEnvironment ( disposable , new CompilerConfiguration ( ) ) ;
 + public static JetCoreEnvironment createCoreEnvironmentForJS ( Disposable disposable , @ notnull CompilerConfiguration configuration ) {
 + return new JetCoreEnvironment ( disposable , configuration ) ;
 }

 @ notnull

Added parameter to JetCoreEnvironment createCoreEnvironmentForJS


<nb> public class AddColumnGenerator extends AbstractSqlGenerator < AddColumnStatement >
 String refTableName = referencesMatcher . group ( NUMBER0 ) ;
 if ( refTableName . indexOf ( STRING0 ) > NUMBER1 ) {
 refSchemaName = refTableName . split ( STRING1 ) [ NUMBER1 ] ;
 - refTableName = refTableName . split ( STRING1 ) [ NUMBER1 ] ;
 + refTableName = refTableName . split ( STRING1 ) [ NUMBER0 ] ;
 }
 String refColName = referencesMatcher . group ( NUMBER2 ) ;

Fixed bug via patch from Marat Tukhvatullin


<nb> public class AudioService extends IAudioService . Stub {
 if ( UserHandle . getAppId ( pkg . applicationInfo . uid ) < FIRST_APPLICATION_UID ) {
 continue ;
 }
 + SINGLE
 + if ( pm . checkPermission ( Manifest . permission . INTERACT_ACROSS_USERS , pkg . packageName )
 + == PackageManager . PERMISSION_GRANTED ) {
 + continue ;
 + }
 if ( homeActivityName != null
 && pkg . packageName . equals ( homeActivityName . getPackageName ( ) )
 && pkg . applicationInfo . isSystemApp ( ) ) {

Don t kill apps that are multi user aware


<nb> public class SimpleTcpCluster extends LifecycleMBeanBase
 log . warn ( sm . getString ( STRING0 , manager ) ) ;
 return ;
 }
 - ClusterManager cmanager = ( ClusterManager ) manager ;
 - cmanager . setDistributable ( true ) ;
 + ClusterManager cmanager = ( ClusterManager ) manager ;
 SINGLE
 fireLifecycleEvent ( BEFORE_MANAGERREGISTER_EVENT , manager ) ;
 String clusterName = getManagerName ( cmanager . getName ( ) , manager ) ;


<nb> public class ModelMetrics extends Keyed < ModelMetrics > {
 public double _wYY ; SINGLE

 public double weightedSigma ( ) {
 - return _count <= NUMBER0 ? NUMBER1 : Math . sqrt ( _count / ( _count - NUMBER0 ) * ( _wYY / _wcount - ( _wY * _wY ) / ( _wcount * _wcount ) ) ) ;
 + SINGLE
 + double sampleCorrection = NUMBER0 ; SINGLE
 + return _count <= NUMBER0 ? NUMBER1 : Math . sqrt ( sampleCorrection * ( _wYY / _wcount - ( _wY * _wY ) / ( _wcount * _wcount ) ) ) ;
 }
 abstract public double [ ] perRow ( double ds [ ] , float yact [ ] , Model m ) ;
 public double [ ] perRow ( double ds [ ] , float yact [ ] , double weight , double offset , Model m ) {

Don t use sample weighted variance but full weighted variance


<nb> public class SplashScreenActivator
 if ( bundleName == null )
 return ;

 + SINGLE
 + SINGLE
 + SINGLE
 + Object service =
 + bundleContext
 + . getService ( serviceEvent . getServiceReference ( ) ) ;
 + if ( service . getClass ( ) . getSimpleName ( ) . equals ( STRING0 ) )
 + {
 + splash . close ( ) ;
 + stop ( bundleContext ) ;
 + return ;
 + }
 +
 + bundleContext . ungetService ( serviceEvent . getServiceReference ( ) ) ;
 +
 progress ++ ;

 int progressWidth = NUMBER0 ;

Hide splash screen when main window is iconified on startup


<nb> public class Intent implements Parcelable , Cloneable {
 = STRING0 ;

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

Added a constant to be used as an Intent extra


<nb> public class BulkWriteError {
 result = NUMBER0 * result + details . hashCode ( ) ;
 return result ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return STRING0
 + + STRING1 + index
 + + STRING2 + code
 + + STRING3 + message + STRING4
 + + STRING5 + details
 + + STRING6 ;
 + }
 }


<nb> public final class MongoConfigUtil {
 public static void setOutputURI ( final Configuration conf , final String uri ) {
 setMongoURIString ( conf , OUTPUT_URI , uri ) ;
 }
 -
 + COMMENT
 + COMMENT
 + COMMENT
 + @ deprecated
 public static void setOutputURI ( final Configuration conf , final MongoURI uri ) {
 setMongoURI ( conf , OUTPUT_URI , uri ) ;
 }

Deprecate old signature of setOutputURI that takes MongoURI


<nb> public class LiveUpdatesSettingsDialogFragment extends DialogFragment {
 downloadOverWiFiSwitch . setChecked ( downloadViaWiFiPreference . get ( ) ) ;

 builder . setView ( view )
 - . setPositiveButton ( R . string . shared_string_save , new DialogInterface . OnClickListener ( ) {
 + . setPositiveButton ( R . string . shared_string_ok , new DialogInterface . OnClickListener ( ) {
 @ override
 public void onClick ( DialogInterface dialog , int which ) {
 final int updateFrequencyInt = updateFrequencySpinner . getSelectedItemPosition ( ) ;


<nb> public class RemoteInputView extends LinearLayout implements View . OnClickListene
 }

 @ override
 - protected void onFocusLost ( ) {
 - super . onFocusLost ( ) ;
 - defocusIfNeeded ( ) ;
 + protected void onFocusChanged ( boolean focused , int direction , Rect previouslyFocusedRect ) {
 + super . onFocusChanged ( focused , direction , previouslyFocusedRect ) ;
 + if ( ! focused ) {
 + defocusIfNeeded ( ) ;
 + }
 }

 @ override

Don t close RemoteInputView on window focus loss


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - abstract class DbQueryBase {
 + abstract class DbQueryBase implements AutoCloseable {

 private static final Logger log = LoggerFactory . getLogger ( DbQueryBase . class ) ;

 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class DbSession {
 + public class DbSession implements AutoCloseable {

 private static final Logger log = LoggerFactory . getLogger ( DbSession . class ) ;

 <nb> public class DbSession {
 }
 }

 + @ override
 + public void close ( ) throws Exception {
 + closeSession ( ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public interface ConnectionProvider {
 + public interface ConnectionProvider extends AutoCloseable {

 COMMENT
 COMMENT


<nb> public class SelectWordHandler extends EditorActionHandler {
 }

 while ( element instanceof PsiWhiteSpace ) {
 - if ( element . getNextSibling ( ) == null ) {
 - element = element . getParent ( ) ;
 - continue ;
 + nextParent: while ( element . getNextSibling ( ) == null ) {
 + final PsiElement parent = element . getParent ( ) ;
 + final PsiElement [ ] children = parent . getChildren ( ) ;
 +
 + if ( children [ children . length - NUMBER0 ] == element ) {
 + element = parent ;
 + }
 + else {
 + element = parent ;
 + break nextParent ;
 + }
 }

 element = element . getNextSibling ( ) ;

Improved selection at first column in XML


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class BlockFromToEvent extends BlockEvent implements Cancellable {
 - protected Block from ;
 + protected Block to ;
 protected BlockFace face ;
 protected boolean cancel ;

 public BlockFromToEvent ( final Event . Type type , final Block block , final BlockFace face ) {
 super ( type , block ) ;
 this . face = face ;
 - this . from = block . getRelative ( face . getModX ( ) , face . getModY ( ) , face . getModZ ( ) ) ;
 + this . to = block . getRelative ( face . getModX ( ) , face . getModY ( ) , face . getModZ ( ) ) ;
 this . cancel = false ;
 }

 <nb> public class BlockFromToEvent extends BlockEvent implements Cancellable {
 COMMENT
 COMMENT
 COMMENT
 - public Block getFromBlock ( ) {
 - return from ;
 + public Block getToBlock ( ) {
 + return to ;
 }

 public boolean isCancelled ( ) {

Fixed BlockFromToEvent not knowing source block from destination block


<nb> public abstract class Repository extends RepositoryInfo {
 {
 SINGLE
 for ( int i = NUMBER0 ; i < datePatterns . length ; i ++ ) {
 - formatters [ i ] = new SimpleDateFormat ( datePatterns [ i ] , Locale . US ) ;
 + formatters [ i ] = new SimpleDateFormat ( datePatterns [ i ] ) ;
 COMMENT
 COMMENT
 COMMENT


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

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

Revert files where only import order had changed


<nb> public class WXSDKEngine {
 COMMENT
 COMMENT
 public static < T extends WXModule > boolean registerModule ( String moduleName , Class < T > moduleClass , boolean global ) throws WXException {
 - return registerModule ( moduleName , new TypeModuleFactory ( moduleClass ) , global ) ;
 + return moduleClass != null && registerModule ( moduleName , new TypeModuleFactory < > ( moduleClass ) , global ) ;
 }

 COMMENT

android stop register when class is null


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class CoreRegistry {
 - private static Map < Class < ? extends Object > , Object > store = Maps . newHashMap ( ) ;
 - private static Set < Class < ? extends Object > > permStore = Sets . newHashSet ( ) ;
 + private static Map < Class < ? extends Object > , Object > store = Maps . newConcurrentMap ( ) ;
 + private static Set < Class < ? extends Object > > permStore = Sets . newSetFromMap ( Maps . < Class < ? extends Object > , Boolean > newConcurrentMap ( ) ) ;

 COMMENT
 COMMENT

Changed core registry to use ConcurrentMaps to be thread safe


<nb> public class MulticastProcessor extends ServiceSupport implements Processor , Nav

 private final CamelContext camelContext ;
 private Collection < Processor > processors ;
 - private AggregationStrategy aggregationStrategy ;
 + private final AggregationStrategy aggregationStrategy ;
 private final boolean parallelProcessing ;
 private final boolean streaming ;
 private final boolean stopOnException ;
 <nb> public class MulticastProcessor extends ServiceSupport implements Processor , Nav
 return aggregationStrategy ;
 }

 - public void setAggregationStrategy ( AggregationStrategy aggregationStrategy ) {
 - this . aggregationStrategy = aggregationStrategy ;
 - }
 -
 public boolean isParallelProcessing ( ) {
 return parallelProcessing ;
 }

Splitter now returns original exchange as outbound by default


<nb> public class PointNavigationLayer extends OsmandMapLayer implements
 float locationY = getPointY ( tb , pointToStart ) ;
 canvas . rotate ( - tb . getRotate ( ) , locationX , locationY ) ;
 canvas . drawBitmap ( mStartPoint , locationX - marginX , locationY - marginY , mBitmapPaint ) ;
 + canvas . rotate ( tb . getRotate ( ) , locationX , locationY ) ;
 }
 }

 <nb> public class PointNavigationLayer extends OsmandMapLayer implements
 float locationY = getPointY ( tb , pointToNavigate ) ;
 canvas . rotate ( - tb . getRotate ( ) , locationX , locationY ) ;
 canvas . drawBitmap ( mTargetPoint , locationX - marginX , locationY - marginY , mBitmapPaint ) ;
 + canvas . rotate ( tb . getRotate ( ) , locationX , locationY ) ;
 }

 Iterator < TargetPoint > it = targetPoints . getIntermediatePoints ( ) . iterator ( ) ;


<nb> public class CassandraDaemon
 {
 logger . warn ( STRING0 ) ;
 }
 - else
 + COMMENT
 {
 String [ ] java_version = javaVersion . split ( STRING1 ) ;
 String java_major = java_version [ NUMBER0 ] ;
 <nb> public class CassandraDaemon
 logger . info ( STRING2 , Arrays . toString ( java_version ) ) ;
 java_minor = NUMBER1 ;
 }
 - if ( java_major . equals ( STRING3 ) )
 - {
 - SINGLE
 - if ( java_minor < NUMBER2 )
 - SINGLE
 - logger . error ( STRING4 ) ;
 - else if ( java_minor < NUMBER1 )
 - SINGLE
 - logger . warn ( STRING4 ) ;
 - }
 }
 -
 + COMMENT
 logger . info ( STRING5 , Runtime . getRuntime ( ) . totalMemory ( ) , Runtime . getRuntime ( ) . maxMemory ( ) ) ;
 logger . info ( STRING6 , System . getProperty ( STRING7 ) ) ;
 CLibrary . tryMlockall ( ) ;


<nb> public class FocusWatcher implements ContainerListener , FocusListener {
 if ( getFocusedComponent ( ) == component ) {
 setFocusedComponentImpl ( null , cause ) ;
 }
 + myTopComponent = null ;
 }

 @ override

reset FocusWatcher myTopComponent to null


<nb> public final class SugarDataSource < T > {
 try {
 count = future . get ( ) ;

 - if ( null == count || count == NUMBER0 ) {
 + if ( null == count ) {
 errorCallback . onError ( new Exception ( STRING0 ) ) ;
 } else {
 successCallback . onSuccess ( count ) ;


<nb> public class VCard extends IQ {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public void setAvatar ( byte [ ] bytes , String mimeType ) {
 + if ( bytes == null ) {
 + SINGLE
 + otherUnescapableFields . remove ( STRING0 ) ;
 + return ;
 + }
 +
 + SINGLE
 + String encodedImage = StringUtils . encodeBase64 ( bytes ) ;
 + avatar = encodedImage ;
 +
 + setField ( STRING0 , STRING1 + mimeType + STRING2 + encodedImage + STRING3 , true ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Added ability to set mime type of avatar


<nb> public class TaskVcsTest extends CodeInsightFixtureTestCase {
 myTaskManager = null ;
 myVcs = null ;
 myChangeListManager = null ;
 +
 + super . tearDown ( ) ;
 }
 - super . tearDown ( ) ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PeopleListFragment extends Fragment {

 mFilteredRecyclerView = ( FilteredRecyclerView ) rootView . findViewById ( R . id . filtered_recycler_view ) ;
 mFilteredRecyclerView . addItemDecoration ( new PeopleItemDecoration ( getActivity ( ) , R . drawable . people_list_divider ) ) ;
 + mFilteredRecyclerView . setLogT ( AppLog . T . PEOPLE ) ;

 mFilteredRecyclerView . setFilterListener ( new FilteredRecyclerView . FilterListener ( ) {
 @ override

Set the logT for people list also fixes the crash on filter change


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ExecuteSqlCommand extends AbstractCommand {
 if ( sqlFile == null ) {
 sqlText = sql ;
 } else {
 - sqlText = FileUtil . getContents ( new File ( sqlFile ) ) ;
 + File file = new File ( sqlFile ) ;
 + if ( ! file . exists ( ) ) {
 + throw new LiquibaseException ( String . format ( STRING0 , file . getCanonicalPath ( ) ) ) ;
 + }
 + sqlText = FileUtil . getContents ( file ) ;
 }

 String out = STRING1 ;

provide a better error message when a file doesn t exist


<nb> import NAMESPACE ;
 COMMENT
 public interface ChangeProvider {
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class OpenID4JavaConsumer implements OpenIDConsumer {
 SINGLE

 public OpenID4JavaConsumer ( ) throws ConsumerException {
 - this . consumerManager = new ConsumerManager ( ) ;
 - this . attributesToFetchFactory = new NullAxFetchListFactory ( ) ;
 + this ( new ConsumerManager ( ) , new NullAxFetchListFactory ( ) ) ;
 }

 COMMENT
 <nb> public class OpenID4JavaConsumer implements OpenIDConsumer {
 }

 public OpenID4JavaConsumer ( AxFetchListFactory attributesToFetchFactory ) throws ConsumerException {
 - this . consumerManager = new ConsumerManager ( ) ;
 + this ( new ConsumerManager ( ) , attributesToFetchFactory ) ;
 + }
 +
 + public OpenID4JavaConsumer ( ConsumerManager consumerManager , AxFetchListFactory attributesToFetchFactory )
 + throws ConsumerException {
 + this . consumerManager = consumerManager ;
 this . attributesToFetchFactory = attributesToFetchFactory ;
 }

Added extra constructor to OpenID4JavaConsumer which takes a ConsumerManager to allow a version compatible with GAE to be injected


<nb> public class FileConsumer extends ScheduledPollConsumer {
 return false ;
 } else if ( endpoint . isIdempotent ( ) && endpoint . getIdempotentRepository ( ) . contains ( file . getPath ( ) ) ) {
 SINGLE
 - LOG . warn ( STRING0 + file ) ;
 + if ( LOG . isTraceEnabled ( ) ) {
 + LOG . trace ( STRING0 + file ) ;
 + }
 return false ;
 }


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

 <nb> public abstract class LocalWorld {
 COMMENT
 COMMENT
 public boolean isValidBlockType ( int type ) {
 - return type >= NUMBER0 && type < NUMBER1 ;
 + return BlockType . fromID ( type ) != null ;
 }

 COMMENT
 <nb> public class BukkitWorld extends LocalWorld {
 COMMENT
 @ override
 public boolean isValidBlockType ( int type ) {
 - return type <= NUMBER2 && ( Material . getMaterial ( type ) != null || BlockType . fromID ( type ) != null ) ; SINGLE
 + return type <= NUMBER2 && Material . getMaterial ( type ) != null ;
 }

 @ override

Reverted block id checking in BukkitWorld to prevent false positives and made LoclWorld use the internal list for easier updates


<nb> public class PluginManager
 . add ( STRING0 )
 . add ( STRING1 )
 . add ( STRING2 )
 + . add ( STRING3 )
 . build ( ) ;

 private static final Logger log = Logger . get ( PluginManager . class ) ;


<nb> public class OptionParser {
 if ( fuzziness == null ) {
 return null ;
 }
 - return Fuzziness . build ( fuzziness ) ;
 + return Fuzziness . build ( BytesRefs . toString ( fuzziness ) ) ;
 }

 private static MatchQuery . ZeroTermsQuery zeroTermsQuery ( @ nullable Object zeroTermsQuery ) {
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class TransportSQLActionTest extends SQLTransportIntegrationTest {
 assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) ,
 is ( STRING0 ) ) ;

 + execute ( STRING1 +
 + STRING2 ) ;
 + assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) ,
 + is ( STRING0 ) ) ;
 +
 execute ( STRING3 +
 STRING4 ) ;
 assertThat ( TestingHelpers . printedTable ( response . rows ( ) ) ,

convert bytesrefs to string when creating the fuzziness conversion


<nb> public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
 }

 @ override
 + public void onBackPressed ( ) {
 + if ( mReactInstanceManager != null ) {
 + mReactInstanceManager . onBackPressed ( ) ;
 + } else {
 + super . onBackPressed ( ) ;
 + }
 + }
 +
 + @ override
 public void invokeDefaultOnBackPressed ( ) {
 super . onBackPressed ( ) ;
 }


<nb> public class AndroidHarness extends Activity implements TouchListener , DialogInt
 public void initialize ( ) {
 app . initialize ( ) ;
 if ( handleExitHook ) {
 + SINGLE
 + SINGLE
 + SINGLE
 + if ( app . getInputManager ( ) . hasMapping ( SimpleApplication . INPUT_MAPPING_EXIT ) ) {
 + app . getInputManager ( ) . deleteMapping ( SimpleApplication . INPUT_MAPPING_EXIT ) ;
 + }
 +
 app . getInputManager ( ) . addMapping ( ESCAPE_EVENT , new TouchTrigger ( TouchInput . KEYCODE_BACK ) ) ;
 app . getInputManager ( ) . addListener ( this , new String [ ] { ESCAPE_EVENT } ) ;
 }

Remove Escape key mapping from InputManager defined in SimpleApplication when using Android platforms


<nb> public class RVRendererAdapter < T > extends RecyclerView . Adapter < RendererViewHolde
 COMMENT
 @ override public void onBindViewHolder ( RendererViewHolder viewHolder , int position ) {
 T content = getItem ( position ) ;
 - rendererBuilder . withContent ( content ) ;
 Renderer < T > renderer = viewHolder . getRenderer ( ) ;
 if ( renderer == null ) {
 throw new NullRendererBuiltException ( STRING0 ) ;
 <nb> public abstract class RendererBuilder < T > {
 protected RendererViewHolder buildRendererViewHolder ( ) {
 validateAttributesToCreateANewRendererViewHolder ( ) ;

 - Renderer renderer = getPrototypeByIndex ( viewType ) ;
 + Renderer renderer = getPrototypeByIndex ( viewType ) . copy ( ) ;
 renderer . onCreate ( null , layoutInflater , parent ) ;
 return new RendererViewHolder ( renderer ) ;
 }
 <nb> class RendererViewHolder extends RecyclerView . ViewHolder {
 }

 Renderer getRenderer ( ) {
 - return renderer . copy ( ) ;
 + return renderer ;
 }
 }

Fix bug related to render prototype cloned and the video click listener


<nb> abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
 if ( onlyWithCache && packageManager . cacheIsNotNull ( ) || ! onlyWithCache ) {
 final PyPackage pip = packageManager . findPackage ( STRING0 ) ;
 myInstallFramework = pip != null ;
 - setWarningText ( STRING1 ) ;
 + setWarningText ( frameworkName + STRING2 ) ;
 }
 }
 catch ( PyExternalProcessException ignored ) {


<nb> public class TabHost extends FrameLayout implements ViewTreeObserver . OnTouchMode

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 < pre > mTabHost = ( TabHost ) findViewById ( R . id . tabhost ) ;
 mTabHost . setup ( ) ;
 <nb> mTabHost . addTab ( TAB_TAG_1 , STRING0 , STRING1 ) ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 View createTabContent ( String tag ) ;
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> mTabHost . addTab ( TAB_TAG_1 , STRING0 , STRING1 ) ;
 }
 mLaunchedView = wd ;

 - SINGLE
 + SINGLE
 SINGLE
 SINGLE
 SINGLE


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class Facebook {

Added note to Facebook java discouraging its use


<nb> public class TestNGReferenceContributor extends PsiReferenceContributor {
 if ( cls != null ) {
 PsiMethod [ ] methods = cls . findMethodsByName ( methodName , true ) ;
 for ( PsiMethod method : methods ) {
 - if ( TestNGUtil . hasTest ( method ) || TestNGUtil . hasConfig ( method ) ) {
 + if ( TestNGUtil . hasTest ( method , false ) || TestNGUtil . hasConfig ( method ) ) {
 return method ;
 }
 }


<nb> public final class SourceMapDecoder {
 if ( reader . hasNext ( ) ) {
 names = new ArrayList < String > ( ) ;
 do {
 - names . add ( reader . nextString ( true ) ) ;
 + if ( reader . peek ( ) == JsonToken . BEGIN_OBJECT ) {
 + SINGLE
 + reader . skipValue ( ) ;
 + names . add ( STRING0 ) ;
 + }
 + else {
 + names . add ( reader . nextString ( true ) ) ;
 + }
 }
 while ( reader . hasNext ( ) ) ;
 }


<nb> public class DAOTestRule extends ExternalResource {
 throw e ;
 }
 }
 +
 + public void transaction ( Runnable action ) {
 + transaction ( ( ) - > {
 + action . run ( ) ;
 + return true ;
 + } ) ;
 + }
 }
 <nb> public class DAOTestRuleTest {
 public void rollsBackTransaction ( ) {
 SINGLE
 final TestEntity testEntity = new TestEntity ( STRING0 ) ;
 - daoTestRule . transaction ( ( ) - > {
 - persist ( testEntity ) ;
 - return true ;
 - } ) ;
 + daoTestRule . transaction ( ( ) - > persist ( testEntity ) ) ;

 SINGLE
 testEntity . setDescription ( STRING1 ) ;
 <nb> public class DAOTestRuleTest {
 daoTestRule . transaction ( ( ) - > {
 persist ( testEntity ) ;
 persist ( new TestEntity ( null ) ) ;
 - return true ;
 } ) ;
 fail ( STRING2 ) ;
 } catch ( ConstraintViolationException ignoredException ) {

Provide a way to execute an action in transaction


<nb> class PFontTexture implements PConstants {
 h = PApplet . min ( NUMBER0 * textures [ currentTex ] . glHeight , maxTexHeight ) ;
 resize = true ;
 } else {
 - h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , maxTexHeight / NUMBER1 ) ;
 + h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , PGL . MAX_FONT_TEX_SIZE / NUMBER0 , maxTexHeight / NUMBER1 ) ;
 resize = false ;
 }

 <nb> class PFontTexture implements PConstants {
 h = PApplet . min ( NUMBER0 * textures [ currentTex ] . glHeight , maxTexHeight ) ;
 resize = true ;
 } else {
 - h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , maxTexHeight / NUMBER1 ) ;
 + h = PApplet . min ( PGraphicsOpenGL . maxTextureSize , PGL . MAX_FONT_TEX_SIZE / NUMBER0 , maxTexHeight / NUMBER1 ) ;
 resize = false ;
 }

adjusted size initialization in font textures


<nb> public class JetColorSettingsPage implements ColorSettingsPage {
 STRING0 +
 STRING1 +
 STRING2 +
 - STRING3 +
 + STRING4 +
 + STRING5 +
 STRING6 +
 STRING7 +
 STRING8 +


<nb> public class CordovaWebViewClient extends WebViewClient {
 COMMENT
 @ override
 public WebResourceResponse shouldInterceptRequest ( WebView view , String url ) {
 - SINGLE
 - if ( ! Config . isUrlWhiteListed ( url ) )
 + SINGLE
 + if ( ! Config . isUrlWhiteListed ( url ) && url . startsWith ( STRING0 ) || url . startsWith ( STRING1 ) )
 {
 return getWhitelistResponse ( ) ;
 }

Making framework only apply for http resources for now so we don t break non http handling


<nb> public class ZRTPTransformEngine
 long endTime = System . currentTimeMillis ( ) + nextDelay ;
 long currentTime = System . currentTimeMillis ( ) ;
 synchronized ( sync ) {
 - while ( ( currentTime <= endTime ) && newTask && ! stop )
 + while ( ( currentTime < endTime ) && newTask && ! stop )
 {
 try
 {
 <nb> public class ZRTPTransformEngine
 e . printStackTrace ( ) ;
 return false ;
 }
 -
 return true ;
 }

Fix a small but important bug in the TimeoutProvider run method


<nb> public class DataStructures {
 System . out . println ( STRING0 + next ) ;
 minHeap . remove ( next ) ;
 System . out . println ( minHeap . toString ( ) ) ;
 + System . out . println ( ) ;
 }

 {

Fixed formatting of data structure test code


<nb> public class Digester extends DefaultHandler2 {

 SINGLE
 bodyText = bodyTexts . pop ( ) ;
 - if ( debug ) {
 - log . debug ( STRING0 + bodyText . toString ( ) + STRING1 ) ;
 - }

 SINGLE
 if ( rules != null ) {
 <nb> public class Digester extends DefaultHandler2 {

 SINGLE
 bodyTexts . push ( bodyText ) ;
 - if ( debug ) {
 - log . debug ( STRING2 + bodyText . toString ( ) + STRING1 ) ;
 - }
 bodyText = new StringBuilder ( ) ;

 SINGLE

Removed debug messages as they do not give any valuable information and floods the log files with empty rows


<nb> public class PublishSubscribeTest extends CamelTestSupport {

 @ test
 public void testPresenceAgentBasedPubSub ( ) throws Exception {
 - if ( LOG . isDebugEnabled ( ) ) {
 - LOG . debug ( STRING0 ) ;
 - }
 -
 unreachableEndpoint . expectedMessageCount ( NUMBER0 ) ;
 resultEndpoint . expectedMinimumMessageCount ( NUMBER1 ) ;

 producerTemplate . sendBodyAndHeader (
 - STRING1 ,
 + STRING2 ,
 STRING3 ,
 STRING4 , Request . PUBLISH ) ;

 assertMockEndpointsSatisfied ( ) ;
 -
 - if ( LOG . isDebugEnabled ( ) ) {
 - LOG . debug ( STRING5 ) ;
 - }
 }

 @ override
 <nb> public class PublishSubscribeTest extends CamelTestSupport {
 @ override
 public void configure ( ) throws Exception {
 SINGLE
 - from ( STRING6 )
 + from ( STRING7 )
 . to ( STRING8 ) ;

 - from ( STRING9 )
 + from ( STRING10 )
 . to ( STRING11 )
 . to ( STRING12 ) ;
 }

Fixed test on windows having port already in use


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 COMMENT
 public class SubtractTransform extends Transform {
 private String fieldName1 ;
 <nb> public class SubtractTransform extends Transform {
 }

 Map < String , Double > output = Util . getOrCreateFloatFeature ( outputName , floatFeatures ) ;
 - Set < String > allKeys = feature1 . keySet ( ) ;

 for ( String key : keys ) {
 if ( feature1 . containsKey ( key ) ) {


<nb> import static NAMESPACE ;
 COMMENT
 public class MockitoJUnitRule implements TestRule {

 - private JUnitRule jUnitRule ;
 + private final JUnitRule jUnitRule ;

 - public MockitoJUnitRule ( Object object ) {
 - checkNotNull ( object , STRING0 ) ;
 - this . jUnitRule = new JUnitRule ( object ) ;
 + COMMENT
 + COMMENT
 + COMMENT
 + public MockitoJUnitRule ( Object testInstance ) {
 + checkNotNull ( testInstance , STRING1 ) ;
 + this . jUnitRule = new JUnitRule ( testInstance ) ;
 }

 public Statement apply ( final Statement base , Description description ) {


<nb> public class BeanELResolver extends ELResolver {
 }
 return property ;
 }
 +
 + public Class < ? > getType ( ) {
 + return type ;
 + }
 }

 private final static class BeanProperty {
 <nb> public class BeanELResolver extends ELResolver {
 String prop = property . toString ( ) ;

 BeanProperties props = this . cache . get ( type . getName ( ) ) ;
 - if ( props == null ) {
 + if ( props == null || type != props . getType ( ) ) {
 props = new BeanProperties ( type ) ;
 this . cache . put ( type . getName ( ) , props ) ;
 }

Fix improper caching by checking the class definition


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class Video implements PConstants {
 - protected static String VERSION_STRING = STRING0 ;
 + protected static String VERSION_STRING = STRING1 ;
 protected static long INSTANCES_COUNT = NUMBER0 ;

 protected static String gstreamerBinPath = STRING2 ;


<nb> class LanguageToolHttpHandler implements HttpHandler {
 if ( motherTongue != null ) {
 languageMessage += STRING0 + motherTongue . getShortNameWithCountryAndVariant ( ) + STRING1 ;
 }
 + if ( autoDetectLanguage ) {
 + languageMessage += STRING2 ;
 + }
 } catch ( IOException exception ) {
 SINGLE
 messageSent = STRING3 + exception . getMessage ( ) ;
 <nb> class LanguageToolHttpHandler implements HttpHandler {
 Language lang ;
 if ( autoDetect ) {
 lang = detectLanguageOfString ( text , langParam ) ;
 - print ( STRING4 + lang . getShortNameWithCountryAndVariant ( ) ) ;
 } else {
 if ( afterTheDeadlineMode ) {
 lang = afterTheDeadlineLanguage ;

put it in the same line as the rest of the output


<nb> public class Solo {
 }

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

 <nb> class ViewFetcher {
 }

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

Clarified javadoc for getButton in Solo and ViewFetcher


<nb> public class IBeacon {

 IBeacon iBeacon = new IBeacon ( ) ;

 - iBeacon . major = ( ( int ) scanData [ NUMBER0 ] & NUMBER1 ) * NUMBER2 + scanData [ NUMBER3 ] ;
 - iBeacon . minor = ( ( int ) scanData [ NUMBER4 ] & NUMBER1 ) * NUMBER2 + scanData [ NUMBER5 ] ;
 + iBeacon . major = ( scanData [ NUMBER0 ] & NUMBER1 ) * NUMBER2 + ( scanData [ NUMBER3 ] & NUMBER1 ) ;
 + iBeacon . minor = ( scanData [ NUMBER4 ] & NUMBER1 ) * NUMBER2 + ( scanData [ NUMBER5 ] & NUMBER1 ) ;
 iBeacon . txPower = ( int ) scanData [ NUMBER6 ] ; SINGLE
 iBeacon . rssi = rssi ;


<nb> public class PooledByteBufAllocator extends AbstractByteBufAllocator {
 heapArenas = null ;
 }

 - if ( nHeapArena > NUMBER0 ) {
 + if ( nDirectArena > NUMBER0 ) {
 directArenas = newArenaArray ( nDirectArena ) ;
 for ( int i = NUMBER0 ; i < directArenas . length ; i ++ ) {
 directArenas [ i ] = new PoolArena . DirectArena ( this , pageSize , maxOrder , pageShifts , chunkSize ) ;

Use correct value to disable enable direct arenas in PooledByteBufAllocator


<nb> public class StatsCursorFragment extends SherlockFragment implements LoaderManag
 }

 private void reloadLinearLayout ( ) {
 - if ( mLinearLayout == null || mAdapter == null )
 + if ( getActivity ( ) == null || mLinearLayout == null || mAdapter == null )
 return ;

 SINGLE
 <nb> public class StatsCursorTreeFragment extends SherlockFragment implements LoaderM
 }

 private void reloadLinearLayout ( ) {
 - if ( mLinearLayout == null || mAdapter == null )
 + if ( getActivity ( ) == null || mLinearLayout == null || mAdapter == null )
 return ;

 int groupCount = Math . min ( mAdapter . getGroupCount ( ) , StatsActivity . STATS_GROUP_MAX_ITEMS ) ;

Fixed NPEs in cursor fragments when detached from activity


<nb> public final class ResourceManager {
 }
 }

 + COMMENT
 java . util . Arrays . sort ( projects ) ;

 for ( Project project : projects ) {

Add comment which describes need the sort method call


<nb> public class EncoderEndpointTest {
 + base . getPath ( )
 + STRING0 ) ;
 return container . connectToServer ( endpoint , uri ) ;
 -
 }
 }


<nb> public class SvnRepositoryConnector extends AbstractRepositoryConnector < SvnConne

 }

 - public boolean login ( String username , String password ) {
 - checkLoggedIn ( ) ;
 + public boolean login ( String username , String password ) {
 ISVNClientAdapter clientAdapter = getSvnClientAdapter ( ) ;

 clientAdapter . setUsername ( username ) ;
 <nb> public class SftpRepositoryConnector extends VfsConnector {
 log . log ( Level . WARNING , STRING0 + getConfiguration ( ) . getHostname ( ) , e ) ;
 return false ;
 }
 -
 + loggedIn = true ;
 return true ;
 }

allow the Svn and Sftp Connectors to perform login


<nb> import NAMESPACE ;
 @ jsonsubtypes ( value = {
 @ jsonsubtypes.type ( value = BinomialDistribution . class , name = STRING0 ) ,
 @ jsonsubtypes.type ( value = NormalDistribution . class , name = STRING1 ) ,
 + @ jsonsubtypes.type ( value = GaussianDistribution . class , name = STRING2 ) ,
 @ jsonsubtypes.type ( value = UniformDistribution . class , name = STRING3 ) ,
 } )
 public abstract class Distribution implements Serializable , Cloneable {
 <nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 + @ deprecated
 public class GaussianDistribution extends Distribution {

 private double mean , std ;

Add json subtype for gaussian conf distribution deprecate


<nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
 }
 return resourceFolders ;
 }
 - COMMENT
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
 return false ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 private boolean isBuildConfigPresent ( Artifact artifact ) throws MojoExecutionException
 {
 String depPackageName = extractPackageNameFromAndroidArtifact ( artifact ) ;
 <nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
 return isBuildConfigPresent ( artifact , depPackageName ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 private boolean isBuildConfigPresent ( Artifact artifact , String packageName ) throws MojoExecutionException
 {
 try


<nb> public class PGL {
 gl . glClear ( GL . GL_COLOR_BUFFER_BIT | GL . GL_DEPTH_BUFFER_BIT |
 GL . GL_STENCIL_BUFFER_BIT ) ;
 firstFrame = false ;
 + drawable . swapBuffers ( ) ;
 }

 if ( capabilities . isFBO ( ) ) {

added buffer swap in Display to solve the garbage problem


<nb> public class Theories extends JUnit4ClassRunner {
 } . childBlock ( fTestMethod ) . evaluate ( ) ;
 } catch ( AssumptionViolatedException e ) {
 handleAssumptionViolation ( e ) ;
 - } catch ( CouldNotGenerateValueException e ) {
 - SINGLE
 }
 }

 <nb> public class Theories extends JUnit4ClassRunner {
 invokeWithActualParameters ( freshInstance , complete ) ;
 } catch ( CouldNotGenerateValueException e ) {
 SINGLE
 - SINGLE
 - SINGLE
 }
 }
 } ;


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

 COMMENT
 COMMENT
 <nb> public abstract class AbstractCacheManager implements CacheManager , Initializing

 public void afterPropertiesSet ( ) {
 Collection < ? extends Cache > caches = loadCaches ( ) ;
 - Assert . notEmpty ( caches , STRING0 ) ;
 - this . cacheMap . clear ( ) ;

 SINGLE
 + this . cacheMap . clear ( ) ;
 + this . cacheNames . clear ( ) ;
 for ( Cache cache : caches ) {
 this . cacheMap . put ( cache . getName ( ) , decorateCache ( cache ) ) ;
 this . cacheNames . add ( cache . getName ( ) ) ;

AbstractCacheManager accepts no caches defined allowing for EHCache default cache setup


<nb> public abstract class SeriesGuideExtension extends IntentService {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 protected abstract void onRequest ( int episodeIdentifier , Episode episode ) ;


<nb> public final class ChannelImpl implements Channel {
 COMMENT
 COMMENT
 public synchronized ChannelImpl shutdown ( ) {
 + if ( shutdown ) {
 + return this ;
 + }
 shutdown = true ;
 if ( activeTransport != null ) {
 activeTransport . stopAsync ( ) ;


<nb> public class ResultSetViewer extends Viewer implements IDataSourceProvider , ISpr

 public void setData ( List < Object [ ] > rows , boolean updateMetaData )
 {
 + if ( spreadsheet . isDisposed ( ) ) {
 + return ;
 + }
 SINGLE
 this . closeEditors ( ) ;

 <nb> class ConnectionPageFinal extends ActiveWizardPage < ConnectionWizard > {

 void saveSettings ( DataSourceDescriptor dataSource )
 {
 + if ( ! activated ) {
 + SINGLE
 + return ;
 + }
 dataSource . setName ( connectionNameText . getText ( ) ) ;
 dataSource . setSavePassword ( savePasswordCheck . getSelection ( ) ) ;
 dataSource . setDefaultAutoCommit ( autocommit . getSelection ( ) , true ) ;


<nb> public abstract class SocketReader implements Runnable {
 packet = new Message ( doc ) ;
 }
 catch ( IllegalArgumentException e ) {
 + Log . debug ( STRING0 , e ) ;
 SINGLE
 Message reply = new Message ( ) ;
 reply . setID ( doc . attributeValue ( STRING1 ) ) ;
 <nb> public abstract class SocketReader implements Runnable {
 packet = new Presence ( doc ) ;
 }
 catch ( IllegalArgumentException e ) {
 + Log . debug ( STRING0 , e ) ;
 SINGLE
 Presence reply = new Presence ( ) ;
 reply . setID ( doc . attributeValue ( STRING1 ) ) ;
 <nb> public abstract class SocketReader implements Runnable {
 packet = getIQ ( doc ) ;
 }
 catch ( IllegalArgumentException e ) {
 + Log . debug ( STRING0 , e ) ;
 SINGLE
 IQ reply = new IQ ( ) ;
 if ( ! doc . elements ( ) . isEmpty ( ) ) {

Added logging when receiving a malformed JID


<nb>
 - package NAMESPACE ;
 + package NAMESPACE ;

 import static NAMESPACE ;
 import static NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT

Move test to test folder where it belongs


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

 <nb> import NAMESPACE ;
 import NAMESPACE ;

 - public class ChooseRepositoryActivity extends ActionBarActivity {
 + public class ChooseRepositoryActivity extends AppCompatActivity {
 private static final String TAG = ChooseRepositoryActivity . class . getSimpleName ( ) ;

 @ override
 <nb> import NAMESPACE ;

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

 - public class MainActivity extends ActionBarActivity {
 + public class MainActivity extends AppCompatActivity {
 private static final String TAG = MainActivity . class . getSimpleName ( ) ;

 @ inject


<nb> public class HttpHeaders extends HashMap < String , String > {

 @ override
 public Set < Map . Entry < String , String > > entrySet ( ) {
 - return super . entrySet ( ) ;
 + throw new UnsupportedOperationException ( ) ;
 }

 @ override


<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
 }

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

Improve GDK Reference File eachLine and File eachFile


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

 + @ suppresswarnings ( STRING0 )
 public class LaunchConfigBuilder {

 private final File baseDir ;
 <nb> public class LaunchConfigBuilder {
 private static class BlockingThreadFactory implements ThreadFactory {

 private final ThreadGroup threadGroup = new ThreadGroup ( STRING1 ) ;
 - private int i = NUMBER0 ;
 + private int i ;

 @ override
 public Thread newThread ( Runnable r ) {


<nb> public class FS20Binding extends AbstractActiveBinding < FS20BindingProvider >
 }

 public void activate ( ) {
 - if ( StringUtils . isEmpty ( deviceName ) ) {
 - logger . error ( STRING0 ) ;
 - return ;
 - }
 logger . debug ( STRING1 ) ;
 - getCULHandler ( ) ;
 }

 private void setNewDeviceName ( String deviceName ) {


<nb> public class BenchmarkSuite
 this . outputDirectory = checkNotNull ( outputDirectory , STRING0 ) ;
 }

 - private File createOutputFile ( String fileName )
 + private static File createOutputFile ( String fileName )
 throws IOException
 {
 File outputFile = new File ( fileName ) ;


<nb> public class SpotLight extends Light {
 protected float spotInnerAngle = FastMath . QUARTER_PI / NUMBER0 ;
 protected float spotOuterAngle = FastMath . QUARTER_PI / NUMBER1 ;
 protected float spotRange = NUMBER2 ;
 - protected float invSpotRange = NUMBER3 / NUMBER2 ;
 + protected float invSpotRange = FLOAT0 / NUMBER2 ;
 protected float packedAngleCos = NUMBER4 ;

 protected float outerAngleCosSqr , outerAngleSinSqr ;

Fixed SpotLight default inititalisation for invSpotRange


<nb> public final class Main implements ActionListener {

 }

 - class PlainTextFilter extends FileFilter {
 + static class PlainTextFilter extends FileFilter {

 public boolean accept ( final File f ) {
 if ( f . getName ( ) . toLowerCase ( ) . endsWith ( STRING0 ) )


<nb> public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {

 int readBytes = NUMBER0 ;

 - if ( ! buffer . isReadOnly ( ) && buffer . hasArray ( ) ) {
 + if ( buffer . hasArray ( ) ) {
 index += buffer . arrayOffset ( ) ;
 do {
 int localReadBytes = in . read ( buffer . array ( ) , index , length ) ;
 <nb> public class ChannelBuffers {
 if ( ! buffer . hasRemaining ( ) ) {
 return EMPTY_BUFFER ;
 }
 - if ( ! buffer . isReadOnly ( ) && buffer . hasArray ( ) ) {
 + if ( buffer . hasArray ( ) ) {
 return wrappedBuffer ( buffer . order ( ) , buffer . array ( ) , buffer . arrayOffset ( ) , buffer . remaining ( ) ) ;
 } else {
 return new ByteBufferBackedChannelBuffer ( buffer ) ;


<nb> public class CUnitPlugin implements Plugin < Project > {
 testSuites . create ( suiteName , CUnitTestSuiteSpec . class , new Action < CUnitTestSuiteSpec > ( ) {
 @ override
 public void execute ( CUnitTestSuiteSpec testSuite ) {
 - DefaultCUnitTestSuiteSpec cunitTestSuite = ( DefaultCUnitTestSuiteSpec ) testSuite ;
 - cunitTestSuite . setTestedComponent ( component ) ;
 + testSuite . setTestedComponent ( component ) ;
 }
 } ) ;
 }
 }
 -
 +
 @ componenttype
 - public void registerCUnitTestSuiteSpecType ( ComponentTypeBuilder < CUnitTestSuiteSpec > builder ) {
 + public void registerCUnitTestSuiteSpecType ( ComponentTypeBuilder < CUnitTestSuiteSpec > builder ) {
 builder . defaultImplementation ( DefaultCUnitTestSuiteSpec . class ) ;
 }

Remove unnecessary casts of CUnitTestSuiteSpec in CUnitPlugin


<nb> public abstract class JSON implements JSONStreamAware , JSONAware {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 public static void writeJSONString ( Object object , Writer writer , SerializerFeature . . . features ) {
 writeJSONString ( object , writer , JSON . DEFAULT_GENERATE_FEATURE , features ) ;


<nb> public class PythonScriptEngineService extends AbstractComponent implements Scri
 }

 @ override public String [ ] types ( ) {
 - return new String [ ] { STRING0 } ;
 + return new String [ ] { STRING0 , STRING1 } ;
 }

 @ override public String [ ] extensions ( ) {


<nb> public class CachedClass {
 }

 public int getSuperClassDistance ( ) {
 - synchronized ( getTheClass ( ) ) {
 - if ( distance == - NUMBER0 ) {
 - int distance = NUMBER1 ;
 - for ( Class klazz = getTheClass ( ) ; klazz != null ; klazz = klazz . getSuperclass ( ) ) {
 - distance ++ ;
 - }
 - this . distance = distance ;
 - }
 - return distance ;
 + if ( distance >= NUMBER1 ) return distance ;
 +
 + int distance = NUMBER1 ;
 + for ( Class klazz = getTheClass ( ) ; klazz != null ; klazz = klazz . getSuperclass ( ) ) {
 + distance ++ ;
 }
 + this . distance = distance ;
 + return distance ;
 }

 public int hashCode ( ) {


<nb> package NAMESPACE ;

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

 - import NAMESPACE ;
 -
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CppCompletionManager implements CompletionManager
 initFilter_ = initFilter ;
 completionContext_ = completionContext ;
 rCompletionManager_ = rCompletionManager ;
 - snippets_ = new SnippetHelper ( ( AceEditor ) docDisplay ) ;
 docDisplay_ . addClickHandler ( new ClickHandler ( )
 {
 public void onClick ( ClickEvent event )
 <nb> public class CppCompletionManager implements CompletionManager
 private FileTypeRegistry fileTypeRegistry_ ;
 private final DocDisplay docDisplay_ ;
 private final CppCompletionContext completionContext_ ;
 - private final SnippetHelper snippets_ ;
 private CppCompletionRequest request_ ;
 private final InitCompletionFilter initFilter_ ;
 private final CompletionManager rCompletionManager_ ;


<nb> public class JavaSourceProcessorTest extends BaseSourceProcessorTestCase {
 STRING0 , STRING0 , STRING0 , STRING0 ,
 STRING0 , STRING0 , STRING0 , STRING0 ,
 STRING0 , STRING0 , STRING0 , STRING0 ,
 - STRING0 , STRING0 , STRING0
 + STRING0 , STRING0
 } ,
 new Integer [ ] {
 - NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , NUMBER7 , NUMBER8 , NUMBER8 , NUMBER9 , NUMBER10 , NUMBER11 , NUMBER12 , NUMBER13
 + NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , NUMBER7 , NUMBER8 , NUMBER9 , NUMBER10 , NUMBER11 , NUMBER12 , NUMBER13
 } ) ;
 }


<nb> public abstract class LanguagePerFileMappings < T > implements PersistentStateCompo
 }

 @ nullable
 - public T getImmediateMapping ( final VirtualFile file ) {
 + public T getImmediateMapping ( @ nullable final VirtualFile file ) {
 synchronized ( myMappings ) {
 return myMappings . get ( file ) ;
 }


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - public abstract class CuratorDiscoveryConfig
 + public class CuratorDiscoveryConfig
 {
 @ jsonproperty
 private String path = null ;

Switch CuratorDiscoveryConfig to not be an abstract class cause Jackson cannot instantiate them


<nb> public class TransportShardMultiPercolateAction extends TransportShardSingleOper
 try {
 responseItem . response = percolatorService . percolate ( item . request ) ;
 } catch ( Throwable e ) {
 - logger . trace ( STRING0 , e , request . index ( ) , request . shardId ( ) ) ;
 + logger . debug ( STRING0 , e , request . index ( ) , request . shardId ( ) ) ;
 if ( TransportActions . isShardNotAvailableException ( e ) ) {
 throw new ElasticSearchException ( STRING1 , e ) ;
 } else {

Logging shard level multi percolate errors under debug rather than trace


<nb> import NAMESPACE ;

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

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

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

 @ test
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;

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

 COMMENT

Removing usage of deprecated Mockito annotation


<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
 private int myComponentConfigCount ;
 @ suppresswarnings ( STRING0 )
 private int myInstantiatedComponentCount = - NUMBER0 ;
 + private boolean myComponentsCreated ;

 private final List < BaseComponent > myBaseComponents = new ArrayList < BaseComponent > ( ) ;

 <nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
 indicator . setIndeterminate ( false ) ;
 }
 createComponents ( indicator ) ;
 + myComponentsCreated = true ;
 }

 protected void setProgressDuringInit ( @ notnull ProgressIndicator indicator ) {
 <nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
 }

 public final boolean isComponentsCreated ( ) {
 - return myComponentConfigCount != - NUMBER0 ;
 + return myComponentsCreated ;
 }

 protected synchronized final void disposeComponents ( ) {


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

 <nb> public class EnglishGrammaticalRelations {
 SINGLE
 SINGLE
 STRING4 ,
 - STRING5
 + SINGLE
 + SINGLE
 + STRING6

 } ) ;
 public static class AppositionalModifierGRAnnotation extends GrammaticalRelationAnnotation { }

Split the her daughter jordan tregex into pieces with and without NNP


<nb> public class ImpermanentGraphDatabase extends EmbeddedGraphDatabase
 private static boolean TRACK_UNCLOSED_DATABASE_INSTANCES = false ;
 private static final Map < File , Exception > startedButNotYetClosed = new ConcurrentHashMap < File , Exception > ( ) ;

 - static final String PATH = STRING0 ;
 + static final String PATH = STRING1 ;

 COMMENT
 COMMENT


<nb> public class SdkConfigurationUtil {
 VirtualFile suggestedDir = suggestedPath == null
 ? null
 : LocalFileSystem . getInstance ( ) . findFileByPath ( FileUtil . toSystemIndependentName ( suggestedPath ) ) ;
 - FileChooser . chooseFiles ( descriptor , project , suggestedDir , new Consumer < List < VirtualFile > > ( ) {
 + FileChooser . chooseFiles ( descriptor , project , suggestedDir , new FileChooser . FileChooserConsumer ( ) {
 @ override
 public void consume ( List < VirtualFile > selectedFiles ) {
 for ( SdkType sdkType : sdkTypes ) {
 <nb> public class SdkConfigurationUtil {
 }
 onSdkCreatedCallBack . consume ( null ) ;
 }
 +
 + @ override
 + public void cancelled ( ) {
 + onSdkCreatedCallBack . consume ( null ) ;
 + }
 } ) ;
 }

allow reacting on cancel when creating sdk


<nb> public final class Constants {
 public static final String MESOS_RESOURCE_DISK = STRING0 ;
 public static final String MESOS_RESOURCE_PORTS = STRING1 ;

 - public static final long SECOND_NANO = NUMBER0 ;
 + public static final long SECOND_NANO = NUMBER1 ;
 public static final int SECOND_MS = NUMBER2 ;
 public static final int MINUTE_MS = SECOND_MS * NUMBER3 ;
 public static final int HOUR_MS = MINUTE_MS * NUMBER3 ;


<nb> public class IpnbFileEditor extends UserDataHolderBase implements FileEditor {
 new CellSelectionListener ( ) {
 @ override
 public void selectionChanged ( @ notnull IpnbPanel ipnbPanel , boolean byMouse ) {
 - if ( myCellTypeCombo == null || byMouse ) return ;
 + if ( myCellTypeCombo == null ) return ;
 updateCellTypeCombo ( ipnbPanel ) ;
 + if ( byMouse ) return ;
 updateScrollPosition ( ipnbPanel ) ;
 }
 } ) ;

Changing style works only after closing the editor


<nb>

 package NAMESPACE ;

 - import NAMESPACE ;
 -
 import NAMESPACE ;
 import NAMESPACE ;

Remove import that was accidentally added


<nb> public final class PrintSpoolerService extends Service {
 final int printJobCount = mPrintJobs . size ( ) ;
 for ( int i = NUMBER0 ; i < printJobCount ; i ++ ) {
 PrintJobInfo printJob = mPrintJobs . get ( i ) ;
 - if ( isActiveState ( printJob . getState ( ) )
 + if ( isActiveState ( printJob . getState ( ) ) && printJob . getPrinterId ( ) != null
 && printJob . getPrinterId ( ) . getServiceName ( ) . equals ( service ) ) {
 return true ;
 }

Add missing null pointer check in PrintSpoolerService


<nb> public class TelephonyManager {
 COMMENT
 COMMENT
 COMMENT
 - public static final boolean EMERGENCY_ASSISTANCE_ENABLED = false ;
 + public static final boolean EMERGENCY_ASSISTANCE_ENABLED = true ;

 COMMENT
 COMMENT

Flip EMERGENCY_ASSISTANCE_ENABLED to true


<nb> public class IndicesQueryCacheTests extends ElasticsearchIntegrationTest {
 SINGLE
 final SearchResponse r1 = client ( ) . prepareSearch ( STRING0 ) . setSize ( NUMBER0 ) . setSearchType ( SearchType . QUERY_THEN_FETCH )
 . addAggregation ( dateHistogram ( STRING1 ) . field ( STRING2 ) . timeZone ( STRING3 ) . minDocCount ( NUMBER0 ) . interval ( DateHistogramInterval . MONTH ) ) . get ( ) ;
 - assertSearchResponse ( r1 ) ; System . out . println ( r1 ) ;
 + assertSearchResponse ( r1 ) ;

 SINGLE
 assertThat ( client ( ) . admin ( ) . indices ( ) . prepareStats ( STRING0 ) . setQueryCache ( true ) . get ( ) . getTotal ( ) . getQueryCache ( ) . getMemorySizeInBytes ( ) , greaterThan ( NUMBER0 l ) ) ;


<nb> abstract class JsonObject {
 COMMENT
 COMMENT
 COMMENT
 + @ suppresswarnings ( STRING0 )
 public < T > T get ( String name , Class < T > clazz ) {
 Object value = parameters . get ( name ) ;
 try {

Revert Remove unneded supressWarning annotation


<nb> public class SampleFactory implements SampleSource {

 public SampleFactory ( Graph graph ) {
 this . graph = graph ;
 - this . setSearchRadiusM ( NUMBER0 ) ;
 + this . setSearchRadiusM ( NUMBER1 ) ;
 }

 private Graph graph ;

increase sample linking distance so things are not left unlinked now that we look for nodes not edges


<nb> final class TransactionImpl implements Transaction , TransactionSupport {
 futures . add ( f ) ;
 }
 }
 - waitWithDeadline ( futures , timeoutMillis , TimeUnit . MILLISECONDS , FutureUtil . RETHROW_EVERYTHING ) ;
 + waitWithDeadline ( futures , timeoutMillis , TimeUnit . MILLISECONDS , FutureUtil . RETHROW_TRANSACTION_EXCEPTION ) ;
 futures . clear ( ) ;
 }

add missing transaction exception handler


<nb> package NAMESPACE ;

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public abstract class AbstractMvcPsiNodeDescriptor extends AbstractPsiBasedNode < PsiElement > {
 + public abstract class AbstractMvcPsiNodeDescriptor extends BasePsiNode < PsiElement > {
 public static final int FOLDER = NUMBER0 ;
 public static final int FILE = NUMBER1 ;
 public static final int CLASS = NUMBER2 ;
 <nb> public abstract class AbstractMvcPsiNodeDescriptor extends AbstractPsiBasedNode <
 return super . contains ( file ) ;
 }

 - @ override
 - @ nullable
 - protected PsiElement extractPsiFromValue ( ) {
 - return getValue ( ) ;
 - }
 -
 @ nullable
 @ override
 public String toTestString ( @ nullable Queryable . PrintInfo printInfo ) {

make AbstractMvcPsiNodeDescriptor extend BasePsiNode


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

 import NAMESPACE ;


<nb> public abstract class DebuggerUtilsEx extends DebuggerUtils {
 DebugProcessImpl process ) {
 PsiClass containingClass = psiMethod . getContainingClass ( ) ;
 try {
 - return containingClass != null && Objects . equals ( containingClass . getQualifiedName ( ) , className ) &&
 + return containingClass != null && Objects . equals ( JVMNameUtil . getClassVMName ( containingClass ) , className ) &&
 JVMNameUtil . getJVMMethodName ( psiMethod ) . equals ( name ) &&
 JVMNameUtil . getJVMSignature ( psiMethod ) . getName ( process ) . equals ( signature ) ;
 }

fixed incorrect smart targets for inner classes


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> class LazyEntryView < K , V > implements EntryView < K , V > {
 }

 public V getValue ( ) {
 - if ( validMergePolicyForValueNullCheck ( mergePolicy ) ) {
 + if ( returnRawData ( mergePolicy ) ) {
 return value ;
 }
 value = serializationService . toObject ( value ) ;
 return value ;
 }

 - private boolean validMergePolicyForValueNullCheck ( MapMergePolicy mergePolicy ) {
 + private boolean returnRawData ( MapMergePolicy mergePolicy ) {
 return mergePolicy instanceof PutIfAbsentMapMergePolicy
 - || mergePolicy instanceof PassThroughMergePolicy ;
 + || mergePolicy instanceof PassThroughMergePolicy
 + || mergePolicy instanceof HigherHitsMapMergePolicy
 + || mergePolicy instanceof LatestUpdateMapMergePolicy ;
 }

 public void setValue ( V value ) {


<nb> public interface PsiComment extends PsiElement {
 COMMENT
 COMMENT
 IElementType getTokenType ( ) ;
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + interface BlockFormatting { }
 }
 <nb> abstract class CodeStyleManagerRunnable < T > {
 protected abstract T doPerform ( int offset , TextRange range ) ;

 private static boolean isInsidePlainComment ( int offset , @ nullable PsiElement element ) {
 - if ( ! ( element instanceof PsiComment ) || ! element . getTextRange ( ) . contains ( offset ) ) {
 + if ( ! ( element instanceof PsiComment ) || element instanceof PsiComment . BlockFormatting || ! element . getTextRange ( ) . contains ( offset ) ) {
 return false ;
 }

block comments indentation review CR OC Anton


<nb> public class MockLibraryUtil {

 @ notnull
 private static Class < ? > getCompilerClass ( ) throws MalformedURLException , ClassNotFoundException {
 -
 if ( compilerClass == null ) {
 File kotlinCompilerJar = new File ( PathUtil . getKotlinPathsForDistDirectory ( ) . getLibPath ( ) , STRING0 ) ;
 - URLClassLoader classLoader = new URLClassLoader ( new URL [ ] { kotlinCompilerJar . toURI ( ) . toURL ( ) } , Object . class . getClassLoader ( ) ) ;
 + File kotlinRuntimeJar = new File ( PathUtil . getKotlinPathsForDistDirectory ( ) . getLibPath ( ) , STRING1 ) ;
 + URLClassLoader classLoader = new URLClassLoader ( new URL [ ] { kotlinCompilerJar . toURI ( ) . toURL ( ) , kotlinRuntimeJar . toURI ( ) . toURL ( ) } ,
 + Object . class . getClassLoader ( ) ) ;

 compilerClass = classLoader . loadClass ( K2JVMCompiler . class . getName ( ) ) ;
 }

Add kotlin runtime jar to the class loader when invoking compiler


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PydevConsoleCommunication extends AbstractConsoleCommunication impl
 return execRequestInput ( ) ;
 }
 else {
 - throw new NotImplementedException ( ) ;
 + throw new UnsupportedOperationException ( ) ;
 }
 }


<nb> import NAMESPACE ;
 COMMENT
 SINGLE
 SINGLE
 - public final class Downloads implements BaseColumns {
 + public final class Downloads {
 private Downloads ( ) { }

 COMMENT


<nb> public class OHazelcastDistributedDatabase implements ODistributedDatabase {
 final IQueue queue = entry . getValue ( ) ;

 if ( queue != null ) {
 - System . out . println ( String . format ( STRING0 , getLocalNodeName ( ) , entry . getKey ( ) , queue . size ( ) ) ) ;
 -
 if ( queueMaxSize > NUMBER0 && queue . size ( ) > queueMaxSize ) {
 ODistributedServerLog . warn ( this , getLocalNodeName ( ) , iNodes . toString ( ) , DIRECTION . OUT ,
 STRING1 , queue . size ( ) ) ;


<nb> public class RxTest extends RandomData {
 final List < Person > people = new ArrayList < > ( ) ;
 data . select ( Person . class ) . limit ( NUMBER0 ) . get ( )
 . toObservable ( )
 - . observeOn ( Schedulers . newThread ( ) )
 - . subscribeOn ( Schedulers . immediate ( ) )
 . subscribe ( new Action1 < Person > ( ) {
 @ override
 public void call ( Person person ) {


<nb> import NAMESPACE ;

 import static NAMESPACE ;

 - public final class AssignmentWithType extends Expression implements WithKey {
 + public final class AssignmentWithType extends Expression implements WithKey {
 private final String type ;
 private final String key ;
 private final String value ;
 <nb>
 package NAMESPACE ;

 - public class ExternalAssignment extends Expression implements WithKey {
 + public final class ExternalAssignment extends Expression implements WithKey {
 private final String key ;
 private final Object oldValue ;
 private final Object newValue ;

use different expression type for external assignments


<nb>
 package NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public final class OrthographicCamera {
 COMMENT
 COMMENT
 public float getScreenToWorldX ( float screenX ) {
 + screenX = screenX / Gdx . graphics . getWidth ( ) * viewportWidth ;
 return ( screenX * scale ) - ( viewportWidth * scale ) / NUMBER0 + position . x ;
 }

 <nb> public final class OrthographicCamera {
 COMMENT
 COMMENT
 public float getScreenToWorldY ( float screenY ) {
 + screenY = screenY / Gdx . graphics . getHeight ( ) * viewportHeight ;
 return ( ( viewportHeight - screenY - NUMBER1 ) * scale )
 - ( viewportHeight * scale ) / NUMBER0 + position . y ;
 }

fix getScreenToWorldX and getScreenToWorldY return wrong translation if screensize


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

 + import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 import static NAMESPACE ;
 <nb> public class AttachmentProcessorFactoryTests extends ESTestCase {
 factory . create ( config ) ;
 fail ( STRING0 ) ;
 } catch ( ElasticsearchParseException e ) {
 - assertThat ( e . getMessage ( ) , equalTo ( STRING1 +
 - STRING2 ) ) ;
 + assertThat ( e . getMessage ( ) , containsString ( STRING3 ) ) ;
 + SINGLE
 + for ( AttachmentProcessor . Field field : AttachmentProcessor . Field . values ( ) ) {
 + assertThat ( e . getMessage ( ) , containsString ( field . name ( ) ) ) ;
 + }
 }

 config = new HashMap < > ( ) ;

Fix AttachmentProcessorFactoryTests to only check for existing fields


<nb> public class Accounts extends K9ListActivity implements OnItemClickListener {
 new String [ ] { STRING0 , STRING1 } ,
 new String [ ] { STRING2 , STRING3 } ,
 new String [ ] { STRING4 , STRING5 } ,
 - new String [ ] { STRING6 , STRING7 }
 + new String [ ] { STRING6 , STRING7 } ,
 + new String [ ] { STRING8 , STRING9 }
 } ;

 private void onAbout ( ) {


<nb> public class DefaultRecordStore implements RecordStore {
 SINGLE
 Collection < Object > keysObject = new ArrayList < Object > ( keysToDelete . size ( ) ) ;
 for ( Data key : keysToDelete ) {
 - SINGLE
 - removeIndex ( key ) ;
 keysObject . add ( mapService . toObject ( key ) ) ;
 }

 <nb> public class DefaultRecordStore implements RecordStore {
 toBeRemovedKeys . removeAll ( keysToDelete ) ;
 }

 + for ( Data key : keysToDelete ) {
 + SINGLE
 + removeIndex ( key ) ;
 + }
 +
 clearRecordsMap ( lockedRecords ) ;
 cancelAssociatedSchedulers ( keysToDelete ) ;
 resetAccessSequenceNumber ( ) ;


<nb> public class DBTCPConnector implements DBConnector {
 boolean secondaryOk = ! ( readPref == ReadPreference . primary ( ) ) ;

 _checkClosed ( ) ;
 - if ( ! secondaryOk )
 + SINGLE
 + if ( ! secondaryOk || getReplicaSetStatus ( ) == null )
 checkMaster ( false , ! secondaryOk ) ;

 final MyPort mp = _myPort . get ( ) ;

Fixing a regression introduced in the previous commit for this issue


<nb> public class FileSystemUtils {
 }
 }

 - private static ByteSource asByteSource ( final Path path ) {
 + COMMENT
 + COMMENT
 + COMMENT
 + public static ByteSource asByteSource ( final Path path ) {
 return new ByteSource ( ) {
 @ override public InputStream openStream ( ) throws IOException {
 return path . getInputStream ( ) ;

Expose the asByteSource method in FileSystemUtils


<nb> public class EnglishTaggerTest extends TestCase {
 }

 public void testTagger ( ) throws IOException {
 - myAssert ( STRING0 , STRING1 ) ;
 - myAssert ( STRING2 , STRING3 ) ;
 - myAssert ( STRING4 , STRING5 ) ;
 + myAssert ( STRING0 , STRING6 ) ;
 + myAssert ( STRING2 , STRING7 ) ;
 + myAssert ( STRING4 , STRING8 ) ;
 myAssert ( STRING9 , STRING10 ) ;
 myAssert ( STRING11 , STRING12 ) ;
 myAssert ( STRING13 , STRING14 ) ;


<nb> class ShowTOCAction extends FBAndroidAction {
 }

 static boolean isTOCAvailable ( FBReaderApp reader ) {
 - return
 - reader != null &&
 - reader . Model != null &&
 - reader . Model . TOCTree != null &&
 - reader . Model . TOCTree . hasChildren ( ) ;
 + if ( reader == null ) {
 + return false ;
 + }
 + final BookModel model = reader . Model ;
 + return model != null && model . TOCTree . hasChildren ( ) ;
 }

 @ override


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

 - import NAMESPACE ;
 -
 import NAMESPACE ;
 import NAMESPACE ;

 <nb> public class PersistenceInjectionTests extends AbstractEntityManagerFactoryBeanT
 public static class DefaultVendorSpecificPrivatePersistenceContextField {

 @ persistencecontext
 - private HibernateEntityManager em ;
 + @ suppresswarnings ( STRING0 )
 + private org . hibernate . ejb . HibernateEntityManager em ;
 }

 <nb> public class PersistenceInjectionTests extends AbstractEntityManagerFactoryBeanT
 throw new IllegalStateException ( ) ;
 }
 }
 +
 }

Suppress deprecation warning in PersistenceInjectionTests


<nb> public class ReaderPostDetailFragment extends Fragment
 showToolbar ( true ) ;
 showFooter ( true ) ;
 }
 +
 + trackRelatedPostsIfShowing ( ) ;
 }

 private void showToolbar ( boolean show ) {

Returned missing call to trackRelatedPostsIfShowing


<nb> public abstract class BaseCrashReportDialog extends Activity {
 if ( ACRA . DEV_LOGGING ) ACRA . log . d ( LOG_TAG , STRING0 ) ;
 cancelReports ( ) ;
 finish ( ) ;
 - } else if ( ( sConfig instanceof ACRAConfiguration ) && ( sReportFile instanceof File ) && ( sException instanceof Throwable ) ) {
 + } else if ( ( sConfig instanceof ACRAConfiguration ) && ( sReportFile instanceof File ) && ( ( sException instanceof Throwable ) || sException == null ) ) {
 config = ( ACRAConfiguration ) sConfig ;
 reportFile = ( File ) sReportFile ;
 exception = ( Throwable ) sException ;


<nb> public class NetworkController extends BroadcastReceiver {
 combinedActivityIconId = mMobileActivityIconId ;
 combinedSignalIconId = mDataSignalIconId ; SINGLE
 mContentDescriptionCombinedSignal = mContentDescriptionDataType ;
 + } else {
 + mobileLabel = mHasMobileDataFeature ?
 + context . getString ( R . string . status_bar_settings_signal_meter_disconnected ) : STRING0 ;
 }

 if ( mWifiConnected ) {

Always show appropriate mobile service label


<nb> public final class TvInputManager {
 mPendingEvents . removeAt ( index ) ;

 if ( timeout ) {
 - Log . w ( TAG , STRING0
 + Log . w ( TAG , STRING1
 + INPUT_SESSION_NOT_RESPONDING_TIMEOUT + STRING2 + mToken ) ;
 } else {
 mHandler . removeMessages ( InputEventHandler . MSG_TIMEOUT_INPUT_EVENT , p ) ;


<nb> public class AmbrosePigProgressNotificationListener implements PigProgressNotifi
 return ;
 }

 + mapReduceHelper . addMapReduceJobState ( job , pigConfig . getJobClient ( ) ) ;
 addCompletedJobStats ( node . getJob ( ) , stats ) ;
 AmbroseUtils . pushEvent ( statsWriteService , scriptId , new Event . JobFailedEvent ( node ) ) ;
 }
 <nb> public class AmbrosePigProgressNotificationListener implements PigProgressNotifi
 return ;
 }

 + mapReduceHelper . addMapReduceJobState ( job , pigConfig . getJobClient ( ) ) ;
 addCompletedJobStats ( node . getJob ( ) , stats ) ;
 AmbroseUtils . pushEvent ( statsWriteService , scriptId , new Event . JobFinishedEvent ( node ) ) ;
 }

update mapreduce state even on completion and failure for pig


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ checkreturnvalue
 @ gwtcompatible
 public final class Collections2 {
 private Collections2 ( ) { }
 <nb> public final class Collections2 {
 COMMENT
 SINGLE
 SINGLE
 - @ checkreturnvalue
 public static < E > Collection < E > filter (
 Collection < E > unfiltered , Predicate < ? super E > predicate ) {
 if ( unfiltered instanceof FilteredCollection ) {
 <nb> public final class Collections2 {
 COMMENT
 COMMENT
 COMMENT
 - @ checkreturnvalue
 public static < F , T > Collection < T > transform ( Collection < F > fromCollection ,
 Function < ? super F , T > function ) {
 return new TransformedCollection < F , T > ( fromCollection , function ) ;


<nb> public class LocalZooKeeperCluster
 private final PortPolicy serverSecondPortPolicy ;
 private final Collection < ZooKeeperServerWrapper > wrappers =
 new ArrayList < ZooKeeperServerWrapper > ( ) ;
 + private Collection < String > serversConfig ;

 public LocalZooKeeperCluster ( int size , DataDirectoryPolicy dataDirectoryPolicy ,
 PortPolicy clientPortPolicy , PortPolicy serverFirstPortPolicy ,
 <nb> public class LocalZooKeeperCluster
 servers . add ( STRING0 + serverFirstPortPolicy . getPort ( id ) + STRING1 +
 serverSecondPortPolicy . getPort ( id ) ) ;
 }
 + this . serversConfig = servers ;

 for ( int i = NUMBER0 ; i < size ; i ++ )
 {
 <nb> public class LocalZooKeeperCluster
 waitForClusterToBeFullyStarted ( ) ;
 }

 + public Collection < String > getZooKeeperServersConfig ( )
 + {
 + return serversConfig ;
 + }
 +
 private void waitForClusterToBeFullyStarted ( )
 {
 try

Added a method for getting the zoo keeper servers config


<nb> public class HTTP {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + static public void sendHttpPutRequest ( String url ) {
 + HttpUtil . executeUrl ( STRING0 , url , NUMBER0 ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class HTTP {
 HttpUtil . executeUrl ( STRING1 , url , NUMBER0 ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + static public void sendHttpDeleteRequest ( String url ) {
 + HttpUtil . executeUrl ( STRING2 , url , NUMBER0 ) ;
 + }
 +
 }

added missing http operations put delete


<nb> public abstract class BinaryMemcacheDecoder < M extends BinaryMemcacheMessage < H > ,
 return ;
 }

 - currentKey = readBytes ( ctx . alloc ( ) , in , keyLength ) . toString ( CharsetUtil . UTF_8 ) ;
 + currentKey = in . toString ( in . readerIndex ( ) , keyLength , CharsetUtil . UTF_8 ) ;
 + in . skipBytes ( keyLength ) ;
 }

 out . add ( buildMessage ( currentHeader , currentExtras , currentKey ) ) ;

Fix a buffer leak in BinaryMemcacheDecoder


<nb> public class RecentsActivity extends Activity implements RecentsView . RecentsView

 @ override
 public void onBackPressed ( ) {
 + SINGLE
 + if ( mConfig . debugModeEnabled ) return ;
 +
 SINGLE
 if ( mFullScreenOverlayView == null ||
 ! mFullScreenOverlayView . cancelAnimateOnEnterRecents ( mFinishRunnable ) ) {


<nb> public class RecyclerViewDragDropManager {
 COMMENT
 COMMENT
 COMMENT
 - public boolean getInitiateOnLongPress ( ) {
 + public boolean isInitiateOnLongPressEnabled ( ) {
 return mInitiateOnLongPress ;
 }

 <nb> public class RecyclerViewDragDropManager {
 COMMENT
 COMMENT
 COMMENT
 - public boolean getInitiateOnMove ( ) {
 + public boolean isInitiateOnMoveEnabled ( ) {
 return mInitiateOnMove ;
 }

Rename some RecyclerViewDragDropManager methods


<nb> public class TreeViewer extends JComponent {
 @ notnull
 protected static JDialog showInDialog ( final TreeViewer viewer ) {
 final JDialog dialog = new JDialog ( ) ;
 + dialog . setTitle ( STRING0 ) ;

 SINGLE
 final Container mainPane = new JPanel ( new BorderLayout ( NUMBER0 , NUMBER0 ) ) ;

Add a default title to the TreeViewer dialog


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

 CoreApplicationEnvironment . registerExtensionPoint ( Extensions . getRootArea ( ) , ReadWriteAccessDetector . EP_NAME , ReadWriteAccessDetector . class ) ;
 appEnvironment . addExtension ( ReadWriteAccessDetector . EP_NAME , new GroovyReadWriteAccessDetector ( ) ) ;
 + if ( GroovyElementTypes . ADDITIVE_EXPRESSION == null ) throw new IllegalStateException ( ) ; SINGLE
 }

 protected ExternalResourceManagerEx createExternalResourceManager ( ) {

initialize and register stub serializers


<nb> public class InjectionsSettingsUI implements Configurable {
 private List < BaseInjection > getSelectedInjections ( ) {
 final ArrayList < BaseInjection > toRemove = new ArrayList < BaseInjection > ( ) ;
 for ( int row : myInjectionsTable . getSelectedRows ( ) ) {
 - toRemove . add ( myInjectionsTable . getItems ( ) . get ( row ) ) ;
 + toRemove . add ( myInjectionsTable . getItems ( ) . get ( myInjectionsTable . convertRowIndexToModel ( row ) ) ) ;
 }
 return toRemove ;
 }
 <nb> public class InjectionsSettingsUI implements Configurable {
 @ nullable
 private BaseInjection getSelectedInjection ( ) {
 final int row = myInjectionsTable . getSelectedRow ( ) ;
 - return row < NUMBER0 ? null : myInjectionsTable . getItems ( ) . get ( row ) ;
 + return row < NUMBER0 ? null : myInjectionsTable . getItems ( ) . get ( myInjectionsTable . convertRowIndexToModel ( row ) ) ;
 }

 private void performAdd ( final AnActionEvent e ) {

clicking on entry opens wrong detail editor


<nb> public class LocalNotification extends CordovaPlugin {
 }

 COMMENT
 + COMMENT
 + COMMENT
 + @ override
 + public void onDestroy ( ) {
 + deviceready = false ;
 + isInBackground = true ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class WorkspaceAndProjectGenerator {
 }

 private void addTestNodeAndDependencies (
 - TargetNode < ? > testBundleBuildTarget ,
 + TargetNode < ? > testBundleTargetNode ,
 ImmutableSet . Builder < TargetNode < ? > > recursiveTestTargetNodesBuilder ,
 ImmutableSet . Builder < TargetNode < ? > > orderedTestBundleTargetNodesBuilder ) {
 Iterable < TargetNode < ? > > testBundleTargetDependencies =
 AppleBuildRules . getRecursiveTargetNodeDependenciesOfTypes (
 projectGraph ,
 AppleBuildRules . RecursiveDependenciesMode . BUILDING ,
 - projectGraph . get ( testBundleBuildTarget . getBuildTarget ( ) ) ,
 + testBundleTargetNode ,
 Optional . < ImmutableSet < BuildRuleType > > absent ( ) ) ;
 recursiveTestTargetNodesBuilder . addAll ( testBundleTargetDependencies ) ;
 - recursiveTestTargetNodesBuilder . add ( testBundleBuildTarget ) ;
 - orderedTestBundleTargetNodesBuilder . add ( testBundleBuildTarget ) ;
 + recursiveTestTargetNodesBuilder . add ( testBundleTargetNode ) ;
 + orderedTestBundleTargetNodesBuilder . add ( testBundleTargetNode ) ;
 }
 }

Remove an unnecessary target graph node lookup


<nb>
 package NAMESPACE ;

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

 <nb> public class ShadowValueAnimator extends ShadowAnimator {
 @ resetter
 public static void reset ( ) {
 ValueAnimator . clearAllAnimations ( ) ;
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + ReflectionHelpers . setStaticField ( ValueAnimator . class , STRING0 , new ThreadLocal < > ( ) ) ;
 }
 }

Fix test pollution in ShadowValueAnimator


<nb> public class OCommandExecutorSQLLiveSelect extends OCommandExecutorSQLSelect imp
 }

 private boolean matchesFilters ( OIdentifiable value ) {
 - return true ; SINGLE
 + if ( this . compiledFilter == null || this . compiledFilter . getRootCondition ( ) == null ) {
 + return true ;
 + }
 + if ( ! ( value instanceof ODocument ) ) {
 + value = value . getRecord ( ) ;
 + }
 + return ! ( Boolean . FALSE . equals ( compiledFilter . evaluate ( ( ODocument ) value , ( ODocument ) value , getContext ( ) ) ) ) ;
 }

 private boolean matchesTarget ( OIdentifiable value ) {

finished filter implementation on live query