diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> public class SetHeaderHandler implements HttpHandler { } - public class Builder implements HandlerBuilder { + public static class Builder implements HandlerBuilder { @ override public String name ( ) { return STRING0 ;
Fix builder issue
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + public class FloatingActionButton extends ImageButton { public static final int SIZE_NORMAL = NUMBER0 ; public static final int SIZE_MINI = NUMBER1 ; + @ retention ( RetentionPolicy . SOURCE...
Fix issue with FAB_SIZE annotation
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class IndexedSetTest { Assert . assertEquals ( NUMBER0 , mSet . getByField ( mIntIndex , i ) . size ( ) ) ; } } + + @ test + public void iteratorRemoveTest ( ...
Added unit test function to show faulty beahvior
<nb> public class ClientEngineImpl implements ClientEngine , CoreService , PostJoinAwar int numberOfJavaClients = NUMBER0 ; int numberOfOtherClients = NUMBER0 ; - Operation clientInfoOperation = new GetConnectedClientsOperation ( ) ; OperationService operationService = node . nodeEngine . getOperationService ...
Do not re use GetConnectedClientsOperation for multiple invocations
<nb> public class JetPositionManager implements PositionManager { value = CachedValuesManager . getManager ( file . getProject ( ) ) . createCachedValue ( new CachedValueProvider < JetTypeMapper > ( ) { @ override public Result < JetTypeMapper > compute ( ) { - AnalyzeExhaust analyzeExhaust = ResolvePackage . g...
Analyze all relevant files in JetPositionManager
<nb> class ConnectionState implements Watcher , Closeable lost . set ( true ) ; } - void reset ( ) throws Exception - { - log . debug ( STRING0 ) ; - - isConnected . set ( false ) ; - connectionStartMs = System . currentTimeMillis ( ) ; - zooKeeper . closeAndReset ( ) ; - zooKeeper . getZooKeeper ...
Made reset synchronized to avoid possible races
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public final class MapConstructor checkCondition ( keysArray . length == valuesArray . length , INVALID_FUNCTION_ARGUMENT , STRING0 ) ; ...
Do not allow null map keys in the map constructor
<nb> public class AsyncFeatureTransferManager implements FeatureTransferManager { logger . log ( Level . FINER , STRING0 + waitForMs + STRING1 ) ; Thread . sleep ( waitForMs ) ; } - catch ( InterruptedException ie ) { - throw new StorageException ( STRING2 , ie ) ; + catch ( InterruptedException e ) { + t...
Change exception message
<nb> public class Cache < K , V > { Entry < K , V > entry ; try { entry = future . get ( ) ; - } catch ( InterruptedException e ) { - throw new ExecutionException ( e ) ; + } catch ( ExecutionException | InterruptedException e ) { + SINGLE + SINGLE + try ( ReleasableLock ignored = segment . writeLock ...
Do not pollute Cache with failed futures
<nb> public class QSPanel extends ViewGroup { @ override public void onAnimationEnd ( Animator animation ) { - setGridContentVisibility ( false ) ; + SINGLE + if ( mDetailRecord != null ) { + setGridContentVisibility ( false ) ; + } } } ;
Only hide grid if there is detail to show
<nb> public class WeekView extends View { } ) ; } + SINGLE + @ override + protected void onSizeChanged ( int w , int h , int oldw , int oldh ) { + super . onSizeChanged ( w , h , oldw , oldh ) ; + mAreDimensionsInvalid = true ; + } + COMMENT COMMENT COMMENT
fixing orientation changes
<nb> public class ErrorHandlingClient { private ManagedChannel channel ; void run ( ) throws Exception { - server = ServerBuilder . forPort ( NUMBER0 ) . addService ( new GreeterGrpc . AbstractGreeter ( ) { + server = ServerBuilder . forPort ( NUMBER0 ) . addService ( new GreeterGrpc . GreeterImplBase ( ) { ...
Avoid deprecated generated class
<nb> public abstract class BusinessFactoryBase { SINGLE return paymentApi . getPaymentMethodById ( paymentMethodId , true , true , context ) ; } catch ( PaymentApiException e ) { - logService . log ( LogService . LOG_INFO , STRING0 + paymentMethodId + STRING1 , e ) ; + logService . log ( LogService . LOG_INFO...
reduce verbosity of log message in BusinessFactoryBase
<nb> class Clicker { MotionEvent . ACTION_UP , x , y , NUMBER0 ) ; inst . sendPointerSync ( event ) ; inst . sendPointerSync ( event2 ) ; - soloActivity . waitForIdle ( ) ; } COMMENT
Fixed a small bug which affects activities without any touch items
<nb> public abstract class IoActions { COMMENT COMMENT COMMENT - public static Action < ? super Action < ? super BufferedWriter > > createFileWriteAction ( File output , String encoding ) { + public static Action < Action < ? super BufferedWriter > > createFileWriteAction ( File output , String encoding ) { ...
Fix generic signature
<nb> public class QueryFragmentCounters implements LowLevelCacheCounters { public QueryFragmentCounters ( Configuration conf ) { fixedCounters = new AtomicLongArray ( Counter . values ( ) . length ) ; - descs = new String [ Desc . values ( ) . length ] ; + descs = new Object [ Desc . values ( ) . length ] ; ...
cache QF counters have a wrong value for consumer time Sergey Shelukhin ADDENDUM
<nb> public class FirstPersonClientSystem extends BaseComponentSystem implements Upda clientHeldItem = heldItem . copy ( ) ; SINGLE - filterUnusedClientHeldComponents ( clientHeldItem ) ; + removeUnusedClientHeldComponents ( clientHeldItem ) ; clientHeldItem . addOrSaveComponent ( new LocationComponent ( ...
Rename filterUnusedClientHeldComponents method
<nb> public class TestWsWebSocketContainer extends TomcatBaseTest { messages . get ( NUMBER0 ) ) ; } } else { + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) { + if ( ! wsSession . isOpen ( ) ) { + break ; + } + Thread . sleep ( NUMBER2 ) ...
Fix failing WebSocket unit tests after session closure refactoring
<nb> package NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
fixed a typo
<nb> public class FileUtilRt { } public static boolean ensureCanCreateFile ( @ notnull File file ) { - if ( file . exists ( ) ) return delete ( file ) ; + if ( file . exists ( ) ) return file . canWrite ( ) ; if ( ! createIfNotExists ( file ) ) return false ; return delete ( file ) ; }
Reverted a dangerous change in a utility method with high usages number
<nb> class UsernamePasswordAuthenticationCredentials implements AuthenticationCredent private String password ; + public UsernamePasswordAuthenticationCredentials ( ) { + super ( ) ; + } + + public UsernamePasswordAuthenticationCredentials ( String username , String password ) { + super ( ) ; + this...
Added UsernamePasswordAuthenticationCredentials constructors needed for
<nb> import static NAMESPACE ; import static NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Remove double plural in docs
<nb> public class WebMvcAutoConfiguration { } @ bean - @ conditionalonmissingbean ( { RequestContextListener . class , - RequestContextFilter . class } ) - public RequestContextFilter requestContextFilter ( ) { - return new OrderedRequestContextFilter ( ) ; - } - - @ bean @ conditionalonbean ( Vie...
Stop RequestContextFilter initializing config
<nb> public class CaldroidFragment extends DialogFragment { SINGLE firstMonthTime . year = year ; firstMonthTime . month = month - NUMBER0 ; - firstMonthTime . monthDay = NUMBER0 ; + firstMonthTime . monthDay = NUMBER1 ; long millis = firstMonthTime . toMillis ( true ) ; SINGLE
Fix timezone change issue when showing month name
<nb> public abstract class BaseBinarySpec extends AbstractBuildableModelElement imple sourceSets . getSources ( ) , new NamedEntityInstantiator < LanguageSourceSet > ( ) { public < S extends LanguageSourceSet > S create ( String name , Class < S > type ) { - sourceSets . getMainSources ( ) . create ( name , typ...
Return the created objects as per contract from instantiators used in domain object container backed model maps
<nb> public abstract class OpenALMusic implements Music { if ( audio != null ) { if ( ! audio . noDevice ) audio . music . add ( this ) ; } + this . onCompletionListener = null ; } protected void setup ( int channels , int sampleRate ) { <nb> public abstract class OpenALMusic implements Music { } al...
Properly dispose completion listener in openal
<nb> public class IOResourceInspection extends ResourceInspection { public boolean isIOResource ( PsiExpression expression ) { return TypeUtils . expressionHasTypeOrSubtype ( expression , STRING0 , STRING1 , STRING2 , - STRING3 , STRING4 ) != null && + STRING3 , STRING4 , STRING5 ) != null && ! isIgnoredTyp...
check ZipFile in IO Resource not safely closed inspection
<nb> public class SettingsImpl implements EditorSettings { } private void reinitDocumentIndentOptions ( ) { - if ( myEditor == null ) return ; + if ( myEditor == null || myEditor . isViewer ( ) ) return ; final Project project = myEditor . getProject ( ) ; final DocumentEx document = myEditor . getDocumen...
Do not run indent options detector for viewer editor
<nb> public class PrepareRequestTokenActivity extends BaseActivity { switch ( result ) { case AUTH_SUCCESS : Bundle extras = getIntent ( ) . getExtras ( ) ; - String comment = extras . getString ( ShareUtils . KEY_GETGLUE_COMMENT ) ; - String imdbId = extras . getString ( ShareUtils . KEY_GETGLUE_IMDBID ) ; ...
Prevent PrepareRequestTokenActivity crash if it does not get handed
<nb> public class PropertiesCodeStyleSettings extends CustomCodeStyleSettings { return CodeStyleSettingsManager . getSettings ( project ) . getCustomSettings ( PropertiesCodeStyleSettings . class ) ; } - public boolean SPACES_AROUND_KEY_VALUE_DELIMITER = false ; - public boolean KEEP_BLANK_LINES = false ; -...
properties formatting default values
<nb> public class TransactionManagerTest { @ test public void testTransactionManagerBoundToJndi ( ) throws NamingException { - TransactionManager tm = ( TransactionManager ) new InitialContext ( ) . lookup ( STRING0 ) ; + TransactionManager tm = ( TransactionManager ) new InitialContext ( ) . lookup ( STRING1...
Fix TransactionManagerTest which was using incorrect jndi name
<nb> public abstract class PullToRefreshBase < T extends View > extends LinearLayout { return false ; } - if ( state == REFRESHING && disableScrollingWhileRefreshing ) { + if ( isRefreshing ( ) && disableScrollingWhileRefreshing ) { return true ; } <nb> public abstract class PullToRefreshBase < T exte...
Disabling scrolling while refreshing has no effect on manual refresh
<nb> public class StorageManagerTest { } @ test - public void referenceCorrectlyInvalidatedWhileStored ( ) { - EntityRef someEntity = entityManager . create ( ) ; - character . addComponent ( new EntityRefComponent ( someEntity ) ) ; - - esm . waitForCompletionOfPreviousSaveAndStartSaving ( ) ; - esm ...
Removed a test that is no longer relevant as ids do not get reused
<nb> public class RuleBasedCorefMentionFinder implements CorefMentionFinder { SINGLE CoreLabel label = tokens . get ( i ) ; if ( ! STRING0 . equals ( label . word ( ) ) ) { - extentTokens . add ( tokens . get ( i ) ) ; + SINGLE + SINGLE + extentTokens . add ( ( CoreLabel ) label . labelFactory ( ) . newLa...
Copy CoreLabels in case the parser alters them in some way
<nb> public class ColorChooserAdapter extends RecyclerView . Adapter < ColorChooserAdapte if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . JELLY_BEAN ) holder . mColorView . setBackground ( circle ) ; else holder . mColorView . setBackgroundDrawable ( circle ) ; + + SINGLE + SINGLE } @ overri...
Added TODO statements to color chooser stuff
<nb> public class javaURLContextFactory SINGLE if ( initialContext == null ) { - if ( initialContext == null ) { - synchronized ( this ) { + synchronized ( this ) { + if ( initialContext == null ) { initialContext = new NamingContext ( ( Hashtable < String , Object > ) environment , MAIN ) ; }
Fix copy paste error
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; public class DocWriteResponseTests extends ESTestCase { public void testGetLocation ( ) { - DocWriteResponse response = new DocWriteResponse ( new ShardId ( STRING0 , STRING1 , NUMBER0 ) , STRING2 , STRING3 , NUMBER0...
Fix unit test build failure
<nb> public abstract class Operation implements DataSerializable { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Fixed javadoc issue in Operation
<nb> public class Form { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Fix javadoc warning in xdata Form
<nb> public class PageIndicator extends ViewGroup { ImageView second = ( ImageView ) getChildAt ( secondIndex ) ; if ( first == null || second == null ) { SINGLE + return ; } SINGLE second . setTranslationX ( first . getX ( ) - second . getX ( ) ) ;
Fixed a rebase gone wrong with pageindicator
<nb> public abstract class AbstractEmbeddedServletContainerFactoryTests { . getEmbeddedServletContainer ( exampleServletRegistration ( ) ) ; this . container . start ( ) ; this . container . stop ( ) ; - this . thrown . expect ( IOException . class ) ; + this . thrown . expect ( Exception . class ) ; getRes...
Relax expected exception when connection fails
<nb> public final class DefaultPassConfig extends PassConfig { if ( ! options . transpileOnly && options . closurePass ) { checks . add ( closureGoogScopeAliases ) ; + checks . add ( closureRewriteClass ) ; } if ( options . getLanguageIn ( ) == LanguageMode . ECMASCRIPT6_TYPED <nb> public final class De...
Moving ClosureRewriteClass to be an earlier pass
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT
Add license header to package info java file
<nb> public abstract class BaseStatusBar extends SystemUI implements StatusBarNotification notification , boolean isHeadsUp ) { final RemoteViews contentView = notification . getNotification ( ) . contentView ; final RemoteViews bigContentView = notification . getNotification ( ) . bigContentView ; - final Remo...
Fix NPE in BaseStatusBar
<nb> public class DeadlockPreventionTest extends AbstractDaoSessionTest < DaoMaster , Da } SINGLE - public void testLoadAll ( ) throws InterruptedException { + public void _testLoadAll ( ) throws InterruptedException { dao = daoSession . getTestEntityDao ( ) ; List < TestEntity > entities = new ArrayList ...
disable testLoadAll by default
<nb> public class ExifInterface { } public void setFilename ( String filename ) { - mFilename = filename ; + if ( mFilename == null || ! mFilename . equals ( filename ) ) { + mFilename = filename ; + mCachedAttributes = null ; + } } COMMENT
Fix the bug that EXIF attributes are always cached
<nb> public class CamelNamespaceHandler implements NamespaceHandler { SINGLE CamelContextNameStrategy strategy = new DefaultCamelContextNameStrategy ( ) ; contextId = strategy . getName ( ) ; - element . setAttribute ( STRING0 , contextId ) ; + element . setAttributeNS ( null , STRING0 , contextId ) ; impli...
Fixed camel blueprint and camel spring refresh issue can cause namespace handler to not trigger
<nb> public class LwjglRenderer implements Renderer { } SINGLE - if ( ! GLContext . getCapabilities ( ) . GL_ARB_texture_non_power_of_two ) { - if ( img . getWidth ( ) != NUMBER0 && img . getHeight ( ) != NUMBER0 ) { + if ( ! GLContext . getCapabilities ( ) . GL_ARB_texture_non_power_of_two ) { + if ( img...
Added proper check for framebuffer textures when doing NPOT scaling
<nb> public interface Queryable < T > { COMMENT COMMENT COMMENT + COMMENT COMMENT COMMENT < E extends T > Result < E > raw ( Class < E > type , String query , Object . . . parameters ) ;
Fix javadoc warning
<nb> public class BuildManager implements ApplicationComponent { launcherCp . add ( ClasspathBootstrap . getResourcePath ( launcherClass ) ) ; launcherCp . add ( compilerPath ) ; ClasspathBootstrap . appendJavaCompilerClasspath ( launcherCp ) ; - SINGLE - cmdLine . addParameter ( STRING0 ) ; cmdLine . addPa...
do not disable ext dirs location because IBM jdk stores some of its essential jars there
<nb> public class QueryableIndexStorageAdapter extends BaseStorageAdapter } final Offset offset = new TimestampCheckingOffset ( - baseOffset , timestamps , Math . min ( interval . getEndMillis ( ) , gran . next ( timeStart ) ) + baseOffset , timestamps , Math . min ( interval . getEndMillis ( ) , gran . next ...
fix cursor overshooting granularity boundaries due to incorrect gran next usage
<nb> public class MainActivity extends ActionBarActivity { } , NUMBER0 ) ; } + COMMENT + Uncomment if you disable PrivateFactory injection . See CalligraphyConfig # disablePrivateFactoryInjection ( ) + COMMENT SINGLE SINGLE SINGLE
added note to the example
<nb> public class BinaryMapIndexWriter { pcalcx = pcalcx + tx ; pcalcy = pcalcy + ty ; - delta = skipSomeNodes ( coordinates , len , i , x , y , false ) ; + delta = skipSomeNodes ( innerPolygonTypes , len , i , x , y , true ) ; } } }
Fix binary map writer
<nb> public class MaterialDialog extends DialogBase implements View . OnClickListener { public MaterialDialog build ( ) { if ( ( content == null || content . toString ( ) . trim ( ) . length ( ) == NUMBER0 ) && - title != null && ( items == null || items . length == NUMBER0 ) && customView == null ) { + title...
Put back adapter null check
<nb> public final class DocumentsContract { COMMENT COMMENT COMMENT - COMMENT - COMMENT COMMENT COMMENT public static final int FLAG_DIR_SUPPORTS_CREATE = NUMBER0 < < NUMBER1 ;
Fix see link in DocumentsContract docs
<nb> package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class Intrinsics { return new IntRange ( NUMBER0 , length - NUMBER1 ) ; } - SINGLE - @ deprecated SINGLE - pub...
Drop deprecated Intrinsics stupidSync
<nb> public class OpmlImportWorker extends } } + public OpmlImportWorker ( Context context , Reader reader ) { + super ( ) ; + this . context = context ; + this . mReader = reader ; + } + @ override protected ArrayList < OpmlElement > doInBackground ( Void . . . params ) { if ( AppConfig . DEBUG...
add constructor to construct with reader and not only file needed for URL imort later
<nb> package NAMESPACE ; COMMENT public enum Verb { - GET , POST , PUT , DELETE , HEAD , OPTIONS , TRACE , PATCH + GET , POST , PUT , DELETE , HEAD , OPTIONS , TRACE }
remove patch verb not supported by HttpUrlConnection
<nb> public class ODocumentHelper { } } return ( RET ) newValue ; + } else if ( OMultiValue . isMultiValue ( iValue ) ) { + SINGLE + for ( Object s : OMultiValue . getMultiValueIterable ( iValue ) ) { + ( ( Collection < Object > ) newValue ) . add ( s ) ; + } + return ( RET ) newValue ; } } else {...
implemented transparent conversion between array and SET
<nb> public class RuleFilenameException extends RuntimeException { public RuleFilenameException ( File file ) { super ( STRING0 + - STRING1 + file . getName ( ) ) ; + STRING2 + + STRING3 + + STRING4 + file . getName ( ) ) ; } }
improve error message
<nb> public class UriUtils { } } - return displayName ; + SINGLE + return displayName . replaceAll ( STRING0 , STRING1 ) ; }
replace path separator characters
<nb> public interface CoreProperties { String PROJECT_LANGUAGE_PROPERTY = STRING0 ; String DYNAMIC_ANALYSIS_PROPERTY = STRING1 ; String PROJECT_EXCLUSIONS_PROPERTY = STRING2 ; + + COMMENT + COMMENT + COMMENT + @ deprecated String REUSE_RULES_CONFIGURATION_PROPERTY = STRING3 ; COMMENT <nb> public...
Deprecate Project getReuseExistingRulesConfig
<nb> public class MainActivity extends BaseActivity implements NavigationView . OnNavig fab = ( FloatingActionButton ) findViewById ( R . id . fab ) ; if ( fab != null ) { fab . setOnClickListener ( v - > showFabDialog ( ) ) ; - CoordinatorLayout . LayoutParams lp = ( CoordinatorLayout . LayoutParams ) fab . ge...
update mehtod checkNavbar
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class UserPreferences { public static void setAutodownloadSelectedNetworks ( String [ ] value ) { prefs . edit ( ) - . putString ( PREF_AUTODL_S...
Don t use StringUtils
<nb> public class InProcessServerControls implements ServerControls } catch ( IOException e ) { - throw new RuntimeException ( STRING0 ) ; + throw new RuntimeException ( STRING0 , e ) ; } } <nb> public class Neo4jRule implements TestRule , TestServerBuilder @ override public void evaluate ( ) thro...
Do not swallow exceptions
<nb> public class RestController extends AbstractLifecycleComponent < RestController > { break ; case OPTIONS : optionsHandlers . insert ( path , handler ) ; + break ; case HEAD : headHandlers . insert ( path , handler ) ; + break ; default : throw new ElasticSearchIllegalArgumentException ( STRING0 +...
fix missing break statemetns via Lukas
<nb> public class MigratorTest { @ test public void getImplementedDatabases ( ) throws Exception { List < Database > databases = Arrays . asList ( DatabaseFactory . getInstance ( ) . getImplementedDatabases ( ) ) ; - assertEquals ( NUMBER0 , databases . size ( ) ) ; + assertEquals ( NUMBER1 , databases . size...
Fixed a failing unit test due to the addition of Sybase as a supported DB
<nb> public class MasqueradingPsiBuilderAdapter extends PsiBuilderAdapter { super . collapse ( type ) ; } + @ override + public void error ( String message ) { + myOriginalPositionMarker . drop ( ) ; + super . error ( message ) ; + } + @ notnull private Marker getDelegateOrThis ( @ notnull Marker ...
Fixed rollback in MasqueradingPsiBuilderAdapter
<nb> public class GetListActiveUsers extends AdHocCommand { field . addValue ( STRING0 ) ; field = form . addField ( ) ; - field . setType ( FormField . Type . jid_single ) ; field . setLabel ( STRING1 ) ; field . setVariable ( STRING2 ) ;
Removed field type from result
<nb> public class DebugLogConfigureAction extends DumbAwareAction { return ScrollPaneFactory . createScrollPane ( myTextArea ) ; } + @ nullable + @ override + public JComponent getPreferredFocusedComponent ( ) { + return myTextArea ; + } + @ notnull public List < String > getLogCategories ( ) { ...
define the default focused component
<nb> public class StoreCached extends StoreDirect { for ( int i = NUMBER0 ; i < sorted . length - NUMBER1 ; i ++ ) { long offset = sorted [ i ] ; - long pageSize = pages . get ( offset ) . length - NUMBER1 ; + long pageSize = pages . get ( offset ) . length ; long offsetNext = sorted [ i + NUMBER1 ] ; i...
Add some assertions
<nb> public class MatcherImplUtil { public static PsiElement [ ] createTreeFromText ( String text , boolean file , FileType fileType , Project project ) throws IncorrectOperationException { PsiElementFactory elementFactory = PsiManager . getInstance ( project ) . getElementFactory ( ) ; if ( fileType == StdFileTy...
reverting HTML lexer changes temporarily
<nb> public class Picasso { } COMMENT - public Builder loader ( Downloader downloader ) { + public Builder downloader ( Downloader downloader ) { if ( downloader == null ) { throw new IllegalArgumentException ( STRING0 ) ; } <nb> public class PicassoTest { @ test public void builderInvalidLoader (...
Rename builder method to downloader to match new class name
<nb> public class AndroidApplication extends Application { this . applicationComponent = Dagger_ApplicationComponent . builder ( ) . applicationModule ( new ApplicationModule ( this ) ) . build ( ) ; - this . applicationComponent . injectApplication ( this ) ; + this . applicationComponent . inject ( this ) ;...
Add application dependency injector component and module
<nb> public class BackgroundDexOptService extends JobService { schedule ( BackgroundDexOptService . this ) ; return ; } - pm . performDexOpt ( pkg , null COMMENT , false ) ; + pm . performDexOpt ( pkg , null COMMENT , true ) ; } SINGLE jobFinished ( jobParams , false ) ; <nb> public class PackageManag...
Fix backwards arguments to performDexOpt
<nb> public class LocaleUtil { if ( localeWithSubtags == null ) return getLayoutDirectionFromFirstChar ( locale ) ; SINGLE - if ( localeWithSubtags . charAt ( NUMBER0 ) != UNDERSCORE_CHAR || - localeWithSubtags . charAt ( NUMBER1 ) != UNDERSCORE_CHAR ) { + if ( localeWithSubtags . length ( ) <= NUMBER1 + ...
Fix crash determining direction of invalid locale
<nb> public class KernelStatementTest KernelStatement statement = new KernelStatement ( mock ( KernelTransactionImplementation . class ) , - mock ( IndexReaderFactory . class ) , scanStore , null , null , null , null ) ; + mock ( IndexReaderFactory . class ) , scanStore , null , null , null ) ; statement ...
Fix merge bug
<nb> public class JetTypeMapper { } DeclarationDescriptor descriptor = jetType . getConstructor ( ) . getDeclarationDescriptor ( ) ; + + if ( ErrorUtils . isError ( descriptor ) ) { + throw new IllegalStateException ( STRING0 ) ; + } + if ( standardLibrary . getArray ( ) . equals ( descriptor ) ) { ...
do not allow mapping of error type to JVM type
<nb> COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; public abstract class DnDManager { public static DnDManager getInstance ( ) { - Application application = App...
we don t need app
<nb> public class NetworkPolicyManagerService extends INetworkPolicyManager . Stub { for ( UserInfo user : users ) { for ( int i = mPowerSaveTempWhitelistAppIds . size ( ) - NUMBER0 ; i >= NUMBER1 ; i -- ) { int appId = mPowerSaveTempWhitelistAppIds . keyAt ( i ) ; + boolean isAllow = mPowerSaveTempWhitelistApp...
fix temp white list update in device idle
<nb> public class TpStatsPrinter values . get ( STRING0 ) , values . get ( STRING1 ) , values . get ( STRING2 ) , - values . get ( STRING3 ) , - values . get ( STRING4 ) ) ; + values . get ( STRING3 ) ) ; } out . printf ( STRING5 , STRING6 , STRING7 ) ;
remove duplicate extraneous ActiveTasks value
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class IssueComment implements Serializable { return this ; } + COMMENT + COMMENT + COMMENT + @ checkfornull public String userLogin ( ) { return userLogin ; } ...
Add some comments
<nb> public class Options throw new IllegalArgumentException ( STRING0 + optval ) ; } + return ; + + case ZMQ . ZMQ_REQ_CORRELATE : + reqCorrelate = ( Integer ) optval ; + return ; + + case ZMQ . ZMQ_REQ_RELAXED : + reqRelaxed = ( Integer ) optval ; return ; case ZMQ . ZMQ_BACKLOG :
Add new options to setSocketOpt
<nb> package 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 PluginModuleType extends ModuleTyp...
correctly validate SDK for running inspections on non Java projects SDK chooser accepts on double click
<nb> public class ReplaceMessagesTest extends CompilerTestCase { STRING0 ) ; } + public void testPlaceholderInPlaceholderValue ( ) { + registerMessage ( new JsMessage . Builder ( STRING1 ) + . appendPlaceholderReference ( STRING2 ) + . appendStringPart ( STRING3 ) + . appendPlaceholderReference ( STRING...
Add a test verifying that placeholders in replacement are fine
<nb> public final class SamlCompliantLogoutMessageBuilder implements LogoutMessageBui final String logoutRequest = String . format ( LOGOUT_REQUEST_TEMPLATE , GENERATOR . getNewTicketId ( STRING0 ) , SamlDateUtils . getCurrentDateAndTime ( ) , request . getTicketId ( ) ) ; - LOGGER . debug ( STRING1 , logoutReq...
Removed incorrect log message
<nb> public class PyArgumentListImpl extends PyElementImpl implements PyArgumentList PyCallExpression call = getCallExpression ( ) ; if ( call != null ) { PyCallExpression . PyMarkedCallee resolved_callee = call . resolveCallee ( context ) ; - if ( resolved_callee != null ) { - PsiFile psifile = getContaining...
Removed dead code
<nb> public class LogSubtypesAction extends InheritanceAction { LOG . info ( STRING0 + psiClass + STRING1 ) ; SmartClassAnchor [ ] classAnchors = hierarchyService . getSingleClassHierarchy ( ) . getSubtypes ( psiClass ) ; String [ ] subtypes = new String [ classAnchors . length ] ; - LOG . info ( STRING0 + psiC...
print the number of subtypes
<nb> public class CopyClassesHandler extends CopyHandlerDelegateBase { PsiClass [ ] classes = ( ( PsiClassOwner ) element ) . getClasses ( ) ; ArrayList < PsiClass > buffer = new ArrayList < PsiClass > ( ) ; for ( final PsiClass aClass : classes ) { - if ( ! isSynthetic ( aClass ) ) { + if ( ! ( aClass instan...
accept top level non physical classes
<nb> public class FloatingActionButton extends ImageButton { private final ScrollSettleHandler mScrollSettleHandler = new ScrollSettleHandler ( ) ; private final Interpolator mInterpolator = new AccelerateDecelerateInterpolator ( ) ; - protected final AbsListView . OnScrollListener mScrollListener = new AbsList...
Changed modifier of some members
<nb> public class JSONEnumConvertor implements JSON . Convertor if ( _fromJSON ) { out . addClass ( obj . getClass ( ) ) ; - out . add ( STRING0 , obj . toString ( ) ) ; + out . add ( STRING0 , ( ( Enum ) obj ) . name ( ) ) ; } else { - out . add ( obj . toString ( ) ) ; + out . add ( ( ( Enum ) obj...
JSON Enum uses name rather than toString
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; <nb> public class DocSchemaInfo implements SchemaInfo , ClusterStateListener { ) ; @ inject - public DocSchemaInfo ( Settings settings , ClusterService clusterService ) { + ...
removed unused arg
<nb> public class AxolotlService { public void registerDevices ( final Jid jid , @ nonnull final Set < Integer > deviceIds ) { if ( jid . toBareJid ( ) . equals ( account . getJid ( ) . toBareJid ( ) ) ) { if ( ! deviceIds . isEmpty ( ) ) { + Log . d ( Config . LOGTAG , getLogprefix ( account ) + STRING0 ) ; ...
Add more logging to pep attemp counter logic
<nb> public class HeliosSoloDeploymentTest { HeliosSoloDeployment . fromEnv ( ) . build ( ) ) ; @ rule - public final TemporaryJobs temporaryJobs = TemporaryJobs . create ( DEPLOYMENT . client ( ) ) ; + public final TemporaryJobs temporaryJobs = TemporaryJobs . builder ( ) + . jobPrefix ( STRING0 ) + . cl...
prefix the temporary jobs created by HeliosSoloDeploymentTest
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class PythonHighlightingTest extends PyTestCase { } public void testDocstring ( ) { SINGLE - doTest ( ...
set docstring format for test PythonHighlightingTest
<nb> import NAMESPACE ; import NAMESPACE ; public class OptimizationMethodVisitor extends MethodVisitor { + private static final int MAX_INSTRUCTIONS_SIZE_TO_OPTIMIZE = NUMBER0 ; private static final MethodTransformer MAIN_METHOD_TRANSFORMER = new RedundantNullCheckMethodTransformer ( new RedundantBoxingMet...
Do not optimize large methods
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; public class FileLengthCheckTest extends BaseCheckTestCase <nb> public class FileLengthCheckTest createChecker ( checkConfig ) ; fail ( STRING0 ) ; } - catch ( ConversionException ex ) + catch ( CheckstyleE...
changed expected exception class to CheckstyleException
<nb> public abstract class AbstractProxyServlet extends HttpServlet protected void copyHeaders ( HttpServletRequest clientRequest , Request proxyRequest ) { + SINGLE + proxyRequest . getHeaders ( ) . clear ( ) ; + Set < String > headersToRemove = findConnectionHeaders ( clientRequest ) ; for ( Enumera...
ProxyServlet sends two User Agent values
<nb> public class ChooseFolder extends K9ListActivity { Intent result = new Intent ( ) ; result . putExtra ( EXTRA_ACCOUNT , mAccount . getUuid ( ) ) ; result . putExtra ( EXTRA_CUR_FOLDER , mFolder ) ; - String destFolderName = ( String ) ( ( TextView ) view ) . getText ( ) ; + String destFolderName = ( ( Te...
Fix potential ClassCastException
<nb> public class SystemConfig { private long dayNightLengthInMs = NUMBER0 ; private int maxThreads = NUMBER1 ; private int verticalChunkMeshSegments = NUMBER2 ; - private int secondsBetweenAutoSave = NUMBER3 ; + private int secondsBetweenAutoSave = NUMBER4 ; private boolean autoSaveEnabled = true ; priva...
Reduced autosave interval