diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + package NAMESPACE ; import NAMESPACE ; <nb> + COMMENT + COMMENT + COM...
added license header to CoffeeShopService and PetShopService
<nb> public class WsSession implements Session { state = State . CLOSING ; - fireEndpointOnClose ( closeReasonLocal ) ; sendCloseMessage ( closeReasonMessage ) ; + fireEndpointOnClose ( closeReasonLocal ) ; state = State . CLOSED ; } <nb> public class WsSession implements Session { synchronized ...
Call onClose before actually closing anything sending a close message closes the endpoint
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; - import static NAMESPACE ; import static NAMESPACE ...
Log host filter in temp jobs
<nb> public class Fillr extends JavaPlugin { public void onEnable ( ) { } + public void onLoad ( ) { + } + @ override public boolean onCommand ( CommandSender sender , Command cmd , String commandLabel , String [ ] args ) { if ( commandLabel . equalsIgnoreCase ( STRING0 ) ) { <nb> public interface P...
Adds an onLoad method to Plugin
<nb> public class AsyncContextImpl implements AsyncContext { try { InstanceFactory < T > factory = ( ( ServletContextImpl ) this . servletRequest . getServletContext ( ) ) . getDeployment ( ) . getDeploymentInfo ( ) . getClassIntrospecter ( ) . createInstanceFactory ( clazz ) ; return factory . createInstance ( )...
Correctly wrap exceptions
<nb> public abstract class PerRequestRelative302Test extends AbstractBasicTest { assertNotNull ( response ) ; assertEquals ( response . getStatusCode ( ) , NUMBER0 ) ; - assertEquals ( getBaseUrl ( response . getUri ( ) ) , STRING0 ) ; + assertEquals ( getBaseUrl ( response . getUri ( ) ) , STRING1 ) ; c . ...
Fix the test based on provided patch
<nb> public class AppWidget extends AppWidgetProvider { } @ override - public void onCreate ( ) { - super . onCreate ( ) ; - } - - @ override public void onHandleIntent ( Intent intent ) { ComponentName me = new ComponentName ( this , AppWidget . class ) ; AppWidgetManager mgr = AppWidgetManager ....
Removed empty method
<nb> package NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; COMMENT COMMENT COMMENT
Remove unused imports
<nb> public class MessageManager } catch ( IllegalArgumentException e ) { + final String error = e . getMessage ( ) ; final String help = cmd . help ( ) ; - throw new BadCommandInvocationException ( msg , help , e ) ; + throw new BadCommandInvocationException ( msg , error + STRING0 + help , + e ) ; }...
Display error first then help text in system message feedback
<nb> public class PluginClassloaders { } return realm ; } catch ( Throwable e ) { + SINGLE + SINGLE + SINGLE + SINGLE throw new SonarException ( STRING0 + plugin . getKey ( ) , e ) ; } } <nb> public class PluginClassloaders { } return true ; } catch ( Throwable e ) { + SINGLE + SINGLE ...
Add some comments
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import static NAMESPACE ; + import static NAMESPACE ; + import static NAMESPACE ; + import static NAMESPACE ; + import static NAMESPACE ; + import static NAMESPACE ; COMMENT COMMENT <nb> public abstract class MigrationTestCase { ...
Fixed testcase for postgresql
<nb> public class Observable < T > { } COMMENT - COMMENT + COMMENT COMMENT public interface OnSubscribe < T > extends Action1 < Subscriber < ? super T > > { SINGLE
Fix typo in OnSubscribe interface s Javadoc
<nb> public class BiggerThanLogTxIT { for ( GraphDatabaseService db : cluster . getAllMembers ( ) ) { + SINGLE + if ( expectedNodeCount != nodeCount ( db ) ) + { + for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) + { + try + { + Thread . sleep ( NUMBER2 ) ; + } + catch ( InterruptedException e ) ...
Make test more resilient by retrying sync on wrong node count
<nb> public class ASMHelper { COMMENT COMMENT public static AnnotationNode getAnnotation ( List < AnnotationNode > annotations , String annotationType ) { - if ( annotations == null ) return null ; + if ( annotations == null ) { + return null ; + } for ( AnnotationNode annotation : annotations ) { i...
Fix checkstyle on ASMHelper java
<nb> class LintPassConfig extends PassConfig . PassConfigDelegate { new CheckJSDoc ( compiler ) , new CheckMissingSemicolon ( compiler ) , new CheckRequiresAndProvidesSorted ( compiler ) , - new CheckUselessBlocks ( compiler ) ) ) ; + new CheckUselessBlocks ( compiler ) , + new ClosureCheckModule ( compiler...
Add the goog module per file checks to the linter
<nb> final class DeepLinkUri { } Builder scheme ( String scheme ) { - if ( scheme == null ) { - throw new IllegalArgumentException ( STRING0 ) ; - } + if ( scheme == null ) throw new IllegalArgumentException ( STRING0 ) ; + this . scheme = scheme ; return this ; }
Fixed scheme setter in DeepLinkUri Builder
<nb> public class PreferenceGroupAdapter extends RecyclerView . Adapter < PreferenceViewH private int widgetResId ; private String name ; + public PreferenceLayout ( ) { } + + public PreferenceLayout ( PreferenceLayout other ) { + resId = other . resId ; + widgetResId = other . widgetResId ; + name = ...
Add missing PreferenceLayouts when querying item type
<nb> public class FrameworkDetectionManager extends AbstractProjectComponent implemen @ override public void initComponent ( ) { + doInitialize ( ) ; + } + + public void doInitialize ( ) { if ( myProject . isDefault ( ) ) return ; myDetectionQueue = new MergingUpdateQueue ( STRING0 , NUMBER0 , true , ...
enable framework detection in detection tests only
<nb> public class MediaConductor extends Agent hasDoneWork |= subscribedSessions . forEach ( NUMBER0 , SubscribedSession : : scanForGaps ) ; hasDoneWork |= processClientCommandBuffer ( ) ; - hasDoneWork |= mediaCommandBuffer ( ) ; + hasDoneWork |= processMediaCommandBuffer ( ) ; hasDoneWork |= processTimers...
put back process into command buffer method name
<nb> public final class ActivityStackSupervisor implements DisplayListener { } void showLockTaskToast ( ) { - mLockTaskNotify . showToast ( mLockTaskModeState ) ; + if ( mLockTaskNotify != null ) { + mLockTaskNotify . showToast ( mLockTaskModeState ) ; + } } void showLockTaskEscapeMessageLocked ( Ta...
Add null check in showLockTaskToast
<nb> package NAMESPACE ; public class IntegrationTestConstants { SINGLE public static final String NETTY_DATA_SERVER = STRING0 ; - public static final String NIO_DATA_SERVER = STRING1 ; SINGLE public static final String NETTY_BLOCK_READER = STRING2 ; <nb> public class RemoteBlockInStreamIntegrationTest ...
Remove NIODataServer tests
<nb> public class OpenPgpSignatureResult implements Parcelable { vr . signatureOnly = source . readByte ( ) == NUMBER0 ; vr . primaryUserId = source . readString ( ) ; vr . keyId = source . readLong ( ) ; + vr . userIds = new ArrayList < String > ( ) ; source . readStringList ( vr . userIds ) ; SINGLE
Fix nullpointer with new OpenPgpSignatureResult version
<nb> public class RxLifecycle { COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT COMMENT COMMENT COMMENT <nb> public class RxLifecycle { COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT COMMENT COMMENT COMMENT <nb> public class RxLifecycle { COMMENT COMMENT COMMEN...
Removed unnecessary warnings from docs
<nb> package NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public final class DataFlow { public static < A extends AbstractValue < A > , S extends Store < S > , T extends TransferFunction < A , S > > Result < A , S , T > dataflow ( MethodTree meth...
Add error handling to ease debugging NPEs when trying to analyze a method with
<nb> public class TextDataBuilderImpl implements TextDataFactory { if ( val instanceof DynamicType ) { DynamicType dynamicType = ( DynamicType ) val ; if ( timeInterval != null ) { - str += dynamicType . getValue ( timeInterval . getLow ( ) , timeInterval . getHigh ( ) ) ; + str += dynamicType . getValue ( ti...
Add Estimator to dynamic visualization of attributes
<nb> public abstract class AbstractApplicationContext extends DefaultResourceLoader } public void addApplicationListener ( ApplicationListener listener ) { - if ( isActive ( ) ) { - addListener ( listener ) ; + if ( this . applicationEventMulticaster != null ) { + this . applicationEventMulticaster . addA...
refined addApplicationListener to work any time during the refresh phase
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + ...
fixed bug on metadata reload
<nb> public class MainActivity extends AppCompatActivity { . progressBarColorRes ( R . color . finestWhite ) . webViewBuiltInZoomControls ( true ) . webViewDisplayZoomControls ( true ) + . swipeRefreshColorRes ( R . color . redNavBar ) . dividerHeight ( NUMBER0 ) . gradientDivider ( false ) . setCustomAni...
Updated sample app swipe refresh idicator colors
<nb> final class VEventResultParser extends ResultParser { return null ; } int vEventStart = rawText . indexOf ( STRING0 ) ; + if ( vEventStart < NUMBER0 ) { + return null ; + } int vEventEnd = rawText . indexOf ( STRING1 ) ; - if ( vEventStart < NUMBER0 || vEventEnd < NUMBER0 ) { + if ( vEventEnd < N...
Made calendar event parsing more robust and also reject non calendar contents a little faster
<nb> public class PhilmMovie implements PhilmModel { Images images = movie . images ; if ( images != null ) { - if ( TextUtils . isEmpty ( fanartUrl ) ) { + SINGLE + if ( fanartType != TYPE_TMDB && ! TextUtils . isEmpty ( images . fanart ) ) { fanartUrl = images . fanart ; fanartType = TYPE_TRAKT ; } ...
Don t overwrite TMDB images with trakt ones
<nb> public final class GenericBooleanPrefDataModel extends AbstractDataModel { } result . append ( userIDs [ i ] ) ; } - if ( result . length ( ) > NUMBER0 ) { + if ( userIDs . length > NUMBER0 ) { result . append ( STRING0 ) ; } result . append ( STRING1 ) ; <nb> public final class GenericDataModel ...
Fix dumb typo in model s toString
<nb> public class PrepareCatalogMojo extends AbstractMojo { component = STRING0 ; } String name = component + STRING1 ; - if ( ! docs . contains ( name ) ) { + if ( ! docs . contains ( name ) && ( ! component . equalsIgnoreCase ( STRING2 ) && ! component . equalsIgnoreCase ( STRING3 ) ) ) { missing . add ( ...
Skip Validation for camel linkedin and camel salesforce since they have API and component in the same component folder
<nb> abstract class RequestArcAction extends FeatureAction { return ; } disableArcTransmission ( ) ; + finish ( ) ; } }
Add finish after timeout of Reqeust Arc operations
<nb> public interface Blueprint { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT String getMortarScopeName ( ) ; <nb> public interface Bundler extends Scoped { COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public interface Bundler extends S...
Fix javadoc typos
<nb> public final class SchemaMetadata extends Iced { if ( ( schema instanceof FieldMetadataV3 || schema instanceof FieldMetadataBase ) && STRING0 . equals ( field_name ) ) return STRING1 ; - if ( ( schema instanceof TwoDimTableV3 && STRING2 . equals ( field_name ) ) ) SINGLE + if ( ( ( schema instanceof TwoD...
Fix schema warning on startup
<nb> public class BufferedRandomAccessFile extends RandomAccessFile implements FileDa throw new IllegalArgumentException ( STRING0 ) ; if ( isReadOnly ( ) && newPosition > fileLength ) - throw new EOFException ( STRING1 ) ; + throw new EOFException ( STRING2 + filePath + STRING3 ) ; current = newPosition ...
add file path to seek past eof exception
<nb> public class VerboseMockitoJUnitRunner extends Runner { Throwable throwable = ( Throwable ) Whitebox . getInternalState ( failure , STRING0 ) ; String newMessage = throwable . getMessage ( ) ; - newMessage += STRING1 + debuggingInfo . getWarnings ( ) ; + newMessage += STRING1 + debuggingInfo . getWarning...
In order to have nicer failure message adjusted the message
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + COMMENT COMMENT COMMENT <nb> import NAMESPACE ; @ suppresswarnings ( STRING0 ) public class DeprecatedLzoTextInputFormat extends DeprecatedLzoInputFormat < LongWritable , Text > { + priv...
Add logging to DeprecatedLzoTextInputFormat as it starts a new split
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + COMMENT + COMMENT + COMMENT + @ deprecated @ state ( name = STRING0 , storages = @ storage ( file = StoragePathMacros . MODULE_FILE )
vcs Deprecate VcsManagerPerModuleConfiguration
<nb> public class CompletionFieldMapper extends AbstractFieldMapper < String > { + STRING0 + i + STRING1 ) ; } } - - System . out . println ( names . indexName ( ) ) ; return new SuggestField ( names . indexName ( ) , input , this . fieldType , payload , analyzingSuggestLookupProvider ) ; }
remove System out println
<nb> public class TypedHandler implements TypedActionHandler { if ( ! editor . getSelectionModel ( ) . hasBlockSelection ( ) ) { if ( STRING0 == charTyped || STRING1 == charTyped || STRING2 == charTyped ) { - if ( handleRParen ( editor , fileType , charTyped ) ) return ; + if ( StdFileTypes . PLAIN_TEXT != fi...
no paired brace insertion no overtype in plain text
<nb> public class GithubApiUtil { try { return new JsonParser ( ) . parse ( reader ) ; } - catch ( JsonSyntaxException jse ) { + catch ( JsonParseException jse ) { throw new GithubJsonException ( STRING0 , jse ) ; } finally {
do not throw runtime exception on parse error
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT public final class LocalTime extends AbstractPartial <nb> public final class LocalTime COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT public static final class Property extends AbstractReadableInstantFieldPr...
Fixed since tags
<nb> public class PanelBar extends FrameLayout { } } if ( DEBUG ) LOG ( STRING0 , animate , waiting ) ; - if ( ! waiting ) { + if ( ! waiting && mState != STATE_CLOSED ) { SINGLE SINGLE go ( STATE_CLOSED ) ; <nb> public class PhoneStatusBar extends BaseStatusBar { return ; } - SINGLE - SINGL...
Lubricate a sticky notification panel
<nb> public class IdeGlassPaneImpl extends JPanel implements IdeGlassPaneEx , IdeEvent if ( pureMouse1Event && me . getClickCount ( ) <= NUMBER0 && ! me . isPopupTrigger ( ) ) { final Point point = SwingUtilities . convertPoint ( meComponent , me . getPoint ( ) , myRootPane . getContentPane ( ) ) ; - if ( myRoo...
main menu ignores mouse clicks in presentation fullscreen mode
<nb> public class TestContextConfig extends TomcatBaseTest { @ test public void testBug53574 ( ) throws Exception { - Tomcat tomcat = getTomcatInstance ( ) ; - - File appDir = new File ( STRING0 ) ; - tomcat . addWebapp ( null , STRING1 , appDir . getAbsolutePath ( ) ) ; - - tomcat . start ( ) ; - ...
Reduce boilerplate code
<nb> public class HintManager implements ApplicationComponent { if ( lookup == null ) { for ( HintInfo info : myHintsStack ) { if ( info . hint instanceof LightweightHint ) { + if ( info . hint . getClass ( ) . isInstance ( hint ) ) continue ; final Rectangle rectangle = info . hint . getBounds ( ) ; - + ...
do not affect hint position by previous same instance of the same type
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + COMMENT COMMENT COMMENT <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - public interface CoreMap extends TypesafeMap , PrettyLoggable { } + public interface CoreMap extends TypesafeMap , PrettyLoggable , Serializable { }
adding sentence gloss recovering codes
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; COMMENT <nb> import NAMESPACE ; public class SafeEncoder { public static byte [ ] encode ( final String str ) { try { + if ( str == null ) { + throw new JedisDataException ( + STRING0 ) ; ...
throw JedisDataException when sending NULL values to redis as it is not a valid value in the protocol
<nb> public class ContextConfig implements LifecycleListener { COMMENT - COMMENT - COMMENT - COMMENT - @ deprecated - public String getDefaultContextXml ( ) { - if ( defaultContextXml == null ) { - defaultContextXml = Constants . DefaultContextXml ; - } - - return ( this . defaultContextXml ) ...
Remove deprecated code
<nb> public class BitcoindComparisonTool { public static void main ( String [ ] args ) throws Exception { BriefLogFormatter . init ( ) ; - System . out . println ( STRING0 ) ; + System . out . println ( STRING1 ) ; boolean runLargeReorgs = Integer . parseInt ( args [ NUMBER0 ] ) == NUMBER0 ; params = Ne...
Re enable port selection as pull tester will need it
<nb> public class SimpleSSLSocketFactory extends SSLSocketFactory implements Comparat public SimpleSSLSocketFactory ( ) { try { - final SSLContext sslContext = SSLContext . getDefault ( ) ; + final SSLContext sslContext = SSLContext . getInstance ( STRING0 ) ; sslContext . init ( null , SINGLE new TrustMa...
Cannot re init default SSLContext
<nb> public final class Es6ToEs3Converter implements NodeTraversal . Callback , HotSwapC Preconditions . checkNotNull ( constructor ) ; - JSDocInfo classJSDoc = classNode . getJSDocInfo ( ) ; + JSDocInfo classJSDoc = NodeUtil . getBestJSDocInfo ( classNode ) ; JSDocInfoBuilder newInfo = JSDocInfoBuilder . m...
Use getBestJSDocInfo to find the JSDocInfo for a class node
<nb> public class RestPermissions { MESSAGES_READ , METRICS_READ , SYSTEM_READ , - THROUGHPUT_READ + THROUGHPUT_READ , + SAVEDSEARCHES_CREATE , + SAVEDSEARCHES_EDIT , + SAVEDSEARCHES_READ ) ; public static Set < String > readerPermissions ( String username ) {
give reader users permission to saved searches
<nb> public abstract class XValueContainerNode < ValueContainer extends XValueContainer myTemporaryMessageChildren != null ? myTemporaryMessageChildren : Collections . < MessageTreeNode > emptyList ( ) ) ; final int [ ] indices = getNodesIndices ( allMessageChildren ) ; final TreeNode [ ] nodes = getChildNodes ( ...
fixed endless loop on adding error message node cleaning message children before firing nodesRemoved causing getChildren and caluclation again
<nb> import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; - import static NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPA...
Fix compile issues following rebase
<nb> public class DefaultRuleFinder implements RuleFinder { session . createQuery ( STRING0 + Rule . class . getSimpleName ( ) + STRING1 ) . setParameter ( STRING2 , ruleId ) . setParameter ( STRING3 , Rule . STATUS_REMOVED - ) , + ) , null ) ; } <nb> public class DefaultRuleFinder implements RuleFind...
Fix quality flaws
<nb> class BaseObj { COMMENT COMMENT public void setName ( String name ) { + if ( name == null ) { + throw new RSIllegalArgumentException ( + STRING0 ) ; + } if ( name . length ( ) < NUMBER0 ) { - throw new RSIllegalArgumentException ( STRING1 ) ; + throw new RSIllegalArgumentException ( + STRING1...
Check setName for null string typo fixes
<nb> public class PApplet implements PConstants { COMMENT public PFont createFont ( String name , float size , boolean smooth , char [ ] charset ) { + if ( g == null ) { + System . err . println ( STRING0 ) ; + throw new RuntimeException ( STRING1 ) ; + } return g . createFont ( name , size , smooth , c...
Give helpful message when createFont called before setup
<nb> public class PortletKeys { public static final String JOURNAL_CONTENT_SEARCH = STRING0 ; + public static final String KNOWLEDGE_BASE_ADMIN = + STRING1 ; + public static final String LANGUAGE = STRING2 ; public static final String LAYOUT_CONFIGURATION = STRING3 ;
Add KB to PortletKeys constants
<nb> public class KeyguardManager { } COMMENT - COMMENT + COMMENT + COMMENT COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT public boolean isKeyguardSecure ( ) { try { <nb> public class KeyguardManager { } COMMENT - COMMENT - COMMENT + COMMENT COMMENT - COMMENT - ...
Clarify javadoc of isKeyguardSecure and isDeviceSecure
<nb> public class AdminServiceFailureTest extends TestCase { default : throw new RuntimeException ( STRING0 ) ; } - - return null ; } private void putAlltoStore ( int nodeId , String storeName ) {
Fixed a compilation error returning from a void method
<nb> public class ModelImpl extends AbstractModel { } public void addRequired ( String name ) { - this . required . add ( name ) ; + if ( required == null ) { + required = new ArrayList < String > ( ) ; + } + required . add ( name ) ; Property p = properties . get ( name ) ; if ( p != null ) { p ....
Add null checking to addRequired
<nb> public class PythonAtTestRunConfiguration extends AbstractPythonTestRunConfigura public void checkConfiguration ( ) throws RuntimeConfigurationException { super . checkConfiguration ( ) ; if ( ! PyTestFrameworksUtil . isAtTestInstalled ( getProject ( ) , getSdkHome ( ) ) ) - throw new RuntimeConfigurationE...
changed error type to warning if couln t find nosetests in interpreter
<nb> public class FindByPersistentMethod extends AbstractClausedStaticPersistentMetho } } - try { - return crit . uniqueResult ( ) ; - } catch ( HibernateException e ) { - crit . setMaxResults ( NUMBER0 ) ; - return crit . uniqueResult ( ) ; - } + crit . setMaxResults ( NUMBER0 ) ; + return crit ....
dynamic findBy method executes sql query twice when more than one result found
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT abstract class AbstractConfigValue implements ConfigValue { final private ConfigOrigin origin ;
add comment about not having ConfigValue parent
<nb> public class Http11AprProcessor extends AbstractHttp11Processor < Long > { } } - } else if ( actionCode == ActionCode . AVAILABLE ) { - request . setAvailable ( inputBuffer . available ( ) ) ; } else if ( actionCode == ActionCode . COMET_BEGIN ) { comet = true ; } else if ( actionCode == ActionCode...
Remove duplicate code
<nb> public class EventCacheBroadcasterCache implements BroadcasterCache { public void setInvalidateCacheInterval ( long invalidateCacheInterval ) { this . invalidateCacheInterval = invalidateCacheInterval ; + scheduledFuture . cancel ( true ) ; + start ( ) ; } public void setClientIdleTime ( long clien...
Restart the scheduler if the value change
<nb> public class Fields { for ( Field field : fields ) { String fieldName = field . getName ( ) ; + if ( fieldName . equals ( STRING0 ) ) { + continue ; + } + map . put ( fieldName , createFieldDescriptor ( field ) ) ; } <nb> public class IntrospectorTest { assertNull ( pd . getWriteMethodDescr...
ignore serialVersionUID as a field ah old java
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class Embedded extends StandardService { COMMENT COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT <n...
Allow Checkstyle s unused imports test to be used with the o a catalina startup package
<nb> public abstract class ObjCObject extends NativeObject { return AssociatedObjectHelper . getPeerObject ( handle ) ; } - public void addStrongRef ( ObjCObject to ) { + public < T extends ObjCObject > T addStrongRef ( T to ) { AssociatedObjectHelper . addStrongRef ( this , to ) ; + return to ; } p...
Changed ObjCCobject addStrongRef o to return o
<nb> public abstract class Job { } COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public long getScheduledAt ( ) { + return mRequest . getScheduledAt ( ) ; + } + + COMMENT COMMENT COMMENT COMMENT <nb> ...
Expose scheduling time of a job
<nb> public class LuceneSerializerTest { @ test public void various ( ) throws Exception { - MatchingFilters filters = new MatchingFilters ( Module . LUCENE , Target . LUCENE ) ; + MatchingFiltersFactory filters = new MatchingFiltersFactory ( Module . LUCENE , Target . LUCENE ) ; for ( BooleanExpression fil...
fixed broken refactoring
<nb> public class StreetVertexIndexServiceImpl implements StreetVertexIndexService { endwiseVertex = ( StreetVertex ) edge . getToVertex ( ) ; else endwiseVertex = null ; - score = distance ; + score = distance * SphericalDistanceLibrary . RADIUS_OF_EARTH_IN_KM * NUMBER0 / FLOAT0 ; if ( endwise ( ) ) { sc...
do not wrongly favor endwise edges
<nb> public class UpgradeServletOutputStream extends ServletOutputStream { SINGLE synchronized ( fireListenerLock ) { if ( flushing ) { - socketWrapper . registerWriteInterest ( ) ; + SINGLE + SINGLE fireListener = true ; return false ; + } else if ( fireListener ) { + SINGLE + SINGLE + SINGLE ...
Fix another source of multiple write registrations
<nb> public class VizGui extends JFrame implements VertexSelectionListener , Remaining if ( transitCheckBox . isSelected ( ) ) modeSet . setTransit ( true ) ; TraverseOptions options = new TraverseOptions ( modeSet ) ; - options . speed = NUMBER0 ; SINGLE - options . walkReluctance = NUMBER0 ; SINGLE Visual...
do not override default traverseoptions in vizgui
<nb> import NAMESPACE ; COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT COMMENT COMMENT COMMENT - interface Rule < VALIDATABLE > { + public interface Rule < VALIDATABLE > { COMMENT COMMENT <nb> interface Rule < VALIDATABLE > { COMMENT COMMENT COMMENT - String getMes...
Rule Make public
<nb> public class ResourceBundleManager implements PersistentStateComponent < ResourceB } @ override - public void childReplaced ( @ notnull PsiTreeChangeEvent event ) { - super . childReplaced ( event ) ; - } - - @ override - public void beforeChildMovement ( @ notnull PsiTreeChangeEvent event ) { ...
ResourceBundleManager mehtod childRemoved beforeChildRemoval in psi listener
<nb> public class SizeAdaptiveLayout extends ViewGroup { if ( DEBUG ) Log . d ( TAG , this + STRING0 + MeasureSpec . toString ( heightMeasureSpec ) ) ; View model = selectActiveChild ( heightMeasureSpec ) ; + if ( model == null ) { + setMeasuredDimension ( NUMBER0 , NUMBER0 ) ; + return ; + } SizeAdapti...
Fix NPE in empty SizeAdaptiveLayouts
<nb> public abstract class XMPPException extends Exception { COMMENT COMMENT public StreamErrorException ( StreamError streamError ) { - super ( streamError . toString ( ) ) ; + super ( streamError . getCondition ( ) . toString ( ) + + STRING0 + + streamError . toString ( ) ) ; this . streamError = stre...
Improve message of StreamErrorException
<nb> public class DirectoryAsPackageRenameHandler implements RenameHandler , TitledHan new String [ ] { RefactoringBundle . message ( STRING0 ) , RefactoringBundle . message ( STRING1 ) , CommonBundle . getCancelButtonText ( ) } , NUMBER0 , Messages . getWarningIcon ( ) ) ; + if ( ret == - NUMBER1 ) return ; ...
cancel should stop renaming
<nb> public class WifiApStress fail ( STRING0 ) ; } assertTrue ( STRING1 , mAct . pingTest ( null ) ) ; - SINGLE - SINGLE - try { - Thread . sleep ( NUMBER0 * NUMBER1 * NUMBER2 ) ; - } catch ( Exception e ) { - fail ( STRING0 ) ; - } - SINGLE - assertTrue ( STRING2 , mAct . pingTest ( null ) ) ;...
Remove long sleep time in WifiApStress test
<nb> public class ArquillianService implements Service < ArquillianService > { @ override public void transition ( ServiceController < ? extends Object > serviceController , ServiceController . Transition transition ) { - switch ( transition ) { - case STARTING_to_UP : { + switch ( serviceController . getSt...
Change arquillian to rely on states rather than transitions
<nb> import NAMESPACE ; import NAMESPACE ; COMMENT + COMMENT + COMMENT + COMMENT COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT - COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT public class RealmQuery < E extends RealmObject > {
Updated RealmQuery JavaDoc
<nb> public class CRUDDocumentPhysicalTest { SINGLE for ( ODocument rec : database . browseCluster ( STRING0 ) ) - rec . delete ( ) ; + if ( rec != null ) + rec . delete ( ) ; Assert . assertEquals ( database . countClusterElements ( STRING0 ) , NUMBER0 ) ;
Fixed unit test on delete
<nb> public final class PluginManager { @ suppresswarnings ( STRING0 ) private boolean isPhoneGapPlugin ( Class c ) { if ( c != null ) { - return com . phonegap . api . Plugin . class . isAssignableFrom ( c ) ; + return com . phonegap . api . Plugin . class . isAssignableFrom ( c ) || com . phonegap . api . I...
Add IPlugin to isPhoneGapPlugin check
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import static NAMESPACE ; <nb> public class IndexTemplateFileLoadingTests extends ElasticsearchIntegrationTest @ test public void testThatLoadingTemplateFromFileWorks ( ) throws...
TEST Use lowercase index names in test
<nb> public class SqueezeboxBinding extends AbstractBinding < SqueezeboxBindingProvider if ( command . equals ( OnOffType . ON ) ) squeezeServer . syncPlayer ( playerId , bindingConfig . getExtra ( ) ) ; else if ( command . equals ( OnOffType . OFF ) ) - squeezeServer . unSyncPlayer ( playerId ) ; + squeezeSe...
Sync remove players incorrect
<nb> class ActivityUtils { COMMENT private void createStackAndPushStartActivity ( ) { activityStack = new Stack < Activity > ( ) ; - activityStack . push ( activity ) ; + if ( activity != null ) + activityStack . push ( activity ) ; } COMMENT
Added a null check in createStackAndPushStartActivity
<nb> public class CalendarPickerViewTest { . inMode ( SINGLE ) SINGLE . withSelectedDate ( today . getTime ( ) ) ; Calendar jumpToCal = Calendar . getInstance ( locale ) ; + jumpToCal . setTime ( today . getTime ( ) ) ; jumpToCal . add ( MONTH , NUMBER0 ) ; jumpToCal . set ( DAY_OF_WEEK , NUMBER1 ) ; bool...
Fix test by making its Calendar invariant
<nb> public class OperationSetPersistentPresenceMsnImpl throw new IllegalArgumentException ( status + STRING0 ) ; + if ( status . equals ( MsnStatusEnum . OFFLINE ) ) + { + msnProvider . unregister ( ) ; + return ; + } + SINGLE SINGLE SINGLE
Changing status to offline
<nb> public class MsOfficeCommActivator public void stop ( BundleContext bundleContext ) throws Exception { + SINGLE + if ( ! OSUtils . IS_WINDOWS ) + return ; + try { int hresult = OutOfProcessServer . stop ( ) ;
Disables msofficecomm plugin on other operating systems than Windows check added when service is stopped
<nb> public class GTFSPatternHopFactory { StopTime st = null ; for ( j = i + NUMBER0 ; j < lastStop + NUMBER0 ; ++ j ) { st = stopTimes . get ( j ) ; - if ( st . isDepartureTimeSet ( ) || st . isArrivalTimeSet ( ) ) { + if ( ( st . isDepartureTimeSet ( ) && st . getDepartureTime ( ) != departureTime ) + || ...
treat stoptimes with duplicate arrival departure times as if said times were unset
<nb> class ActualProperties public boolean isPartitionedOn ( Collection < Symbol > columns ) { SINGLE - return partitioningColumns . isPresent ( ) && ImmutableSet . copyOf ( columns ) . containsAll ( partitioningColumns . get ( ) ) ; + SINGLE + return partitioningColumns . isPresent ( ) && partitioningColum...
Improve partitionedOn property check for constants
<nb> public class JRubyBackend implements Backend { jruby . setCompatVersion ( CompatVersion . RUBY1_8 ) ; } if ( STRING0 . equals ( rubyVersion ) ) { - jruby . setCompatVersion ( CompatVersion . RUBY1_8 ) ; + jruby . setCompatVersion ( CompatVersion . RUBY1_9 ) ; } if ( STRING1 . equals ( rubyVersion ) )...
Fixing the CompatVersion for the JrubyBackend
<nb> public class MultiFormatLoader < M > extends FilterLoadFunc { Class < ? > clazz = PigUtil . getClass ( className ) ; typeRef = new TypeRef < M > ( clazz ) { } ; - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT Load...
update an old comment
<nb> COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; COMMENT <nb> public interface PsiImportStatementBase extends PsiElement { COMMENT PsiImportStatementBase [ ] EMPTY_ARRAY = new PsiImportStatementBase [ NUMB...
Fix array merging
<nb> public class PathUtil { File answer = lib . getParentFile ( ) ; return answer . exists ( ) ? answer : null ; } + + File current = new File ( STRING0 ) . getAbsoluteFile ( ) ; SINGLE + + do { + File atDevHome = new File ( current , STRING1 ) ; + if ( atDevHome . exists ( ) ) return atDevHome ; +...
Detect alt headers in locally built kompiler
<nb> public class DashFavoritesFragment extends DashBaseFragment { } ) ; favorites . addView ( view ) ; } - SINGLE - mainView . invalidate ( ) ; } private void updateArrows ( ) {
remove not working fix
<nb> public class DB { COMMENT - public < V > Map < String , V > makeStringMap ( ) { + public < V > BTreeMap < String , V > makeStringMap ( ) { keySerializer = BTreeKeySerializer . STRING ; return make ( ) ; } COMMENT - public < V > Map < Long , V > makeLongMap ( ) { + public < V > BTreeMap < Lo...
maker methods now return BTreeMap instead of Map