<nb> public class ConversationActivity extends XmppActivity
 listView . discardUndo ( ) ;
 super . onPause ( ) ;
 this . mActivityPaused = true ;
 - if ( this . xmppConnectionServiceBound ) {
 - this . xmppConnectionService . getNotificationService ( ) . setIsInForeground ( false ) ;
 - }
 }

 @ override
 <nb> public class ConversationActivity extends XmppActivity
 recreate ( ) ;
 }
 this . mActivityPaused = false ;
 - if ( this . xmppConnectionServiceBound ) {
 - this . xmppConnectionService . getNotificationService ( ) . setIsInForeground ( true ) ;
 - }

 if ( ! isConversationsOverviewVisable ( ) || ! isConversationsOverviewHideable ( ) ) {
 sendReadMarkerIfNecessary ( getSelectedConversation ( ) ) ;

don t set notification mode to background when on pause


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

 import NAMESPACE ;

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

 public class SetAssigneeTest {
 @ test


<nb> public class ZQLTest extends TestCase {
 assertEquals ( STRING0 , q . get ( NUMBER0 ) . getQuery ( ) ) ;
 }

 + public void testErbScopeMultilineQueryCondition ( ) throws IOException , ZException , ZQLException {
 + ZQL zql = new ZQL ( STRING1 ) ;
 +
 + List < Z > q = zql . compile ( ) ;
 + assertEquals ( NUMBER0 , q . size ( ) ) ;
 + assertEquals ( STRING2 , q . get ( NUMBER1 ) . getQuery ( ) ) ;
 + }
 +
 public void testErbScopePipedQuery ( ) throws IOException , ZException , ZQLException {
 ZQL zql = new ZQL ( STRING3 ) ;

Add more zql erb template test case with conditional branch


<nb> public class PowerNotificationWarnings implements PowerUI . WarningsUI {
 updateNotification ( ) ;
 }

 - private void cancelOther ( int showing ) {
 - if ( mShowing != SHOWING_NOTHING && mShowing != showing ) {
 - mNoMan . cancel ( TAG_NOTIFICATION , ID_NOTIFICATION ) ; SINGLE
 - }
 - }
 -
 private void updateNotification ( ) {
 Slog . d ( TAG , STRING0 + mWarning
 + STRING1 + mSaver + STRING2 + mInvalidCharger ) ;
 if ( mInvalidCharger ) {
 - cancelOther ( SHOWING_INVALID_CHARGER ) ;
 showInvalidChargerNotification ( ) ;
 mShowing = SHOWING_INVALID_CHARGER ;
 } else if ( mWarning ) {
 - cancelOther ( SHOWING_WARNING ) ;
 showWarningNotification ( ) ;
 mShowing = SHOWING_WARNING ;
 } else if ( mSaver ) {
 - cancelOther ( SHOWING_SAVER ) ;
 showSaverNotification ( ) ;
 mShowing = SHOWING_SAVER ;
 } else {


<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> class XPathUsageSearcher implements UsageSearcher {
 if ( psiFile instanceof XmlFile ) {
 final XmlFile t1 = ( XmlFile ) psiFile ;
 final XmlDocument document ;
 - if ( t1 instanceof JspFile ) {
 - final PsiFile root = ( ( JspFile ) t1 ) . getBaseLanguageRoot ( ) ;
 + FileViewProvider fileViewProvider = t1 . getViewProvider ( ) ;
 +
 + if ( fileViewProvider instanceof TemplateLanguageFileViewProvider ) {
 + final PsiFile root = fileViewProvider . getPsi ( ( ( TemplateLanguageFileViewProvider ) fileViewProvider ) . getTemplateDataLanguage ( ) ) ;
 +
 if ( root instanceof XmlFile ) {
 document = ( ( XmlFile ) root ) . getDocument ( ) ;
 } else {


<nb> public class ContextHandlerMBean extends AbstractHandlerMBean
 }

 @ managedattribute ( STRING0 )
 - public Map getContextAttributes ( )
 + public Map < String , Object > getContextAttributes ( )
 {
 - Map map = new HashMap ( ) ;
 + Map < String , Object > map = new HashMap < String , Object > ( ) ;
 Attributes attrs = ( ( ContextHandler ) _managed ) . getAttributes ( ) ;
 - Enumeration en = attrs . getAttributeNames ( ) ;
 + Enumeration < String > en = attrs . getAttributeNames ( ) ;
 while ( en . hasMoreElements ( ) )
 {
 String name = ( String ) en . nextElement ( ) ;
 <nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;

add typing to context handler mbean and remove import from xmlconfiguration


<nb> class RemovePluginCommand extends SettingCommand {

 Path pluginDir = env . pluginsFile ( ) . resolve ( pluginName ) ;
 if ( Files . exists ( pluginDir ) == false ) {
 - throw new UserError ( ExitCodes . USAGE , STRING0 + pluginName + STRING1 ) ;
 + throw new UserError ( ExitCodes . USAGE , STRING2 + pluginName + STRING3 ) ;
 }

 List < Path > pluginPaths = new ArrayList < > ( ) ;
 <nb> public class RemovePluginCommandTests extends ESTestCase {

 public void testMissing ( ) throws Exception {
 UserError e = expectThrows ( UserError . class , ( ) - > removePlugin ( STRING4 , home ) ) ;
 - assertTrue ( e . getMessage ( ) , e . getMessage ( ) . contains ( STRING5 ) ) ;
 + assertTrue ( e . getMessage ( ) , e . getMessage ( ) . contains ( STRING6 ) ) ;
 assertRemoveCleaned ( env ) ;
 }

Fix plugin command name in remove plugin command


<nb> public class CompareTxStreams
 branchingDetected = false ;
 System . out . println ( STRING0 + tx1 ) ;
 }
 + else
 + {
 + System . out . println ( STRING1 + tx1 + STRING2 + extractor1 . getLastCommitEntry ( ) . getMasterId ( ) + STRING3 + extractor2 . getLastCommitEntry ( ) . getMasterId ( ) +
 + STRING4 + extractor1 . getLastTxChecksum ( ) + STRING3 + extractor2 . getLastTxChecksum ( ) ) ;
 + }
 }
 }
 System . out . println ( STRING5 + lastTx ) ;


<nb> public class GroovyTestCase extends TestCase {
 public GroovyTestCase ( ) {
 }

 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public String getName ( ) {
 + return super . getName ( ) . substring ( NUMBER0 ) . replaceAll ( STRING0 , STRING1 ) . toLowerCase ( ) ;
 + }
 +
 protected void assertArrayEquals ( Object [ ] expected , Object [ ] value ) {
 String message =
 STRING2 + InvokerHelper . toString ( expected ) + STRING3 + InvokerHelper . toString ( value ) ;

patch to make test cases appear more like AgileDox when running them in a report or IDE


<nb> final class UnsafeAioChannelFinder implements AioChannelFinder {
 public AbstractAioChannel findChannel ( Runnable command ) throws Exception {
 Long offset ;
 for ( ; ; ) {
 - offset = findField ( command ) ;
 + offset = findFieldOffset ( command ) ;
 if ( offset == null ) {
 return null ;
 }
 <nb> final class UnsafeAioChannelFinder implements AioChannelFinder {
 }
 }

 - private static Long findField ( Object command ) throws Exception {
 + private static Long findFieldOffset ( Object command ) throws Exception {
 Map < Class < ? > , Long > offsetCache = UnsafeAioChannelFinder . offsetCache ;
 Class < ? > commandType = command . getClass ( ) ;
 Long res = offsetCache . get ( commandType ) ;


<nb> public class Tag {
 return false ;

 SINGLE
 - SINGLE
 - SINGLE
 + SINGLE
 if ( this . tagName . equals ( STRING0 ) ) {
 if ( child . tagName . equals ( STRING1 ) || child . tagName . equals ( STRING2 ) || child . tagName . equals ( STRING3 ) ||
 - child . tagName . equals ( STRING4 ) || child . tagName . equals ( STRING5 ) ) {
 + child . tagName . equals ( STRING4 ) || child . tagName . equals ( STRING5 ) || child . tagName . equals ( STRING6 ) || child . tagName . equals ( STRING7 ) ) {
 return true ;
 }
 return false ;


<nb> public class RecursiveWatcherTest {

 SINGLE
 watcher . start ( ) ;
 - Thread . sleep ( NUMBER0 ) ; SINGLE
 + Thread . sleep ( NUMBER1 ) ; SINGLE

 File largeFile = new File ( tempDir + STRING0 ) ;

 <nb> public class RecursiveWatcherTest {
 fileWrittenTime . set ( System . currentTimeMillis ( ) ) ;

 SINGLE
 - Thread . sleep ( NUMBER1 ) ; SINGLE
 + Thread . sleep ( NUMBER2 ) ; SINGLE
 watcher . stop ( ) ;

 SINGLE

Relaxing timings to accomodate Travis after she has had a stressful couple of minute


<nb> public class View implements Drawable . Callback , KeyEvent . Callback ,
 COMMENT
 COMMENT
 protected void destroyHardwareResources ( ) {
 + clearDisplayList ( ) ;
 destroyLayer ( true ) ;
 }

Destroy display lists when running complete memory trims


<nb> package NAMESPACE ;

 import NAMESPACE ;

 + import NAMESPACE ;
 +
 COMMENT
 COMMENT
 COMMENT
 public class BlockMeta extends BlockMetaBase {
 private final long mBlockSize ;

 - public BlockMeta ( long blockId , long blockSize , StorageDir dir ) {
 - super ( blockId , dir ) ;
 - mBlockSize = blockSize ;
 - }
 -
 public BlockMeta ( TempBlockMeta tempBlock ) {
 super ( tempBlock . getBlockId ( ) , tempBlock . getParentDir ( ) ) ;
 - mBlockSize = tempBlock . getBlockSize ( ) ;
 + mBlockSize = new File ( tempBlock . getCommitPath ( ) ) . length ( ) ;
 }

 @ override

Make BlockMeta size really measured from actual file length


<nb> public class DistanceCalculatorPlugin extends OsmandPlugin {
 if ( distanceControl != null ) {
 String ds = distance ;
 if ( ds == null ) {
 - distanceControl . setText ( app . getString ( R . string . dist_control_start ) , STRING0 ) ;
 + if ( distanceMeasurementMode == NUMBER0 ) {
 + distanceControl . setText ( app . getString ( R . string . dist_control_start ) , STRING0 ) ;
 + } else {
 + distanceControl . setText ( STRING1 , STRING0 ) ; SINGLE
 + }
 } else {
 int ls = ds . lastIndexOf ( STRING2 ) ;
 if ( ls == - NUMBER1 ) {

indicate immediately when planning widget is in edit mode


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

 - import NAMESPACE ;
 - import NAMESPACE ;
 -
 public interface GradleConnectionParticipant extends GradleParticipantBuild {
 String getDisplayName ( ) ;

Check style fix for GradleConnectionParticipant


<nb> public final class IosMockMaker implements MockMaker {
 IOSClass * clazz = getMethodDescription ( [ self class ] , selector , & methodDescription ) ;
 if ( clazz ) {
 JavaLangReflectMethod * method =
 - [ clazz findMethodWithTranslatedName : NSStringFromSelector ( selector ) ] ;
 + [ clazz findMethodWithTranslatedName : NSStringFromSelector ( selector )
 + checkSupertypes: YES ] ;
 IOSObjectArray * paramTypes = [ method getParameterTypes ] ;
 NSUInteger numArgs = paramTypes - > size_ ;
 IOSObjectArray * args = [ IOSObjectArray arrayWithLength : numArgs type : NSObject_class_ ( ) ] ;


<nb>

 package NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;

 COMMENT
 <nb> public class Attribute implements Cloneable {
 protected String value ;
 protected String [ ] splits ;

 - public Attribute ( String rawName , String name , String value , boolean decode ) {
 + public Attribute ( String rawName , String name , String value ) {
 this . rawName = rawName ;
 this . name = name ;
 - this . value = value != null ? ( decode ? HtmlDecoder . decode ( value ) : value ) : null ;
 + this . value = value ;
 }

 @ override
 public Attribute clone ( ) {
 - return new Attribute ( rawName , name , value , false ) ;
 + return new Attribute ( rawName , name , value ) ;
 }

 COMMENT


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

 COMMENT
 COMMENT


<nb> public interface MethodDescription extends ByteCodeElement {
 }
 TypeDescription returnType = getReturnType ( ) ;
 return ( returnType . represents ( boolean . class ) && value instanceof Boolean )
 - || ( returnType . represents ( boolean . class ) && value instanceof Boolean )
 || ( returnType . represents ( byte . class ) && value instanceof Byte )
 || ( returnType . represents ( char . class ) && value instanceof Character )
 || ( returnType . represents ( short . class ) && value instanceof Short )


<nb> public class ManagementWebSecurityAutoConfiguration {
 }
 if ( this . endpointHandlerMapping == null ) {
 this . endpointHandlerMapping = new EndpointHandlerMapping (
 - Collections . < MvcEndpoint > emptySet ( ) ) ;
 + Collections . < MvcEndpoint > emptySet ( ) ) ;
 }
 }
 }


<nb> public class ForgeHooksClient {
 }
 }

 + static int renderPass = - NUMBER0 ;
 public static void beforeRenderPass ( int pass ) {
 + renderPass = pass ;
 Tessellator . instance = Tessellator . firstInstance ;
 Tessellator . renderingWorldRenderer = true ;
 GL11 . glBindTexture ( NUMBER1 COMMENT , ModLoader
 <nb> public class ForgeHooksClient {
 }

 public static void afterRenderPass ( int pass ) {
 + renderPass = - NUMBER0 ;
 inWorld = false ;
 for ( List l : renderTextureList ) {
 SINGLE
 <nb> public class MinecraftForgeClient {
 rb . renderBlockByRenderType ( bl , i , j , k ) ;
 ForgeHooksClient . afterBlockRender ( bl , rb ) ;
 }
 +
 + COMMENT
 + COMMENT
 + public static int getRenderPass ( ) {
 + return ForgeHooksClient . renderPass ;
 + }
 }

Added a little support for two pass rendering


<nb>
 SINGLE
 SINGLE
 SINGLE
 + SINGLE

 package NAMESPACE ;

 <nb> public class Control extends AbstractControl implements SessionListener {
 SINGLE
 Proxy proxy = getProxy ( overrides ) ;
 getExtensionLoader ( ) . hookProxyListener ( proxy ) ;
 + getExtensionLoader ( ) . hookOverrideMessageProxyListener ( proxy ) ;
 getExtensionLoader ( ) . hookPersistentConnectionListener ( proxy ) ;
 getExtensionLoader ( ) . hookConnectRequestProxyListeners ( proxy ) ;

Hook OverrideMessageProxyListener into the Proxy


<nb> public class SimpleErrorPageHandler implements HttpHandler {
 if ( codes == null ? exchange . getResponseCode ( ) >= NUMBER0 : codes . contains ( Integer . valueOf ( exchange . getResponseCode ( ) ) ) ) {
 final String errorPage = STRING0 + exchange . getResponseCode ( ) + STRING1 + StatusCodes . getReason ( exchange . getResponseCode ( ) ) + STRING2 ;
 exchange . getResponseHeaders ( ) . put ( Headers . CONTENT_LENGTH , STRING3 + errorPage . length ( ) ) ;
 + exchange . getResponseHeaders ( ) . put ( Headers . CONTENT_TYPE , STRING4 ) ;
 Sender sender = exchange . getResponseSender ( ) ;
 sender . send ( errorPage ) ;
 return true ;


<nb> public abstract class RequestBuilderBase < T extends RequestBuilderBase < T > > {
 String uri ;
 try {
 uri = URI . create ( url ) . toURL ( ) . toString ( ) ;
 - } catch ( MalformedURLException e ) {
 + } catch ( Throwable e ) {
 throw new IllegalStateException ( STRING0 + url , e ) ;
 }

Catch any exception and properly display the uri which caused the exception


<nb> public class VerifySegmentState extends AbstractBaseCommand implements Command {
 @ option ( name = STRING0 , required = true , metaVar = STRING1 , usage = STRING2 )
 String clusterName ;

 - @ option ( name = STRING3 , required = false , metaVar = STRING1 , usage = STRING4 )
 + @ option ( name = STRING3 , required = false , metaVar = STRING1 , usage = STRING5 )
 String tablePrefix = STRING6 ;

 @ option ( name = STRING7 , required = false , help = true , aliases = { STRING8 , STRING9 , STRING10 } ,

Added more informative usage with examples to VerifySegmentState


<nb> public class SvnVcs extends AbstractVcs {
 final MessageBusConnection messageBusConnection = ApplicationManager . getApplication ( ) . getMessageBus ( ) . connect ( ) ;
 messageBusConnection . subscribe ( ChangeListManagerImpl . LISTS_LOADED , new LocalChangeListsLoadedListener ( ) {
 public void processLoadedLists ( final List < LocalChangeList > lists ) {
 - ChangeListManager . getInstanceChecked ( myProject ) . setReadOnly ( SvnChangeProvider . ourDefaultListName , true ) ;
 + try {
 + ChangeListManager . getInstanceChecked ( myProject ) . setReadOnly ( SvnChangeProvider . ourDefaultListName , true ) ;

 - if ( ! supportOptions . changeListsSynchronized ( ) ) {
 - try {
 + if ( ! supportOptions . changeListsSynchronized ( ) ) {
 processChangeLists ( lists ) ;
 supportOptions . upgradeToChangeListsSynchronized ( ) ;
 }
 - catch ( ProcessCanceledException e ) {
 - SINGLE
 - }
 + }
 + catch ( ProcessCanceledException e ) {
 + SINGLE
 }
 messageBusConnection . disconnect ( ) ;
 }

catch cancelled exception when after change lists loaded correctly


<nb> public final class LeaderInquireClient {
 }
 } catch ( Exception e ) {
 LOG . error ( STRING0 ,
 - mZookeeperAddress , e . getMessage ( ) ) ;
 + mZookeeperAddress , e ) ;
 }

 return null ;


<nb> public class SearchEverywhereAction extends AnAction implements CustomComponentA
 topPanel . add ( title , BorderLayout . WEST ) ;
 myNonProjectCheckBox . setForeground ( new JBColor ( Gray . _240 , Gray . _200 ) ) ;
 myNonProjectCheckBox . setText ( STRING0 + getShortcut ( ) + STRING1 ) ;
 - topPanel . add ( myNonProjectCheckBox , BorderLayout . EAST ) ;
 + if ( ! NonProjectScopeDisablerEP . isSearchInNonProjectDisabled ( ) ) {
 + topPanel . add ( myNonProjectCheckBox , BorderLayout . EAST ) ;
 + }
 panel . add ( myPopupField , BorderLayout . CENTER ) ;
 panel . add ( topPanel , BorderLayout . NORTH ) ;
 panel . setBorder ( IdeBorderFactory . createEmptyBorder ( NUMBER0 , NUMBER1 , NUMBER2 , NUMBER1 ) ) ;

use goto nonProjectScopeDisabler EP to show hide non project items checkbox


<nb> public class PetValidator {

 public void validate ( Pet pet , Errors errors ) {
 String name = pet . getName ( ) ;
 - SINGLE
 + SINGLE
 if ( ! StringUtils . hasLength ( name ) ) {
 errors . rejectValue ( STRING0 , STRING1 , STRING1 ) ;
 } else if ( pet . isNew ( ) && pet . getOwner ( ) . getPet ( name , true ) != null ) {
 errors . rejectValue ( STRING0 , STRING2 , STRING3 ) ;
 }

 - SINGLE
 + SINGLE
 if ( pet . isNew ( ) && pet . getType ( ) == null ) {
 errors . rejectValue ( STRING4 , STRING1 , STRING1 ) ;
 }

 - SINGLE
 + SINGLE
 if ( pet . getBirthDate ( ) == null ) {
 errors . rejectValue ( STRING5 , STRING1 , STRING1 ) ;
 }


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class BraceMatchingUtil {
 private static boolean isStrictTagMatching ( FileType fileType , int tokenGroup ) {
 switch ( tokenGroup ) {
 case XML_TAG_TOKEN_GROUP :
 - return fileType == StdFileTypes . XML ;
 + return fileType instanceof LanguageFileType &&
 + ( ( LanguageFileType ) fileType ) . getLanguage ( ) instanceof XMLLanguage ;

 case JSP_TOKEN_GROUP :
 return true ;

fixed issue with entering end tag for html xhtml jspx files


<nb> public abstract class AbstractFlagEncoder implements FlagEncoder , TurnCostEncode
 {
 if ( str == null )
 return NUMBER0 ;
 -
 - int index = str . indexOf ( STRING0 ) ;
 -
 +
 try
 {
 + SINGLE
 + SINGLE
 + SINGLE
 + if ( str . startsWith ( STRING1 ) )
 + return NUMBER0 ;
 +
 + int index = str . indexOf ( STRING0 ) ;
 if ( index > NUMBER0 )
 {
 String hourStr = str . substring ( NUMBER0 , index ) ;


<nb> public class MongoCredentials {
 public String toString ( ) {
 return STRING0 +
 STRING1 + protocol +
 - STRING2 + userName + STRING3 +
 - STRING4 + password +
 - STRING5 + source + STRING3 +
 + STRING2 + userName +
 + STRING4 + STRING6 +
 + STRING5 + source +
 STRING7 ;
 }

Fixed up toString of MongoCredentials so it doesn t print the address of the password char array


<nb> abstract class BoundedLocalCache < K , V > extends BLCHeader . DrainStatusRef < K , V >
 COMMENT
 void scheduleDrainBuffers ( ) {
 if ( evictionLock . tryLock ( ) ) {
 - if ( drainStatus ( ) == PROCESSING ) {
 - return ;
 - }
 try {
 + if ( drainStatus ( ) == PROCESSING ) {
 + return ;
 + }
 lazySetDrainStatus ( PROCESSING ) ;
 executor ( ) . execute ( drainBuffersTask ) ;
 } catch ( Throwable t ) {

Fix eager return causing the lock to not be released


<nb> public class JavaSymbolFinderIntegrationTest {
 @ rule
 public DebuggableTemporaryFolder temporaryFolder = new DebuggableTemporaryFolder ( ) ;

 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 @ test
 public void shouldFindTargetDefiningSymbol ( ) throws IOException {
 ProjectWorkspace workspace = TestDataHelper . createProjectWorkspaceForScenario (

Delete an unintentionally copied comment


<nb> public class Preferences {

 SINGLE
 try {
 - load ( Base . getStream ( STRING0 ) ) ;
 + load ( Base . getStream ( STRING1 ) ) ;
 } catch ( Exception te ) {
 Base . showError ( null , STRING2 +
 STRING3 , te ) ;


<nb> public abstract class GroovyPsiCreator implements GroovyElementTypes {
 if ( elem . equals ( PACKAGE_DEFINITION ) ) return new GrPackageDefinitionImpl ( node ) ;

 SINGLE
 + if ( elem . equals ( ASSIGNMENT_EXPRESSION ) ) return new GrAssignmentExpressionImpl ( node ) ;
 if ( elem . equals ( ADDITIVE_EXXPRESSION ) ) return new GrAdditiveExpressionImpl ( node ) ;
 if ( elem . equals ( LOGICAL_OR_EXPRESSION ) ) return new GrLogicalOrExprImpl ( node ) ;
 if ( elem . equals ( LOGICAL_AND_EXPRESSION ) ) return new GrLogicalAndExprImpl ( node ) ;


<nb>

 package NAMESPACE ;

 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public abstract class XContentSettingsLoader implements SettingsLoader {
 if ( token == null ) {
 return settings ;
 }
 + if ( token != XContentParser . Token . START_OBJECT ) {
 + throw new ElasticSearchParseException ( STRING0 + token + STRING1 ) ;
 + }
 serializeObject ( settings , sb , path , jp , null ) ;
 return settings ;
 }

malformed elasticsearch yml causes unresponsive hang


<nb> public class GLM2 extends ModelJob {
 _model . setAndTestValidation ( NUMBER0 , t . _val ) ;
 _lambdaIdx = NUMBER1 ;
 }
 - new GLMIterationTask ( GLM2 . this , _dinfo , _glm , case_mode , case_val , null , _ymu = ymut . ymu ( ) , _reg = FLOAT0 / ymut . nobs ( ) , new Iteration ( ) ) . dfork ( _dinfo . _adaptedFrame ) ;
 + if ( _lambdaIdx == lambda . length ) SINGLE
 + GLM2 . this . complete ( ) ; SINGLE
 + else
 + new GLMIterationTask ( GLM2 . this , _dinfo , _glm , case_mode , case_val , null , _ymu = ymut . ymu ( ) , _reg = FLOAT0 / ymut . nobs ( ) , new Iteration ( ) ) . dfork ( _dinfo . _adaptedFrame ) ;
 }
 @ override public boolean onExceptionalCompletion ( Throwable ex , CountedCompleter cc ) {
 ex . printStackTrace ( ) ;

handle special case when called only with one lambda lambda max just output the null model


<nb> import NAMESPACE ;
 public class WifiKey implements Parcelable {

 SINGLE
 - private static final Pattern SSID_PATTERN = Pattern . compile ( STRING0 ) ;
 + private static final Pattern SSID_PATTERN = Pattern . compile ( STRING0 ,
 + Pattern . DOTALL ) ;
 private static final Pattern BSSID_PATTERN =
 Pattern . compile ( STRING1 ) ;

Actually allow all valid characters in a Wi Fi SSID


<nb> public class GroovyJava7RuntimeMemoryLeakStrategy extends MemoryLeakPrevention . S
 }

 @ override
 - void prepare ( ClassLoader leakingLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 + public void prepare ( ClassLoader leakingLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 SINGLE
 SINGLE

 <nb> public class MemoryLeakPrevention {
 return leakingLoader ;
 }

 - static abstract class Strategy {
 - boolean appliesTo ( ClassPath classpath ) {
 + public static abstract class Strategy {
 + public boolean appliesTo ( ClassPath classpath ) {
 return false ;
 }

 SINGLE
 - void prepare ( ClassLoader leakingLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 + public void prepare ( ClassLoader leakingLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 }

 SINGLE
 - void dispose ( ClassLoader classLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 + public void dispose ( ClassLoader classLoader , ClassLoader . . . affectedLoaders ) throws Exception {
 }
 }


<nb> public class Http11Processor extends AbstractHttp11Processor {

 rp . setStage ( org . apache . coyote . Constants . STAGE_ENDED ) ;
 if ( error || endpoint . isPaused ( ) ) {
 - recycle ( ) ;
 return SocketState . CLOSED ;
 } else if ( isAsync ( ) ) {
 return SocketState . LONG ;
 } else {
 - recycle ( ) ;
 if ( ! keepAlive ) {
 return SocketState . CLOSED ;
 } else {


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PatchApplier {
 final List < VirtualFile > directlyAffected = myVerifier . getDirectlyAffected ( ) ;
 final List < VirtualFile > indirectlyAffected = myVerifier . getAllAffected ( ) ;

 + refreshIndirectlyAffected ( indirectlyAffected ) ;
 + for ( VirtualFile file : directlyAffected ) {
 + VcsDirtyScopeManager . getInstance ( myProject ) . fileDirty ( file ) ;
 + }
 if ( ( myTargetChangeList != null ) && ( ! directlyAffected . isEmpty ( ) ) ) {
 ApplyPatchAction . moveChangesOfVsToList ( myProject , directlyAffected , myTargetChangeList ) ;
 } else {
 final ChangeListManager changeListManager = ChangeListManager . getInstance ( myProject ) ;
 changeListManager . scheduleUpdate ( ) ;
 }
 - refreshIndirectlyAffected ( indirectlyAffected ) ;

 return refStatus . get ( ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class CertificateConfigurable implements SearchableConfigurable , Configur

 @ override
 public void disposeUIResources ( ) {
 + Disposer . dispose ( myTreeBuilder ) ;
 myTrustManager . removeListener ( this ) ;
 }

Dispose tree builder in disposeUIResources to prevent memory leak


<nb> public class PyCharmEduInitialConfigurator {

 private static void showInitialConfigurationDialog ( ) {
 final JFrame frame = WindowManager . getInstance ( ) . findVisibleFrame ( ) ;
 - new InitialConfigurationDialog ( frame , STRING0 ) . show ( ) ;
 + new InitialConfigurationDialog ( frame , STRING0 ) {
 + @ override
 + protected boolean canCreateLauncherScript ( ) {
 + return false ;
 + }
 + } . show ( ) ;
 }
 }


<nb> public class BoneContext {

 @ override
 public String toString ( ) {
 - return STRING0 + bone . getName ( ) ;
 + return STRING0 + boneName ;
 }
 }

displaying the bone name in BoneContext toString method even if the bone is not yet created


<nb> public class UpdateGenerator extends AbstractSqlGenerator < UpdateStatement > {
 sqlString = STRING0 + database . escapeStringForDatabase ( newValue . toString ( ) ) + STRING0 ;
 } else if ( newValue instanceof Date ) {
 SINGLE
 - Date date = ( Date ) newValue ;
 - sqlString = database . getDateLiteral ( new java . sql . Timestamp ( date . getTime ( ) ) ) ;
 + Date date = ( Date ) newValue ;
 + if ( date . getClass ( ) . equals ( java . util . Date . class ) ) {
 + date = new java . sql . Date ( date . getTime ( ) ) ;
 + }
 +
 + sqlString = database . getDateLiteral ( date ) ;
 } else if ( newValue instanceof Boolean ) {
 if ( ( ( Boolean ) newValue ) ) {
 sqlString = TypeConverterFactory . getInstance ( ) . findTypeConverter ( database ) . getBooleanType ( ) . getTrueBooleanValue ( ) ;


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

 - final ActionBar actionBar = getSupportActionBar ( ) ;
 - actionBar . setDisplayShowTitleEnabled ( false ) ;
 - actionBar . setDisplayHomeAsUpEnabled ( true ) ;
 + setupActionBar ( ) ;

 final int episodeId = getIntent ( ) . getIntExtra ( InitBundle . EPISODE_TVDBID , NUMBER0 ) ;
 if ( episodeId == NUMBER0 ) {
 <nb> public class EpisodeDetailsActivity extends BaseActivity {
 indicator . setViewPager ( mPager , startPosition ) ;
 }

 + private void setupActionBar ( ) {
 + final ActionBar actionBar = getSupportActionBar ( ) ;
 + actionBar . setDisplayShowTitleEnabled ( false ) ;
 + actionBar . setDisplayHomeAsUpEnabled ( true ) ;
 + actionBar . setBackgroundDrawable ( null ) ;
 + }
 +
 @ override
 protected void onStart ( ) {
 super . onStart ( ) ;

Remove background in episode details activity


<nb> public abstract class Context {
 COMMENT
 COMMENT
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT


<nb> public class QueryStringJsonQueryParser extends AbstractIndexComponent implement
 int fuzzyPrefixLength = FuzzyQuery . defaultPrefixLength ;
 int phraseSlop = NUMBER0 ;
 float boost = FLOAT0 ;
 - boolean escape = true ;
 + boolean escape = false ;
 Analyzer analyzer = null ;

 String currentFieldName = null ;

revert escaspe default to true in queryString


<nb> class ResultSetPersister {
 statement . keyAttributes . add (
 new DBDAttributeValue (
 binding ,
 - row . values [ binding . getOrdinalPosition ( ) ] ) ) ;
 + model . getCellValue ( binding , row ) ) ) ;
 }
 deleteStatements . add ( statement ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class Orient extends OListenerManger < OOrientListener > {
 SINGLE
 return this ;

 - profiler = new OProfiler ( ) ;
 -
 if ( timer == null )
 timer = new Timer ( true ) ;

 + profiler = new OProfiler ( ) ;
 +
 shutdownHook = new OrientShutdownHook ( ) ;
 if ( signalHandler == null ) {
 signalHandler = new OSignalHandler ( ) ;


<nb> public class Printer {
 private String indent = STRING0 ;
 private final StringBuilder out ;

 - Printer ( @ notnull StringBuilder out ) {
 + public Printer ( @ notnull StringBuilder out ) {
 this . out = out ;
 }


<nb> public final class AppendProcessor extends AbstractProcessor {
 Object value = ConfigurationUtils . readObject ( TYPE , processorTag , config , STRING0 ) ;
 TemplateService . Template compiledTemplate = ConfigurationUtils . compileTemplate ( TYPE , processorTag ,
 STRING1 , field , templateService ) ;
 - return new AppendProcessor ( processorTag , templateService . compile ( field ) , ValueSource . wrap ( value , templateService ) ) ;
 + return new AppendProcessor ( processorTag , compiledTemplate , ValueSource . wrap ( value , templateService ) ) ;
 }
 }
 }

don t render template twice for append processor


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

Fix up ChannelPipeline javadocs by add lost don t


<nb>
 COMMENT
 COMMENT

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


<nb> public class RegexUrlMapping extends AbstractUrlMapping {
 String [ ] thisTokens = getUrlData ( ) . getTokens ( ) ;
 String [ ] otherTokens = other . getUrlData ( ) . getTokens ( ) ;
 for ( int i = NUMBER0 ; i < thisTokens . length ; i ++ ) {
 + if ( i == otherTokens . length ) break ;
 boolean thisTokenIsWildcard = isSingleWildcard ( thisTokens [ i ] ) ;
 boolean otherTokenIsWildcard = isSingleWildcard ( otherTokens [ i ] ) ;
 if ( thisTokenIsWildcard && ! otherTokenIsWildcard ) {


<nb> public class DarculaButtonUI extends BasicButtonUI {
 public void update ( Graphics g , JComponent c ) {
 super . update ( g , c ) ;
 if ( ( ( JButton ) c ) . isDefaultButton ( ) && ! SystemInfo . isMac ) {
 - c . setFont ( c . getFont ( ) . deriveFont ( Font . BOLD ) ) ;
 + if ( ! c . getFont ( ) . isBold ( ) ) {
 + c . setFont ( c . getFont ( ) . deriveFont ( Font . BOLD ) ) ;
 + }
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

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

 COMMENT
 <nb> import NAMESPACE ;
 @ notthreadsafe
 public class OperatorStats
 {
 - private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory . getThreadMXBean ( ) ;
 -
 private final TaskOutput taskOutput ;

 private long declaredSize ;
 <nb> public class OperatorStats
 private long completedPositions ;

 private CpuTimer cpuTimer = new CpuTimer ( ) ;
 - private long exchangeWaitTime ;

 private boolean finished ;


<nb> public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
 }
 }

 - private int counter ;
 -
 private void processFiles (
 @ notnull Printer printer ,
 @ notnull File [ ] files ,
 <nb> public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
 @ notnull FilesWriter holderMock )
 throws IOException
 {
 - if ( counter > NUMBER0 ) return ;
 holderFull . writeFilesOnDiskIfNeeded ( ) ;
 holderMock . writeFilesOnDiskIfNeeded ( ) ;

 <nb> public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
 if ( InTextDirectivesUtils . isDirectiveDefined ( text , STRING0 ) || text . contains ( STRING1 ) ) continue ;

 if ( hasBoxMethod ( text ) ) {
 - counter ++ ;
 String generatedTestName = generateTestName ( file . getName ( ) ) ;
 String packageName = file . getPath ( ) . replaceAll ( STRING2 , STRING3 ) ;
 text = changePackage ( packageName , text ) ;


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

Update the javadoc for the clip path fix


<nb> public class GradleDistributionExecuter extends AbstractGradleExecuter implement
 TestFile tmpDir = getTmpDir ( ) ;
 if ( tmpDir != null ) {
 tmpDir . deleteDir ( ) . createDir ( ) ;
 - forkingGradleExecuter . addGradleOpts ( String . format ( STRING0 , tmpDir ) ) ;
 + forkingGradleExecuter . addGradleOpts ( String . format ( STRING1 , tmpDir ) ) ;
 }
 returnedExecuter = forkingGradleExecuter ;
 }

Remove all quoting of the tmpdir argument for the test harness


<nb> public final class FileTypes {
 . put ( STRING0 , STRING1 )
 . put ( STRING2 , STRING3 )
 . put ( STRING4 , STRING5 )
 + . put ( STRING6 , STRING7 )
 . put ( STRING8 , STRING9 )
 . put ( STRING10 , STRING9 )
 . put ( STRING11 , STRING12 )

Add stringsdict file type for Xcode project generation


<nb> public enum ActionCode {
 COMMENT
 CLIENT_FLUSH ,

 - CUSTOM ,
 RESET ,

 COMMENT
 <nb> public abstract class AbstractHttp11Processor < S > extends AbstractProcessor < S > {

 getOutputBuffer ( ) . reset ( ) ;

 - } else if ( actionCode == ActionCode . CUSTOM ) {
 - SINGLE
 - SINGLE
 -
 } else if ( actionCode == ActionCode . REQ_SET_BODY_REPLAY ) {
 ByteChunk body = ( ByteChunk ) param ;


<nb> package NAMESPACE ;

 import NAMESPACE ;

 - public class PlurkApi extends DefaultApi10a
 + public class MobilePlurkApi extends DefaultApi10a
 {
 private static final String REQUEST_TOKEN_URL = STRING0 ;
 private static final String AUTHORIZATION_URL = STRING1 ;


<nb> public class SearchedTrendsActivity extends Activity {
 private void handleIntent ( Intent intent ) {
 if ( Intent . ACTION_SEARCH . equals ( intent . getAction ( ) ) ) {
 searchQuery = intent . getStringExtra ( SearchManager . QUERY ) ;
 - searchQuery += STRING0 ;

 String query = searchQuery ;

 - if ( query . contains ( STRING1 ) ) {
 - doSearch ( query ) ;
 - }
 -
 SearchRecentSuggestions suggestions = new SearchRecentSuggestions ( this ,
 MySuggestionsProvider . AUTHORITY , MySuggestionsProvider . MODE ) ;

 <nb> public class SearchedTrendsActivity extends Activity {
 source . createTag ( searchQuery . replaceAll ( STRING1 , STRING2 ) ) ;
 }
 }
 +
 + searchQuery += STRING0 ;
 +
 + if ( query . contains ( STRING1 ) ) {
 + doSearch ( query ) ;
 + }
 +
 +
 }
 }

Fix change the way it saves a trends search


<nb> public abstract class BeanIds {
 COMMENT
 static final String INTERCEPT_METHODS_BEAN_FACTORY_POST_PROCESSOR = STRING0 ;
 static final String CONTEXT_SOURCE_SETTING_POST_PROCESSOR = STRING1 ;
 + static final String HTTP_POST_PROCESSOR = STRING2 ;

 public static final String JDBC_USER_DETAILS_MANAGER = STRING3 ;
 public static final String USER_DETAILS_SERVICE = STRING4 ;
 <nb> public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser {
 registry . registerBeanDefinition ( BeanIds . FILTER_SECURITY_INTERCEPTOR , filterSecurityInterceptorBuilder . getBeanDefinition ( ) ) ;

 SINGLE
 - registry . registerBeanDefinition ( STRING5 , new RootBeanDefinition ( HttpSecurityConfigPostProcessor . class ) ) ;
 + registry . registerBeanDefinition ( BeanIds . HTTP_POST_PROCESSOR , new RootBeanDefinition ( HttpSecurityConfigPostProcessor . class ) ) ;

 return null ;
 }

Moved Http post processor bean name to BeanIds class


<nb> public class DatePickerDialog extends DialogFragment implements
 Bundle savedInstanceState ) {
 Log . d ( TAG , STRING0 ) ;

 - View view = inflater . inflate ( R . layout . mdtp_date_picker_dialog , container ) ;
 + View view = inflater . inflate ( R . layout . mdtp_date_picker_dialog , container , false ) ;

 mDayOfWeekView = ( TextView ) view . findViewById ( R . id . date_picker_header ) ;
 mMonthAndDayView = ( LinearLayout ) view . findViewById ( R . id . date_picker_month_and_day ) ;
 <nb> public class TimePickerDialog extends DialogFragment implements
 @ override
 public View onCreateView ( LayoutInflater inflater , ViewGroup container ,
 Bundle savedInstanceState ) {
 - View view = inflater . inflate ( R . layout . mdtp_time_picker_dialog , container ) ;
 + View view = inflater . inflate ( R . layout . mdtp_time_picker_dialog , container , false ) ;
 KeyboardListener keyboardListener = new KeyboardListener ( ) ;
 view . findViewById ( R . id . time_picker_dialog ) . setOnKeyListener ( keyboardListener ) ;

Fixed java lang IllegalStateException when using as a fragment


<nb> public class Checker extends AutomaticBean
 try {
 final Object module = mModuleFactory . createModule ( name ) ;
 if ( ! ( module instanceof FileSetCheck ) ) {
 - throw new CheckstyleException ( name + STRING0 ) ;
 + throw new CheckstyleException ( name
 + + STRING1 ) ;
 }
 final FileSetCheck fsc = ( FileSetCheck ) module ;
 fsc . contextualize ( mChildContext ) ;
 <nb> public class Checker extends AutomaticBean
 catch ( Exception ex ) {
 SINGLE
 throw new CheckstyleException (
 - STRING2
 + STRING3
 + name + STRING4 + ex . getMessage ( ) ) ;
 }
 }

improved error messages so a user can understand them


<nb> public class PathChildrenCache implements Closeable
 getDataAndStat ( fullPath ) ;
 }

 - if ( mode == RefreshMode . POST_INITIALIZED )
 - {
 - updateInitialSet ( name , null ) ;
 - }
 + updateInitialSet ( name , null ) ;
 }
 }

Always updateInitialSet allow multiple changes to initial set up to the point that the INITIALIZED event is sent


<nb> public class StbTrueTypeBuild {
 BuildTarget lin32 = BuildTarget . newDefaultTarget ( TargetOs . Linux , false ) ;
 BuildTarget lin64 = BuildTarget . newDefaultTarget ( TargetOs . Linux , true ) ;
 BuildTarget mac = BuildTarget . newDefaultTarget ( TargetOs . MacOsX , false ) ;
 - new AntScriptGenerator ( ) . generate ( new BuildConfig ( STRING0 ) , win32home , win32 , win64 , lin32 , lin64 , mac ) ;
 + new AntScriptGenerator ( ) . generate ( new BuildConfig ( STRING1 ) , win32home , win32 , win64 , lin32 , lin64 , mac ) ;

 SINGLE
 AntScriptExecutor . execute ( STRING2 , STRING3 ) ;


<nb> public class PowerManager
 COMMENT
 public void release ( int flags ) {
 synchronized ( mToken ) {
 - mHandler . removeCallbacks ( mReleaser ) ;
 if ( ! mRefCounted || -- mCount == NUMBER0 ) {
 + mHandler . removeCallbacks ( mReleaser ) ;
 try {
 mService . releaseWakeLock ( mToken , flags ) ;
 } catch ( RemoteException e ) {


<nb> public class PlaybackService extends Service {
 mediaPlayer . pause ( true , true ) ;
 }
 break ;
 - case KeyEvent . KEYCODE_MEDIA_FAST_FORWARD : {
 + case KeyEvent . KEYCODE_MEDIA_FAST_FORWARD :
 mediaPlayer . seekDelta ( PlaybackController . DEFAULT_SEEK_DELTA ) ;
 break ;
 - }
 - case KeyEvent . KEYCODE_MEDIA_REWIND : {
 + case KeyEvent . KEYCODE_MEDIA_REWIND :
 mediaPlayer . seekDelta ( - PlaybackController . DEFAULT_SEEK_DELTA ) ;
 break ;
 - }
 }
 }

Remove unnecessary braces in PlaybackService case block


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

 public class CoreProxy {


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

 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class MetricsResourceTest
 @ beforeclass
 public static void startup ( ) throws Exception
 {
 + SINGLE
 + SLF4JBridgeHandler . removeHandlersForRootLogger ( ) ;
 + SLF4JBridgeHandler . install ( ) ;
 +
 Injector injector = Guice . createInjector ( new WebServletModule ( new Properties ( ) ) , new AbstractModule ( )
 {
 private Datastore datastore = new TestDatastore ( ) ;

Redirect Jersey Jetty logging through logback so we don t get log messages in the test output


<nb> public class EnglishGrammaticalStructure extends GrammaticalStructure {
 COMMENT
 COMMENT
 private static void correctWHAttachment ( SemanticGraph sg ) {
 + COMMENT
 + if ( sg . getRoots ( ) . isEmpty ( ) )
 + return ;
 +
 SemanticGraph sgCopy = sg . makeSoftCopy ( ) ;
 SemgrexMatcher matcher = XCOMP_PATTERN . matcher ( sgCopy ) ;
 while ( matcher . findNextMatchingNode ( ) ) {
 <nb> public class UniversalEnglishGrammaticalStructure extends GrammaticalStructure {
 COMMENT
 COMMENT
 private static void correctWHAttachment ( SemanticGraph sg ) {
 +
 + COMMENT
 + if ( sg . getRoots ( ) . isEmpty ( ) )
 + return ;
 +
 SemanticGraph sgCopy = sg . makeSoftCopy ( ) ;
 SemgrexMatcher matcher = XCOMP_PATTERN . matcher ( sgCopy ) ;
 while ( matcher . findNextMatchingNode ( ) ) {

Add check for root in correctWHAttachment


<nb> public class TestLeftRecursion extends BaseTest {
 STRING0 +
 STRING1 +
 STRING2 +
 - STRING3 +
 - STRING4 +
 + STRING5 +
 + STRING6 +
 STRING7 +
 - STRING8 +
 + STRING9 +
 STRING10 +
 STRING11 +
 STRING12 +


<nb> public class ModelControllerOperationHandlerImpl extends AbstractMessageHandler
 case NUMBER0 : {
 synchronized ( outputStream ) {
 outputStream . write ( ModelControllerClientProtocol . PARAM_HANDLE_RESULT_FAILED ) ;
 - outputStream . write ( ModelControllerClientProtocol . PARAM_OPERATION ) ;
 failureHolder . getFailure ( ) . writeExternal ( outputStream ) ;
 outputStream . flush ( ) ;
 }


<nb> public class tutorial {

 System . out . println ( STRING0 ) ;
 SINGLE
 - People p = peopletable . name . SINGLE
 + People p = peopletable . name . equal ( STRING1 ) . findFirst ( ) ;
 System . out . println ( p ) ;
 SINGLE
 SINGLE


<nb> public class MapActivityActions implements DialogProvider {
 } ) . reg ( ) ;
 }
 final OsmAndLocationProvider loc = app . getLocationProvider ( ) ;
 - if ( app . getTargetPointsHelper ( ) . getPointToNavigate ( ) != null || loc . getLocationSimulation ( ) . isRouteAnimating ( ) ) {
 + SINGLE
 + SINGLE
 + if ( app . getTargetPointsHelper ( ) . getPointToNavigate ( ) != null && loc . getLocationSimulation ( ) . isRouteAnimating ( ) ) {
 if ( OsmandPlugin . getEnabledPlugin ( OsmandDevelopmentPlugin . class ) != null ) {
 optionsMenuHelper
 . item ( loc . getLocationSimulation ( ) . isRouteAnimating ( ) ? R . string . animate_route_off : R . string . animate_route )

Shorten our menus by one more obsolete item


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import NAMESPACE ;
 - import NAMESPACE ;

 COMMENT
 COMMENT


<nb> public class ReaderPostListFragment extends Fragment
 Toolbar . OnMenuItemClickListener toolbarListener = new Toolbar . OnMenuItemClickListener ( ) {
 @ override
 public boolean onMenuItemClick ( MenuItem item ) {
 + if ( ! isAdded ( ) ) {
 + return false ;
 + }
 if ( item . getItemId ( ) == R . id . menu_settings ) {
 ReaderActivityLauncher . showReaderSubs ( getActivity ( ) ) ;
 return true ;


<nb> public class ConstantCaptureActivity extends Activity implements SurfaceHolder . C
 case NUMBER0 : GLES20 . glClearColor ( FLOAT0 , FLOAT0 , FLOAT1 , FLOAT1 ) ; break ;
 }

 - int xpos = ( frameNum * NUMBER1 ) % width ;
 + int xpos = ( int ) ( width * ( ( frameNum % NUMBER2 ) / FLOAT2 ) ) ;
 GLES20 . glEnable ( GLES20 . GL_SCISSOR_TEST ) ;
 GLES20 . glScissor ( xpos , NUMBER3 , width / NUMBER4 , height / NUMBER4 ) ;
 GLES20 . glClear ( GLES20 . GL_COLOR_BUFFER_BIT ) ;


<nb>
 COMMENT
 package NAMESPACE ;

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

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

 import NAMESPACE ;
 import NAMESPACE ;


<nb> public enum Material {
 COMMENT
 COMMENT
 public static Material getMaterial ( final int id ) {
 - if ( byId . length > id ) {
 + if ( byId . length > id && id >= NUMBER0 ) {
 return byId [ id ] ;
 } else {
 return null ;
 <nb> public class MaterialTest {
 @ test
 public void getByOutOfRangeId ( ) {
 assertThat ( Material . getMaterial ( Integer . MAX_VALUE ) , is ( nullValue ( ) ) ) ;
 + assertThat ( Material . getMaterial ( Integer . MIN_VALUE ) , is ( nullValue ( ) ) ) ;
 }

 @ test

Added negative id check to Material getMaterial int


<nb> public class ShinyAppsDeployDialog
 events_ = events ;
 lastAppName_ = lastAppName ;

 - launchCheck_ = new CheckBox ( STRING0 ) ;
 + launchCheck_ = new CheckBox ( STRING1 ) ;
 launchCheck_ . setValue ( true ) ;
 launchCheck_ . setStyleName ( contents_ . getStyle ( ) . launchCheck ( ) ) ;
 addLeftWidget ( launchCheck_ ) ;


<nb> public class SimpleValueListener < O extends Object > implements ValueListener {
 }
 SINGLE
 for ( int i = NUMBER0 ; i < keys . size ( ) ; i ++ ) {
 - Map m = merge ( current . source ( ) , keys . get ( i ) , values . get ( i ) ) ;
 - current . source ( m ) ;
 + Map map = null ;
 + try {
 + map = JsonXContent . jsonXContent . createParser ( values . get ( i ) . toString ( ) ) . mapAndClose ( ) ;
 + } catch ( Exception e ) { }
 +
 + Map m = merge ( current . source ( ) , keys . get ( i ) , map != null && map . size ( ) > NUMBER0 ? map : values . get ( i ) ) ;
 + current . source ( m ) ;
 }
 return this ;
 }

Check fields for json before treating them as normal strings


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

 import NAMESPACE ;

Add copyright notice to BitmapCreationBenchmark


<nb> public abstract class InputHandler extends KeyAdapter
 StringBuilder sb = new StringBuilder ( ) ;
 for ( int i = NUMBER0 ; i < repeatCount ; i ++ )
 sb . append ( str ) ;
 - textArea . overwriteSetSelectedText ( sb . toString ( ) ) ;
 + if ( hasBracketsAndQuotes ( str ) ) {
 + matchBracketsAndQuotes ( str , evt , textArea , sb ) ;
 + } else {
 + textArea . overwriteSetSelectedText ( sb . toString ( ) ) ;
 + }
 }
 else
 {


<nb> class SocketIOConnection {
 }

 public void connect ( SocketIOClient client ) {
 - clients . add ( client ) ;
 + if ( ! clients . contains ( client ) )
 + clients . add ( client ) ;
 webSocket . send ( String . format ( STRING0 , client . endpoint ) ) ;
 }


<nb> public class PrimeConnections {
 SINGLE
 SINGLE
 SINGLE
 + logger . debug ( STRING0 , e . getMessage ( ) ) ;
 lastException = e ;
 sleepBeforeRetry ( tryNum ) ;
 }
 <nb> public class HttpPrimeConnection implements IPrimeConnection {
 @ override
 public boolean connect ( Server server , String primeConnectionsURIPath ) throws Exception {
 String url = STRING1 + server . getHostPort ( ) + primeConnectionsURIPath ;
 + logger . debug ( STRING2 , url ) ;
 HttpUriRequest get = new HttpGet ( url ) ;
 HttpResponse response = null ;
 try {


<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>
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 package NAMESPACE ;

 public class TableStat {


<nb> public class MasterInfoIntegrationTest {
 Assert . assertFalse ( fileInfo . isComplete ) ;
 }

 + SINGLE
 + SINGLE
 @ test
 public void concurrentCreateJournalTest ( ) throws Exception {
 SINGLE


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

Fix a missing word in AppCompatDelegate documentation


<nb>
 package NAMESPACE ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public enum PrimitiveType
 COMMENT
 public static PrimitiveType lookup ( final String value )
 {
 - for ( final PrimitiveType p : values ( ) )
 + for ( final PrimitiveType p : Singleton . values )
 {
 if ( value . equals ( p . name ) )
 {
 <nb> public enum PrimitiveType

 throw new IllegalArgumentException ( STRING0 + value ) ;
 }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + static class Singleton
 + {
 + public static final PrimitiveType [ ] values = PrimitiveType . values ( ) ;
 + }
 }

Use a cached singleton for PrimitiveType lookup name to avoid defensive copy of values array


<nb> public class OsMoThread {
 }

 public void reconnect ( ) {
 + sessionInfo = null ;
 reconnect = true ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;

 public abstract class ParallaxRecyclerAdapter < T > extends RecyclerView . Adapter < RecyclerView . ViewHolder > {
 - private static final float SCROLL_MULTIPLIER = FLOAT0 ;
 + private float SCROLL_MULTIPLIER = FLOAT0 ;

 public static class VIEW_TYPES {
 public static final int NORMAL = NUMBER0 ;

removed static and final modifier SCROLL_MULTIPLIER


<nb> public class MagicNumberCheck extends Check
 COMMENT
 private boolean isConstantDefinition ( DetailAST aAST )
 {
 - if ( ScopeUtils . inInterfaceBlock ( aAST ) ) {
 - return true ;
 - }
 DetailAST parent = aAST . getParent ( ) ;

 SINGLE
 <nb> public class MagicNumberCheck extends Check
 return false ;
 }

 - SINGLE
 + SINGLE
 final DetailAST modifiersAST =
 parent . findFirstToken ( TokenTypes . MODIFIERS ) ;
 - return modifiersAST . branchContains ( TokenTypes . FINAL ) ;
 + return modifiersAST . branchContains ( TokenTypes . FINAL )
 + || ScopeUtils . inInterfaceBlock ( parent ) ;
 }

 COMMENT

efficiency improvement don t go up the tree twice


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PyClassImpl extends PyPresentableElementImpl < PyClassStub > implement
 }

 public PyClassImpl ( final PyClassStub stub ) {
 - super ( stub , PyElementTypes . CLASS_DECLARATION ) ;
 + this ( stub , PyElementTypes . CLASS_DECLARATION ) ;
 + }
 +
 + public PyClassImpl ( final PyClassStub stub , IStubElementType nodeType ) {
 + super ( stub , nodeType ) ;
 }

 public PsiElement setName ( @ notnull String name ) throws IncorrectOperationException {

Added parsing of Cython property declarations


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

 import NAMESPACE ;

Resolved incorrect path for ReaderTaskFragment


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

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

 public class TestOfflinePermissible implements OfflinePlayer , Permissible {
 private boolean op ;
 + private UUID randomUuid = UUID . randomUUID ( ) ;

 private final Map < String , Boolean > assignedPermissions = new HashMap < String , Boolean > ( ) ;

 <nb> public class TestOfflinePermissible implements OfflinePlayer , Permissible {
 return STRING0 ;
 }

 + public UUID getUniqueId ( ) {
 + return randomUuid ;
 + }
 +
 public boolean isBanned ( ) {
 throw new UnsupportedOperationException ( STRING1 ) ;
 }

Added getUniqueId to TestOfflinePermissible


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


<nb> public class DirectoryUtil {
 throw new PermanentStorageException ( String . format ( STRING0 , location ) ) ;

 if ( ! storageDir . exists ( ) && ! storageDir . mkdirs ( ) )
 - throw new PermanentStorageException ( String . format ( STRING1 , location ) ) ;
 + throw new PermanentStorageException ( String . format ( STRING2 , location ) ) ;

 return storageDir ;
 }


<nb> public class CoreProgressManager extends ProgressManager implements Disposable {
 public Task getTask ( ) {
 return myTask ;
 }
 +
 + @ override
 + public String toString ( ) {
 + return myTask . toString ( ) ;
 + }
 }
 protected static class TaskRunnable extends TaskContainer {
 private final ProgressIndicator myIndicator ;
 <nb> public class ProgressManagerImpl extends CoreProgressManager implements Disposab
 final Runnable process = new TaskRunnable ( task , progressIndicator , continuation ) ;

 TaskContainer action = new TaskContainer ( task ) {
 -
 - @ override
 - public String toString ( ) {
 - return task . toString ( ) ;
 - }
 -
 @ override
 public void run ( ) {
 boolean canceled = false ;

TaskContainer move meaningful toString to the base class


<nb> public class PyStructureViewTest extends PyTestCase {
 STRING0 +
 STRING1 +
 STRING2 +
 - STRING3 ,
 + STRING3 +
 + STRING4 ,
 true ) ;
 }

Updated structure view test to include object


<nb> public final class TypeUtils
 return type . equalTo ( leftBlock , leftPosition , rightBlock , rightPosition ) ;
 }

 - public static List < Type > resolveTypes ( List < TypeSignature > typeNames , final TypeManager typeManager )
 + public static List < Type > resolveTypes ( List < TypeSignature > typeNames , TypeManager typeManager )
 {
 return typeNames . stream ( )
 . map ( ( TypeSignature type ) - > checkNotNull ( typeManager . getType ( type ) , STRING0 , type ) )


<nb>
 COMMENT
 package NAMESPACE ;

 - import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 +
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 public class JTASessionContext extends AbstractCurrentSessionContext {
 private static final CoreMessageLogger LOG = Logger . getMessageLogger ( CoreMessageLogger . class , JTASessionContext . class . getName ( ) ) ;

 - private transient Map currentSessionMap = new Hashtable ( ) ;
 + private transient Map < Object , Session > currentSessionMap = new ConcurrentHashMap < Object , Session > ( ) ;

 public JTASessionContext ( SessionFactoryImplementor factory ) {
 super ( factory ) ;
 <nb> public class JTASessionContext extends AbstractCurrentSessionContext {

 final Object txnIdentifier = jtaPlatform . getTransactionIdentifier ( txn ) ;

 - Session currentSession = ( Session ) currentSessionMap . get ( txnIdentifier ) ;
 + Session currentSession = currentSessionMap . get ( txnIdentifier ) ;

 if ( currentSession == null ) {
 currentSession = buildOrObtainSession ( ) ;

using ConcurrentHashMap for decrease synchronization


<nb> final class MultiServerCluster extends BaseCluster {

 switch ( clusterType ) {
 case ReplicaSet :
 - handleReplicaSetMemberChange ( newDescription ) ;
 + handleReplicaSetMemberChanged ( newDescription ) ;
 break ;
 case Sharded :
 handleShardRouterChanged ( newDescription ) ;
 <nb> final class MultiServerCluster extends BaseCluster {
 fireChangeEvent ( ) ;
 }

 - private void handleReplicaSetMemberChange ( final ServerDescription newDescription ) {
 + private void handleReplicaSetMemberChanged ( final ServerDescription newDescription ) {
 if ( ! newDescription . isReplicaSetMember ( ) ) {
 LOGGER . severe ( format ( STRING0 ,
 newDescription . getType ( ) , newDescription . getAddress ( ) ) ) ;


<nb> public class SyncManager {
 null , null ) ;
 }

 - Intent startServiceIntent = new Intent ( mContext , SyncJobService . class ) ;
 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + final Intent startServiceIntent = new Intent ( mContext , SyncJobService . class ) ;
 startServiceIntent . putExtra ( SyncJobService . EXTRA_MESSENGER , new Messenger ( mSyncHandler ) ) ;
 - mContext . startService ( startServiceIntent ) ;
 + new Handler ( mContext . getMainLooper ( ) ) . post ( new Runnable ( ) {
 + @ override
 + public void run ( ) {
 + mContext . startService ( startServiceIntent ) ;
 + }
 + } ) ;
 }

 private boolean isDeviceProvisioned ( ) {

Start the sync job service after primary boot


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

 COMMENT
 COMMENT
 COMMENT
 public class PlatformModifiableModelsProvider implements ModifiableModelsProvider {
 @ override
 - public ModifiableRootModel getModuleModifiableModel ( final Module module ) {
 + public ModifiableRootModel getModuleModifiableModel ( @ notnull final Module module ) {
 return ModuleRootManager . getInstance ( module ) . getModifiableModel ( ) ;
 }

do not call GemManager updateGemset Module with null


<nb> public class OperatorContext
 }
 } ) ;
 }
 - long newReservation = memoryReservation . getAndAdd ( bytes ) ;
 + long newReservation = memoryReservation . addAndGet ( bytes ) ;
 if ( newReservation > maxMemoryReservation ) {
 memoryReservation . getAndAdd ( - bytes ) ;
 throw new ExceededMemoryLimitException ( getMaxMemorySize ( ) ) ;
 <nb> public class OperatorContext
 return false ;
 }

 - long newReservation = memoryReservation . getAndAdd ( bytes ) ;
 + long newReservation = memoryReservation . addAndGet ( bytes ) ;
 if ( newReservation > maxMemoryReservation ) {
 memoryReservation . getAndAdd ( - bytes ) ;
 return false ;

Fix memory accounting error in OperatorContext


<nb> public class LockPatternUtils {
 }

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 - public static boolean isDeviceEncrypted ( ) {
 - IMountService mountService = IMountService . Stub . asInterface (
 - ServiceManager . getService ( STRING0 ) ) ;
 - try {
 - return mountService . getEncryptionState ( ) != IMountService . ENCRYPTION_STATE_NONE
 - && mountService . getPasswordType ( ) != StorageManager . CRYPT_TYPE_DEFAULT ;
 - } catch ( RemoteException re ) {
 - Log . e ( TAG , STRING1 , re ) ;
 - }
 - return true ;
 - }
 -
 - COMMENT
 COMMENT
 COMMENT
 COMMENT

Move legacy full disk encryption code to Settings


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

 COMMENT
 <nb> public class JetContentBasedFileSubstitutor implements ContentBasedClassFileProc
 return new JetHighlighter ( ) ;
 }

 - @ notnull
 + @ nullable
 @ override
 public PsiFile getDecompiledPsiFile ( PsiFile psiFile ) {
 return JetDecompiledData . getDecompiledData ( ( ClsFileImpl ) psiFile ) . getJetFile ( ) ;

Made JetContentBasedFileSubstitutor getDecompiledPsiFile Nullable


<nb> public class PredefinedConfiguration extends Configuration {
 SINGLE
 createSearchTemplateInfo ( SSRBundle . message ( STRING0 ) , STRING1 , EXPRESSION_TYPE ) ,
 createSearchTemplateInfo ( SSRBundle . message ( STRING2 ) , STRING3 , EXPRESSION_TYPE ) ,
 + createSearchTemplateInfo ( SSRBundle . message ( STRING4 ) , STRING5 , EXPRESSION_TYPE ) ,
 createSearchTemplateInfo ( SSRBundle . message ( STRING6 ) , STRING7 , EXPRESSION_TYPE ) ,
 createSearchTemplateInfo ( SSRBundle . message ( STRING8 ) , STRING9 , EXPRESSION_TYPE ) ,
 createSearchTemplateInfo ( SSRBundle . message ( STRING10 ) , STRING11 , EXPRESSION_TYPE ) ,


<nb> public class SimpleHandlerResultHandlerTests {

 hm = new HandlerMethod ( controller , TestController . class . getMethod ( STRING0 ) ) ;
 type = ResolvableType . forMethodParameter ( hm . getReturnType ( ) ) ;
 - SINGLE
 + SINGLE
 assertTrue ( resultHandler . supports ( createHandlerResult ( hm , type ) ) ) ;

 hm = new HandlerMethod ( controller , TestController . class . getMethod ( STRING1 ) ) ;


<nb> class DriverDependenciesTree {
 return libraries ;
 }

 - public void resolveLibraries ( ) {
 + public boolean resolveLibraries ( ) {
 + boolean resolved = false ;
 try {
 runnableContext . run ( true , true , new DBRRunnableWithProgress ( ) {
 @ override
 <nb> class DriverDependenciesTree {
 }
 }
 } ) ;
 + resolved = true ;
 } catch ( InterruptedException e ) {
 SINGLE
 } catch ( InvocationTargetException e ) {
 <nb> class DriverDependenciesTree {
 SINGLE
 SINGLE
 }
 + return resolved ;
 }

 public void resizeTree ( ) {
 <nb> class DriverDownloadAutoPage extends DriverDownloadPage {

 @ override
 void resolveLibraries ( ) {
 - depsTree . resolveLibraries ( ) ;
 + if ( ! depsTree . resolveLibraries ( ) ) {
 + setErrorMessage ( STRING0 ) ;
 + }
 depsTree . resizeTree ( ) ;
 }


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

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

 @ requiresauthentication
 <nb> public class StreamsTest extends BaseRestTest {
 . statusCode ( NUMBER0 ) ;
 }

 - protected ValidatableResponse createStreamFromRequest ( byte [ ] request ) {
 - return given ( )
 - . when ( )
 - . body ( request )
 - . post ( STRING0 )
 - . then ( )
 - . contentType ( ContentType . JSON )
 - . assertThat ( ) ;
 - }
 -
 protected ValidatableResponse createStreamFromRequest ( String request ) {
 return given ( )
 . when ( )


<nb> public final class Providers {
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 public static < T > Provider < T > guicify ( javax . inject . Provider < T > provider ) {
 if ( provider instanceof Provider ) {


<nb> public class DatabaseDescriptor

 public static String getInitialToken ( )
 {
 - return conf . initial_token ;
 + return System . getProperty ( STRING0 , conf . initial_token ) ;
 }

 public static String getClusterName ( )
 <nb> public class DatabaseDescriptor

 public static int getStoragePort ( )
 {
 - return conf . storage_port ;
 + return Integer . parseInt ( System . getProperty ( STRING1 , conf . storage_port . toString ( ) ) ) ;
 }

 public static int getRpcPort ( )
 {
 - return conf . rpc_port ;
 + return Integer . parseInt ( System . getProperty ( STRING2 , conf . rpc_port . toString ( ) ) ) ;
 }

 public static long getRpcTimeout ( )

Allow configured ports and initial token to be overridden by system


<nb> import NAMESPACE ;

 public class Constants {

 - public static final String VERSION = STRING0 ;
 + public static final String VERSION = STRING1 ;

 }

run gen thrift java to update thrift Constants java


<nb> public class ZWaveConverterHandler {
 ZWaveCommandClass commandClass ;
 String commandClassName = bindingConfiguration . getArguments ( ) . get ( STRING0 ) ;

 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 - SINGLE
 -
 if ( commandClassName != null ) {
 commandClass = node . resolveCommandClass ( CommandClass . getCommandClass ( commandClassName ) , bindingConfiguration . getEndpoint ( ) ) ;


<nb> public class NewChatActivity extends FragmentActivity implements View . OnCreateCo
 mHandler = new SimpleAlertHandler ( this ) ;

 mChatPager = ( ViewPager ) findViewById ( R . id . chatpager ) ;
 + mChatPager . setSaveEnabled ( false ) ;
 mChatPager . setOnPageChangeListener ( new OnPageChangeListener ( )
 {

prevent ClassNotFoundException when restoring ViewPager


<nb> class CollectionBinding extends AbstractCollectionBinding {

 Iterable getIterable ( Object o ) {
 if ( o instanceof Set ) {
 - Set set = ( Set ) o ;
 - return new TreeSet ( set ) ;
 + SINGLE
 + SINGLE
 + if ( o instanceof SortedSet ) {
 + SINGLE
 + return ( Iterable ) o ;
 + }
 + return new TreeSet ( ( Set ) o ) ;
 }
 return ( Collection ) o ;
 }


<nb> public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
 if ( icons == null )
 return ;

 - state . currentTexture = icons . getIcon ( state . textureMatrix . getTextureIndex ( ForgeDirection . UNKNOWN ) ) ;
 -
 boolean west = false ;
 boolean east = false ;
 boolean down = false ;
 <nb> public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
 south = true ;
 }

 + state . currentTexture = icons . getIcon ( state . textureMatrix . getTextureIndex ( ForgeDirection . UNKNOWN ) ) ;
 block . setBlockBounds ( minSize , minSize , minSize , maxSize , maxSize , maxSize ) ;
 renderblocks . setRenderBoundsFromBlock ( block ) ;
 if ( ! west )

Fix pipe renderer using wrong texture for center


<nb>
 package NAMESPACE ;

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

 <nb> public enum Platform {
 COMMENT
 COMMENT
 COMMENT
 + @ skylarkcallable ( name = STRING0 , structField = true ,
 + doc = STRING1
 + + STRING2
 + + STRING3 )
 public String getNameInPlist ( ) {
 return nameInPlist ;
 }


<nb> public final class ClassReflection {
 }

 COMMENT
 - static public Object newInstance ( Class c ) throws ReflectionException {
 - return ReflectionCache . getType ( c ) . newInstance ( ) ;
 + static public < T > T newInstance ( Class < T > c ) throws ReflectionException {
 + return ( T ) ReflectionCache . getType ( c ) . newInstance ( ) ;
 }

 COMMENT
 <nb> public final class ClassReflection {
 }

 COMMENT
 - static public Object newInstance ( Class c ) throws ReflectionException {
 + static public < T > T newInstance ( Class < T > c ) throws ReflectionException {
 try {
 return c . newInstance ( ) ;
 } catch ( InstantiationException e ) {


<nb> public class FetchBlogListWPOrg extends FetchBlogListAbstract {

 private boolean validateListMethodsResponse ( Object [ ] availableMethods ) {
 if ( availableMethods == null ) {
 - AppLog . e ( T . NUX , STRING0 ) ;
 + AppLog . e ( T . NUX , STRING1 ) ;
 return false ;
 }
 SINGLE
 <nb> public class FetchBlogListWPOrg extends FetchBlogListAbstract {
 private boolean checkXMLRPCEndpointValidity ( String url ) {
 try {
 Object [ ] methods = ( Object [ ] ) doSystemListMethodsXMLRPC ( url ) ;
 + if ( methods == null ) {
 + AppLog . e ( T . NUX , STRING1 ) ;
 + return false ;
 + }
 SINGLE
 AppLog . i ( T . NUX , STRING2 + url ) ;
 AppLog . i ( T . NUX , STRING3 ) ;

Do not return xml rpc endpoint found but have missing methods when the server replies with an empty document


<nb> public class JavadocOptionFileWriterContext {
 SINGLE
 SINGLE
 write ( value . replaceAll ( STRING0 , STRING1 )
 + SINGLE
 . replaceAll ( STRING2 + getLineSeparator ( ) + STRING3 , STRING0 + getLineSeparator ( ) ) ) ;
 write ( STRING4 ) ;
 return this ;

Added a comment that describes some gotchas around writing options file on windows


<nb>
 COMMENT
 - COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 <nb> public class GoCreateFileAction extends CreateFileFromTemplateAction implements

 @ override
 protected PsiFile createFile ( String name , @ notnull String templateName , @ notnull PsiDirectory dir ) {
 - FileTemplate template = FileTemplateManager . getInstance ( ) . getInternalTemplate ( templateName ) ;
 + FileTemplate template = FileTemplateManager . getInstance ( dir . getProject ( ) ) . getInternalTemplate ( templateName ) ;
 Properties properties = new Properties ( ) ;
 properties . setProperty ( PACKAGE , ContainerUtil . getLastItem ( StringUtil . split ( dir . getName ( ) , STRING0 ) ) ) ;
 try {


<nb> public class Element extends Node {
 COMMENT
 COMMENT
 public String id ( ) {
 - String id = attr ( STRING0 ) ;
 - return id == null ? STRING1 : id ;
 + return attributes . get ( STRING0 ) ;
 }

 COMMENT


<nb>
 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 ListTemplatesHandler implements CodeInsightActionHandler {
 }

 if ( matchingTemplates . isEmpty ( ) && customTemplatesLookupElements . isEmpty ( ) ) {
 - HintManager . getInstance ( ) . showErrorHint ( editor , CodeInsightBundle . message ( STRING0 ) ) ;
 + if ( ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
 + HintManager . getInstance ( ) . showErrorHint ( editor , CodeInsightBundle . message ( STRING0 ) ) ;
 + }
 return ;
 }

do not show an error hint in unit test mode


<nb> public final class ShutdownThread extends Thread {
 if ( confirm ) {
 final CloseDialogReceiver closer = new CloseDialogReceiver ( context ) ;
 final AlertDialog dialog = new AlertDialog . Builder ( context )
 - . setIconAttribute ( android . R . attr . alertDialogIcon )
 . setTitle ( com . android . internal . R . string . power_off )
 . setMessage ( resourceId )
 . setPositiveButton ( com . android . internal . R . string . yes , new DialogInterface . OnClickListener ( ) {

Don t show icon for power off confirmation dialog


<nb> public class RapidsTest extends TestUtil {
 tree = STRING0 ;
 checkTree ( tree ) ;
 SINGLE
 - tree = STRING1 ;
 + SINGLE
 + tree = STRING2 ;
 checkTree ( tree ) ;
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class PlacePickerFragment extends GraphObjectListFragment < GraphPlace > {

 private void onSearchTextTimerTriggered ( ) {
 if ( hasSearchTextChangedSinceLastQuery ) {
 - getActivity ( ) . runOnUiThread ( new Runnable ( ) {
 + Handler handler = new Handler ( Looper . getMainLooper ( ) ) ;
 + handler . post ( new Runnable ( ) {
 @ override
 public void run ( ) {
 FacebookException error = null ;

android sdk Fix PlacePickerFragment search text timer to avoid null reference


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

 SINGLE
 - SINGLE
 - reorderResultSet ( constraint . getOrderPosition ( ) == NUMBER0 , new Runnable ( ) {
 + reorderResultSet ( false , new Runnable ( ) {
 @ override
 public void run ( )
 {


<nb> public class TestExpressionInterpreter
 assertOptimizedEquals ( STRING0 , getSeconds ( new DateTime ( NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 , DateTimeZone . UTC ) ) ) ;
 }

 + @ test
 + public void testDateLiteral ( )
 + {
 + assertOptimizedEquals ( STRING1 , getSeconds ( new DateTime ( NUMBER0 , NUMBER1 , NUMBER7 , NUMBER8 , NUMBER8 , NUMBER8 , NUMBER8 , DateTimeZone . UTC ) ) ) ;
 + assertOptimizedEquals ( STRING2 , getSeconds ( new DateTime ( NUMBER9 , NUMBER3 , NUMBER7 , NUMBER8 , NUMBER8 , NUMBER8 , NUMBER8 , DateTimeZone . UTC ) ) ) ;
 + }
 +
 private static String getSeconds ( DateTime dateTime )
 {
 return String . valueOf ( MILLISECONDS . toSeconds ( dateTime . getMillis ( ) ) ) ;


<nb> public class NettyAsyncHttpProvider extends IdleStateHandler implements AsyncHtt
 ChannelFuture writeFuture ;
 if ( channel . getPipeline ( ) . get ( SslHandler . class ) != null ) {
 writeFuture = channel . write ( new ChunkedFile ( raf , NUMBER0 , fileLength , NUMBER1 ) ) ;
 - writeFuture . addListener ( new ProgressListener ( false , future . getAsyncHandler ( ) , future ) {
 - public void operationComplete ( ChannelFuture cf ) {
 - super . operationComplete ( cf ) ;
 - }
 - } ) ;
 + writeFuture . addListener ( new ProgressListener ( false , future . getAsyncHandler ( ) , future ) ) ;
 } else {
 final FileRegion region = new OptimizedFileRegion ( raf , NUMBER0 , fileLength ) ;
 writeFuture = channel . write ( region ) ;


<nb> package NAMESPACE ;

 COMMENT
 COMMENT
 - COMMENT
 COMMENT
 COMMENT
 public interface Defn


<nb> public class StructStrategy implements ModelSchemaExtractionStrategy {
 return Iterables . filter ( methods , new Predicate < Method > ( ) {
 @ override
 public boolean apply ( Method method ) {
 - return ! method . getName ( ) . contains ( STRING0 ) && ! ignoredMethods . contains ( equivalence . wrap ( method ) ) ;
 + return ! method . isSynthetic ( ) && ! ignoredMethods . contains ( equivalence . wrap ( method ) ) ;
 }
 } ) ;
 }

Ignore synthetic methods instead of using presence of in name


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class JPAModelTest {
 }

 @ test
 + public void testInsertOneToMany ( ) {
 + PersonEntity person = randomPerson ( ) ;
 + PhoneEntity phone = new PhoneEntity ( ) ;
 + phone . setPhoneNumber ( STRING0 ) ;
 + phone . setOwner ( person ) ;
 + person . getPhoneNumbers ( ) . add ( phone ) ;
 + data . insert ( person ) ;
 + }
 +
 + @ test
 public void testSingleQueryExecute ( ) {
 data . insert ( randomPerson ( ) ) ;
 Result < Person > result = data . select ( Person . class ) . get ( ) ;


<nb> public class DiffContentUtil {
 }

 public static boolean isTextType ( FileType fileType ) {
 - return fileType != null && ! fileType . isBinary ( ) ;
 + return fileType != null && ! fileType . isBinary ( ) && ! fileType . isReadOnly ( ) ;
 }

 public static String getTitle ( VirtualFile virtualFile ) {

don t get documents for files with read onloy file type


<nb> package NAMESPACE ;
 @ suppresswarnings ( STRING0 )
 public class InvalidJsonException extends JsonPathException {

 + COMMENT
 + COMMENT
 + COMMENT
 + private final String json ;
 +
 public InvalidJsonException ( ) {
 + json = null ;
 }

 public InvalidJsonException ( String message ) {
 super ( message ) ;
 + json = null ;
 }

 public InvalidJsonException ( String message , Throwable cause ) {
 super ( message , cause ) ;
 + json = null ;
 }

 public InvalidJsonException ( Throwable cause ) {
 super ( cause ) ;
 + json = null ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + public InvalidJsonException ( final Throwable cause , final String json ) {
 + super ( cause ) ;
 + this . json = json ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 + public String getJson ( ) {
 + return json ;
 }
 }

Provide a constructor that captures the JSON


<nb> public class NotificationManagerService extends INotificationManager . Stub
 if ( ! notificationMatchesUserId ( r , userId ) ) {
 continue ;
 }
 + SINGLE
 + if ( r . userId == UserHandle . USER_ALL && pkg == null ) {
 + continue ;
 + }
 if ( ( r . notification . flags & mustHaveFlags ) != mustHaveFlags ) {
 continue ;
 }

Don t cancel any notifications that are meant for all users if no package is specified


<nb> public class RxPermissions {
 COMMENT
 COMMENT
 COMMENT
 - public void onRequestPermissionsResult ( int requestCode ,
 - String permissions [ ] , int [ ] grantResults ) {
 + void onRequestPermissionsResult ( int requestCode ,
 + String permissions [ ] , int [ ] grantResults ) {
 for ( int i = NUMBER0 ; i < permissions . length ; i ++ ) {
 SINGLE
 PublishSubject < Boolean > subject = mSubjects . get ( permissions [ i ] ) ;


<nb> public class Inputs {
 }
 } catch ( NoSuchInputTypeException e ) {
 LOG . warn ( STRING0 , io . getType ( ) ) ;
 - throw new WebApplicationException ( e , Response . Status . NOT_FOUND ) ;
 + continue ;
 } catch ( ConfigurationException e ) {
 - LOG . error ( STRING1 , e ) ;
 - throw new WebApplicationException ( e , Response . Status . BAD_REQUEST ) ;
 + LOG . error ( STRING2 , e ) ;
 + continue ;
 }

 launch ( input , io . getInputId ( ) ) ;

do not throw WebApplicationExceptions in Inputs java lolwut


<nb> import NAMESPACE ;
 import NAMESPACE ;

 import static NAMESPACE ;
 + import static NAMESPACE ;

 SINGLE
 SINGLE
 <nb> public class ModelType
 return null ;
 }

 - return String . format ( STRING0 , getTypeSignature ( ) ) ;
 + return format ( STRING0 , getTypeSignature ( ) ) . getBytes ( ) ;
 }
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> import NAMESPACE ;
 COMMENT
 COMMENT
 public class MessageManager implements OnLoadListener , OnPacketListener , OnDisconnectListener ,
 - OnAccountRemovedListener , OnRosterReceivedListener , OnAccountArchiveModeChangedListener ,
 - OnStatusChangeListener {
 + OnAccountRemovedListener , OnAccountDisabledListener , OnRosterReceivedListener ,
 + OnAccountArchiveModeChangedListener , OnStatusChangeListener {

 private final static MessageManager instance ;

 <nb> public class MessageManager implements OnLoadListener , OnPacketListener , OnDisco
 chats . clear ( accountItem . getAccount ( ) ) ;
 }

 + @ override
 + public void onAccountDisabled ( AccountItem accountItem ) {
 + chats . clear ( accountItem . getAccount ( ) ) ;
 + }
 +
 COMMENT
 COMMENT
 COMMENT

MessageManager removed active chats on account disable


<nb> static public void print ( Object x , Writer w ) throws Exception {
 if ( RT . count ( o . meta ( ) ) > NUMBER0 )
 {
 IPersistentMap meta = o . meta ( ) ;
 - w . write ( STRING0 ) ;
 + w . write ( STRING1 ) ;
 if ( meta . count ( ) == NUMBER1 && meta . contains ( TAG_KEY ) )
 print ( meta . valAt ( TAG_KEY ) , w ) ;
 else


<nb> class NotificationManagerService extends INotificationManager . Stub
 private NotificationRecord mSoundNotification ;
 private AsyncPlayer mSound ;
 private boolean mSystemReady ;
 - private int mDisabledNotifications = StatusBarManager . DISABLE_NOTIFICATION_ALERTS ;
 + private int mDisabledNotifications ;

 private NotificationRecord mVibrateNotification ;
 private Vibrator mVibrator = new Vibrator ( ) ;
 <nb> class NotificationManagerService extends INotificationManager . Stub
 mStatusBarService = statusBar ;
 statusBar . setNotificationCallbacks ( mNotificationCallbacks ) ;

 + SINGLE
 + SINGLE
 + SINGLE
 + SINGLE
 + if ( NUMBER0 != Settings . Secure . getInt ( mContext . getContentResolver ( ) ,
 + Settings . Secure . DEVICE_PROVISIONED , NUMBER0 ) ) {
 + mDisabledNotifications = AudioManager . STREAM_NOTIFICATION ;
 + }
 +
 SINGLE
 IntentFilter filter = new IntentFilter ( ) ;
 filter . addAction ( Intent . ACTION_BATTERY_CHANGED ) ;

Have the notification service only have notifications diabled


<nb> public class SlidingUpPanelLayout extends ViewGroup {
 SINGLE
 return mIsSlidingUp
 ? getMeasuredHeight ( ) - getPaddingBottom ( ) - mPanelHeight - slidePixelOffset
 - : getPaddingTop ( ) + slidePixelOffset ;
 + : getPaddingTop ( ) - panelHeight + mPanelHeight + slidePixelOffset ;
 }

 COMMENT
 <nb> public class SlidingUpPanelLayout extends ViewGroup {
 result = super . drawChild ( canvas , child , drawingTime ) ;
 canvas . restoreToCount ( save ) ;

 - if ( drawScrim && mCoveredFadeColor > NUMBER0 ) {
 + if ( drawScrim && mCoveredFadeColor != NUMBER0 ) {
 final int baseAlpha = ( mCoveredFadeColor & NUMBER1 ) > > > NUMBER2 ;
 final int imag = ( int ) ( baseAlpha * mSlideOffset ) ;
 final int color = imag < < NUMBER2 | ( mCoveredFadeColor & NUMBER3 ) ;

Fixed the top gravity support and dimming


<nb> import NAMESPACE ;
 import NAMESPACE ;

 @ runwith ( Cucumber . class )
 - SINGLE
 - SINGLE
 - @ cucumber.options ( tags = { STRING0 } , format = { STRING1 , STRING2 } )
 + @ cucumber.options ( format = { STRING1 , STRING2 } )
 public class RunCukesTest {
 }


<nb> public interface IndexSearcherWrapper {
 DirectoryReader wrap ( DirectoryReader reader ) ;

 COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 COMMENT
 COMMENT
 - IndexSearcher wrap ( IndexSearcher searcher ) throws EngineException ;
 + IndexSearcher wrap ( EngineConfig engineConfig , IndexSearcher searcher ) throws EngineException ;

 }
 <nb> public final class IndexSearcherWrappingService {
 SINGLE
 SINGLE
 SINGLE
 - IndexSearcher indexSearcher = wrapper . wrap ( innerIndexSearcher ) ;
 + IndexSearcher indexSearcher = wrapper . wrap ( engineConfig , innerIndexSearcher ) ;
 if ( reader == engineSearcher . reader ( ) && indexSearcher == innerIndexSearcher ) {
 return engineSearcher ;
 } else {
 <nb> public class InternalEngineTests extends ESTestCase {
 }

 @ override
 - public IndexSearcher wrap ( IndexSearcher searcher ) throws EngineException {
 + public IndexSearcher wrap ( EngineConfig engineConfig , IndexSearcher searcher ) throws EngineException {
 counter . incrementAndGet ( ) ;
 return searcher ;
 }

Pass down the EngineConfig to IndexSearcherWrapper


<nb> public class DjangoProjectCreationTest extends PyEnvTestCase {
 contentRoot ,
 WEB_SITE_NAME ,
 STRING0 ,
 + templateDir ,
 djangoPath ,
 false ,
 false

reverted back templates folder setup in django


<nb> abstract class AbstractModuleComponentResolveMetadata implements MutableModuleCo

 public abstract AbstractModuleComponentResolveMetadata copy ( ) ;

 + @ override
 + public ModuleComponentResolveMetadata asImmutable ( ) {
 + SINGLE
 + return copy ( ) ;
 + }
 +
 + @ override
 + public MutableModuleComponentResolveMetadata asMutable ( ) {
 + return copy ( ) ;
 + }
 +
 public MutableModuleComponentResolveMetadata withSource ( ModuleSource source ) {
 AbstractModuleComponentResolveMetadata copy = copy ( ) ;
 copy . setModuleSource ( source ) ;
 <nb> public interface ModuleComponentResolveMetadata extends ComponentResolveMetadata
 ModuleComponentResolveMetadata withSource ( ModuleSource source ) ;

 COMMENT
 + COMMENT
 + COMMENT
 + MutableModuleComponentResolveMetadata asMutable ( ) ;
 +
 + COMMENT
 COMMENT
 COMMENT
 ModuleComponentArtifactMetadata artifact ( String type , @ nullable String extension , @ nullable String classifier ) ;
 <nb> import NAMESPACE ;

 public interface MutableModuleComponentResolveMetadata extends ModuleComponentResolveMetadata {
 COMMENT
 + COMMENT
 + COMMENT
 + ModuleComponentResolveMetadata asImmutable ( ) ;
 +
 + COMMENT
 COMMENT
 COMMENT
 MutableModuleComponentResolveMetadata copy ( ) ;

Added methods to convert an immutable ModuleComponentResolveMetadata into a mutable MutableModuleComponentResolveMetadata and vice versa


<nb> public class EmojiconGridFragment extends Fragment implements AdapterView . OnItem
 super . onAttach ( activity ) ;
 if ( activity instanceof OnEmojiconClickedListener ) {
 mOnEmojiconClickedListener = ( OnEmojiconClickedListener ) activity ;
 - } else {
 + } if ( getParentFragment ( ) instanceof OnEmojiconClickedListener )
 + {
 + mOnEmojiconClickedListener = ( OnEmojiconClickedListener ) getParentFragment ( ) ;
 + }
 + else {
 throw new IllegalArgumentException ( activity + STRING0 + OnEmojiconClickedListener . class . getSimpleName ( ) ) ;
 }
 }
 <nb> public class EmojiconsFragment extends Fragment implements ViewPager . OnPageChang
 super . onAttach ( activity ) ;
 if ( getActivity ( ) instanceof OnEmojiconBackspaceClickedListener ) {
 mOnEmojiconBackspaceClickedListener = ( OnEmojiconBackspaceClickedListener ) getActivity ( ) ;
 - } else {
 + } if ( getParentFragment ( ) instanceof OnEmojiconBackspaceClickedListener )
 + {
 + mOnEmojiconBackspaceClickedListener = ( OnEmojiconBackspaceClickedListener ) getParentFragment ( ) ;
 + }
 + else {
 throw new IllegalArgumentException ( activity + STRING0 + OnEmojiconBackspaceClickedListener . class . getSimpleName ( ) ) ;
 }
 }

Adding support for using inside a fragment as fragment children


<nb> public abstract class FirebaseLoginBaseActivity extends AppCompatActivity {
 @ override
 protected void onStart ( ) {
 super . onStart ( ) ;
 + SINGLE
 + SINGLE
 getFirebaseRef ( ) . addAuthStateListener ( new Firebase . AuthStateListener ( ) {
 @ override
 public void onAuthStateChanged ( AuthData authData ) {


<nb> public class OpenStreetMapGraphBuilderImpl implements GraphBuilder {
 }
 }
 }
 -
 + GeometryFactory geometryFactory = new GeometryFactory ( ) ;
 +
 COMMENT
 ArrayList < Vertex > endpoints = new ArrayList < Vertex > ( ) ;

 <nb> public class OpenStreetMapGraphBuilderImpl implements GraphBuilder {
 Vertex startEndpoint = null , endEndpoint = null ;

 ArrayList < Coordinate > segmentCoordinates = new ArrayList < Coordinate > ( ) ;
 - GeometryFactory geometryFactory = new GeometryFactory ( ) ;

 COMMENT
 COMMENT

use a single geometry factory for all geometries


<nb> public class IndexDatabase {
 RuntimeEnvironment env = RuntimeEnvironment . getInstance ( ) ;
 String path = env . getPathRelativeToSourceRoot ( file , NUMBER0 ) ;
 SINGLE
 + SINGLE
 path = path . replace ( STRING0 , STRING1 ) ;

 IndexReader ireader = getIndexReader ( path ) ;


<nb> class BackupManagerService extends IBackupManager . Stub {

 synchronized ( mClearDataLock ) {
 mClearingData = true ;
 + COMMENT
 + Temporarily revert this change until we find a better solution .
 try {
 mActivityManager . clearApplicationUserData ( packageName , observer ) ;
 } catch ( RemoteException e ) {
 SINGLE
 }
 + COMMENT
 + mPackageManager . clearApplicationUserData ( packageName , observer ) ;

 SINGLE
 long timeoutMark = System . currentTimeMillis ( ) + TIMEOUT_INTERVAL ;

Temporarily rollback a change that s causing SetupWizard failures during restore


<nb> public final class MultiPassLightingLogic extends DefaultTechniqueDefLogic {
 lightDir . setValue ( VarType . Vector4 , tmpLightDirection ) ;

 break ;
 + case Probe :
 + break ;
 default :
 throw new UnsupportedOperationException ( STRING0 + l . getType ( ) ) ;
 }
 <nb> public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic {
 lightData . setVector4InArray ( tmpVec . getX ( ) , tmpVec . getY ( ) , tmpVec . getZ ( ) , spotAngleCos , lightDataIndex ) ;
 lightDataIndex ++ ;
 break ;
 + case Probe :
 + break ;
 default :
 throw new UnsupportedOperationException ( STRING0 + l . getType ( ) ) ;
 }

Fixed a crash with singlepass an multipass TDL when a lightProbe is added to the scene


<nb> public abstract class AbstractTestResourceSet {
 getMount ( ) + STRING0 , webResource . getWebappPath ( ) ) ;
 }

 + @ test
 + public final void testGetResourceCaseSensitive ( ) {
 + WebResource webResource =
 + resourceRoot . getResource ( getMount ( ) + STRING1 ) ;
 + Assert . assertFalse ( webResource . exists ( ) ) ;
 + }
 +
 + @ test
 + public final void testGetResourceTraversal ( ) {
 + WebResource webResource =
 + resourceRoot . getResource ( getMount ( ) + STRING2 ) ;
 + Assert . assertFalse ( webResource . exists ( ) ) ;
 + }
 +
 +
 SINGLE

 @ test ( expected = IllegalArgumentException . class )


<nb> public final class CipherSuiteConverter {
 handshakeAlgo = STRING0 ;
 }

 + handshakeAlgo = handshakeAlgo . replace ( STRING1 , STRING2 ) ;
 handshakeAlgo = handshakeAlgo . replace ( STRING3 , STRING4 ) ;
 if ( export ) {
 return handshakeAlgo + STRING5 ;

Some OpenSSL aliases use EDH instead of DHE


<nb> public class MainActivity extends ActionBarActivity implements NavDrawerActivity
 menuInfo = lastMenuInfo ;
 }

 - if ( menuInfo . targetView . getParent ( ) instanceof ListView == false
 - || ( ( ListView ) menuInfo . targetView . getParent ( ) ) . getId ( ) != R . id . nav_list ) {
 + if ( menuInfo == null
 + || menuInfo . targetView == null
 + || menuInfo . targetView . getParent ( ) == null
 + || menuInfo . targetView . getParent ( ) instanceof ListView == false
 + || ( ( ListView ) menuInfo . targetView . getParent ( ) ) . getId ( ) != R . id . nav_list ) {
 return false ;
 }
 final int position = menuInfo . position ;

Just check everything for null before you do stuff with it


<nb> public class EntitySerializer implements Serializer {
 writer . append ( STRING0 ) ;
 for ( Parameter p : method . getParameters ( ) ) {
 SINGLE
 - writer . append ( COMMA + STRING1 + p . getName ( ) + STRING2 ) ;
 + String paramType = writer . getGenericName ( true , p . getType ( ) ) ;
 + writer . append ( COMMA + STRING3 + paramType + STRING4 + p . getName ( ) + STRING2 ) ;
 }
 writer . append ( STRING5 ) ;

added proper type parameter to ConstantImpl usage


<nb> public class ColorRGBADialog extends javax . swing . JDialog {
 }

 public void setColor ( Color color ) {
 - this . color = color ;
 - jColorChooser1 . setColor ( color ) ;
 -
 - alphaSlider . setValue ( ( int ) ( ( float ) ( color . getAlpha ( ) / NUMBER0 f ) * NUMBER1 ) ) ;
 + if ( color != null ) {
 + this . color = color ;
 + jColorChooser1 . setColor ( color ) ;
 +
 + alphaSlider . setValue ( ( int ) ( ( float ) ( color . getAlpha ( ) / NUMBER0 f ) * NUMBER1 ) ) ;
 + }

 }
 }

fixed NPE in colorRGBADIalog introduced by previous change


<nb> public abstract class JavaPlugin implements Plugin {

 try {
 URL url = getClassLoader ( ) . getResource ( filename ) ;
 +
 + if ( url == null ) {
 + return null ;
 + }
 +
 URLConnection connection = url . openConnection ( ) ;
 connection . setUseCaches ( false ) ;
 return connection . getInputStream ( ) ;

Fixed the fix of the fix of javaplugin getResource


<nb> public class CompileStepBeforeRun extends BeforeRunTaskProvider < CompileStepBefor
 }
 }

 - done . down ( ) ;
 - scope . putUserData ( RUN_CONFIGURATION , configuration ) ;
 - compilerManager . make ( scope , callback ) ;
 + if ( ! myProject . isDisposed ( ) ) {
 + done . down ( ) ;
 + scope . putUserData ( RUN_CONFIGURATION , configuration ) ;
 + compilerManager . make ( scope , callback ) ;
 + }
 }
 } , ModalityState . NON_MODAL ) ;
 }

do not start compilation for disposed project


<nb> public class TextEditingTarget implements EditingTarget
 }
 } ;

 - if ( isCpp )
 + if ( isCpp && dirtyState_ . getValue ( ) )
 saveThenExecute ( null , sourceCommand ) ;
 else
 sourceCommand . execute ( ) ;

only save cpp docs before sourcing if they are dirty


<nb> public class AhcBridgeEndpointTest extends BaseAhcTest {

 @ test
 public void testBridgeEndpoint ( ) throws Exception {
 - String response = template . requestBodyAndHeader ( STRING0 + port1 + STRING1 ,
 + String response = template . requestBodyAndHeader ( STRING0 + port1 + STRING1 ,
 new ByteArrayInputStream ( STRING2 . getBytes ( ) ) , STRING3 , STRING4 , String . class ) ;
 assertEquals ( STRING5 , STRING6 , response ) ;

Fixed a CS error of AhcBridgeEndpointTest


<nb> public class PokemonGo {
 map = new Map ( this ) ;
 longitude = Double . NaN ;
 latitude = Double . NaN ;
 + altitude = Double . NaN ;
 }

 COMMENT
 <nb> public class LocationFixes extends ArrayList < SignatureOuterClass . Signature . Locat
 float latitude = offsetOnLatLong ( api . getLatitude ( ) , random . nextInt ( NUMBER0 ) + NUMBER1 ) ;
 float longitude = offsetOnLatLong ( api . getLongitude ( ) , random . nextInt ( NUMBER0 ) + NUMBER1 ) ;
 float altitude = NUMBER2 ;
 + if ( api . getAltitude ( ) != Double . NaN ) {
 + altitude = ( float ) api . getAltitude ( ) ;
 + }
 float verticalAccuracy = ( float ) ( NUMBER3 + ( NUMBER4 - NUMBER3 ) * random . nextDouble ( ) ) ;

 SINGLE

Prefer user values to maintain consistency Altitude


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 - import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class SpnegoAuthenticator extends AuthenticatorBase {
 String krb5Conf = System . getProperty ( Constants . KRB5_CONF_PROPERTY ) ;
 if ( krb5Conf == null ) {
 SINGLE
 - File krb5ConfFile = new File ( Bootstrap . getCatalinaBase ( ) ,
 + File krb5ConfFile = new File ( container . getCatalinaBase ( ) ,
 Constants . DEFAULT_KRB5_CONF ) ;
 System . setProperty ( Constants . KRB5_CONF_PROPERTY ,
 krb5ConfFile . getAbsolutePath ( ) ) ;
 <nb> public class SpnegoAuthenticator extends AuthenticatorBase {
 String jaasConf = System . getProperty ( Constants . JAAS_CONF_PROPERTY ) ;
 if ( jaasConf == null ) {
 SINGLE
 - File jaasConfFile = new File ( Bootstrap . getCatalinaBase ( ) ,
 + File jaasConfFile = new File ( container . getCatalinaBase ( ) ,
 Constants . DEFAULT_JAAS_CONF ) ;
 System . setProperty ( Constants . JAAS_CONF_PROPERTY ,
 jaasConfFile . getAbsolutePath ( ) ) ;


<nb> public class StdlibTest extends KotlinTestWithEnvironment {
 JvmContentRootsKt . addJvmClasspathRoot ( configuration , junitJar ) ;

 ContentRootsKt . addKotlinSourceRoot ( configuration , KotlinTestUtils . getHomeDirectory ( ) + STRING0 ) ;
 - ContentRootsKt . addKotlinSourceRoot ( configuration , KotlinTestUtils . getHomeDirectory ( ) + STRING1 ) ;
 configuration . put ( CLIConfigurationKeys . MESSAGE_COLLECTOR_KEY , PrintingMessageCollector . PLAIN_TEXT_TO_SYSTEM_ERR ) ;

 return KotlinCoreEnvironment . createForTests ( getTestRootDisposable ( ) , configuration , EnvironmentConfigFiles . JVM_CONFIG_FILES ) ;

Minor delete kunit source root from StdlibTest


<nb> abstract public class AvailableJavaHomes {
 return getAvailableJdk ( new Spec < JvmInstallation > ( ) {
 @ override
 public boolean isSatisfiedBy ( JvmInstallation element ) {
 - return element . getJavaHome ( ) . equals ( Jvm . current ( ) . getJavaHome ( ) ) ;
 + return ! element . getJavaHome ( ) . equals ( Jvm . current ( ) . getJavaHome ( ) ) ;
 }
 } ) ;
 }
 <nb> abstract public class AvailableJavaHomes {
 return getAvailableJdk ( new Spec < JvmInstallation > ( ) {
 @ override
 public boolean isSatisfiedBy ( JvmInstallation element ) {
 - return element . getJavaVersion ( ) . equals ( Jvm . current ( ) . getJavaVersion ( ) ) ;
 + return ! element . getJavaVersion ( ) . equals ( Jvm . current ( ) . getJavaVersion ( ) ) ;
 }
 } ) ;
 }


<nb> public class ExportHTMLAction extends AnAction implements DumbAware {
 }
 PathMacroManager . getInstance ( myView . getProject ( ) ) . collapsePaths ( problems ) ;
 try {
 - JDOMUtil . writeDocument ( new Document ( problems ) ,
 - outputDirectoryName + File . separator + toolWrapper . getShortName ( ) + InspectionApplication . XML_EXTENSION ,
 - CodeStyleSettingsManager . getSettings ( null ) . getLineSeparator ( ) ) ;
 + if ( problems . getContentSize ( ) != NUMBER0 ) {
 + JDOMUtil . writeDocument ( new Document ( problems ) ,
 + outputDirectoryName + File . separator + toolWrapper . getShortName ( ) + InspectionApplication . XML_EXTENSION ,
 + CodeStyleSettingsManager . getSettings ( null ) . getLineSeparator ( ) ) ;
 + }
 }
 catch ( IOException e ) {
 ex [ NUMBER0 ] = e ;


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

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

 COMMENT
 - COMMENT
 - COMMENT
 - COMMENT
 + COMMENT
 + COMMENT
 + @ override
 + public boolean equals ( Object object ) {
 + if ( ! ( object instanceof ActivityLifecycleCallbacksWrapper ) )
 + return false ;
 + ActivityLifecycleCallbacksWrapper that = ( ActivityLifecycleCallbacksWrapper ) object ;
 + return null == mCallback ? null == that . mCallback : mCallback . equals ( that . mCallback ) ;
 + }
 +
 + COMMENT
 + COMMENT
 + COMMENT
 COMMENT
 @ override
 - public boolean equals ( Object o ) {
 - return null == mCallback ? null == o : mCallback . equals ( o ) ;
 + public int hashCode ( ) {
 + return null != mCallback ? mCallback . hashCode ( ) : NUMBER0 ;
 }
 }

equals method modified and hashcode added to ActivityLifecycleCallbacksWrapper


<nb> public class JspHelper {
 public static String escapeXml ( Object obj ) {
 String value = null ;
 try {
 - value = ( obj == null ) ? null : String . valueOf ( obj ) ;
 + value = ( obj == null ) ? null : obj . toString ( ) ;
 } catch ( Exception e ) {
 SINGLE
 }


<nb> import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 + import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 import NAMESPACE ;
 <nb> public class TagDataService {
 cursor . moveToNext ( ) ;
 }
 ActFmSyncService . JsonHelper . featuredListFromJson ( featObject , tagData ) ;
 + tagData . putTransitory ( SyncFlags . ACTFM_SUPPRESS_OUTSTANDING_ENTRIES , true ) ;
 save ( tagData ) ;

 } finally {

Don t record changeshappened for featured lists


<nb> static final public IPersistentMap CHAR_MAP =
 STRING0 , STRING1 ,
 STRING2 , STRING3 ,
 STRING4 , STRING5 ,
 - STRING6 , STRING7 ,
 + STRING8 , STRING9 ,
 + STRING10 , STRING11 ,
 STRING12 , STRING13 ,
 STRING14 , STRING15 ,
 STRING16 , STRING17 ,


<nb> public class GLMModel extends Model < GLMModel , GLMModel . GLMParameters , GLMModel . GLM
 public boolean _stdOverride ; SINGLE

 public void validate ( GLM glm ) {
 + if ( _alpha != null && ( NUMBER0 < _alpha [ NUMBER1 ] || _alpha [ NUMBER1 ] < NUMBER1 ) )
 + glm . error ( STRING0 , STRING1 ) ;
 if ( _compute_p_values && _solver != Solver . AUTO && _solver != Solver . IRLSM )
 glm . error ( STRING2 , STRING3 + _solver ) ;
 if ( _compute_p_values && ( _lambda == null || _lambda [ NUMBER1 ] > NUMBER1 ) )

Added validation of alpha parameter in glm


<nb> public class DroidGap extends Activity implements CordovaInterface {
 public boolean onKeyUp ( int keyCode , KeyEvent event )
 {
 SINGLE
 - if ( appView . getHitTestResult ( ) . getType ( ) == WebView . HitTestResult . EDIT_TEXT_TYPE &&
 - keyCode == KeyEvent . KEYCODE_BACK )
 - {
 - return appView . onKeyUp ( keyCode , event ) ;
 + if ( appView . getHitTestResult ( ) != null &&
 + appView . getHitTestResult ( ) . getType ( ) == WebView . HitTestResult . EDIT_TEXT_TYPE &&
 + keyCode == KeyEvent . KEYCODE_BACK ) {
 + return appView . onKeyUp ( keyCode , event ) ;
 }
 else
 return super . onKeyUp ( keyCode , event ) ;

Clicking the menu button crashes Jellybean


<nb> public final class RenderTaskListGenerator {
 private static final Logger logger = LoggerFactory . getLogger ( RenderTaskListGenerator . class ) ;
 private List < RenderPipelineTask > taskList ;
 private List < Node > nodeList ;
 - private boolean refreshRequested ;

 public RenderTaskListGenerator ( ) {
 taskList = Lists . newArrayList ( ) ;


<nb> import NAMESPACE ;
 COMMENT
 COMMENT
 COMMENT
 + COMMENT
 COMMENT
 public class LargeValueFormatter implements ValueFormatter {

 - private static String [ ] SUFFIX = new String [ ] {
 + private static final String [ ] SUFFIX = new String [ ] {
 STRING0 , STRING1 , STRING2 , STRING3 , STRING4
 } ;
 -
 - private static int MAX_LENGTH = NUMBER0 ;
 + private static final int MAX_LENGTH = NUMBER0 ;

 private DecimalFormat mFormat ;
 + private String mText ;

 public LargeValueFormatter ( ) {
 -
 mFormat = new DecimalFormat ( STRING5 ) ;
 }

 + COMMENT
 + COMMENT
 + COMMENT
 + COMMENT
 + public LargeValueFormatter ( String text ) {
 + this ( ) ;
 + mText = text ;
 + }
 +
 @ override
 public String getFormattedValue ( float value ) {
 - return makePretty ( value ) ;
 + return makePretty ( value ) + STRING6 + mText ;
 }

 COMMENT

Large value formatter now can appends a specified text to the result string


<nb> public class ResourcesManager {
 }

 synchronized ( this ) {
 - final ActivityResources activityResources =
 - getOrCreateActivityResourcesStructLocked (
 - activityToken ) ;
 -
 - if ( overrideConfig != null ) {
 - activityResources . overrideConfig . setTo ( overrideConfig ) ;
 - } else {
 - activityResources . overrideConfig . setToDefaults ( ) ;
 - }
 + SINGLE
 + getOrCreateActivityResourcesStructLocked ( activityToken ) ;
 }

 SINGLE

Fix issue where existing Activity Resources references would not update


<nb> public class SampleSecureApplication extends WebMvcConfigurerAdapter {

 public static void main ( String [ ] args ) throws Exception {
 SINGLE
 - new SpringApplicationBuilder ( SampleSecureApplication . class ) . properties (
 - STRING0 , STRING1 ) . run (
 + new SpringApplicationBuilder ( SampleSecureApplication . class ) . properties ( STRING1 ) . run (
 args ) ;
 }


<nb> public class JSONPrettyFormatterTest {
 expected = expected . replace ( STRING0 , STRING1 + File . separator + STRING2
 + File . separator + STRING3 + File . separator + STRING4 ) ;
 String actual = new Scanner ( report , STRING5 ) . useDelimiter ( STRING6 ) . next ( ) ;
 - assertEquals ( expected , actual ) ;
 +
 + SINGLE
 + SINGLE
 }

 private File runFeaturesWithJSONPrettyFormatter ( final List < String > featurePaths ) throws IOException {