<nb> public class MyProfileActivity extends AppCompatActivity {
 }

 private void updateLabel ( WPTextView textView , String text ) {
 + textView . setText ( text ) ;
 if ( text == null || text . isEmpty ( ) ) {
 textView . setVisibility ( View . GONE ) ;
 }
 else {
 textView . setVisibility ( View . VISIBLE ) ;
 - textView . setText ( text ) ;
 }
 }

Fixed a bug where you couldn t delete your my profile labels


<nb> public class EpisodeDetailsActivity extends BaseActivity {
 setContentView ( R . layout . episode_pager ) ;

 final ActionBar actionBar = getSupportActionBar ( ) ;
 - actionBar . setTitle ( getString ( R . string . episode ) ) ;
 - actionBar . setDisplayShowTitleEnabled ( true ) ;
 + actionBar . setDisplayShowTitleEnabled ( false ) ;

 List < Episode > episodes = new ArrayList < Episode > ( ) ;
 String episodeId = getIntent ( ) . getExtras ( ) . getString ( Episodes . _ID ) ;

Don t display an actionbar title while showing an episode in a single


<nb> public class PluginProcessManager {
 apk = pluginInfo . applicationInfo . publicSourceDir ;
 }
 if ( apk != null ) {
 - ClassLoader classloader = new PluginClassLoader ( apk , optimizedDirectory , libraryPath , ClassLoader . getSystemClassLoader ( ) ) ;
 + ClassLoader classloader = null ;
 + try {
 + classloader = new PluginClassLoader ( apk , optimizedDirectory , libraryPath , ClassLoader . getSystemClassLoader ( ) ) ;
 + } catch ( Exception e ) {
 + }
 + if ( classloader == null ) {
 + PluginDirHelper . cleanOptimizedDirectory ( optimizedDirectory ) ;
 + classloader = new PluginClassLoader ( apk , optimizedDirectory , libraryPath , ClassLoader . getSystemClassLoader ( ) ) ;
 + }
 synchronized ( loadedApk ) {
 FieldUtils . writeDeclaredField ( loadedApk , STRING0 , classloader ) ;
 }

Can not create PluginClassLoader on some devices


<nb> public class NativeLibrary {
 RenderingRuleSearchRequest request , boolean skipDuplicates , int renderRouteDataFile , Object objectWithInterruptedField ,
 String msgIfNothingFound ) ;

 + protected static native boolean initFontType ( byte [ ] byteData , String name , boolean bold , boolean italic ) ;

 COMMENT
 SINGLE


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

Added note in JavaDoc that the ChatStateManager getInstace need be called in order to receive chat state notifications


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PlanPrinter
 }

 @ override
 - protected Void visitPlan ( PlanNode node , Integer context )
 + public Void visitApply ( ApplyNode node , Integer indent )
 + {
 + print ( indent , STRING0 , node . getCorrelation ( ) , formatOutputs ( node . getOutputSymbols ( ) ) ) ;
 + printStats ( indent + NUMBER0 , node . getId ( ) ) ;
 +
 + return processChildren ( node , indent + NUMBER1 ) ;
 + }
 +
 + @ override
 + protected Void visitPlan ( PlanNode node , Integer indent )
 {
 throw new UnsupportedOperationException ( STRING1 + node . getClass ( ) . getName ( ) ) ;
 }

Add missing PlanPrinter visitApply method


<nb> public class DLFileEntryIndexer extends BaseIndexer {
 long searchRepositoryId = GetterUtil . getLong (
 searchContext . getAttribute ( STRING0 ) ) ;

 - searchQuery . addRequiredTerm ( STRING1 , searchRepositoryId ) ;
 + if ( searchRepositoryId != NUMBER0 ) {
 + searchQuery . addRequiredTerm ( STRING1 , searchRepositoryId ) ;
 + }

 String keywords = searchContext . getKeywords ( ) ;


<nb> public class PackageManagerService extends IPackageManager . Stub {

 enforceDeclaredAsUsedAndRuntimePermission ( pkg , bp ) ;

 - uid = pkg . applicationInfo . uid ;
 + uid = UserHandle . getUid ( userId , pkg . applicationInfo . uid ) ;
 sb = ( SettingBase ) pkg . mExtras ;
 if ( sb == null ) {
 throw new IllegalArgumentException ( STRING0 + packageName ) ;

Qualify the uid with the userId when granting permissions


<nb>
 COMMENT
 package NAMESPACE ;

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

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

 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BasicHttpProxyToHttpTest {
 private Server proxy ;

 @ suppresswarnings ( STRING0 )
 - public static class BasicAuthProxyServlet extends AsyncProxyServlet {
 + public static class BasicAuthProxyServlet extends ProxyServlet {

 @ override
 public void service ( ServletRequest req , ServletResponse res ) throws ServletException , IOException {


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class JavaInstallationProbe {
 exec . executable ( javaExe ( jdkPath , STRING0 ) ) ;
 File workingDir = Files . createTempDir ( ) ;
 exec . setWorkingDir ( workingDir ) ;
 + exec . setClasspath ( new SimpleFileCollection ( workingDir ) ) ;
 try {
 writeProbe ( workingDir ) ;
 exec . setMain ( JavaProbe . CLASSNAME ) ;

Explicitly set classpath attempt to fix Windows test


<nb> public class TaskListFragment extends ListFragment implements OnScrollListener ,
 SINGLE
 setHasOptionsMenu ( true ) ;

 + syncActionHelper = new SyncActionHelper ( getActivity ( ) , this ) ;
 setUpUiComponents ( ) ;
 onNewIntent ( getActivity ( ) . getIntent ( ) ) ;
 setupQuickAddBar ( ) ;
 <nb> public class TaskListFragment extends ListFragment implements OnScrollListener ,
 Thread . currentThread ( ) . setPriority ( Thread . MAX_PRIORITY ) ;
 }
 } ) ;
 +
 }

 COMMENT
 <nb> public class TaskListFragment extends ListFragment implements OnScrollListener ,
 setListAdapter ( taskAdapter ) ;
 getListView ( ) . setOnScrollListener ( this ) ;
 registerForContextMenu ( getListView ( ) ) ;
 - syncActionHelper = new SyncActionHelper ( getActivity ( ) , this ) ;

 loadTaskListContent ( true ) ;
 }

Create the sync action helper in task list when activity is created so it is never null


<nb> class Slurper implements Runnable {
 if ( collection == null ) {
 for ( String name : slurpedDb . getCollectionNames ( ) ) {
 DBCollection slurpedCollection = slurpedDb . getCollection ( name ) ;
 - addQueryToStream ( operation , currentTimestamp , update , collection , slurpedCollection ) ;
 + addQueryToStream ( operation , currentTimestamp , update , name , slurpedCollection ) ;
 }
 } else {
 DBCollection slurpedCollection = slurpedDb . getCollection ( collection ) ;

Use the actual name of the collection for the operations


<nb> public class ViewResource {
 @ produces ( STRING0 )
 @ path ( STRING1 )
 public View mustacheUTF8 ( ) {
 - return new View ( STRING2 , Charsets . UTF_8 ) {
 + return new View ( STRING3 , Charsets . UTF_8 ) {
 } ;
 }

 <nb> public class ViewResource {
 @ produces ( STRING4 )
 @ path ( STRING5 )
 public View mustacheISO88591 ( ) {
 - return new View ( STRING6 , Charsets . ISO_8859_1 ) {
 + return new View ( STRING7 , Charsets . ISO_8859_1 ) {
 } ;
 }
 }

Fixing wrong paths to mustache views in dropwizard example


<nb> public class BasicAdminBufferStrategyTest
 private final BasicAdminBufferStrategy mediaDriverStrategy = new BasicAdminBufferStrategy ( ADMIN_DIR , NUMBER0 , true ) ;
 private final BasicAdminBufferStrategy apiStrategy = new BasicAdminBufferStrategy ( ADMIN_DIR , NUMBER1 , false ) ;

 - @ test ( expected = IllegalStateException . class )
 - public void mediaDriverDoesntMapApiBuffer ( ) throws IOException
 - {
 - mediaDriverStrategy . toApi ( ) ;
 - }
 -
 - @ test ( expected = IllegalStateException . class )
 - public void apiDoesntMapMediaDriverBuffer ( ) throws IOException
 - {
 - apiStrategy . toMediaDriver ( ) ;
 - }
 -
 @ test
 public void mediaDriverBuffersAreTheSame ( ) throws IOException
 {


<nb> public final class ProxyHandler implements HttpHandler {
 @ override
 public void failed ( HttpServerExchange exchange ) {
 if ( ! exchange . isResponseStarted ( ) ) {
 - exchange . setResponseCode ( NUMBER0 ) ;
 + exchange . setResponseCode ( NUMBER1 ) ;
 exchange . endExchange ( ) ;
 } else {
 IoUtils . safeClose ( exchange . getConnection ( ) ) ;


<nb> public class PhoneWindowManager implements WindowManagerPolicy {
 COMMENT
 COMMENT
 private boolean canHideNavigationBar ( ) {
 - return mHasNavigationBar
 - && ! mAccessibilityManager . isTouchExplorationEnabled ( ) ;
 + return mHasNavigationBar ;
 }

 @ override
 <nb> public class PhoneWindowManager implements WindowManagerPolicy {
 COMMENT
 COMMENT
 private boolean areTranslucentBarsAllowed ( ) {
 - return mTranslucentDecorEnabled
 - && ! mAccessibilityManager . isTouchExplorationEnabled ( ) ;
 + return mTranslucentDecorEnabled ;
 }

 SINGLE

Allow translucent and hidden system bars when EBT is turned on


<nb> public class RequireThisCheck extends Check {
 COMMENT
 COMMENT
 COMMENT
 - protected final boolean isClassField ( DetailAST ident ) {
 + private boolean isClassField ( DetailAST ident ) {
 final LexicalFrame frame = findFrame ( ident , false ) ;
 return frame instanceof ClassFrame
 && ( ( ClassFrame ) frame ) . hasInstanceMember ( ident ) ;
 <nb> public class RequireThisCheck extends Check {
 COMMENT
 COMMENT
 COMMENT
 - protected final boolean isClassMethod ( DetailAST ident ) {
 + private boolean isClassMethod ( DetailAST ident ) {
 final LexicalFrame frame = findFrame ( ident , true ) ;
 return frame instanceof ClassFrame
 && ( ( ClassFrame ) frame ) . hasInstanceMethod ( ident ) ;

Make methods private in RequireThisCheck


<nb> public class KMeans extends ClusteringModelBuilder < KMeansModel , KMeansModel . KMean
 SINGLE
 randomRow ( vecs , rand , centers [ NUMBER0 ] , means , mults ) ;

 + model . _output . _iterations = NUMBER0 ;
 while ( model . _output . _iterations < NUMBER1 ) {
 SINGLE
 SumSqr sqr = new SumSqr ( centers , means , mults , _isCats ) . doAll ( vecs ) ;
 <nb> public class KMeans extends ClusteringModelBuilder < KMeansModel , KMeansModel . KMean
 }
 SINGLE
 centers = recluster ( centers , rand , _parms . _k , _parms . _init , _isCats ) ;
 - model . _output . _iterations = - NUMBER2 ; SINGLE
 + model . _output . _iterations = NUMBER0 ; SINGLE
 }
 }
 return centers ;

Set the iters counter during kmeans center initialization correctly


<nb> public class EffectTrack implements ClonableTrack {

 public KillParticleControl ( ) {
 }
 -
 +
 @ override
 public void setSpatial ( Spatial spatial ) {
 super . setSpatial ( spatial ) ;
 <nb> public class EffectTrack implements ClonableTrack {

 @ override
 protected void controlUpdate ( float tpf ) {
 - if ( remove ) {
 + if ( remove ) {
 emitter . removeControl ( this ) ;
 return ;
 }
 <nb> public class EffectTrack implements ClonableTrack {
 return c ;

 }
 -
 -
 } ;

 SINGLE
 <nb> public class EffectTrack implements ClonableTrack {
 }

 public void onAnimChange ( AnimControl control , AnimChannel channel , String animName ) {
 - stop ( ) ;
 }
 }

fixed an issue when emitter wouldn t emit again once the animation was done and loopMode was set to DontLoop


<nb> public class FileSystemUtils {
 byte [ ] buffer = new byte [ limit ] ;
 try ( InputStream inputStream = byteSource . openBufferedStream ( ) ) {
 int read = ByteStreams . read ( inputStream , buffer , NUMBER0 , limit ) ;
 - return Arrays . copyOf ( buffer , read ) ;
 + return read == limit ? buffer : Arrays . copyOf ( buffer , read ) ;
 }
 }

Avoid copying file contents when reading the expected number of bytes in readContentWithLimit


<nb> import NAMESPACE ;

 import static NAMESPACE ;

 + @ deprecated
 public class ModuleBuilder {
 private static Map < ArtifactBuilderTestCase , Pair < AtomicInteger , AtomicInteger > > testCaseToNameCounter = new THashMap < ArtifactBuilderTestCase , Pair < AtomicInteger , AtomicInteger > > ( ) ;

deprecate unused helper class which leads to unnecessary complications in JPS build tests


<nb> public class SvnMergeProvider implements MergeProvider {
 catch ( SVNException e ) {
 SINGLE
 }
 + SINGLE
 + final VirtualFile parent = file . getParent ( ) ;
 + if ( parent != null ) {
 + parent . refresh ( true , false ) ;
 + }
 }

 }

refresh directory after marking file as resolved


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class Clock extends TextView {
 - private final Handler mHandler = new Handler ( ) ;
 private boolean mAttached ;
 private Calendar mCalendar ;
 private String mClockFormatString ;
 <nb> public class Clock extends TextView {
 filter . addAction ( Intent . ACTION_TIMEZONE_CHANGED ) ;
 filter . addAction ( Intent . ACTION_CONFIGURATION_CHANGED ) ;

 - getContext ( ) . registerReceiver ( mIntentReceiver , filter , null , mHandler ) ;
 + getContext ( ) . registerReceiver ( mIntentReceiver , filter , null , getHandler ( ) ) ;
 }

 SINGLE

Use the built in handler instead of allocating another one


<nb> public class Specs {
 }

 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 @ deprecated
 <nb> public class Specs {
 return new NotSpec < T > ( spec ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 public static < T > Spec < T > negate ( Spec < ? super T > spec ) {
 if ( spec == SATISFIES_ALL ) {
 return satisfyNone ( ) ;
 <nb> public class Specs {
 }

 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 @ deprecated


<nb> public class SettingsMonitoringActivity extends SettingsBaseActivity {

 private void createLoggingSection ( PreferenceScreen grp ) {
 PreferenceCategory cat = new PreferenceCategory ( this ) ;
 - cat . setTitle ( R . string . save_track_to_gpx ) ;
 + cat . setTitle ( R . string . save_track_to_gpx_globally ) ;
 grp . addPreference ( cat ) ;
 +
 + Preference globalrecord = new Preference ( this ) ;
 + globalrecord . setSummary ( R . string . save_track_to_gpx_globally_descr ) ;
 + cat . addPreference ( globalrecord ) ;

 Preference pref = new Preference ( this ) ;
 pref . setTitle ( R . string . save_current_track ) ;

add descriptive text for global track recording


<nb>

 package NAMESPACE ;

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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 public class ServerStarter {

 + private static final Logger Log = LoggerFactory . getLogger ( ServerStarter . class ) ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public class ServerStarter {
 containerClass . newInstance ( ) ;
 }
 catch ( Exception e ) {
 - e . printStackTrace ( ) ;
 + Log . error ( e . getMessage ( ) , e ) ;
 }
 }

Replace custom logging implementation with a third party library


<nb> public class WordCountTuples {
 public static void main ( String [ ] args ) throws Exception {

 final ExecutionEnvironment env = ExecutionEnvironment . getExecutionEnvironment ( ) ;
 - env . setDegreeOfParallelism ( NUMBER0 ) ;

 DataSet < String > text = env . fromElements ( STRING0 , STRING1 , STRING2 , STRING3 , STRING4 ) ;

 DataSet < Tuple2 < String , Integer > > result = text . flatMap ( new Tokenizer ( ) ) . groupBy ( NUMBER1 ) . reduce ( new Counter ( ) ) ;

 result . print ( ) ;
 -
 - SINGLE
 env . execute ( ) ;
 }
 }
 <nb> public abstract class ExecutionEnvironment {
 }

 public static ExecutionEnvironment createLocalEnvironment ( ) {
 - return new LocalEnvironment ( ) ;
 + int defaultDop = Runtime . getRuntime ( ) . availableProcessors ( ) ;
 + return createLocalEnvironment ( defaultDop ) ;
 }

 public static ExecutionEnvironment createLocalEnvironment ( int degreeOfParallelism ) {

LocalEnvironment used the number of processor cores as the default DOP


<nb> public class CompileStack implements Opcodes {

 for ( Iterator iterator = usedVariables . iterator ( ) ; iterator . hasNext ( ) ; ) {
 BytecodeVariable v = ( BytecodeVariable ) iterator . next ( ) ;
 - String type = BytecodeHelper . getTypeDescription ( v . getType ( ) ) ;
 + ClassNode t = v . getType ( ) ;
 + if ( v . isHolder ( ) ) t = ClassHelper . REFERENCE_TYPE ;
 + String type = BytecodeHelper . getTypeDescription ( t ) ;
 Label start = v . getStartLabel ( ) ;
 Label end = v . getEndLabel ( ) ;
 mv . visitLocalVariable ( v . getName ( ) , type , null , start , end , v . getIndex ( ) ) ;

make Reference type appear in the variable type correctly


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

 <nb> public class DebugLogs extends BaseActivity {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 private String getLogs ( ) throws IOException {
 <nb> public class DebugLogs extends BaseActivity {
 ( isRadioLogs ? STRING0 : STRING1 ) +
 STRING2 +
 STRING3 +
 - STRING4 + STRING5
 + STRING4 +
 + STRING6 + STRING5
 ) ;
 }


<nb> public class XmppConnection extends ImConnection implements CallbackHandler {
 else
 mConfig = new ConnectionConfiguration ( domain , serverPort , mProxyInfo ) ;

 - server = domain ;
 + SINGLE

 } else {
 debug ( TAG , STRING0 + server + STRING1 + serverPort + STRING1
 + domain + STRING2 ) ;

 - String serviceName = domain ;
 + SINGLE

 - if ( server != null && ( ! server . endsWith ( STRING3 ) ) ) SINGLE
 - serviceName = server ;
 + SINGLE
 + SINGLE

 if ( mProxyInfo == null )
 - mConfig = new ConnectionConfiguration ( server , serverPort , serviceName ) ;
 + mConfig = new ConnectionConfiguration ( server , serverPort , domain ) ;
 else
 - mConfig = new ConnectionConfiguration ( server , serverPort , serviceName , mProxyInfo ) ;
 + mConfig = new ConnectionConfiguration ( server , serverPort , domain , mProxyInfo ) ;
 }


<nb> class PeepholeMinimizeConditions
 return tryMinimizeIf ( node ) ;

 case Token . EXPR_RESULT :
 - tryMinimizeCondition ( node . getFirstChild ( ) , true ) ;
 + tryMinimizeCondition ( node . getFirstChild ( ) , false ) ;
 return node ;

 case Token . HOOK :
 <nb> class PeepholeMinimizeConditions
 COMMENT
 COMMENT
 private Node tryMinimizeNot ( Node n ) {
 + Preconditions . checkArgument ( n . isNot ( ) ) ;
 Node parent = n . getParent ( ) ;

 Node notChild = n . getFirstChild ( ) ;
 <nb> public class PeepholeMinimizeConditionsTest extends CompilerTestCase {
 STRING0 ) ;
 }

 + public void testMinimizeExprResult ( ) {
 + fold ( STRING1 , STRING2 ) ;
 + fold ( STRING3 , STRING4 ) ;
 + fold ( STRING5 , STRING4 ) ;
 + }
 +
 public void testMinimizeDemorgan21 ( ) {
 fold ( STRING6 ,
 STRING7 ) ;


<nb> public class EntryProcessorTest extends HazelcastTestSupport {
 }

 instance1 . shutdown ( ) ;
 - waitAllForSafeState ( ) ;
 + waitAllForSafeState ( instance2 , instance3 ) ;

 IMap < Integer , Integer > map3 = instance3 . getMap ( STRING0 ) ;


<nb> public class TasksWidget extends AppWidgetProvider {
 if ( ! query . contains ( subtaskJoin ) ) {
 query = subtaskJoin + query ;
 query = query . replaceAll ( STRING0 , STRING1 ) ;
 - query = query + String . format ( STRING2 ,
 + query = query + String . format ( STRING3 ,
 Task . DELETION_DATE , Task . COMPLETION_DATE ,
 - SubtasksMetadata . ORDER , Task . CREATION_DATE ) ;
 + SubtasksMetadata . ORDER , Task . CREATION_DATE ,
 + numberOfTasks ) ;
 query = query . replace ( TaskCriteria . isVisible ( ) . toString ( ) ,
 Criterion . all . toString ( ) ) ;

Include the sql limit in the widget when subtasks enabled


<nb> public class GitVcs extends AbstractVcs < CommittedChangeList > {
 private RepositoryChangeListener myIndexChangeListener ;
 private GitCurrentBranchWidget myCurrentBranchWidget ;

 - public static GitVcs getInstance ( @ notnull Project project ) {
 - return ( GitVcs ) ProjectLevelVcsManager . getInstance ( project ) . findVcsByName ( NAME ) ;
 + @ nullable
 + public static GitVcs getInstance ( Project project ) {
 + if ( project == null || project . isDisposed ( ) ) {
 + return null ;
 + }
 + return ( GitVcs ) ProjectLevelVcsManager . getInstance ( project ) . findVcsByName ( NAME ) ;
 }

 public GitVcs ( @ notnull Project project ,

returning null in case of already disposed project


<nb> public class LzfDecoder extends ByteToMessageDecoder {

 ByteBuf uncompressed = ctx . alloc ( ) . heapBuffer ( originalLength , originalLength ) ;
 final byte [ ] outputArray = uncompressed . array ( ) ;
 - final int outPos = uncompressed . arrayOffset ( ) ;
 + final int outPos = uncompressed . arrayOffset ( ) + uncompressed . writerIndex ( ) ;

 boolean success = false ;
 try {

Consider writerIndex when LzfDecoder writes into a new heap buffer


<nb> public class CheckInDialogFragment extends SherlockDialogFragment {
 updateCheckInButtonState ( ) ;
 return ;
 } else {
 - SINGLE
 - new CheckInTask ( imdbid , message , getActivity ( ) ) . execute ( ) ;
 + SINGLE
 + AndroidUtils . executeAsyncTask ( new CheckInTask ( imdbid , message ,
 + getActivity ( ) ) , new Void [ ] { } ) ;
 }
 }

GetGlue Check In task execs on thread pool


<nb> public final class CFMetaData
 if ( cf_def . isSetMerge_shards_chance ( ) ) { newCFMD . mergeShardsChance ( cf_def . merge_shards_chance ) ; }
 if ( cf_def . isSetRow_cache_provider ( ) ) { newCFMD . rowCacheProvider ( FBUtilities . newCacheProvider ( cf_def . row_cache_provider ) ) ; }
 if ( cf_def . isSetKey_alias ( ) ) { newCFMD . keyAlias ( cf_def . key_alias ) ; }
 + if ( cf_def . isSetKey_validation_class ( ) ) { newCFMD . keyValidator ( DatabaseDescriptor . getComparator ( cf_def . key_validation_class ) ) ; }

 return newCFMD . comment ( cf_def . comment )
 . rowCacheSize ( cf_def . row_cache_size )

set key validator when creating a keyspace


<nb> public abstract class SpiceServiceListenerNotificationService extends Service {
 return null ;
 }

 + public Class < ? extends SpiceService > getSpiceServiceClass ( ) {
 + return spiceServiceClass ;
 + }
 +
 @ suppresswarnings ( { STRING0 , STRING1 } )
 @ override
 public final void onStart ( final Intent intent , final int startId ) {


<nb> public class SourceFormatter {
 String trimmedLine = StringUtil . trimLeading ( line ) ;
 String trimmedPreviousLine = StringUtil . trimLeading ( previousLine ) ;

 + if ( ! trimmedLine . equals ( STRING0 ) && line . contains ( STRING0 ) &&
 + ! line . contains ( STRING1 ) && ! line . contains ( STRING2 ) ) {
 +
 + line = StringUtil . replace ( line , STRING0 , STRING2 ) ;
 + }
 +
 + if ( line . contains ( STRING3 ) && ! line . contains ( STRING4 ) ) {
 + line = StringUtil . replace ( line , STRING3 , STRING4 ) ;
 + }
 +
 if ( trimmedPreviousLine . equals ( STRING0 ) && Validator . isNotNull ( line ) &&
 ! trimmedLine . equals ( STRING5 ) ) {


<nb> public class BundleBuildCommand extends SingleFileCommand {
 public void handleFile ( Path file ) throws IOException {
 if ( outFile == null ) {
 String fileName = PathUtils . getBaseName ( file ) ;
 - outFile = file . getParent ( ) . resolve ( fileName ) ;
 + outFile = file . getParent ( ) . resolve ( fileName + STRING0 ) ;
 }
 AssetBundleUtils . build ( file , outFile ) ;
 }


<nb> 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 ;
 <nb> public class AppleBundle extends AbstractBuildRule {
 SINGLE
 SINGLE
 SINGLE
 + stepsBuilder . add ( new RmStep ( outputZipPath , COMMENT true ) ) ;
 stepsBuilder . add (
 new ZipStep (
 outputZipPath ,

Delete output path for AppleBundle before trying to write it


<nb> public class CommittableUtil {

 public static void queueReset ( Committable committable ) {
 ourApplication . assertIsDispatchThread ( ) ;
 - if ( CommandProcessor . getInstance ( ) . getCurrentCommand ( ) != null || CommandProcessor . getInstance ( ) . isUndoTransparentActionInProgress ( ) ) {
 - ourResetQueue . add ( committable ) ;
 - } else {
 + ourResetQueue . add ( committable ) ;
 + if ( ! ourResetQueue . contains ( committable ) && CommandProcessor . getInstance ( ) . getCurrentCommand ( ) == null &&
 + ! CommandProcessor . getInstance ( ) . isUndoTransparentActionInProgress ( ) ) {
 committable . reset ( ) ;
 + ourResetQueue . remove ( committable ) ;
 }
 }


<nb> class ProxyThread implements Runnable {
 private boolean keepSocketOpen = false ;

 private static Object semaphoreSingleton = new Object ( ) ;
 + private static int id = NUMBER0 ;

 private static Vector < Thread > proxyThreadList = new Vector < > ( ) ;

 <nb> class ProxyThread implements Runnable {
 log . warn ( e . getMessage ( ) , e ) ;
 }

 - thread = new Thread ( this , STRING0 ) ; SINGLE
 + thread = new Thread ( this , STRING1 + id ++ ) ; SINGLE
 thread . setDaemon ( true ) ;
 thread . setPriority ( Thread . NORM_PRIORITY - NUMBER0 ) ;
 }


<nb> final class AndroidSound implements Sound {
 float rightVolume = volume ;

 if ( pan < NUMBER0 ) {
 - leftVolume *= ( NUMBER1 - Math . abs ( pan ) ) ;
 - } else if ( pan > NUMBER0 ) {
 rightVolume *= ( NUMBER1 - Math . abs ( pan ) ) ;
 + } else if ( pan > NUMBER0 ) {
 + leftVolume *= ( NUMBER1 - Math . abs ( pan ) ) ;
 }

 soundPool . setVolume ( ( int ) soundId , leftVolume , rightVolume ) ;


<nb> public class ProgressDialog extends JDialog implements IProgress {
 if ( run != null ) {
 run . run ( ) ;
 }
 - isLive = false ;
 } catch ( RuntimeException e ) {
 exception = new InvocationTargetException ( e ) ;
 } finally {
 - SwingUtilities . invokeLater ( new Runnable ( ) {
 - @ override
 - public void run ( ) {
 - setVisible ( false ) ;
 - }
 - } ) ;
 + isLive = false ;
 }
 + SwingUtilities . invokeLater ( new Runnable ( ) {
 + @ override
 + public void run ( ) {
 + setVisible ( false ) ;
 + }
 + } ) ;
 }

 }


<nb>
 COMMENT
 package NAMESPACE ;

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


<nb> public class ApplicationImpl extends ComponentManagerImpl implements Application
 assertCanRunWriteAction ( ) ;
 fireBeforeWriteActionStart ( action ) ;

 + LOG . assertTrue ( myActionsLock . isWriteLockAcquired ( Thread . currentThread ( ) ) || ! Thread . holdsLock ( PsiLock . LOCK ) , STRING0 ) ;
 myIsWaitingForWriteAction = true ;
 try {
 myActionsLock . writeLock ( ) . acquire ( ) ;

do not run write action from within PsiLock


<nb> public class ClusterInfoServiceIT extends ESIntegTestCase {
 }
 for ( DiskUsage usage : mostUsages . values ( ) ) {
 logger . info ( STRING0 , usage ) ;
 - assertThat ( STRING1 , usage . getFreeBytes ( ) , greaterThan ( NUMBER0 L ) ) ;
 + assertThat ( STRING1 , usage . getFreeBytes ( ) , greaterThanOrEqualTo ( NUMBER0 L ) ) ;
 }
 for ( Long size : shardSizes . values ( ) ) {
 logger . info ( STRING2 , size ) ;

TEST Use greaterThanOrEqualTo for testClusterInfoServiceCollectsInformation


<nb> public class KmlDemoActivity extends BaseDemoActivity {
 try {
 KmlLayer kmlLayer = new KmlLayer ( mMap , R . raw . campus , getApplicationContext ( ) ) ;
 kmlLayer . addLayerToMap ( ) ;
 + moveCameraToKml ( kmlLayer ) ;
 } catch ( IOException e ) {
 e . printStackTrace ( ) ;
 } catch ( XmlPullParserException e ) {

Move camera to KML layer from local file in demo


<nb> public class TachyonFile implements Comparable < TachyonFile > {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 + public FileOutStream getOutStream ( WriteType writeType ) throws IOException {
 + return getOutStream ( ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public FileOutStream getOutStream ( ) throws IOException {
 if ( isCompleted ( ) ) {
 throw new IOException ( STRING0 ) ;
 <nb> public class TachyonFile implements Comparable < TachyonFile > {
 FileInfo info = getUnCachedFileStatus ( ) ;
 OutStreamOptions . Builder optionsBuilder = new OutStreamOptions . Builder ( mTachyonConf ) ;
 optionsBuilder . setBlockSizeBytes ( info . getBlockSizeBytes ( ) ) ;
 -
 optionsBuilder . setTachyonStorageType ( tachyonStorageType ) ;
 optionsBuilder . setUnderStorageType ( underStorageType ) ;
 return mTFS . getOutStream ( mFileId , optionsBuilder . build ( ) ) ;


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


<nb> public class GroovyCategorySupport {
 } ;

 private static void newScope ( ) {
 - System . out . println ( STRING0 + getProperties ( ) ) ;
 List stack = ( List ) local . get ( ) ;
 Map properties = new WeakHashMap ( getProperties ( ) ) ;
 stack . add ( properties ) ;
 - System . out . println ( STRING1 ) ;
 }

 private static void endScope ( ) {
 - System . out . println ( STRING2 + getProperties ( ) ) ;
 List stack = ( List ) local . get ( ) ;
 stack . remove ( stack . size ( ) - NUMBER0 ) ;
 - System . out . println ( STRING3 + getProperties ( ) ) ;
 - System . out . println ( STRING4 ) ;
 }

 private static Map getProperties ( ) {


<nb> public class BroadcasterConfig {
 config . properties ( ) . put ( STRING0 , STRING1 ) ;
 }

 - protected BroadcasterConfig broadcasterID ( String name ) {
 + protected BroadcasterConfig broadcasterID ( String broadcasterId ) {
 this . broadcasterId = broadcasterId ;
 initClusterExtension ( ) ;
 return this ;


<nb> public class PageIndicator extends View {
 if ( mDotType == DotType . MULTIPLE || i == mActiveDot ) {
 state = mExtraState ;
 }
 + SINGLE
 + SINGLE
 + SINGLE
 + d . setCallback ( null ) ;
 d . setState ( state ) ;
 + d . setCallback ( this ) ;
 }
 d . draw ( canvas ) ;
 canvas . translate ( mDotSpacing + d . getIntrinsicWidth ( ) , NUMBER0 ) ;

Prevent the PageIndicator from invalidating its content over and over again


<nb> public class BeaconConfigFragment extends Fragment implements TextView . OnEditorA
 if ( status != BluetoothGatt . GATT_SUCCESS ) {
 Log . e ( TAG , STRING0 + status ) ;
 } else {
 - String url = ( uriBeacon != null ) ? uriBeacon . getUriString ( ) : STRING1 ;
 + SINGLE
 + String url = STRING1 ;
 + try {
 + url = ( uriBeacon != null ) ? uriBeacon . getUriString ( ) : STRING1 ;
 + }
 + catch ( Exception e ) {
 + }
 Log . d ( TAG , STRING2 + STRING3 + url ) ;
 if ( UrlShortener . isShortUrl ( url ) ) {
 url = UrlShortener . lengthenShortUrl ( url ) ;


<nb> public class LinearLayout extends ViewGroup {
 return ( mShowDividers & SHOW_DIVIDER_BEGINNING ) != NUMBER0 ;
 } else if ( childIndex == getChildCount ( ) ) {
 return ( mShowDividers & SHOW_DIVIDER_END ) != NUMBER0 ;
 - } else {
 - return ( mShowDividers & SHOW_DIVIDER_MIDDLE ) != NUMBER0 ;
 + } else if ( ( mShowDividers & SHOW_DIVIDER_MIDDLE ) != NUMBER0 ) {
 + boolean hasVisibleViewBefore = false ;
 + for ( int i = childIndex - NUMBER1 ; i >= NUMBER0 ; i -- ) {
 + if ( getChildAt ( i ) . getVisibility ( ) != GONE ) {
 + hasVisibleViewBefore = true ;
 + break ;
 + }
 + }
 + return hasVisibleViewBefore ;
 }
 + return false ;
 }

 COMMENT

Don t draw a middle divider on the first visible view


<nb> public class ContextConfig implements LifecycleListener {

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class QNMinimizer implements Minimizer < DiffFunction > , HasEvaluators {
 say ( STRING0 ) ;
 break ;
 default :
 - sayln ( STRING1 ) ;
 - System . exit ( NUMBER0 ) ;
 - break ;
 -
 + throw new IllegalArgumentException ( STRING2 ) ;
 }
 }

 newValue = newPoint [ f ] ;
 - System . err . print ( STRING3 + nf . format ( newPoint [ a ] ) ) ;
 + say ( STRING3 ) ;
 + say ( nf . format ( newPoint [ a ] ) ) ;
 say ( STRING4 ) ;

 SINGLE

Throw exception not System exit change a System err print to say


<nb> public class DB {
 COMMENT
 COMMENT
 public void dropDatabase ( ) {
 - database . commands ( ) . drop ( ) ;
 + database . admin ( ) . drop ( ) ;
 }
 }


<nb> public abstract class AbstractWizard < T extends Step > extends DialogWrapper {
 return myPreviousButton ;
 }

 + protected JButton getHelpButton ( ) {
 + return myHelpButton ;
 + }
 +
 public JButton getCancelButton ( ) {
 return myCancelButton ;
 }


<nb> public class IdeEventQueue extends EventQueue {
 }

 private IdeEventQueue ( ) {
 - EventQueue systemEventQueue = Toolkit . getDefaultToolkit ( ) . getSystemEventQueue ( ) ;
 - assert ! ( systemEventQueue instanceof IdeEventQueue ) : systemEventQueue ;
 - systemEventQueue . push ( this ) ;
 + final Application application = ApplicationManager . getApplication ( ) ;
 + if ( application == null || ! application . isUnitTestMode ( ) ) {
 + EventQueue systemEventQueue = Toolkit . getDefaultToolkit ( ) . getSystemEventQueue ( ) ;
 + assert ! ( systemEventQueue instanceof IdeEventQueue ) : systemEventQueue ;
 + systemEventQueue . push ( this ) ;
 + }
 addIdleTimeCounterRequest ( ) ;

 final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager . getCurrentKeyboardFocusManager ( ) ;

Do not push new event queue in test mode


<nb> public class K9AlarmManager {
 alarmManager . setAndAllowWhileIdle ( type , triggerAtMillis , operation ) ;
 }

 - @ targetapi ( Build . VERSION_CODES . KITKAT )
 - public void setExact ( int type , long triggerAtMillis , PendingIntent operation ) {
 - if ( isDozeSupported ( ) && isDozeWhiteListed ( ) ) {
 - setExactAndAllowWhileIdle ( type , triggerAtMillis , operation ) ;
 - } else {
 - alarmManager . setExact ( type , triggerAtMillis , operation ) ;
 - }
 - }
 -
 - @ targetapi ( Build . VERSION_CODES . M )
 - public void setExactAndAllowWhileIdle ( int type , long triggerAtMillis , PendingIntent operation ) {
 - alarmManager . setExactAndAllowWhileIdle ( type , triggerAtMillis , operation ) ;
 - }
 -
 -
 public void cancel ( PendingIntent operation ) {
 alarmManager . cancel ( operation ) ;
 }


<nb> public class ScopeViewPane extends AbstractProjectViewPane {
 private final DependencyValidationManager myDependencyValidationManager ;
 private final NamedScopeManager myNamedScopeManager ;
 private final NamedScopesHolder . ScopeListener myScopeListener ;
 - public static final Icon ICON = IconLoader . getIcon ( STRING0 ) ;
 + public static final Icon ICON = IconLoader . getIcon ( STRING1 ) ;

 public ScopeViewPane ( final Project project , ProjectView projectView , DependencyValidationManager dependencyValidationManager , NamedScopeManager namedScopeManager ) {
 super ( project ) ;


<nb> public class ScopeTreeViewPanel extends JPanel implements JDOMExternalizable , Di
 }
 } , false ) ;
 }
 - else if ( element != null && element . isValid ( ) ) {
 + else if ( element instanceof PsiDirectory && element . isValid ( ) ) {
 queueRefreshScope ( scope ) ;
 }
 }

do not refresh scope for inner file replacements


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public final class CommandLineTools {

 SINGLE
 if ( xmlMode == StringTools . XmlPrintMode . NORMAL_XML ) {
 - displayTimeStats ( startTime , lt . getSentenceCount ( ) , apiFormat ) ;
 + SentenceTokenizer sentenceTokenizer = lt . getLanguage ( ) . getSentenceTokenizer ( ) ;
 + int sentenceCount = sentenceTokenizer . tokenize ( contents ) . size ( ) ;
 + displayTimeStats ( startTime , sentenceCount , apiFormat ) ;
 }
 return ruleMatches . size ( ) ;
 }


<nb> import NAMESPACE ;

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

 <nb> public class TestScopeVoter {
 Collections . < ConfigAttribute > singleton ( new SecurityConfig ( STRING0 ) ) ) ) ;
 }

 - @ test ( expected = InsufficientScopeException . class )
 + @ test ( expected = AccessDeniedException . class )
 public void testExceptionThrownIfWrongScopesPresent ( ) throws Exception {
 AuthorizationRequest clientAuthentication = new AuthorizationRequest ( STRING1 , Collections . singleton ( STRING2 ) ,
 null , null ) ;


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


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class GitRebaseEditor extends DialogWrapper {
 myTableModel . load ( file ) ;
 myCommitsTable . setModel ( myTableModel ) ;
 myCommitsTable . setSelectionMode ( ListSelectionModel . SINGLE_INTERVAL_SELECTION ) ;
 + myCommitsTable . setIntercellSpacing ( JBUI . emptySize ( ) ) ;

 final JComboBox editorComboBox = new JComboBox ( ) ;
 for ( Object option : GitRebaseEntry . Action . values ( ) ) {


<nb> public class Capsule implements Runnable {
 throw new RuntimeException ( STRING0 + jarFile , e ) ;
 }

 + initAppId ( ) ; SINGLE
 +
 loadCaplets ( ) ;
 this . wrapper = isEmptyCapsule ( ) ;

 <nb> public class Capsule implements Runnable {
 }

 private void initAppId ( ) {
 + if ( oc . appId != null )
 + return ;
 final String [ ] nameAndVersion = buildAppId ( ) ;
 if ( nameAndVersion == null )
 return ;
 <nb> public class Capsule implements Runnable {
 SINGLE
 SINGLE
 protected final Capsule loadCaplet ( String caplet , Capsule pred ) {
 - if ( isDependency ( caplet ) ) {
 + if ( isDependency ( caplet ) || caplet . endsWith ( STRING1 ) ) {
 final List < Path > jars = getPath ( caplet ) ;
 if ( jars . size ( ) != NUMBER0 )
 throw new RuntimeException ( STRING2 + caplet + STRING3 ) ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT

 COMMENT
 - public interface LookupService {
 + public interface LookupService < T > {

 COMMENT
 COMMENT


<nb> public class PorterDuff {
 COMMENT
 MULTIPLY ( NUMBER0 ) ,
 COMMENT
 - SCREEN ( NUMBER1 ) ;
 + SCREEN ( NUMBER1 ) ,
 + COMMENT
 + ADD ( NUMBER2 ) ,
 + OVERLAY ( NUMBER3 ) ;

 Mode ( int nativeInt ) {
 this . nativeInt = nativeInt ;

Add Overlay mode to the PorterDuff list of supported modes


<nb> public class IssuesDecoratorTest {
 verify ( context ) . saveMeasure ( CoreMetrics . ISSUES , FLOAT0 ) ;
 }

 + @ test
 + public void should_do_nothing_when_issuable_is_null ( ) {
 + ResourcePerspectives perspectives = mock ( ResourcePerspectives . class ) ;
 + when ( perspectives . as ( Issuable . class , resource ) ) . thenReturn ( null ) ;
 + IssuesDecorator decorator = new IssuesDecorator ( perspectives , rulefinder ) ;
 +
 + decorator . decorate ( resource , context ) ;
 +
 + verifyZeroInteractions ( context ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT


<nb> public class IntentFilter implements Parcelable {
 throws MalformedMimeTypeException {
 mPriority = NUMBER0 ;
 mActions = new ArrayList < String > ( ) ;
 + addAction ( action ) ;
 addDataType ( dataType ) ;
 }

Fix IntentFilter constructor to properly process the action parameter


<nb> public class LayerUpdater implements Updater {
 case Step :
 conf . setLearningRateByParam ( variable , lr * Math . pow ( decayRate , Math . floor ( iteration / conf . getLrPolicySteps ( ) ) ) ) ;
 break ;
 + case TorchStep :
 + if ( iteration > NUMBER0 && conf . getLrPolicySteps ( ) % iteration == NUMBER1 )
 + conf . setLearningRateByParam ( variable , lr * decayRate ) ;
 + break ;
 case Poly :
 conf . setLearningRateByParam ( variable , lr * Math . pow ( ( NUMBER0 - ( ( double ) iteration ) / conf . getNumIterations ( ) ) , conf . getLrPolicyPower ( ) ) ) ;
 break ;

Add TorchStep missed in merge refactoring


<nb> public class GraphStructure {
 if ( ! node . getEdgesOutTree ( ) . isEmpty ( ) ) {
 for ( edgeIterator . setNode ( node . getEdgesOutTree ( ) ) ; edgeIterator . hasNext ( ) ; ) {
 AbstractEdge edge = edgeIterator . next ( ) ;
 - AbstractNode sourceCopy = newStructure . getNodeAt ( edge . getSource ( ) . getPre ( ) ) ;
 - AbstractNode targetCopy = newStructure . getNodeAt ( edge . getTarget ( ) . getPre ( ) ) ;
 + AbstractNode sourceCopy = newStructure . getNodeAt ( node . getPre ( ) ) ;
 + AbstractNode targetCopy = newStructure . getNodeAt ( ( ( AbstractNode ) edge . getTarget ( ) . getNodeData ( ) . getNode ( view . getViewId ( ) ) ) . getPre ( ) ) ;
 sourceCopy . getEdgesOutTree ( ) . add ( edge ) ;
 targetCopy . getEdgesInTree ( ) . add ( edge ) ;
 addToDictionnary ( edge ) ;


<nb> public class InjectedLanguageUtil {
 return editor ;
 }

 - static PsiFile getTopLevelFile ( @ notnull PsiElement element ) {
 + public static PsiFile getTopLevelFile ( @ notnull PsiElement element ) {
 PsiFile containingFile = element . getContainingFile ( ) ;
 if ( containingFile == null ) return null ;
 Document document = PsiDocumentManager . getInstance ( element . getProject ( ) ) . getCachedDocument ( containingFile ) ;
 <nb> package NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SameDirectoryWeigher extends ProximityWeigher {
 } ) ;

 private static PsiDirectory getParentDirectory ( PsiElement element ) {
 + PsiFile file = InjectedLanguageUtil . getTopLevelFile ( element ) ;
 + if ( file != null ) {
 + element = file ;
 + }
 while ( element != null && ! ( element instanceof PsiDirectory ) ) {
 element = element . getParent ( ) ;
 }

don t load ast when sorting by proximity


<nb> public class UnionQueryRunner < T > implements QueryRunner < T >
 {
 DataSource dataSource = query . getDataSource ( ) ;
 if ( dataSource instanceof UnionDataSource ) {
 - System . out . println ( STRING0 + dataSource . getMetricName ( ) ) ;
 return Sequences . concat (
 Iterables . transform (
 ( ( UnionDataSource ) dataSource ) . getDataSources ( ) ,
 <nb> public class UnionQueryRunner < T > implements QueryRunner < T >
 @ override
 public Sequence < T > apply ( DataSource singleSource )
 {
 - System . out . println ( STRING1 + singleSource . getNames ( ) ) ;
 return baseRunner . run (
 query . withDataSource ( singleSource )
 ) ;


<nb> class ActivityUtils {
 return activity ;
 }

 + COMMENT
 + public boolean isActivityStackEmpty ( ) {
 + return activityStack . isEmpty ( ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> public class Solo {
 {
 return waiter . waitForActivity ( activityClass , timeout ) ;
 }
 -
 -
 +
 + COMMENT
 +
 + public boolean waitForActivityStackToBeEmpty ( int timeout )
 + {
 + return waiter . waitForCondition (
 + new Condition ( ) {
 + @ override
 + public boolean isSatisfied ( ) {
 + return activityUtils . isActivityStackEmpty ( ) ;
 + }
 + } , timeout ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT


<nb> public class OffsetDateTimeField extends DecoratedDateTimeField {
 COMMENT
 COMMENT
 public OffsetDateTimeField ( DateTimeField field , int offset ) {
 - this ( field , field . getType ( ) , offset , Integer . MIN_VALUE , Integer . MAX_VALUE ) ;
 + this ( field , ( field == null ? null : field . getType ( ) ) , offset , Integer . MIN_VALUE , Integer . MAX_VALUE ) ;
 }

 COMMENT


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

 import NAMESPACE ;
 <nb> public class LocalHistoryActionsTest extends LocalHistoryUITestCase {
 @ override
 @ nullable
 public Object getData ( String id ) {
 - if ( CommonDataKeys . VIRTUAL_FILE_ARRAY . is ( id ) ) return files ;
 + if ( VcsDataKeys . VIRTUAL_FILE_STREAM . is ( id ) ) return VcsUtil . toStream ( files ) ;
 if ( CommonDataKeys . EDITOR . is ( id ) ) return editor ;
 if ( CommonDataKeys . PROJECT . is ( id ) ) return p ;
 return null ;

Fixed LocalHistoryActionsTest tests provided correct DataContext


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public class TermSession {
 private ColorScheme mColorScheme = BaseTextRenderer . defaultColorScheme ;
 <nb> public class TermSession {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 protected void processInput ( byte [ ] data , int offset , int count ) {
 mEmulator . append ( data , offset , count ) ;


<nb> public class RasterMapMenu {
 if ( type == OsmandRasterMapsPlugin . RasterMapType . UNDERLAY ) {
 contextMenuAdapter . addItem ( new ContextMenuItem . ItemBuilder ( )
 . setTitleId ( R . string . show_polygons , mapActivity )
 + . hideDivider ( true )
 . setListener ( l )
 . setSelected ( hidePolygonsPref . get ( ) ) . createItem ( ) ) ;
 }


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

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

 <nb> public class SiteMain {
 . add ( TextTemplateModule . class , conf - >
 conf . setStaticallyCompile ( true )
 )
 + . bindInstance ( CompressionConfig . of ( ) . compressResponses ( true ) . minSize ( NUMBER0 ) . blackListMimeTypes ( Collections . emptyList ( ) ) . build ( ) )
 )
 )
 . handlers ( c - > {


<nb> public class ListView extends AbsListView {
 if ( gainFocus && previouslyFocusedRect != null ) {
 previouslyFocusedRect . offset ( mScrollX , mScrollY ) ;

 + final ListAdapter adapter = mAdapter ;
 + final int firstPosition = mFirstPosition ;
 + SINGLE
 + if ( adapter . getCount ( ) < getChildCount ( ) + firstPosition ) {
 + mLayoutMode = LAYOUT_NORMAL ;
 + layoutChildren ( ) ;
 + }
 +
 SINGLE
 SINGLE
 Rect otherRect = mTempRect ;
 int minDistance = Integer . MAX_VALUE ;
 final int childCount = getChildCount ( ) ;
 - final int firstPosition = mFirstPosition ;
 - final ListAdapter adapter = mAdapter ;

 for ( int i = NUMBER0 ; i < childCount ; i ++ ) {
 SINGLE

Force a re layout of children if ListView is out of sync with the


<nb> public class Bundle {
 mPackageName = pkg ;
 }

 - String uri = map . getString ( STRING0 ) ;
 - if ( ! uri . startsWith ( STRING1 ) && Small . getBaseUri ( ) != null ) {
 - uri = Small . getBaseUri ( ) + uri ;
 + if ( map . has ( STRING0 ) ) {
 + String uri = map . getString ( STRING0 ) ;
 + if ( ! uri . startsWith ( STRING1 ) && Small . getBaseUri ( ) != null ) {
 + uri = Small . getBaseUri ( ) + uri ;
 + }
 + this . uriString = uri ;
 + this . uri = Uri . parse ( uriString ) ;
 }
 - this . uriString = uri ;
 - this . uri = Uri . parse ( uriString ) ;
 +
 this . rules = new HashMap < String , String > ( ) ;
 SINGLE
 this . rules . put ( STRING2 , STRING2 ) ;


<nb> public class AtmosphereFramework implements ServletContextProvider {
 }
 }

 - protected void initWebSocket ( ) {
 + public void initWebSocket ( ) {
 if ( webSocketProtocolInitialized ) return ;
 if ( webSocketProtocol == null ) {
 try {


<nb> public class ChangelistTable extends Composite
 table_ . setPageSize ( items . size ( ) ) ;
 dataProvider_ . getList ( ) . clear ( ) ;
 dataProvider_ . getList ( ) . addAll ( items ) ;
 + ColumnSortEvent . fire ( table_ ,
 + table_ . getColumnSortList ( ) ) ;
 +
 }

 public ArrayList < StatusAndPath > getSelectedItems ( )

In VCS table apply sort order after setting items


<nb> package NAMESPACE ;
 import NAMESPACE ;

 public class TestXByteBuffer extends TestCase {
 - @ override
 - protected void setUp ( ) throws Exception {
 - super . setUp ( ) ;
 - }
 -
 +
 public void testEmptyArray ( ) throws Exception {
 SINGLE
 }

 - @ override
 - protected void tearDown ( ) throws Exception {
 - super . tearDown ( ) ;
 + public void testSerializationString ( ) throws Exception {
 + String test = STRING0 ;
 + byte [ ] msg = XByteBuffer . serialize ( test ) ;
 + Object obj = XByteBuffer . deserialize ( msg ) ;
 + assertTrue ( obj instanceof String ) ;
 + assertEquals ( test , obj ) ;
 }
 -
 +
 public static void main ( String [ ] args ) throws Exception {
 SINGLE
 XByteBuffer . deserialize ( new byte [ ] { - NUMBER0 , - NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER2 , NUMBER6 , NUMBER7 } ) ;


<nb> public class JacksonTest
 assertThat ( mapper . getFactory ( ) ) . isSameAs ( factory ) ;
 }

 + @ test
 + public void objectMapperCanHandleNullInsteadOfCustomJsonFactory ( ) {
 + ObjectMapper mapper = Jackson . newObjectMapper ( null ) ;
 +
 + assertThat ( mapper . getFactory ( ) ) . isNotNull ( ) ;
 + }
 +
 }

Added more tests to ensure that Jackson newObjectMapper can handle null as parameter


<nb> public final class FileDataManager {
 if ( ! mUfs . exists ( parentPath ) ) {
 final int maxRetry = NUMBER0 ;
 int numRetry = NUMBER1 ;
 + SINGLE
 for ( ; numRetry < maxRetry ; numRetry ++ ) {
 if ( mUfs . mkdirs ( parentPath , true ) || mUfs . exists ( parentPath ) ) {
 break ;


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

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class ReduceSinkMapJoinProc implements NodeProcessor {

 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class PlanUtils {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public static TableDesc getMapJoinValueTableDesc (
 List < FieldSchema > fieldSchemas ) {
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public class CounterStatsAggregatorTez implements StatsAggregator {

 private static final Log LOG = LogFactory . getLog ( CounterStatsAggregatorTez . class . getName ( ) ) ;

Fix some javadoc issues on Tez branch Gunther Hagleitner


<nb> public class Language {

 COMMENT
 static public String text ( String text ) {
 - String result = init ( ) . bundle . getString ( text ) ;
 - return ( result == null ) ? text : result ;
 + ResourceBundle bundle = init ( ) . bundle ;
 +
 + try {
 + return bundle . getString ( text ) ;
 + } catch ( MissingResourceException e ) {
 + return text ;
 + }
 }

Catch MissingResourceException when language key is missing


<nb> public class ReaderRelatedPostsView extends LinearLayout {

 private OnRelatedPostClickListener mClickListener ;
 private int mFeaturedImageWidth ;
 - private ReaderRelatedPostList mRelatedPostList ;
 + private final ReaderRelatedPostList mRelatedPostList = new ReaderRelatedPostList ( ) ;

 public ReaderRelatedPostsView ( Context context ) {
 super ( context ) ;
 <nb> public class ReaderRelatedPostsView extends LinearLayout {
 }

 public void showRelatedPosts ( @ nonnull ReaderRelatedPostList posts , String siteName , boolean isGlobal ) {
 - mRelatedPostList = posts ;
 + mRelatedPostList . clear ( ) ;
 + mRelatedPostList . addAll ( posts ) ;

 ViewGroup container = ( ViewGroup ) findViewById ( R . id . container_related_posts ) ;
 container . removeAllViews ( ) ;
 <nb> public class ReaderRelatedPostsView extends LinearLayout {
 }
 }

 + public ReaderRelatedPostList getRelatedPosts ( ) {
 + return mRelatedPostList ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT

Expose the post list in ReaderRelatedPostsView


<nb> public class SignatureToolTipManager
 if ( coordinates_ == null && ! uiPrefs_ . showFunctionTooltipOnIdle ( ) . getGlobalValue ( ) )
 return ;

 + SINGLE
 + if ( ! isMouseDrivenEvent ( ) && toolTip_ . isShowing ( ) )
 + return ;
 +
 resolveActiveFunctionAndDisplayToolTip ( ) ;
 }
 } ;

avoid re positioning sigtip if already showing after completion insertion


<nb> package NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 + import NAMESPACE ;

 public class SavedCookieTest extends TestCase {

 <nb> public class SavedCookieTest extends TestCase {
 assertEquals ( cookie . getVersion ( ) , other . getVersion ( ) ) ;
 }

 + public void testSerializable ( ) throws Exception {
 + assertTrue ( savedCookie instanceof Serializable ) ;
 + }
 }

Added Serializable check just to be sure


<nb> public class IMapDataStructureAdapterTest extends HazelcastTestSupport {
 public void testSet ( ) {
 adapter . set ( NUMBER0 , STRING0 ) ;

 - assertEquals ( STRING0 , map . get ( NUMBER0 ) ) ; }
 + assertEquals ( STRING0 , map . get ( NUMBER0 ) ) ;
 + }

 @ test
 public void testPut ( ) {

Fixed formatting of IMapDataStructureAdapterTest


<nb> public class MainActivity extends BaseActivity implements MainPhoneFragment . Cont

 private void verifyGooglePlayServicesStatus ( ) {
 int deviceGooglePlayServicesState = GooglePlayServicesUtil . isGooglePlayServicesAvailable ( getApplicationContext ( ) ) ;
 - if ( deviceGooglePlayServicesState == ConnectionResult . SERVICE_MISSING ||
 - deviceGooglePlayServicesState == ConnectionResult . SERVICE_VERSION_UPDATE_REQUIRED ||
 - deviceGooglePlayServicesState == ConnectionResult . SERVICE_DISABLED ) {
 + if ( deviceGooglePlayServicesState == ConnectionResult . SERVICE_VERSION_UPDATE_REQUIRED ) {
 GooglePlayServicesUtil . getErrorDialog ( deviceGooglePlayServicesState ,
 this ,
 REQUEST_CODE_GOOGLE_PLAY_SERVICES_DIALOG )

Update play services verification dialog check


<nb> public class ResourceInjectionAnnotationParsingProcessor implements DeploymentUn
 }
 }

 + SINGLE
 + final boolean optionalEnvEntry = isEnvEntryType && this . isEmpty ( lookup ) ;
 SINGLE
 - final InjectionSource injectionSource = new LookupInjectionSource ( localContextName , isEnvEntryType ) ;
 + final InjectionSource injectionSource = new LookupInjectionSource ( localContextName , optionalEnvEntry ) ;
 final ResourceInjectionConfiguration injectionConfiguration = targetDescription != null ?
 new ResourceInjectionConfiguration ( targetDescription , injectionSource ) : null ;

 SINGLE
 SINGLE
 final BindingConfiguration bindingConfiguration ;
 - if ( isEnvEntryType ) {
 + if ( optionalEnvEntry ) {
 bindingConfiguration = null ;
 } else {
 bindingConfiguration = new BindingConfiguration ( localContextName , valueSource ) ;

Fix Resource env entry processing with a lookup value


<nb> public class AdHocChatRoomList
 SINGLE
 if ( serRefs == null )
 return ;
 - logger . setLevelDebug ( ) ;
 +
 for ( ServiceReference serRef : serRefs )
 {
 ProtocolProviderService protocolProvider
 <nb> public class AdHocChatRoomMsnImpl
 COMMENT
 public void sendMessage ( Message message ) throws OperationFailedException
 {
 - logger . setLevelInfo ( ) ;
 logger . info ( STRING0 + this . switchboard ) ;
 this . switchboard . sendText ( message . getContent ( ) ) ;

 <nb> public class OperationSetAdHocMultiUserChatMsnImpl
 }
 else
 {
 - logger . setLevelDebug ( ) ;
 logger . debug ( STRING1 ) ;
 }
 }
 <nb> public class AdHocChatRoomYahooImpl
 }
 catch ( Exception e )
 {
 - logger . setLevelDebug ( ) ;
 logger . debug ( STRING2
 + yahooConference . getName ( ) + e ) ;
 }

Removes explicit setting of Logger levels in ad hoc chat related code


<nb>

 package NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class OfflineMessageStrategy extends BasicModule {
 JiveGlobals . setProperty ( STRING0 , type . toString ( ) ) ;
 }

 - public void storeOffline ( Message message ) throws UnauthorizedException , UserNotFoundException {
 + public void storeOffline ( Message message ) {
 if ( message != null ) {
 Session senderSession = sessionManager . getSession ( message . getFrom ( ) ) ;
 if ( senderSession == null ) {


<nb> public class MergePolicyModule extends AbstractModule {

 @ override protected void configure ( ) {
 bind ( MergePolicyProvider . class )
 - . to ( settings . getAsClass ( STRING0 , TieredMergePolicyProvider . class ) )
 + . to ( settings . getAsClass ( STRING0 , TieredMergePolicyProvider . class , STRING1 , STRING2 ) )
 . asEagerSingleton ( ) ;
 }
 }
 <nb> public class MergeSchedulerModule extends AbstractModule {

 @ override protected void configure ( ) {
 bind ( MergeSchedulerProvider . class )
 - . to ( settings . getAsClass ( TYPE , ConcurrentMergeSchedulerProvider . class ) )
 + . to ( settings . getAsClass ( TYPE , ConcurrentMergeSchedulerProvider . class , STRING3 , STRING4 ) )
 . asEagerSingleton ( ) ;
 }
 }


<nb> public class BTreeMap < K , V >
 LeafNode l = ( LeafNode ) n ;
 SINGLE
 while ( l . keysLen ( keySerializer ) == NUMBER0 ) {
 - if ( l . next == NUMBER1 ) return null ;
 + if ( l . next == NUMBER1 )
 + throw new NoSuchElementException ( ) ;
 SINGLE
 l = ( LeafNode ) engine . get ( l . next , nodeSerializer ) ;
 }

make firstKey more effective do not load values if not needed


<nb> public class MemoryIndexStorage < Key , Value > implements IndexStorage < Key , Value >

 void clearCaches ( ) {
 if ( myMap . size ( ) == NUMBER0 ) return ;
 - String message = STRING0 + ( myIndexId != null ? myIndexId : this ) + STRING1 + myMap . size ( ) ;
 - if ( DebugAssertions . DEBUG ) FileBasedIndexImpl . LOG . info ( message ) ;
 +
 + if ( DebugAssertions . DEBUG ) {
 + String message = STRING0 + ( myIndexId != null ? myIndexId : this ) + STRING1 + myMap . size ( ) ;
 + FileBasedIndexImpl . LOG . info ( message ) ;
 + }

 for ( ChangeTrackingValueContainer < Value > v : myMap . values ( ) ) {
 v . dropMergedData ( ) ;


<nb> static class FnExpr implements Expr {
 for ( ISeq s = RT . keys ( closes ) ; s != null ; s = s . rest ( ) , ++ a )
 {
 LocalBinding lb = ( LocalBinding ) s . first ( ) ;
 + ctorgen . loadThis ( ) ;
 ctorgen . visitVarInsn ( OBJECT_TYPE . getOpcode ( Opcodes . ILOAD ) , a ) ;
 ctorgen . putField ( fntype , lb . name , OBJECT_TYPE ) ;
 }
 <nb> static class FnExpr implements Expr {

 private void emitLocal ( GeneratorAdapter gen , LocalBinding lb ) {
 if ( closes . contains ( lb ) )
 + {
 + gen . loadThis ( ) ;
 gen . getField ( fntype , lb . name , OBJECT_TYPE ) ;
 + }
 else
 gen . visitVarInsn ( OBJECT_TYPE . getOpcode ( Opcodes . ILOAD ) , lb . idx ) ;
 }

fixed bug in closed over variable access


<nb> public abstract class AST < A extends AST < A , L , N > , L extends LombokNode < A , L , N > ,
 this . imports = Collections . unmodifiableCollection ( new ArrayList < String > ( imports ) ) ;
 }

 - protected void setChanged ( ) {
 + public void setChanged ( ) {
 this . changed = true ;
 }

 <nb> public class HandleVal extends JavacASTAdapter {
 SINGLE
 }
 replacement = JavacResolution . typeToJCTree ( type , localNode . getTreeMaker ( ) , localNode . getAst ( ) ) ;
 - if ( replacement != null ) local . vartype = replacement ;
 + if ( replacement != null ) {
 + local . vartype = replacement ;
 + localNode . getAst ( ) . setChanged ( ) ;
 + }
 else local . vartype = oldVarType ;
 } catch ( JavacResolution . TypeNotConvertibleException e ) {
 localNode . addError ( STRING0 + e . getMessage ( ) ) ;

Delombok on files with only val in them without force didn t do anything


<nb> public class PyReferenceImpl implements PsiReferenceEx , PsiPolyVariantReference
 }

 SINGLE
 + @ suppresswarnings ( STRING0 )
 private static boolean USE_CACHE = true ;

 COMMENT

Suppress warning for USE_CACHE in PyReferenceImpl


<nb> public class TempClassLoader extends ConcurrentClassLoader {
 private final ClassLoader delegate ;
 private static final String MANIFEST_MF = STRING0 + File . separatorChar + STRING1 ;

 + static {
 + try {
 + ClassLoader . registerAsParallelCapable ( ) ;
 + } catch ( Throwable ignored ) { }
 + }
 +
 TempClassLoader ( final ClassLoader delegate ) {
 super ( null ) ;
 this . delegate = delegate ;

Prevent possible deadlocks relating to intermixing of parallel capable and non lockless class loaders


<nb> public class HelpManagerImpl extends HelpManager {

 if ( broker == null ) {
 ApplicationInfoEx info = ApplicationInfoEx . getInstanceEx ( ) ;
 - String productVersion = info . getMajorVersion ( ) + STRING0 + info . getMinorVersion ( ) ;
 + String minorVersion = info . getMinorVersion ( ) ;
 + int dot = minorVersion . indexOf ( STRING1 ) ;
 + if ( dot != - NUMBER0 ) {
 + minorVersion = minorVersion . substring ( NUMBER1 , dot ) ;
 + }
 + String productVersion = info . getMajorVersion ( ) + STRING0 + minorVersion ;
 String productCode = info . getPackageCode ( ) ;

 String url = info . getWebHelpUrl ( ) + STRING2 + productVersion + STRING3 + id ;

use only major minor version to build help url


<nb> public final class UpdateChecker {
 URL requestUrl = new URL ( url ) ;
 if ( ! StandardFileSystems . FILE_PROTOCOL . equals ( requestUrl . getProtocol ( ) ) ) {
 HttpConfigurable . getInstance ( ) . prepareURL ( url ) ;
 - requestUrl = new URL ( url + STRING0 + ApplicationInfo . getInstance ( ) . getBuild ( ) . asString ( ) ) ;
 + requestUrl = new URL ( url + ( url . contains ( STRING1 ) ? STRING2 : STRING1 ) + STRING3 + ApplicationInfo . getInstance ( ) . getBuild ( ) . asString ( ) ) ;
 }
 inputStreams [ NUMBER0 ] = requestUrl . openStream ( ) ;
 }


<nb> public class ContactsFragment extends BaseContactFragment {

 @ override
 public void onItemClicked ( Contact contact ) {
 - ( ( ActorMainActivity ) getActivity ( ) ) . onContactClicked ( contact ) ;
 -
 + getActivity ( ) . startActivity ( Intents . openPrivateDialog ( contact . getUid ( ) , true , getActivity ( ) ) ) ;
 }

 @ override
 <nb> public class SmileProcessor {
 }

 public static boolean containsEmoji ( CharSequence s ) {
 + if ( s == null ) {
 + return false ;
 + }
 long prev = NUMBER0 ;
 long prevLong = NUMBER0 ;
 int prevLongCount = NUMBER0 ;

workaround smiles crash with translations null bug


<nb> public class LibraryLoadTest extends TestCase {
 dst . deleteOnExit ( ) ;
 copy ( src , dst ) ;
 NativeLibrary . addSearchPath ( UNICODE , tmp ) ;
 - NativeLibrary . getInstance ( UNICODE ) ;
 + NativeLibrary nl = NativeLibrary . getInstance ( UNICODE ) ;
 + nl . dispose ( ) ;
 }

 public void testHandleObjectMethods ( ) {

ensure temp test unicode named library deleted


<nb> public class ChatWindowManager
 }

 if ( chatWindow . isVisible ( ) )
 - {
 - if ( ConfigurationManager . isAutoPopupNewMessage ( ) || setSelected )
 + {
 + if ( ConfigurationManager . isAutoPopupNewMessage ( ) )
 {
 - if ( chatWindow . getState ( ) == JFrame . ICONIFIED )
 + if ( chatWindow . getState ( ) == JFrame . ICONIFIED && setSelected )
 chatWindow . setState ( JFrame . NORMAL ) ;

 chatWindow . toFront ( ) ;

don t bring window to front if it s minimized


<nb> abstract class AbstractIndentingBackspaceHandler extends BackspaceHandlerDelegat
 @ override
 public void beforeCharDeleted ( char c , PsiFile file , Editor editor ) {
 myEnabled = false ;
 - if ( ! StringUtil . isWhiteSpace ( c ) ) {
 + if ( editor . isColumnMode ( ) || ! StringUtil . isWhiteSpace ( c ) ) {
 return ;
 }
 SmartBackspaceMode mode = getBackspaceMode ( file . getLanguage ( ) ) ;

disable smart backspace functionality in column selection mode the latter should have more priority in defining backspace behaviour


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import static NAMESPACE ;
 + import static NAMESPACE ;

 public class TabbedShowHistoryAction extends AbstractVcsAction {
 <nb> public class TabbedShowHistoryAction extends AbstractVcsAction {

 @ notnull
 private static Pair < FilePath , VirtualFile > getPathAndParentFile ( @ notnull VcsContext context ) {
 - VirtualFile [ ] files = context . getSelectedFiles ( ) ;
 - if ( files . length != NUMBER0 ) {
 - return files . length == NUMBER1 ? Pair . create ( VcsUtil . getFilePath ( files [ NUMBER0 ] ) , files [ NUMBER0 ] ) : Pair . empty ( ) ;
 + if ( context . getSelectedFilesStream ( ) . findAny ( ) . isPresent ( ) ) {
 + VirtualFile file = getIfSingle ( context . getSelectedFilesStream ( ) ) ;
 + return file != null ? Pair . create ( VcsUtil . getFilePath ( file ) , file ) : Pair . empty ( ) ;
 }

 File [ ] ioFiles = context . getSelectedIOFiles ( ) ;


<nb> public class CopyReferenceAction extends AnAction {
 DataContext dataContext = e . getDataContext ( ) ;
 boolean enabled = isEnabled ( dataContext ) ;
 e . getPresentation ( ) . setEnabled ( enabled ) ;
 + if ( e . getPlace ( ) . equals ( ActionPlaces . EDITOR_POPUP ) ) {
 + e . getPresentation ( ) . setVisible ( enabled ) ;
 + }
 + else {
 + e . getPresentation ( ) . setVisible ( true ) ;
 + }
 }

 private static boolean isEnabled ( final DataContext dataContext ) {


<nb> public class VimEmulationConfigurable implements Configurable {
 private static final class VimShortcutConflictsTable extends StripeTable {
 public VimShortcutConflictsTable ( @ notnull Model model ) {
 super ( model ) ;
 - getTableColumn ( Column . KEYSTROKE ) . setPreferredWidth ( NUMBER0 ) ;
 - getTableColumn ( Column . IDE_ACTION ) . setPreferredWidth ( NUMBER1 ) ;
 + getTableColumn ( Column . KEYSTROKE ) . setPreferredWidth ( NUMBER2 ) ;
 + getTableColumn ( Column . IDE_ACTION ) . setPreferredWidth ( NUMBER3 ) ;
 final TableColumn ownerColumn = getTableColumn ( Column . OWNER ) ;
 final ComboBoxTableRenderer < ShortcutOwner > renderer = new ShortcutOwnerRenderer ( ) ;
 - ownerColumn . setPreferredWidth ( NUMBER0 ) ;
 + ownerColumn . setPreferredWidth ( NUMBER4 ) ;
 ownerColumn . setCellRenderer ( renderer ) ;
 ownerColumn . setCellEditor ( renderer ) ;
 }


<nb> import NAMESPACE ;
 public class Routing implements Action < Chain > {

 public void execute ( Chain chain ) {
 - chain . add ( Handlers . get ( new Handler ( ) {
 + chain . add ( Handlers . get ( STRING0 , new Handler ( ) {
 public void handle ( Exchange exchange ) {
 exchange . getResponse ( ) . send ( exchange . getRequest ( ) . getUri ( ) ) ;
 }

Put the handler under a URL to exercise the mapping code


<nb> public class IsolatedContext extends ContextWrapper {
 }

 @ override
 + public void unregisterReceiver ( BroadcastReceiver receiver ) {
 + SINGLE
 + }
 +
 + @ override
 public void sendBroadcast ( Intent intent ) {
 mBroadcastIntents . add ( intent ) ;
 }

Added noop unregisterReceiver to complement existing noop registerReceiver


<nb> class NoBodyOutputStream extends ServletOutputStream {
 lStrings . getString ( STRING0 ) ) ;
 }

 - if ( offset < NUMBER0 || len < NUMBER0 || offset + len < buf . length ) {
 + if ( offset < NUMBER0 || len < NUMBER0 || offset + len > buf . length ) {
 String msg = lStrings . getString ( STRING1 ) ;
 Object [ ] msgArgs = new Object [ NUMBER1 ] ;
 msgArgs [ NUMBER0 ] = Integer . valueOf ( offset ) ;
 msgArgs [ NUMBER2 ] = Integer . valueOf ( len ) ;
 - msgArgs [ NUMBER3 ] = Integer . valueOf ( offset + len ) ;
 + msgArgs [ NUMBER3 ] = Integer . valueOf ( buf . length ) ;
 msg = MessageFormat . format ( msg , msgArgs ) ;
 throw new IndexOutOfBoundsException ( msg ) ;
 }


<nb> public class XMLRPCUtils {
 return url ;
 }
 } catch ( XMLRPCUtilsException e ) {
 + if ( e . kind == XMLRPCUtilsException . Kind . ERRONEOUS_SSL_CERTIFICATE ||
 + e . kind == XMLRPCUtilsException . Kind . HTTP_AUTH_REQUIRED ||
 + e . kind == XMLRPCUtilsException . Kind . MISSING_XMLRPC_METHOD ) {
 + throw e ;
 + }
 SINGLE
 continue ;
 } catch ( RuntimeException re ) {

Do not eat those exceptions that require user interaction during the discovery phase


<nb> public class BuildTargetTypeCoercer extends LeafTypeCoercer < BuildTarget > {
 Object object )
 throws CoerceFailedException {
 if ( ! ( object instanceof String ) ) {
 - throw new IllegalArgumentException ( STRING0 ) ;
 + throw CoerceFailedException . simple ( object , getOutputClass ( ) ) ;
 }
 String param = ( String ) object ;

Throw correct exception when BuildTargetTypeCoercer encounters non string


<nb> public class RunContentManagerImpl implements RunContentManager , Disposable {
 return ;
 }

 - final ToolWindow toolWindow = toolWindowManager . registerToolWindow ( toolWindowId , true , ToolWindowAnchor . BOTTOM , this ) ;
 + final ToolWindow toolWindow = toolWindowManager . registerToolWindow ( toolWindowId , true , ToolWindowAnchor . BOTTOM , this , true ) ;

 final ContentManager contentManager = toolWindow . getContentManager ( ) ;
 class MyDataProvider implements DataProvider {


<nb> package NAMESPACE ;

 import static NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SslHandler extends FrameDecoder {
 this . outAppBuf = outAppBuf ;
 }
 }
 -
 - private static final class EncryptedMessageEvent extends DownstreamMessageEvent {
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public EncryptedMessageEvent ( Channel channel , ChannelFuture future ,
 - Object message , SocketAddress remoteAddress ) {
 - super ( channel , future , message , remoteAddress ) ;
 - }
 -
 - }
 }


<nb> public class AbstractEnglishSpellerRuleTest {
 assertFirstMatch ( STRING0 , STRING1 ) ;
 assertFirstMatch ( STRING2 , STRING3 , STRING4 ) ;
 SINGLE
 - SINGLE
 + SINGLE
 SINGLE

 SINGLE


<nb> public class DrawHandler extends Handler {

 private void quitUpdateThread ( ) {
 if ( mThread != null ) {
 + mThread . quit ( ) ;
 synchronized ( drawTask ) {
 drawTask . notifyAll ( ) ;
 }
 - mThread . quit ( ) ;
 try {
 + mThread . interrupt ( ) ;
 mThread . join ( ) ;
 } catch ( InterruptedException e ) {
 e . printStackTrace ( ) ;


<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 ;

 <nb> public class GeneralCommands {
 }

 @ command (
 - aliases = { STRING0 , STRING1 , STRING2 , STRING3 , STRING4 } ,
 + aliases = { STRING0 , STRING1 , STRING2 , STRING3 } ,
 usage = STRING5 ,
 flags = STRING6 ,
 desc = STRING7 ,


<nb> public class SQLiteDatabase extends SQLiteClosable {
 sBlockSize = new StatFs ( STRING0 ) . getBlockSize ( ) ;
 }
 sqliteDatabase . setPageSize ( sBlockSize ) ;
 - SINGLE
 - SINGLE
 - SINGLE
 - if ( ! path . equalsIgnoreCase ( MEMORY_DB_PATH ) ) {
 - sqliteDatabase . enableWriteAheadLogging ( ) ;
 - }
 - SINGLE
 + sqliteDatabase . setJournalMode ( path , STRING1 ) ;

 SINGLE
 synchronized ( mActiveDatabases ) {


<nb> public abstract class SkyFunctionException extends Exception {

 COMMENT
 public enum Transience {
 - SINGLE
 - SINGLE
 - SINGLE
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 TRANSIENT ,

 - SINGLE
 - SINGLE
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 PERSISTENT ;
 }

 <nb> public abstract class SkyFunctionException extends Exception {
 public SkyFunctionException ( Exception cause , Transience transience ) {
 this ( cause , transience , null ) ;
 }
 -
 +
 COMMENT
 public SkyFunctionException ( Exception cause , SkyKey childKey ) {
 this ( cause , Transience . PERSISTENT , childKey ) ;

Fix style issue convert comment to Javadoc format


<nb> public class SplitManager
 expectedType = SchemaField . Type . LONG ;
 }
 else if ( literal instanceof StringLiteral ) {
 - value = ( ( StringLiteral ) literal ) . getSlice ( ) ;
 + value = ( ( StringLiteral ) literal ) . getValue ( ) ;
 expectedType = SchemaField . Type . STRING ;
 }
 else {

Fix issue when partition keys are strings


<nb> import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 @ retention ( RetentionPolicy . RUNTIME )
 @ target ( ElementType . METHOD )
 @ incubating

add autotested sample usage to BinaryTasks javadoc


<nb> public interface ProjectsServerOperations extends PrefsServerOperations ,

 void setProjectSharedUsers ( JsArrayString users ,
 ServerRequestCallback < Void > callback ) ;
 +
 + void getAllServerUsers ( ServerRequestCallback < JsArrayString > callback ) ;
 }
 <nb> public class RemoteServer implements Server
 sendRequest ( RPC_SCOPE , STRING0 , params , callback ) ;
 }

 + @ override
 + public void getAllServerUsers ( ServerRequestCallback < JsArrayString > callback )
 + {
 + sendRequest ( RPC_SCOPE , STRING1 , callback ) ;
 + }
 +
 private String clientId_ ;
 private double clientVersion_ = NUMBER0 ;
 private boolean listeningForEvents_ ;


<nb> public class InjectViewTest {
 STRING0 ,
 STRING1 ,
 STRING2 ,
 - STRING3 ,
 + STRING4 ,
 STRING5 ,
 - STRING6 ,
 - STRING7 ,
 STRING6
 ) ) ;

 - JavaFileObject expectedSource = JavaFileObjects . forSourceString ( STRING8 ,
 + JavaFileObject expectedSource = JavaFileObjects . forSourceString ( STRING9 ,
 Joiner . on ( STRING10 ) . join (
 STRING11 ,
 STRING12 ,
 STRING13 ,
 - STRING14 ,
 - STRING15 ,
 + STRING16 ,
 + STRING17 ,
 STRING18 ,
 STRING19 ,
 STRING20 ,
 STRING21 ,
 - STRING22 ,
 + STRING23 ,
 STRING24 ,
 STRING21 ,
 STRING6


<nb> public class JUnitTestClassExecuter {
 ) ) ;
 }

 + Request request = Request . aClass ( testClass ) ;
 + Runner runner = request . getRunner ( ) ;
 +
 if ( ! options . getIncludedTests ( ) . isEmpty ( ) ) {
 TestSelectionMatcher matcher = new TestSelectionMatcher ( options . getIncludedTests ( ) ) ;

 - SINGLE
 - SINGLE
 - SINGLE
 - if ( ! matcher . matchesTest ( testClassName , null ) ) {
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + if ( runner . getDescription ( ) . isSuite ( ) && ! matcher . matchesTest ( testClassName , null ) ) {
 filters . add ( new MethodNameFilter ( matcher ) ) ;
 }
 }

 - Request request = Request . aClass ( testClass ) ;
 - Runner runner = request . getRunner ( ) ;
 if ( runner instanceof Filterable ) {
 Filterable filterable = ( Filterable ) runner ;
 for ( Filter filter : filters ) {

Add suite check to make purpose of other check clearer


<nb> public abstract class PreferenceActivity extends ListActivity implements
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public List < Header > getHeaders ( ) {
 + return mHeaders ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

Add a private method to retrieve the header list from PreferenceActivity


<nb> package NAMESPACE ;

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

 import NAMESPACE ;

 <nb> public abstract class SdkType {
 @ nullable
 public abstract String getRtLibraryPath ( Sdk sdk ) ;

 + @ suppresswarnings ( { STRING0 } )
 + @ nullable
 + public Sdk getEncapsulatedSdk ( Sdk sdk ) {
 + return null ;
 + }
 +
 public abstract void saveAdditionalData ( SdkAdditionalData additionalData , Element additional ) ;

 public abstract SdkAdditionalData loadAdditionalData ( Element additional ) ;


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

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

 import NAMESPACE ;


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ChunkedOutputTest

 out . setTargetChannel ( ch ) ;
 }
 +
 + @ after
 + public void teardown ( )
 + {
 + out . close ( ) ;
 + }
 +
 }
 <nb> public class ConcurrentAccessIT
 {
 creaeteAndRollback ( client ) ;
 }
 +
 return null ;
 }

Solve annoying leak warning from test code


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


<nb> public final class FreeAndDeleteIntegrationTest {
 try {
 SINGLE
 mFileSystem . getStatus ( filePath ) ;
 - Assert . fail ( ) ;
 + Assert . fail ( String . format ( STRING0 , filePath ) ) ;
 } catch ( FileDoesNotExistException e ) {
 SINGLE
 }


<nb> public class Preferences {
 top += d . height ; SINGLE

 label = new JLabel ( preferencesFile . getAbsolutePath ( ) ) ;
 + final JLabel clickable = label ;
 + label . addMouseListener ( new MouseAdapter ( ) {
 + public void mousePressed ( MouseEvent e ) {
 + Base . openFolder ( Base . getSettingsFolder ( ) ) ;
 + }
 +
 + public void mouseEntered ( MouseEvent e ) {
 + clickable . setForeground ( new Color ( NUMBER0 , NUMBER0 , NUMBER1 ) ) ;
 + }
 +
 + public void mouseExited ( MouseEvent e ) {
 + clickable . setForeground ( Color . BLACK ) ;
 + }
 + } ) ;
 pain . add ( label ) ;
 d = label . getPreferredSize ( ) ;
 label . setBounds ( left , top , d . width , d . height ) ;


<nb> public abstract class RealmBase

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public abstract class RealmBase

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public final class Shader extends GLObject implements Savable {
 }

 public void deleteObject ( Renderer r ) {
 - r . deleteShaderSource ( this ) ;
 + r . deleteShaderSource ( ShaderSource . this ) ;
 }

 public GLObject createDestructableClone ( ) {
 - return new ShaderSource ( this ) ;
 + return new ShaderSource ( ShaderSource . this ) ;
 }
 }

 <nb> public final class Shader extends GLObject implements Savable {
 public void resetObject ( ) {
 this . id = - NUMBER0 ;
 this . usable = false ;
 +
 + for ( ShaderSource source : shaderList ) {
 + source . resetObject ( ) ;
 + }
 +
 setUpdateNeeded ( ) ;
 - SINGLE
 - SINGLE
 }

 @ override


<nb> public class AppLagartoServletFilter extends SimpleLagartoServletFilter {
 } ;
 }

 + @ override
 + protected boolean acceptActionPath ( HttpServletRequest request , String actionPath ) {
 + SINGLE
 + if ( actionPath . equals ( bundlesManager . getStaplerServletPath ( ) ) ) {
 + return false ;
 + }
 + return super . acceptActionPath ( request , actionPath ) ;
 + }
 }

skip htmlstapler path from lagarto parser


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public class ActivityManager {
 + public class ActivityManager implements OnUnloadListener {

 private static final String EXTRA_TASK_INDEX = STRING0 ;

 <nb> public class ActivityManager {
 taskIndexes . put ( activity , index ) ;
 }

 + @ override
 + public void onUnload ( ) {
 + clearStack ( true ) ;
 + }
 +
 }

Force close all activities before kill the app


<nb> public final class Constants {
 }

 public static final class Types {
 - public static final Type newsType = new TypeToken < DailyNews > ( ) {
 -
 - } . getType ( ) ;
 -
 public static final Type newsListType = new TypeToken < List < DailyNews > > ( ) {

 } . getType ( ) ;


<nb> public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
 if ( anchor != null && anchor != aClass ) {
 anchor = anchor . getNextSibling ( ) ;
 while ( anchor instanceof PsiJavaToken && ( anchor . getText ( ) . equals ( STRING0 ) || anchor . getText ( ) . equals ( STRING1 ) ) ) {
 + final boolean afterComma = anchor . getText ( ) . equals ( STRING0 ) ;
 anchor = anchor . getNextSibling ( ) ;
 + if ( afterComma ) {
 + newAnchor = skipWhitespaces ( aClass , anchor ) ;
 + if ( newAnchor != null ) return newAnchor ;
 + }
 }
 if ( anchor != null ) {
 - newAnchor = skipWhitespaces ( aClass , anchor ) ;
 - return newAnchor != null ? newAnchor : anchor ;
 + return anchor ;
 }
 }

skip spaces after incomplete members only


<nb> import NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 public class ContainerInitializerAnnotationHandler extends AbstractHandler
 {
 final ContainerInitializer _initializer ;
 <nb> public class ContainerInitializerAnnotationHandler extends AbstractHandler
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public void handle ( ClassInfo info , String annotationName )
 {
 <nb> public class ContainerInitializerAnnotationHandler extends AbstractHandler
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public void handle ( FieldInfo info , String annotationName )
 {
 <nb> public class ContainerInitializerAnnotationHandler extends AbstractHandler
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 public void handle ( MethodInfo info , String annotationName )
 {


<nb> public interface DocDisplay extends HasValueChangeHandlers < Void > ,
 void splitIntoLines ( ) ;

 Position screenCoordinatesToDocumentPosition ( int pageX , int pageY ) ;
 +
 + void forceImmediateRender ( ) ;
 }
 <nb> public class TextEditingTarget implements
 public void execute ( Integer arg ) {
 docDisplay . syncDiagnosticsPrefs ( ) ;
 } } ) ) ;
 + releaseOnDismiss . add ( prefs . showInlineToolbarForRCodeChunks ( ) . bind (
 + new CommandWithArg < Boolean > ( ) {
 + public void execute ( Boolean arg ) {
 + docDisplay . forceImmediateRender ( ) ;
 + } } ) ) ;

 }

reflect code chunk toolbar option immediately


<nb> package NAMESPACE ;
 public class Ssl {

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 private boolean enabled = true ;


<nb> public class AsyncHttpConnection extends AbstractHttpConnection implements Async
 }
 else if ( _request . getAsyncContinuation ( ) . isAsyncStarted ( ) )
 {
 - SINGLE
 + SINGLE
 + SINGLE
 LOG . debug ( STRING0 , this ) ;
 - SINGLE
 - break ;
 + progress = false ;
 }
 }
 }

replaced break in finally with progres false


<nb> public class TestShapefileLoader extends TestCase {

 GtfsContext context = GtfsLibrary . readGtfs ( new File ( ConstantsForTests . NY_GTFS ) ) ;

 - GTFSHopLoader hl = new GTFSHopLoader ( gg , context ) ;
 + GTFSPatternHopLoader hl = new GTFSPatternHopLoader ( gg , context ) ;
 hl . load ( ) ;

 NetworkLinker nl = new NetworkLinker ( gg ) ;
 <nb> public class TestShapefileLoader extends TestCase {
 new State ( new GregorianCalendar ( NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 ) . getTimeInMillis ( ) ) ,
 new TraverseOptions ( context ) ) ;
 GraphPath path = spt . getPath ( end ) ;
 -
 +
 assertNotNull ( path ) ;

 }


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

 + import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + @ checkreturnvalue
 @ gwtcompatible
 @ suppresswarnings ( STRING0 )
 public final class Range < C extends Comparable > implements Predicate < C > , Serializable {


<nb> public class FavouritesDbHelper {
 }
 }
 if ( index . length ( ) > NUMBER0 || emoticons ) {
 - AlertDialog . Builder builder = new AlertDialog . Builder ( context . getMapActivity ( ) ) ;
 + AlertDialog . Builder builder = new AlertDialog . Builder ( context ) ;
 builder . setTitle ( R . string . fav_point_dublicate ) ;
 if ( emoticons ) {
 builder . setMessage ( context . getString ( R . string . fav_point_emoticons_message , name ) ) ;

Fixed null pointer in favorites db helerp


<nb> public class ClusterBlock implements Serializable , Streamable , ToXContent {
 }
 }

 + public String toString ( ) {
 + StringBuilder sb = new StringBuilder ( ) ;
 + sb . append ( id ) . append ( STRING0 ) . append ( description ) . append ( STRING1 ) ;
 + for ( ClusterBlockLevel level : levels ) {
 + sb . append ( level . name ( ) ) . append ( STRING0 ) ;
 + }
 + return sb . toString ( ) ;
 + }
 +
 @ override public boolean equals ( Object o ) {
 if ( this == o ) return true ;
 if ( o == null || getClass ( ) != o . getClass ( ) ) return false ;


<nb> public abstract class HadoopDruidIndexerMapper < KEYOUT , VALUEOUT > extends Mapper <
 {
 if ( parser instanceof StringInputRowParser && value instanceof Text ) {
 SINGLE
 - return ( ( StringInputRowParser ) parser ) . parse ( value . toString ( ) ) ;
 + return ( ( StringInputRowParser ) parser ) . parse ( value . toString ( ) ) ;
 + } else if ( value instanceof InputRow ) {
 + return ( InputRow ) value ;
 } else {
 return parser . parse ( value ) ;
 }

do not run parser if value from InputFormat is already an InputRow


<nb> public class ShadowMotionEvent {
 }

 @ implementation
 + public float getRawX ( ) {
 + return getX ( ) ;
 + }
 +
 + @ implementation
 + public float getRawY ( ) {
 + return getY ( ) ;
 + }
 +
 + @ implementation
 public final float getX ( ) {
 return getX ( NUMBER0 ) ;
 }
 <nb> public class ShadowMotionEvent {
 return pointerIndex ;
 }

 + @ implementation
 + public final float getPressure ( int pointerIndex ) {
 + return FLOAT0 ;
 + }
 +
 public MotionEvent setPointer2 ( float x , float y ) {
 this . x [ NUMBER1 ] = x ;
 this . y [ NUMBER1 ] = y ;

zooming now uses the ScaleGestureDetector from android


<nb> public interface PConstants {
 SINGLE
 static final String E2D = PGraphicsDanger2D . class . getName ( ) ;

 + SINGLE
 + static final String FX2D = PGraphicsFX . class . getName ( ) ;
 +
 static final String PDF = STRING0 ;
 static final String DXF = STRING1 ;


<nb>
 COMMENT
 package NAMESPACE ;

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 <nb> package NAMESPACE ;
 public enum IdType
 {
 NODE ( NUMBER0 , false ) ,
 - RELATIONSHIP ( NUMBER0 , false ) ,
 + RELATIONSHIP ( NUMBER0 , FeatureToggles . flag ( STRING0 , false ) ) ,
 PROPERTY ( NUMBER1 , true ) ,
 STRING_BLOCK ( NUMBER1 , true ) ,
 ARRAY_BLOCK ( NUMBER1 , true ) ,
 <nb> public class StoreNodeRelationshipCursor extends StoreAbstractRelationshipCursor
 relationshipStore . fillRecord ( relationshipId , relationshipRecord , RecordLoad . FORCE ) ;

 SINGLE
 - SINGLE
 + SINGLE
 SINGLE
 SINGLE
 try
 <nb> public class FeatureToggles
 }

 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public static boolean flag ( String name , boolean defaultValue )
 + {
 + return booleanProperty ( name , defaultValue ) ;
 + }
 +
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class Entity {
 }

 public ToMany addToMany ( Property [ ] sourceProperties , Entity target , Property [ ] targetProperties ) {
 + if ( protobuf ) {
 + throw new IllegalStateException ( STRING0 ) ;
 + }
 +
 ToMany toMany = new ToMany ( schema , this , sourceProperties , target , targetProperties ) ;
 toManyRelations . add ( toMany ) ;
 target . incomingToManyRelations . add ( toMany ) ;
 <nb> public class Entity {
 COMMENT
 COMMENT
 public ToOne addToOne ( Entity target , Property fkProperty ) {
 + if ( protobuf ) {
 + throw new IllegalStateException ( STRING0 ) ;
 + }
 +
 Property [ ] fkProperties = { fkProperty } ;
 ToOne toOne = new ToOne ( schema , this , target , fkProperties , true ) ;
 toOneRelations . add ( toOne ) ;

throw exception when trying to add relations to protobuf entities


<nb> public class BaseSwiftTest implements RuntimeTestSupport {
 String fileList = sourceFiles . toString ( ) . replace ( STRING0 , STRING1 ) . replace ( STRING2 , STRING1 )
 . replace ( STRING3 , STRING4 ) ;

 - String argsString = STRING5 + fileList + STRING6 + EXEC_NAME + STRING7 + ANTLR_FRAMEWORK_DIR + STRING8 + ANTLR_FRAMEWORK_DIR + STRING9 ;
 + String argsString = STRING5 + fileList + STRING6 + EXEC_NAME + STRING7 + ANTLR_FRAMEWORK_DIR + STRING8 + ANTLR_FRAMEWORK_DIR + STRING10 ;
 return runProcess ( argsString , tmpdir ) ;
 }


<nb> public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
 }

 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT

RenderScript Fix IntrinsicConvolve documentation


<nb> public class CurrentBranchDialog extends DialogWrapper {
 }
 }
 myTrackedRepository = current == null ? null : current . getTrackedRemoteName ( myProject , root ) ;
 - myTrackedBranch = current == null ? null : current . getTrackedBranchName ( myProject , root ) ;
 if ( myTrackedRepository == null ) {
 myTrackedRepository = REMOTE_NONE ;
 }
 <nb> public class CurrentBranchDialog extends DialogWrapper {
 if ( myTrackedBranch != null && myTrackedBranch . startsWith ( GitBranch . REFS_HEADS_PREFIX ) ) {
 myTrackedBranch = myTrackedBranch . substring ( GitBranch . REFS_HEADS_PREFIX . length ( ) ) ;
 }
 + myTrackedBranch = current == null ? null : current . getTrackedBranchName ( myProject , root ) ;
 + if ( myTrackedBranch == null ) {
 + myTrackedBranch = BRANCH_NONE ;
 + }
 myRepositoryComboBox . setSelectedItem ( myTrackedRepository ) ;
 myBranches . clear ( ) ;
 GitBranch . list ( myProject , root , true , true , myBranches ) ;

fixed CurrentBranchDialog the case when there is no tracking branch


<nb> public class EmulatorView extends View implements GestureDetector . OnGestureListe
 updateText ( ) ;
 }

 - public void resetTerminal ( ) {
 - mEmulator . reset ( ) ;
 - invalidate ( ) ;
 - }
 -
 @ override
 public boolean onCheckIsTextEditor ( ) {
 return true ;

Remove superfluous EmulatorView resetTerminal method


<nb> public class RepartitionerTest {

 SINGLE
 SINGLE
 - greedyZones = null ;
 + greedyZones = Collections . < Integer > emptyList ( ) ;

 repartitionedCluster = Repartitioner . repartition ( currentCluster ,
 currentStores ,


<nb> public class DruidMasterBalancerTest
 Lists . < String > newArrayList ( ) ,
 Lists . < String > newArrayList ( ) ,
 new NoneShardSpec ( ) ,
 + NUMBER0 ,
 NUMBER1
 ) ;
 segment2 = new DataSegment (
 <nb> public class DruidMasterBalancerTest
 Lists . < String > newArrayList ( ) ,
 Lists . < String > newArrayList ( ) ,
 new NoneShardSpec ( ) ,
 + NUMBER0 ,
 NUMBER2
 ) ;
 segment3 = new DataSegment (
 <nb> public class DruidMasterBalancerTest
 Lists . < String > newArrayList ( ) ,
 Lists . < String > newArrayList ( ) ,
 new NoneShardSpec ( ) ,
 + NUMBER0 ,
 NUMBER3
 ) ;
 segment4 = new DataSegment (
 <nb> public class DruidMasterBalancerTest
 Lists . < String > newArrayList ( ) ,
 Lists . < String > newArrayList ( ) ,
 new NoneShardSpec ( ) ,
 + NUMBER0 ,
 NUMBER4
 ) ;

add binary version to datasegments for balancer test


<nb> public class ProtocolProviderServiceJabberImpl
 dnssecState [ NUMBER0 ] = true ;
 }
 if ( addrs == null || addrs . length == NUMBER0 )
 + {
 + logger . error ( STRING0 +
 + srv . getTarget ( ) ) ;
 continue ;
 + }

 for ( InetSocketAddress isa : addrs )
 {
 <nb> public class ProtocolProviderServiceJabberImpl
 }
 }
 }
 + else
 + logger . error ( STRING1 ) ;

 return ConnectState . CONTINUE_TRYING ;
 }

Adds more logging when we fail to find xmpp server addresses


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class DatePicker extends FrameLayout {
 mYearSpinner . setValue ( mCurrentDate . get ( Calendar . YEAR ) ) ;
 mMonthSpinner . setValue ( mCurrentDate . get ( Calendar . MONTH ) ) ;
 mDaySpinner . setValue ( mCurrentDate . get ( Calendar . DAY_OF_MONTH ) ) ;
 +
 + if ( Character . isDigit ( displayedValues [ NUMBER0 ] . charAt ( NUMBER0 ) ) ) {
 + mMonthSpinnerInput . setRawInputType ( InputType . TYPE_CLASS_NUMBER ) ;
 + }
 }

 COMMENT

when locale is non Enligh sometimes month spinner needs a number IME


<nb> package NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 - public interface ArrowEntity extends Entity {
 + public interface Arrow extends Entity {
 }
 <nb> public interface World {
 COMMENT
 COMMENT
 COMMENT
 - public ArrowEntity spawnArrow ( Location loc , Vector velocity ,
 + public Arrow spawnArrow ( Location loc , Vector velocity ,
 float speed , float spread ) ;

 COMMENT

Renamed ArrowEntity Arrow to be consistent


<nb> public class SwipeRefreshLayout extends ViewGroup implements NestedScrollingPare
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class SwipeRefreshLayout extends ViewGroup implements NestedScrollingPare
 COMMENT
 public void setProgressViewOffset ( boolean scale , int start , int end ) {
 mScale = scale ;
 - mCircleView . setVisibility ( View . GONE ) ;
 - mOriginalOffsetTop = mCurrentTargetOffsetTop = start ;
 + mOriginalOffsetTop = start ;
 mSpinnerFinalOffset = end ;
 mUsingCustomStart = true ;
 - mCircleView . invalidate ( ) ;
 + reset ( ) ;
 + mRefreshing = false ;
 }

 COMMENT


<nb> public class GroovyHotSwapper extends GenericDebuggerRunner {
 ExecutionEnvironment env ) throws ExecutionException {
 if ( state instanceof JavaCommandLine && containsGroovyClasses ( project ) ) {
 final JavaParameters params = ( ( JavaCommandLine ) state ) . getJavaParameters ( ) ;
 - params . getVMParametersList ( ) . addParametersString ( STRING0 + getAgentJarPath ( ) ) ;
 + params . getVMParametersList ( ) . add ( STRING0 + getAgentJarPath ( ) ) ;
 }

 return super . createContentDescriptor ( project , executor , state , contentToReuse , env ) ;


<nb> public abstract class AbstractInspectionToolStarter implements ApplicationStarte
 if ( ! myOptions . suppressHelp ( ) ) {
 printHelpAndExit ( args , myOptions ) ;
 }
 - return ;
 + System . exit ( NUMBER0 ) ;
 }

 myApplication = new InspectionApplication ( ) ;


<nb> public class DRootElement implements DElement {
 return containingClasses . values ( ) ;
 }

 - public void setContainingClasses ( Map < String , DClassElement > containingClasses ) {
 - this . containingClasses = containingClasses ;
 - }
 -
 public DClassElement removeClassElement ( String classElementName ) {
 return containingClasses . remove ( classElementName ) ;
 }


<nb> public class CoordinatorLayout extends ViewGroup implements NestedScrollingParen
 COMMENT
 COMMENT
 COMMENT
 - private void resolveAnchorView ( View forChild , CoordinatorLayout parent ) {
 + private void resolveAnchorView ( final View forChild , final CoordinatorLayout parent ) {
 mAnchorView = parent . findViewById ( mAnchorId ) ;
 if ( mAnchorView != null ) {
 + if ( mAnchorView == parent ) {
 + if ( parent . isInEditMode ( ) ) {
 + mAnchorView = mAnchorDirectChild = null ;
 + return ;
 + }
 + throw new IllegalStateException (
 + STRING0 ) ;
 + }
 +
 View directChild = mAnchorView ;
 for ( ViewParent p = mAnchorView . getParent ( ) ;
 p != parent && p != null ;

Don t let a View anchor itself to it s parent CoordinatorLayout


<nb> public class ShowGraph extends PApplet {
 @ suppresswarnings ( STRING0 )
 public void draw ( ) {
 fill ( NUMBER0 ) ;
 - rect ( NUMBER0 , NUMBER0 , getSize ( ) . width , getSize ( ) . height ) ;
 + rect ( NUMBER0 , NUMBER0 , getSize ( ) . width - NUMBER1 , getSize ( ) . height - NUMBER1 ) ;
 List < Vertex > vertices = ( List < Vertex > ) vertexIndex . query ( modelBounds ) ;

 List < Edge > edges = ( List < Edge > ) edgeIndex . query ( modelBounds ) ;


<nb> public abstract class Rule {
 this . messages = messages ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 public abstract String getId ( ) ;

 public abstract String getDescription ( ) ;


<nb> public class RestletComponent extends HeaderFilterStrategyComponent {
 private Boolean pipeliningConnections ;
 private Integer threadMaxIdleTimeMs ;
 private Boolean useForwardedForHeader ;
 + private Boolean reuseAddress ;

 public RestletComponent ( ) {
 this ( new Component ( ) ) ;
 <nb> public class RestletComponent extends HeaderFilterStrategyComponent {
 if ( getUseForwardedForHeader ( ) != null ) {
 params . add ( STRING0 , getUseForwardedForHeader ( ) . toString ( ) ) ;
 }
 + if ( getReuseAddress ( ) != null ) {
 + params . add ( STRING1 , getReuseAddress ( ) . toString ( ) ) ;
 + }
 LOG . debug ( STRING2 , params , server ) ;
 server . getContext ( ) . setParameters ( params ) ;

 <nb> public class RestletComponent extends HeaderFilterStrategyComponent {
 this . useForwardedForHeader = useForwardedForHeader ;
 }

 + public Boolean getReuseAddress ( ) {
 + return reuseAddress ;
 + }
 +
 + public void setReuseAddress ( Boolean reuseAddress ) {
 + this . reuseAddress = reuseAddress ;
 + }
 }

Added reuseAddress option to restlet component


<nb> public abstract class Contacts {
 COMMENT
 public abstract void markAsContacted ( final Address [ ] addresses ) ;

 -
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public abstract Intent contactPickerIntent ( ) ;

 -
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 -
 -
 -
 public abstract String getEmailFromContactPicker ( final Intent intent ) ;

 -
 -
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 -
 public boolean hasContactPicker ( ) {
 -
 if ( mContext . getPackageManager ( ) . queryIntentActivities ( contactPickerIntent ( ) , NUMBER0 ) . size ( ) > NUMBER0 ) {
 return true ;
 } else {
 return false ;
 }
 }
 -
 -
 -
 }


<nb> public class ApplyPatchAction extends AnAction {
 public static ApplyPatchStatus mergeAgainstBaseVersion ( final Project project , final VirtualFile file , final FilePath pathBeforeRename ,
 final TextFilePatch patch , final PatchMergeRequestFactory mergeRequestFactory ) {
 final ApplyPatchForBaseRevisionTexts threeTexts = ApplyPatchForBaseRevisionTexts . create ( project , file , pathBeforeRename , patch ) ;
 - if ( threeTexts == null ) {
 + if ( ( threeTexts == null ) || ( threeTexts . getStatus ( ) == null ) ) {
 return null ;
 }
 ApplyPatchStatus status = threeTexts . getStatus ( ) ;

apply patch to report when no base revision found


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

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


<nb> public class HeapPool extends MemtablePool
 return new Allocator ( this ) ;
 }

 - public class Allocator extends MemtableBufferAllocator
 + public static class Allocator extends MemtableBufferAllocator
 {
 Allocator ( HeapPool pool )
 {


<nb> public class MaxRequestSizeTestCase {
 exchange . getOutputStream ( ) . close ( ) ;
 } catch ( IOException e ) {
 try {
 + exchange . getExchange ( ) . getResponseHeaders ( ) . put ( Headers . CONNECTION , STRING0 ) ;
 exchange . getExchange ( ) . setResponseCode ( NUMBER0 ) ;
 } catch ( Exception ignore ) {

 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class ChunkedRequestTransferCodingTestCase {
 exchange . getInputStream ( ) . close ( ) ;
 exchange . getOutputStream ( ) . close ( ) ;
 } catch ( IOException e ) {
 + exchange . getExchange ( ) . getResponseHeaders ( ) . put ( Headers . CONNECTION , STRING0 ) ;
 exchange . getExchange ( ) . setResponseCode ( NUMBER0 ) ;
 throw new RuntimeException ( e ) ;
 }