diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> public class AndroidBinaryRule extends DoNotUseAbstractBuildable implements new AndroidTransitiveDependencyGraph ( classpathDeps ) ; BuildRuleParams originalParams = createBuildRuleParams ( ruleResolver ) ; + AndroidBinaryGraphEnhancer graphEnhancer = new AndroidBinaryGraphEnhancer ( originalParams ) ; final ImmutableSortedSet < BuildRule > originalDeps = originalParams . getDeps ( ) ; - ImmutableSet < IntermediateDexRule > preDexDeps ; + ImmutableSet < BuildTarget > buildTargetsToExcludeFromDex = buildTargetsToExcludeFromDexBuilder . build ( ) ; - AndroidBinaryGraphEnhancer graphEnhancer = new AndroidBinaryGraphEnhancer ( originalParams ) ; + ImmutableSet < IntermediateDexRule > preDexDeps ; if ( ! disablePreDex && PackageType . DEBUG . equals ( packageType ) && ! preprocessJavaClassesBash . isPresent ( )
Reorder some variables in AndroidBinaryRule
<nb> public class BitmapText extends Node { if ( ! block . getText ( ) . equals ( text ) ) { SINGLE if ( text . isEmpty ( ) ) { - System . out . println ( STRING0 ) ; detachAllChildren ( ) ; for ( int page = NUMBER0 ; page < textPages . length ; page ++ ) { <nb> public class BitmapText extends Node { attachChild ( textPages [ page ] ) ; } - System . out . println ( STRING1 ) ; block = new StringBlock ( ) ; letters = new Letters ( font , block , letters . getQuad ( ) . isRightToLeft ( ) ) ; }
Removed more println s
<nb> public class WifiStateMachine extends StateMachine { public void enter ( ) { mIsRunning = true ; mInDelayedStop = false ; + mDelayedStopCounter ++ ; updateBatteryWorkSource ( null ) ; COMMENT
Ignore outstanding delayed shutdown on restart
<nb> package NAMESPACE ; class S { - @ suppresswarnings ( STRING0 ) + @ suppresswarnings ( STRING1 ) public String get ( final Class cls ) { return STRING2 ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class RawUseOfParameterizedTypeInspection extends BaseInspection { @ suppresswarnings ( STRING3 ) public boolean ignoreParametersOfOverridingMethods = false ; + @ pattern ( VALID_ID_PATTERN ) + @ notnull + @ override + public String getID ( ) { + return STRING0 ; + } + + @ nullable + @ override + public String getAlternativeID ( ) { + return STRING1 ; + } + @ override @ notnull public String getDisplayName ( ) {
Set ID and alternateID for inspection in test environment
<nb> public class TestCaseLoader { private static List < String > ourRanklist = getTeamCityRankList ( ) ; private static List < String > getTeamCityRankList ( ) { - final String filepath = System . getProperty ( STRING0 , null ) ; + final String filepath = System . getProperty ( STRING1 , null ) ; if ( filepath == null ) { return Collections . emptyList ( ) ; }
run recently failed tests first
<nb> public final class GrailsDomainBinder { OneToMany oneToMany = new OneToMany ( collection . getOwner ( ) ) ; collection . setElement ( oneToMany ) ; + if ( property . isBidirectional ( ) ) { + collection . setReferencedPropertyName ( property . getOtherSide ( ) . getName ( ) ) ; + } bindOneToMany ( property , oneToMany , mappings ) ; } <nb> public class GrailsDomainConfigurationUtil { if ( referenced != null ) { GrailsDomainClassProperty [ ] referencedProperties = referenced . getPersistantProperties ( ) ; for ( int k = NUMBER0 ; k < referencedProperties . length ; k ++ ) { + SINGLE + SINGLE + if ( prop . equals ( referencedProperties [ k ] ) ) + continue ; if ( domainClasses [ i ] . getClazz ( ) . equals ( referencedProperties [ k ] . getReferencedPropertyType ( ) ) ) { prop . setOtherSide ( referencedProperties [ k ] ) ; break ;
fixed bug that was failing to establish the circular relationships correctly
<nb> public class WindowsResourceCompiler implements Compiler < WindowsResourceCompileS List < String > args = new ArrayList < String > ( ) ; args . add ( STRING0 ) ; args . add ( STRING1 ) ; - args . add ( STRING2 + getOutputFile ( spec ) . getAbsolutePath ( ) ) ; + args . add ( getOutputFile ( spec ) . getAbsolutePath ( ) ) ; for ( String macroArg : new MacroArgsConverter ( ) . transform ( spec . getMacros ( ) ) ) { args . add ( STRING3 + macroArg ) ; } args . addAll ( spec . getAllArgs ( ) ) ; for ( File file : spec . getIncludeRoots ( ) ) { - args . add ( STRING4 + STRING2 + file . getAbsolutePath ( ) ) ; + args . add ( STRING4 + file . getAbsolutePath ( ) ) ; } args . add ( inputFile . getAbsolutePath ( ) ) ;
Revert fix windows resource sample integration test
<nb> public class ShowsActivity extends BaseActivity implements AbsListView . OnScrollL SINGLE ActionBar actionBar = getSupportActionBar ( ) ; + actionBar . setDisplayShowTitleEnabled ( false ) ; actionBar . setNavigationMode ( ActionBar . NAVIGATION_MODE_LIST ) ; ArrayAdapter < CharSequence > mActionBarList = ArrayAdapter . createFromResource ( this , R . array . showfilter_list , R . layout . abs__simple_spinner_item ) ; <nb> public class UpcomingRecentActivity extends BaseActivity { setContentView ( R . layout . upcoming_multipane ) ; final ActionBar actionBar = getSupportActionBar ( ) ; + actionBar . setDisplayShowTitleEnabled ( false ) ; actionBar . setDisplayHomeAsUpEnabled ( true ) ; actionBar . setNavigationMode ( ActionBar . NAVIGATION_MODE_TABS ) ;
Hide action bar title on main screen and in Upcoming
<nb> public abstract class AbstractHistogram extends AbstractHistogramBase implements ( subBucketCount == fromHistogram . subBucketCount ) && ( unitMagnitude == fromHistogram . unitMagnitude ) ) { SINGLE + long totalCount = NUMBER0 ; for ( int i = NUMBER0 ; i < fromHistogram . countsArrayLength ; i ++ ) { - addToCountAtIndex ( i , fromHistogram . getCountAtIndex ( i ) ) ; + long count = fromHistogram . getCountAtIndex ( i ) ; + addToCountAtIndex ( i , count ) ; + totalCount += count ; } - setTotalCount ( getTotalCount ( ) + fromHistogram . getTotalCount ( ) ) ; + SINGLE + SINGLE + setTotalCount ( getTotalCount ( ) + totalCount ) ; } else { SINGLE SINGLE
Fixed total count computation on adding concurrently modified histograms
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class BigStoreIT implements RelationshipType { createAndVerifyGraphStartingWithId ( ( long ) pow ( NUMBER0 , NUMBER1 ) , NUMBER2 ) ; } - + + @ ignore ( STRING0 ) @ test public void createAndVerify34BitGraph ( ) throws Exception {
Suppress a test that appears to bust limits
<nb> public class PropertyValuesHolder implements Cloneable { public void setObjectValues ( Object . . . values ) { mValueType = values [ NUMBER0 ] . getClass ( ) ; mKeyframeSet = KeyframeSet . ofObject ( values ) ; + if ( mEvaluator != null ) { + mKeyframeSet . setEvaluator ( mEvaluator ) ; + } } COMMENT
Set existing TypeEvaluator on new KeyframeSet when changing object values
<nb> public final class Configuration implements PersistentStateComponent < Element > { setPatternAnnotation ( JDOMExternalizerUtil . readField ( element , PATTERN_ANNOTATION_NAME ) ) ; setSubstAnnotation ( JDOMExternalizerUtil . readField ( element , SUBST_ANNOTATION_NAME ) ) ; setResolveReferences ( readBoolean ( element , RESOLVE_REFERENCES , true ) ) ; - setUseDfaIfAvailable ( readBoolean ( element , USE_DFA_IF_AVAILABLE , true ) ) ; - setIncludeUncomputablesAsLiterals ( readBoolean ( element , INCLUDE_UNCOMPUTABLES_AS_LITERALS , true ) ) ; + setUseDfaIfAvailable ( readBoolean ( element , USE_DFA_IF_AVAILABLE , false ) ) ; + setIncludeUncomputablesAsLiterals ( readBoolean ( element , INCLUDE_UNCOMPUTABLES_AS_LITERALS , false ) ) ; if ( mergeWithOriginalAndCompile ) { mergeWithDefaultConfiguration ( ) ;
turn DFA off by default
<nb> public class InputsResource extends RestResource { launchExisting ( inputId ) ; return Response . status ( Response . Status . ACCEPTED ) . build ( ) ; } - - @ get - @ timed - @ path ( STRING0 ) - public Response locationtest ( ) { - return Response . created ( getUriBuilderToSelf ( ) . path ( InputsResource . class ) - . path ( STRING1 ) - . build ( STRING2 ) - ) . build ( ) ; - } }
Removing test endpoint
<nb> public class SmoothProgressDrawable extends Drawable implements Animatable { prev = Math . max ( FLOAT0 , xOffset - xSectionWidth ) ; ratioSectionWidth = Math . abs ( mInterpolator . getInterpolation ( prev ) - - mInterpolator . getInterpolation ( xOffset ) ) ; + mInterpolator . getInterpolation ( Math . min ( xOffset , FLOAT1 ) ) ) ; sectionWidth = ( int ) ( width * ratioSectionWidth ) ; if ( sectionWidth + prev < width )
Fixed decelerate issue
<nb> import static NAMESPACE ; COMMENT COMMENT COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT public class Advice implements AsmVisitorWrapper . ForDeclaredMethods . MethodVisitorWrapper {
Added information about break points when using advice component
<nb> public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder , AS } @ override + @ nullable public IElementType getTokenType ( ) { - final IElementType elementType = doGetTokenType ( ) ; - if ( elementType instanceof TokenWrapper ) { - return ( ( TokenWrapper ) elementType ) . getDelegate ( ) ; - } - return elementType ; - } - - private IElementType doGetTokenType ( ) { if ( eof ( ) ) return null ; if ( myRemapper != null ) { <nb> public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder , AS @ nullable public String getTokenText ( ) { if ( eof ( ) ) return null ; - final IElementType type = doGetTokenType ( ) ; + final IElementType type = getTokenType ( ) ; if ( type instanceof TokenWrapper ) { return ( ( TokenWrapper ) type ) . getValue ( ) ; }
don t unwrap TokenWrappers element type
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class IdentifierHighlighterPassFactory extends AbstractProjectComponent i public TextEditorHighlightingPass createHighlightingPass ( @ notnull final PsiFile file , @ notnull final Editor editor ) { if ( editor . isOneLineMode ( ) ) return null ; - if ( ! CodeInsightSettings . getInstance ( ) . HIGHLIGHT_IDENTIFIER_UNDER_CARET ) { + if ( ! CodeInsightSettings . getInstance ( ) . HIGHLIGHT_IDENTIFIER_UNDER_CARET || + ApplicationManager . getApplication ( ) . isHeadlessEnvironment ( ) ) { return null ; }
in headless environment do not create identifier highlighter pass
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import static NAMESPACE ;
Remove unecessary imports
<nb> public class MapActivityActions implements DialogProvider { settings . setPointToNavigate ( lat , lon , false , name ) ; } else if ( which == NUMBER0 ) { int sz = targetPointsHelper . getIntermediatePoints ( ) . size ( ) ; - LatLon pt = targetPointsHelper . getPointToNavigate ( ) ; + SINGLE settings . insertIntermediatePoint ( lat , lon , name , sz , false ) ; - settings . setPointToNavigate ( pt . getLatitude ( ) , pt . getLongitude ( ) , false , settings . getPointNavigateDescription ( ) ) ; + SINGLE SINGLE SINGLE SINGLE
remove surplus code
<nb> class NodeImpl implements Node , Comparable < Node > StopEvaluator stopEvaluator , ReturnableEvaluator returnableEvaluator , RelationshipType relationshipType , Direction direction ) { + if ( direction == null ) + { + throw new IllegalArgumentException ( STRING0 ) ; + } + SINGLE return travFactory . createTraverser ( traversalOrder , this , relationshipType , direction , stopEvaluator , returnableEvaluator ) ; } <nb> class NodeImpl implements Node , Comparable < Node > RelationshipType firstRelationshipType , Direction firstDirection , RelationshipType secondRelationshipType , Direction secondDirection ) { + if ( firstDirection == null || secondDirection == null ) + { + throw new IllegalArgumentException ( STRING1 + + STRING2 + firstDirection + STRING3 + + secondDirection ) ; + } + SINGLE RelationshipType [ ] types = new RelationshipType [ NUMBER0 ] ; Direction [ ] dirs = new Direction [ NUMBER0 ] ; types [ NUMBER1 ] = firstRelationshipType ;
Added null check for direction in node traverse non varargs methods
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT - interface RowMapper { + public interface RowMapper { COMMENT COMMENT
make rowmapper interface public for custom task implementers
<nb> class Presser { COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT <nb> public class Solo { } COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT
Clarified javadoc for pressMenuItem in Solo and Presser
<nb> public class ObjectStore implements RawStore , Configurable { return prop ; } - private static PersistenceManagerFactory getPMF ( ) { + private static synchronized PersistenceManagerFactory getPMF ( ) { if ( pmf == null ) { pmf = JDOHelper . getPersistenceManagerFactory ( prop ) ; DataStoreCache dsc = pmf . getDataStoreCache ( ) ;
ObjectStore getPMF has concurrency problems Brock Noland via Ashutosh Chauhan
<nb> public class CancelActivity extends ListActivity { protected void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; requestWindowFeature ( Window . FEATURE_NO_TITLE ) ; + } + + @ override + protected void onStart ( ) { + super . onStart ( ) ; + SINGLE final BookCollectionShadow collection = new BookCollectionShadow ( ) ; myCollection = collection ; collection . bindToService ( this , new Runnable ( ) {
connect book service in onStart not in onCreate
<nb> COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; COMMENT <nb> public class IntelliJLaf extends DarculaLaf { } @ override - public UIDefaults getDefaults ( ) { - UIDefaults defaults = super . getDefaults ( ) ; - if ( SystemInfo . isLinux ) { - try { - LafManagerImpl . initFontDefaults ( defaults , STRING0 , NUMBER0 ) ; - } - catch ( Exception ignore ) { - } - } - return defaults ; - } - - @ override protected DefaultMetalTheme createMetalTheme ( ) { return new IdeaBlueMetalTheme ( ) ; }
do not redefine system fonts for IntelliJ Laf
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; COMMENT COMMENT <nb> public class Bro { public static final boolean IS_LINUX ; public static final boolean IS_X86 ; public static final boolean IS_ARM ; + public static final boolean IS_32BIT ; + public static final boolean IS_64BIT ; static { String os = System . getProperty ( STRING0 , STRING1 ) . toLowerCase ( ) ; <nb> public class Bro { IS_LINUX = ! IS_DARWIN && os . contains ( STRING2 ) ; IS_X86 = arch . contains ( STRING3 ) ; IS_ARM = ! IS_X86 && arch . contains ( STRING4 ) ; + IS_64BIT = VoidPtr . sizeOf ( ) == NUMBER0 ; + IS_32BIT = ! IS_64BIT ; } public static void bind ( ) {
Added IS_32BIT and IS_64BIT flags to org robovm rt bro Bro
<nb> public class Searcher { COMMENT public boolean searchForEditTextWithTimeout ( String regex ) { - long now = System . currentTimeMillis ( ) ; - final long endTime = now + TIMEOUT ; - - boolean shouldContinue = true ; - while ( shouldContinue ) { - sleeper . sleep ( ) ; - shouldContinue = ! searchFor ( EditText . class , regex , NUMBER0 , true ) && now < endTime ; - now = System . currentTimeMillis ( ) ; - } - - SINGLE - SINGLE - return searchFor ( EditText . class , regex , NUMBER0 , true ) ; + return searchWithTimeoutFor ( EditText . class , regex , NUMBER0 , true ) ; }
Simplified Searcher searchForEditTextWithTimeout
<nb> public class UnionDataSource implements DataSource { return dataSources . hashCode ( ) ; } + + @ override + public String toString ( ) + { + return STRING0 + + STRING1 + dataSources + + STRING2 ; + } }
Add toString for better logging
<nb> public class Node extends Spatial implements Savable { protected void breadthFirstTraversal ( SceneGraphVisitor visitor , Queue < Spatial > queue ) { queue . addAll ( children ) ; } - COMMENT - @ override - void checkDoBoundUpdate ( ) { - if ( ( refreshFlags & RF_BOUND ) == NUMBER0 ) { - return ; - } - - checkDoTransformUpdate ( ) ; - - SINGLE - int len = getQuantity ( ) ; - for ( int i = NUMBER0 ; i < len ; i ++ ) { - Spatial child = getChild ( i ) ; - child . checkDoBoundUpdate ( ) ; - } - - SINGLE - updateWorldBound ( ) ; - } - COMMENT }
commented code relict removed
<nb> public class PluginManager { public static boolean isIncompatible ( final IdeaPluginDescriptor descriptor ) { BuildNumber buildNumber = getBuildNumber ( ) ; - if ( descriptor . getSinceBuild ( ) != null ) { + if ( ! StringUtil . isEmpty ( descriptor . getSinceBuild ( ) ) ) { BuildNumber sinceBuild = BuildNumber . fromString ( descriptor . getSinceBuild ( ) ) ; if ( sinceBuild . compareTo ( buildNumber ) > NUMBER0 ) { return true ; } } - if ( descriptor . getUntilBuild ( ) != null && ! buildNumber . isSnapshot ( ) ) { + if ( ! StringUtil . isEmpty ( descriptor . getUntilBuild ( ) ) && ! buildNumber . isSnapshot ( ) ) { BuildNumber untilBuild = BuildNumber . fromString ( descriptor . getUntilBuild ( ) ) ; if ( untilBuild . compareTo ( buildNumber ) < NUMBER0 ) return true ; }
Allow empty since build and until build tags
<nb> import static NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import static NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
remove unused import
<nb> COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class Attachment { return Base64Converter . encode ( myBytes ) ; } + @ notnull + public byte [ ] getBytes ( ) { + return myBytes ; + } + public boolean isIncluded ( ) { return myIncluded ; }
add getBytes method to diagnostic Attachment
<nb> public class Array < T > implements Iterable < T > { } public void clear ( ) { - size = NUMBER0 ; Object [ ] items = this . items ; for ( int i = NUMBER0 , n = size ; i < n ; i ++ ) items [ i ] = null ; + size = NUMBER0 ; } COMMENT
fixed Nothing to see here
<nb> public abstract class jOOQAbstractTest < new InsertUpdateTests ( this ) . testInsertReturning ( ) ; } - SINGLE + SINGLE public void testInsertReturningWithPlainSQL ( ) throws Exception { new InsertUpdateTests ( this ) . testInsertReturningWithPlainSQL ( ) ; }
Added issue id marker
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + package NAMESPACE ; public interface Macro {
Add missing copyright
<nb> public class IssueIndex extends BaseIndex { result . addAll ( EsUtils . termsKeys ( issuesResult ) ) ; result . addAll ( EsUtils . termsKeys ( rulesResult ) ) ; List < String > resultAsList = Lists . newArrayList ( result ) ; - return resultAsList . size ( ) > maxNumberOfTags ? resultAsList . subList ( NUMBER0 , maxNumberOfTags ) : resultAsList ; + return resultAsList . size ( ) > maxNumberOfTags && maxNumberOfTags > NUMBER0 ? resultAsList . subList ( NUMBER0 , maxNumberOfTags ) : resultAsList ; } public Map < String , Long > countTags ( IssueQuery query , int maxNumberOfTags ) {
Fix tags dropdown in issue bulk change
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT package NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import static NAMESPACE ; - COMMENT - COMMENT - COMMENT public class Map { private final PokemonGo api ; <nb> public class Map { result = cachedMapObjects ; lastMapUpdate = System . currentTimeMillis ( ) ; } - + return result ; }
Fixed the license
<nb> public class SelectStatement implements CQLStatement , MeasurableForPreparedCache if ( restriction == null ) restriction = new MultiColumnRestriction . Slice ( onToken ) ; else if ( ! restriction . isMultiColumn ( ) ) - throw new InvalidRequestException ( String . format ( STRING0 , name , relation ) ) ; + throw new InvalidRequestException ( String . format ( STRING1 , name , relation ) ) ; restriction . setBound ( relation . operator ( ) , t ) ; stmt . columnRestrictions [ name . position ] = restriction ; }
add missing string format placeholder
<nb> public class EclipseClasspathStorageProvider implements ClasspathStorageProvider try { final HashSet < String > usedVariables = new HashSet < String > ( ) ; final CachedXmlDocumentSet documentSet = getFileSet ( ) ; - final String path = documentSet . getParent ( EclipseXml . PROJECT_FILE ) ; - LOG . assertTrue ( documentSet . exists ( EclipseXml . PROJECT_FILE ) ) ; + String path = documentSet . getParent ( EclipseXml . PROJECT_FILE ) ; + if ( ! documentSet . exists ( EclipseXml . PROJECT_FILE ) ) { + if ( ! documentSet . exists ( EclipseXml . CLASSPATH_FILE ) ) { + return usedVariables ; + } + + path = documentSet . getParent ( EclipseXml . CLASSPATH_FILE ) ; + } final EclipseClasspathReader classpathReader = new EclipseClasspathReader ( path , module . getProject ( ) , null ) ; classpathReader . init ( model ) ; if ( documentSet . exists ( EclipseXml . CLASSPATH_FILE ) ) {
restore root path from
<nb> public class CoreAPI extends ApiImplementor implements SessionListener { private static final String PARAM_DIR = STRING0 ; private static final String PARAM_SESSION = STRING1 ; private static final String PARAM_OVERWRITE_SESSION = STRING2 ; - SINGLE private static final String PARAM_REGEX = STRING3 ; private static final String PARAM_START = STRING4 ; private static final String PARAM_PROXY_DETAILS = STRING5 ;
Tidy up removed a TODO comment no longer needed contexts are handled by ContextAPI
<nb> public class BlockMetadataManager { } } } + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public synchronized BlockStoreMeta getBlockStoreMeta ( ) { + return new BlockStoreMeta ( this ) ; + } } <nb> public class TieredBlockStore implements BlockStore { @ override public BlockStoreMeta getBlockStoreMeta ( ) { - mEvictionLock . readLock ( ) . lock ( ) ; - BlockStoreMeta meta = new BlockStoreMeta ( mMetaManager ) ; - mEvictionLock . readLock ( ) . unlock ( ) ; - return meta ; + return mMetaManager . getBlockStoreMeta ( ) ; } @ override
Remove locking on the code path of getBlockStoremeta
<nb> public class Observable < T > { SINGLE } if ( isTrusted ) { - return onSubscribe . call ( observer ) ; + Subscription s = onSubscribe . call ( observer ) ; + if ( s == null ) { + SINGLE + SINGLE + return Subscriptions . empty ( ) ; + } else { + return s ; + } } else { AtomicObservableSubscription subscription = new AtomicObservableSubscription ( ) ; return subscription . wrap ( onSubscribe . call ( new AtomicObserver < T > ( subscription , observer ) ) ) ;
gracefully handle null subscription on trusted onSubscribe the same as non trusted already does
<nb> public class GoTestConsoleProperties extends TestConsoleProperties implements SM myStdOut . append ( text ) ; } else { + String failedMessage = ServiceMessageBuilder . testFailed ( myCurrentTest ) . addAttribute ( STRING0 , myStdOut . toString ( ) ) . toString ( ) ; myFailed = false ; myStdOut = new StringBuilder ( ) ; - return super . processServiceMessages ( failedMessage ( ) , outputType , visitor ) + return super . processServiceMessages ( failedMessage , outputType , visitor ) && super . processServiceMessages ( ServiceMessageBuilder . testFinished ( myCurrentTest ) . toString ( ) , outputType , visitor ) ; } }
Fix fail messages capturing
<nb> public class AUC extends Func { if ( ca . isNA0 ( i ) ) throw new UnsupportedOperationException ( STRING0 ) ; final int a = ( int ) ca . at80 ( i ) ; SINGLE - assert ( a == NUMBER0 || a == NUMBER1 ) : STRING1 ; + assert ( a == NUMBER0 || a == NUMBER1 ) : STRING2 ; if ( cp . isNA0 ( i ) ) { SINGLE continue ;
Improve error message
<nb> public class SpringApplication { private void handleRunFailure ( ConfigurableApplicationContext context , SpringApplicationRunListeners listeners , Throwable exception ) { + if ( this . log . isErrorEnabled ( ) ) { + this . log . error ( STRING0 , exception ) ; + registerLoggedException ( exception ) ; + } try { try { listeners . finished ( context , exception ) ; <nb> public class SpringApplication { catch ( Exception ex ) { this . log . warn ( STRING1 , ex ) ; } - if ( this . log . isErrorEnabled ( ) ) { - this . log . error ( STRING0 , exception ) ; - registerLoggedException ( exception ) ; - } ReflectionUtils . rethrowRuntimeException ( exception ) ; }
Log exception before sending to listeners
<nb> public class WebappClassLoader public static final boolean ENABLE_CLEAR_REFERENCES = Boolean . valueOf ( System . getProperty ( STRING0 , STRING1 ) ) . booleanValue ( ) ; - protected class PrivilegedFindResource - implements PrivilegedAction < ResourceEntry > { - - protected File file ; - protected String path ; - - PrivilegedFindResource ( File file , String path ) { - this . file = file ; - this . path = path ; - } - - public ResourceEntry run ( ) { - return findResourceInternal ( file , path ) ; - } - - } - protected class PrivilegedFindResourceByName implements PrivilegedAction < ResourceEntry > { <nb> public final class SecurityClassLoad { String basePackage = STRING2 ; loader . loadClass ( basePackage + - STRING3 ) ; + STRING4 ) ; }
Remove unused inner class
<nb> public class NijiPermissionsResolver implements PermissionsResolver { public boolean hasPermission ( String worldName , String name , String permission ) { try { - return api . getHandler ( ) . has ( worldName , name , permission ) ; + try { + return api . getHandler ( ) . has ( worldName , name , permission ) ; + } catch ( Throwable t ) { + return api . getHandler ( ) . has ( server . getPlayer ( name ) , permission ) ; + } } catch ( Throwable t ) { t . printStackTrace ( ) ; return false ;
Added backwards compatibility for per world permissions
<nb> public class PatchDelegate { List < BindingTuple > methodsToDelegateForThisAnn = new ArrayList < BindingTuple > ( ) ; if ( rawTypes . isEmpty ( ) ) { + if ( method . returnType == null ) continue ; addAllMethodBindings ( methodsToDelegateForThisAnn , method . returnType . resolveType ( decl . initializerScope ) , banList , method . selector , ann ) ; } else { for ( ClassLiteralAccess cla : rawTypes ) {
Added null check to prevent errors in eclipse when working on incomplete files
<nb> import NAMESPACE ; COMMENT public class TestConnections { + @ suppresswarnings ( STRING0 ) @ test public void testCreate ( ) throws SQLException { <nb> public class TestConnections } finally { ds . close ( ) ; + System . getProperties ( ) . remove ( STRING1 , STRING2 ) ; } } <nb> public class TestConnections } } + @ suppresswarnings ( STRING0 ) @ test public void testGetWithUsername ( ) throws Exception {
Reset housekeeping period after test
<nb> public abstract class AAdvancedMaterial extends AMaterial { } public AAdvancedMaterial ( String vertexShader , String fragmentShader , boolean isAnimated ) { - this ( vertexShader , fragmentShader , AMaterial . VERTEX_ANIMATION ) ; + this ( vertexShader , fragmentShader , + isAnimated ? AMaterial . VERTEX_ANIMATION : AMaterial . NONE ) ; } public AAdvancedMaterial ( String vertexShader , String fragmentShader , int parameters ) {
Add parameter check in material constructor
<nb> public class WatchedBox extends ImageView { updateStateImage ( ) ; } - COMMENT - COMMENT - COMMENT - public void toggleWatched ( ) { - mEpisodeFlag = EpisodeTools . isWatched ( mEpisodeFlag ) - ? EpisodeFlags . UNWATCHED : EpisodeFlags . WATCHED ; - updateStateImage ( ) ; - } - private void updateStateImage ( ) { switch ( mEpisodeFlag ) { case EpisodeFlags . WATCHED : {
Drop unused method also should not be used of WatchedBox
<nb> public class DataSourceRealm extends RealmBase { String dbCredentials = getPassword ( dbConnection , username ) ; + if ( credentials == null || dbCredentials == null ) { + if ( containerLog . isTraceEnabled ( ) ) + containerLog . trace ( + sm . getString ( STRING0 , + username ) ) ; + return null ; + } + SINGLE boolean validated = getCredentialHandler ( ) . matches ( credentials , dbCredentials ) ;
Perform null checking on input and stored credentials before passing them off to CredentialHandlers for matching
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; public abstract class WelcomeActivity extends AppCompatActivity { <nb> - package NAMESPACE ; + package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; COMMENT COMMENT
Moved WelcomeScreenHider to more appropriate package
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; class CuratorEventImpl implements CuratorEvent <nb> class CuratorEventImpl implements CuratorEvent STRING0 + children + STRING1 + context + STRING2 + stat + - STRING3 + data + + STRING3 + Arrays . toString ( data ) + STRING4 + watchedEvent + STRING5 + aclList + STRING6 ;
wrap data in toString
<nb> public final class Eureka2Clients { } public static EurekaInterestClient getInterestClient ( ) { - if ( interestClient == null ) { - throw new IllegalStateException ( STRING0 ) ; - } return interestClient ; }
Remove unnecessary condition in Eureka2Clients
<nb> public class MainTest { } @ test - public void testVersionArg ( ) throws IOException , CommandLineParsingException { - Main . main ( new String [ ] { STRING0 } ) ; + public void testVersionArg ( ) throws Exception { + Main . run ( new String [ ] { STRING0 } ) ; }
Fixed test now that main method logic moved to run
<nb> public class FilterUtil fc . onRestRequest ( req , emptyRequestContext ( ) , emptyWireAttrs ( ) ) ; } + public static void fireRestRequest ( FilterChain fc , RestRequest req , Map < String , String > wireAttrs ) + { + fc . onRestRequest ( req , emptyRequestContext ( ) , wireAttrs ) ; + } + public static void fireUntypedRequest ( FilterChain fc , Request req ) { if ( req instanceof RpcRequest )
Added wire attrs as a param
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class HeronServerTest { private volatile boolean isMessageNeed = false ; private volatile int messagesReceieved = NUMBER0 ; + COMMENT + COMMENT + COMMENT + @ rule + public final ExpectedException exception = ExpectedException . none ( ) ; + @ before public void before ( ) throws Exception { SINGLE <nb> public class HeronServerTest { COMMENT @ test public void testHandleConnect ( ) throws Exception { - boolean throwException = false ; - try { - heronServer . handleConnect ( null ) ; - } catch ( RuntimeException re ) { - throwException = true ; - } - Assert . assertTrue ( throwException ) ; + exception . expect ( RuntimeException . class ) ; + heronServer . handleConnect ( null ) ; } COMMENT
Fix check style of unit tests in common network
<nb> public class AjpAprProcessor extends AbstractAjpProcessor < Long > { protected void setupSocket ( SocketWrapperBase < Long > socketWrapper ) { SINGLE } - - - COMMENT - COMMENT - COMMENT - @ override - public void recycle ( boolean socketClosing ) { - super . recycle ( socketClosing ) ; - } }
Remove unnecessary method
<nb> static class ThrowExpr extends UntypedExpr { public Object eval ( ) throws Exception { - throw ( Exception ) excExpr . eval ( ) ; + Object t = excExpr . eval ( ) ; + if ( t instanceof Exception ) + throw ( Exception ) t ; + else + throw ( Error ) t ; } public void emit ( C context , FnExpr fn , GeneratorAdapter gen ) {
enable eval of throw to throw Errors as well as Exceptions
<nb> public class EditingTargetCodeExecution codeExtractor_ = codeExtractor ; docId_ = docId ; inlineChunkExecutor_ = new EditingTargetInlineChunkExecution ( - target . getDocDisplay ( ) , docId ) ; + display , docId ) ; RStudioGinjector . INSTANCE . injectMembers ( this ) ; }
use supplied display interface for code browser
<nb> public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder { @ notnull TokenSet comments , @ notnull Lexer lexer , CharTable charTable , - @ notnull final CharSequence text , + @ notnull CharSequence text , @ nullable ASTNode originalTree , @ nullable CharSequence lastCommittedText , @ nullable MyTreeStructure parentLightTree ,
drop final good for debug
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; COMMENT COMMENT COMMENT - @ incubating + @ incubating @ hasinternalprotocol public interface ProjectNativeComponent extends Named { COMMENT COMMENT
Add missing HasInternalProtocol
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Added missing import CountDownTimer
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , UU , I , IPK , T7 @ test public void testKeepRSWithUpdateOnChangeLazy ( ) throws Exception { switch ( dialect ( ) ) { + SINGLE + SINGLE + SINGLE + case DERBY : case SQLITE : log . info ( STRING0 , STRING1 ) ; return ;
Skip a test in Derby which fails because of
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; public class NavigationItemListCellRenderer extends JPanel implements ListCellRenderer { + private static final Logger LOG = Logger . getInstance ( STRING0 ) ; + public NavigationItemListCellRenderer ( ) { super ( new BorderLayout ( ) ) ; } <nb> public class NavigationItemListCellRenderer extends JPanel implements ListCellRe if ( value instanceof NavigationItem ) { NavigationItem element = ( NavigationItem ) value ; ItemPresentation presentation = element . getPresentation ( ) ; + assert presentation != null : STRING1 ; String name = presentation . getPresentableText ( ) ; Color color = list . getForeground ( ) ; FileStatus status = element . getFileStatus ( ) ;
assert not null item presentation
<nb> public class TransactionMetricCollector implements AgentStatCollector < TTransacti this . sampledNewGauge = ( Gauge < Long > ) MetricMonitorValues . getMetric ( metrics , TRANSACTION_SAMPLED_NEW , UNSUPPORTED_GAUGE ) ; this . sampledContinuationGauge = ( Gauge < Long > ) MetricMonitorValues . getMetric ( metrics , TRANSACTION_SAMPLED_CONTINUATION , UNSUPPORTED_GAUGE ) ; this . unsampledNewGauge = ( Gauge < Long > ) MetricMonitorValues . getMetric ( metrics , TRANSACTION_UNSAMPLED_NEW , UNSUPPORTED_GAUGE ) ; - this . unsampledContinuationGuage = ( Gauge < Long > ) MetricMonitorValues . getMetric ( metrics , TRANSACTION_UNSAMPLED_NEW , UNSUPPORTED_GAUGE ) ; + this . unsampledContinuationGuage = ( Gauge < Long > ) MetricMonitorValues . getMetric ( metrics , TRANSACTION_UNSAMPLED_CONTINUATION , UNSUPPORTED_GAUGE ) ; } @ override
Fixed collection of unsampled continuation transactions
<nb> public class RuleResult extends Result < Rule > { Map < String , Map < String , Object > > activeRulesForHit = hit . getFields ( ) . get ( RuleNormalizer . RuleField . ACTIVE . key ( ) ) . getValue ( ) ; for ( Map . Entry < String , Map < String , Object > > activeRule : activeRulesForHit . entrySet ( ) ) { - System . out . println ( STRING0 + ruleKey ) ; - System . out . println ( STRING1 + activeRule ) ; activeRules . put ( ruleKey , new ActiveRuleDoc ( ActiveRuleKey . parse ( activeRule . getKey ( ) ) , activeRule . getValue ( ) ) ) ; } <nb> public class RuleResult extends Result < Rule > { } public Multimap < String , ActiveRuleDoc > getActiveRules ( ) { - System . out . println ( STRING2 + activeRules ) ; return this . activeRules ; } }
Removed debug output
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class HttpClientBuilderTest { @ test public void usesACustomRoutePlanner ( ) throws Exception { - final HttpRoutePlanner routePlanner = new SystemDefaultRoutePlanner ( new DefaultProxySelector ( ) ) ; + ProxySelector proxySelector = ( ProxySelector ) Class . forName ( STRING0 ) . newInstance ( ) ; + final HttpRoutePlanner routePlanner = new SystemDefaultRoutePlanner ( proxySelector ) ; final CloseableHttpClient httpClient = builder . using ( configuration ) . using ( routePlanner ) . createClient ( apacheBuilder , connectionManager , STRING1 ) ;
Remove XLint SUN proprietary API warnings
<nb> public class DataSet extends Sql { } return visitor ; } + COMMENT + COMMENT + COMMENT + public DataSet createView ( Closure criteria ) { + return new DataSet ( this , criteria ) ; + } }
added method to create a subset of the orginal dataset
<nb> package NAMESPACE ; + import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; <nb> public class NewHostControllerBootstrap { static void activateNetworkInterfaces ( final ModelNode host , final ServiceTarget serviceTarget ) { for ( final Property iFace : host . get ( INTERFACE ) . asPropertyList ( ) ) { final String interfaceName = iFace . getName ( ) ; - final ParsedInterfaceCriteria criteria = ParsedInterfaceCriteria . parse ( iFace . getValue ( ) ) ; + final ParsedInterfaceCriteria criteria = ParsedInterfaceCriteria . parse ( iFace . getValue ( ) . require ( CRITERIA ) ) ; serviceTarget . addService ( NetworkInterfaceService . JBOSS_NETWORK_INTERFACE . append ( interfaceName ) , NetworkInterfaceService . create ( interfaceName , criteria ) ) . setInitialMode ( Mode . ON_DEMAND ) . install ( ) ;
Parse criteria properly when setting up the management socket
<nb> public class LocalGatewayShardsState extends AbstractComponent implements Cluste builder . prettyPrint ( ) ; builder . startObject ( ) ; builder . field ( STRING0 , shardStateInfo . version ) ; + if ( shardStateInfo . primary != null ) { + builder . field ( STRING1 , shardStateInfo . primary ) ; + } builder . endObject ( ) ; builder . flush ( ) ;
also store the fact that a shard is primary or not in the shard state
<nb> public class XWebView extends XHook { SINGLE SINGLE - SINGLE + SINGLE SINGLE SINGLE SINGLE <nb> public class XWebView extends XHook { SINGLE try { - Method setUserAgent = clazzWebSettings . getDeclaredMethod ( STRING0 , String . class ) ; + Method setUserAgent = clazzWebSettings . getDeclaredMethod ( STRING0 , Integer . class ) ; Util . log ( this , Log . INFO , STRING1 + setUserAgent . getName ( ) ) ; XposedBridge . hookMethod ( setUserAgent , new XC_MethodHook ( ) { @ override
Fix hooking setUserAgent
<nb> public final class Settings implements ToXContent { } InputStream is = classLoader . getResourceAsStream ( resourceName ) ; if ( is == null ) { - return this ; + throw new SettingsException ( STRING0 + resourceName + STRING1 ) ; } return loadFromStream ( resourceName , is ) ; <nb> public class YamlSettingsLoaderTests extends ESTestCase { . loadFromClasspath ( STRING2 ) . build ( ) ; } + + + @ test + public void testYamlSettingsNoFile ( ) throws Exception { + String invalidResourceName = STRING3 ; + try { + Settings defaultSettings = settingsBuilder ( ) . loadFromClasspath ( invalidResourceName ) . build ( ) ; + fail ( STRING4 ) ; + } catch ( Exception e ) { + assertTrue ( e instanceof SettingsException ) ; + assertThat ( e . getMessage ( ) , equalTo ( STRING0 + invalidResourceName + STRING1 ) ) ; + } + } }
Throw Exception for missing settings file
<nb> package NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public final class WebViewFactory { } private static Class < WebViewFactoryProvider > getFactoryClass ( ) throws ClassNotFoundException { - return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY ) ; + try { + Context webViewContext = AppGlobals . getInitialApplication ( ) . createPackageContext ( + getWebViewPackageName ( ) , + Context . CONTEXT_INCLUDE_CODE | Context . CONTEXT_IGNORE_SECURITY ) ; + ClassLoader clazzLoader = webViewContext . getClassLoader ( ) ; + return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY , true , + clazzLoader ) ; + } catch ( PackageManager . NameNotFoundException e ) { + Log . e ( LOGTAG , STRING0 ) ; + return ( Class < WebViewFactoryProvider > ) Class . forName ( NULL_WEBVIEW_FACTORY ) ; + } } }
Load the WebView Java code via createPackageContext
<nb> public abstract class LifecycleBase implements Lifecycle { ExceptionUtils . handleThrowable ( t ) ; setStateInternal ( LifecycleState . FAILED , null , false ) ; throw new LifecycleException ( sm . getString ( STRING0 , toString ( ) ) , t ) ; - } finally { - if ( state . equals ( LifecycleState . FAILED ) ) { - stop ( ) ; - return ; - } } SINGLE
Fix test failures
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class ModuleTestCase extends IdeaTestCase { final File moduleDir = createTempDirectory ( ) ; FileUtil . copyDir ( dirInTestDataFile , moduleDir ) ; final Module module = createModule ( moduleDir + STRING0 + newModuleFileName , moduleType ) ; - VirtualFile root = LocalFileSystem . getInstance ( ) . refreshAndFindFileByIoFile ( moduleDir ) ; + final VirtualFile root = LocalFileSystem . getInstance ( ) . refreshAndFindFileByIoFile ( moduleDir ) ; + new WriteCommandAction . Simple ( module . getProject ( ) ) { + @ override + protected void run ( ) throws Throwable { + root . refresh ( false , true ) ; + } + } . execute ( ) . throwException ( ) ; if ( addSourceRoot ) { PsiTestUtil . addSourceContentToRoots ( module , root ) ; }
force refresh source root when creating new module to fix test
<nb> public class FormattedEmailAlertSender extends StaticEmailAlertSender implements STRING0 + STRING1 + STRING2 + - STRING3 + + STRING4 + STRING5 + STRING6 + STRING7 +
Add addition newline between messages to alert email
<nb> public final class MapPalette { byte [ ] result = new byte [ temp . getWidth ( ) * temp . getHeight ( ) ] ; for ( int i = NUMBER0 ; i < pixels . length ; i ++ ) { - result [ i ] = matchColor ( new Color ( pixels [ i ] ) ) ; + result [ i ] = matchColor ( new Color ( pixels [ i ] , true ) ) ; } return result ; }
Bleeding Fixed MapPalette imageToBytes to properly handle transparency
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class FeedRefreshWorker { Thread . sleep ( NUMBER0 ) ; } } catch ( Exception e ) { - throw new EJBException ( e . getMessage ( ) , e ) ; + log . error ( threadName + STRING0 + e . getMessage ( ) , e ) ; } } return new AsyncResult < Void > ( null ) ;
just log the error and go on
<nb> public class ClientEngineImpl implements ClientEngine , CoreService , PostJoinAwar ClientEndpointImpl endpoint = ( ClientEndpointImpl ) endpointManager . getEndpoint ( conn ) ; ClientRequest request = null ; try { - if ( ! node . joined ( ) ) { - throw new HazelcastInstanceNotActiveException ( STRING0 ) ; - } request = loadRequest ( ) ; if ( request == null ) { handlePacketWithNullRequest ( ) ; <nb> public class ClientEngineImpl implements ClientEngine , CoreService , PostJoinAwar } private void processRequest ( ClientEndpointImpl endpoint , ClientRequest request ) throws Exception { + if ( ! node . joined ( ) ) { + throw new HazelcastInstanceNotActiveException ( STRING0 ) ; + } + request . setEndpoint ( endpoint ) ; initService ( request ) ; request . setClientEngine ( ClientEngineImpl . this ) ;
Moved ClientPacketProcessor node joined check intto process to be able to return error to client
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + package NAMESPACE ; import NAMESPACE ;
Adding license header for test file
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; + + import static NAMESPACE ; + import static NAMESPACE ; COMMENT COMMENT <nb> public class GithubShareProjectTest extends GithubShareProjectTestBase { createProjectFiles ( ) ; - GitExecutor . cd ( myProjectRoot . getPath ( ) ) ; - GitExecutor . git ( myProjectRoot . getPath ( ) , STRING0 ) ; - GitExecutor . git ( myProjectRoot . getPath ( ) , STRING1 ) ; - GitExecutor . git ( myProjectRoot . getPath ( ) , STRING2 ) ; + cd ( myProjectRoot . getPath ( ) ) ; + git ( STRING0 ) ; + git ( STRING1 ) ; + git ( STRING2 ) ; GithubShareAction . shareProjectOnGithub ( myProject ) ;
github test Fix git commands execution params
<nb> final class ClientCallImpl < ReqT , RespT > extends ClientCall < ReqT , RespT > @ override public void cancel ( ) { - cancel ( Status . CANCELLED ) ; - } - - SINGLE - SINGLE - private void cancel ( Status status ) { if ( cancelCalled ) { return ; } <nb> final class ClientCallImpl < ReqT , RespT > extends ClientCall < ReqT , RespT > SINGLE SINGLE if ( stream != null ) { - stream . cancel ( status ) ; + stream . cancel ( Status . CANCELLED ) ; } } finally { context . removeListener ( ClientCallImpl . this ) ;
Remove cancel Status since it is now unused
<nb> public class WebView extends AbsoluteLayout mHeldMotionless = MOTIONLESS_PENDING ; } } + int saveCount = canvas . save ( ) ; if ( animateZoom ) { mZoomManager . animateZoom ( canvas ) ; } else if ( ! canvas . isHardwareAccelerated ( ) ) { <nb> public class WebView extends AbsoluteLayout nativeUseHardwareAccelSkia ( mHardwareAccelSkia ) ; } - if ( mSelectingText && USE_JAVA_TEXT_SELECTION ) { - drawTextSelectionHandles ( canvas ) ; - } - } else { DrawFilter df = null ; if ( mZoomManager . isZoomAnimating ( ) || UIAnimationsRunning ) { <nb> public class WebView extends AbsoluteLayout } } + canvas . restoreToCount ( saveCount ) ; + if ( mSelectingText && USE_JAVA_TEXT_SELECTION ) { + drawTextSelectionHandles ( canvas ) ; + } + if ( extras == DRAW_EXTRAS_CURSOR_RING ) { if ( mTouchMode == TOUCH_SHORTPRESS_START_MODE ) { mTouchMode = TOUCH_SHORTPRESS_MODE ;
Fix text selection drawing on SW
<nb> public class BuildOutputConsumerImpl implements BuildOutputConsumer { for ( File outputRoot : myOutputs ) { String outputRootPath = FileUtil . toSystemIndependentName ( outputRoot . getPath ( ) ) ; final String relativePath = FileUtil . getRelativePath ( outputRootPath , outputFilePath , STRING0 ) ; - if ( relativePath != null ) { + if ( relativePath != null && ! relativePath . startsWith ( STRING1 ) ) { + SINGLE myFileGeneratedEvent . add ( outputRootPath , relativePath ) ; } }
correctly choose output root for generated class
<nb> public class ModifyKeyboardShortcutsWidget extends ModalDialogBase @ override public Object getKey ( CommandBinding item ) { - return item . getName ( ) ; + return item . hashCode ( ) ; } } ;
ensure key provider returns unique key for each item
<nb> public final class StringUtils { } if ( str . length ( ) > length ) { StringBuilder buffer = new StringBuilder ( length + NUMBER0 ) ; - buffer . append ( str . substring ( NUMBER1 , length ) ) ; + buffer . append ( str , NUMBER1 , length ) ; appendDropMessage ( buffer , str . length ( ) ) ; return buffer . toString ( ) ; } else { <nb> public final class StringUtils { return ; } if ( str . length ( ) > length ) { - builder . append ( str . substring ( NUMBER1 , length ) ) ; + builder . append ( str , NUMBER1 , length ) ; appendDropMessage ( builder , str . length ( ) ) ; } else { builder . append ( str ) ;
remove substring object
<nb> public class ElasticsearchRestTests extends ElasticsearchIntegrationTest { public void reset ( ) throws IOException , RestException { SINGLE for ( PathMatcher blacklistedPathMatcher : blacklistPathMatchers ) { - assumeFalse ( STRING0 + testCandidate . getTestPath ( ) + STRING1 , blacklistedPathMatcher . matches ( Paths . get ( testCandidate . getTestPath ( ) ) ) ) ; + SINGLE + String testSection = testCandidate . getTestSection ( ) . getName ( ) . replace ( STRING2 , STRING3 ) . replace ( STRING4 , STRING5 ) . replaceAll ( STRING6 , STRING5 ) . trim ( ) ; + String testPath = testCandidate . getSuitePath ( ) + STRING5 + testSection ; + assumeFalse ( STRING0 + testCandidate . getTestPath ( ) + STRING1 , blacklistedPathMatcher . matches ( Paths . get ( testPath ) ) ) ; } restTestExecutionContext . resetClient ( immutableCluster ( ) . httpAddresses ( ) ) ;
TEST make sure that the Dtests rest blacklist parameter works on windows too
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - public final class MethodHierarchyBrowser extends MethodHierarchyBrowserBase { + public class MethodHierarchyBrowser extends MethodHierarchyBrowserBase { private static final Logger LOG = Logger . getInstance ( STRING0 ) ; public MethodHierarchyBrowser ( final Project project , final PsiMethod method ) { <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - public final class TypeHierarchyBrowser extends TypeHierarchyBrowserBase { + public class TypeHierarchyBrowser extends TypeHierarchyBrowserBase { private static final Logger LOG = Logger . getInstance ( STRING1 ) ;
Allow inheritance from HierarchyBrowser implementations Type Method hierarchy
<nb> public class AtomEntryPollingConsumerTest extends ContextTestSupport { public void testResult3 ( ) throws Exception { MockEndpoint mock = getMockEndpoint ( STRING0 ) ; - mock . expectedMessageCount ( NUMBER0 ) ; + mock . expectedMessageCount ( NUMBER1 ) ; mock . assertIsSatisfied ( ) ; } <nb> public class AtomEntryPollingConsumerTest extends ContextTestSupport { from ( STRING1 ) . to ( STRING2 ) ; - from ( STRING3 ) . to ( STRING0 ) ; + from ( STRING4 ) . to ( STRING0 ) ; } } ; }
Fixed failing unit test on Bamboo
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class WordPress extends Application { COMMENT COMMENT COMMENT + @ targetapi ( Build . VERSION_CODES . ICE_CREAM_SANDWICH ) private class PushNotificationsBackendMonitor implements Application . ActivityLifecycleCallbacks , ComponentCallbacks2 { private final int DEFAULT_TIMEOUT = NUMBER0 * NUMBER1 ; SINGLE
Add targetApi annotation to prevent lint warning on PushNotificationBackendMonitor
<nb> public class LifecycleServiceImpl implements LifecycleService { @ override public boolean isRunning ( ) { - synchronized ( lifecycleLock ) { - return instance . node . isActive ( ) ; - } + SINGLE + return instance . node . isActive ( ) ; } @ override
removed excessive locking on lifecycleserviceimpl isRunning
<nb> public final class Settings { public static final String ACTION_NFCSHARING_SETTINGS = STRING0 ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + @ sdkconstant ( SdkConstantType . ACTIVITY_INTENT_ACTION ) + public static final String ACTION_DREAM_SETTINGS = STRING1 ; + SINGLE COMMENT
Add constant for Daydream settings
<nb> public class PhoneStatusBar extends BaseStatusBar implements DemoMode , @ override public void run ( ) { mLeaveOpenOnKeyguardHide = true ; - executeRunnableDismissingKeyguard ( runnable , null , false , true ) ; + executeRunnableDismissingKeyguard ( runnable , null , false , false ) ; } } ) ; }
Fix weird broken state from lock screen QS edit
<nb> import NAMESPACE ; import NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Cleaning up javadoc
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
removed unused import
<nb> import NAMESPACE ; COMMENT public class CompilerOptions implements Serializable , Cloneable { + SINGLE + private boolean manageClosureDependencies = false ; + SINGLE public enum Reach { ALL , <nb> public class CompilerOptions implements Serializable , Cloneable { dependencyOptions . setDependencySorting ( newVal ) ; dependencyOptions . setDependencyPruning ( newVal ) ; dependencyOptions . setMoocherDropping ( false ) ; + manageClosureDependencies = newVal ; } COMMENT
Add manageClosureDependencies option back
<nb> public class ServiceLocator { addPackageToScan ( STRING0 ) ; addPackageToScan ( STRING1 ) ; addPackageToScan ( STRING2 ) ; + addPackageToScan ( STRING3 ) ; addPackageToScan ( STRING4 ) ; } }
Include liquibase sdk in packages to scan by default
<nb> public class GroovyCompiler implements TranslatingCompiler { SINGLE printer . println ( GroovycRunner . IS_GRAILS ) ; - printer . println ( GrailsConfigUtils . getInstance ( ) . isSDKConfigured ( module ) && module . getModuleType ( ) instanceof GrailsModuleType ) ; + printer . println ( GrailsConfigUtils . getInstance ( ) . isSDKConfigured ( module ) ) ; final Charset ideCharset = EncodingProjectManager . getInstance ( myProject ) . getDefaultCharset ( ) ; if ( ! Comparing . equal ( CharsetToolkit . getDefaultSystemCharset ( ) , ideCharset ) ) {
enable grails specific compilation in java modules with several grails libraries