diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - public class NewSignInActivity extends AppCompatActivity { + public class NewSignInActivity extends AppCompatActivity implements WPComMagicLinkFragment . OnFragmentInteractionListener { public String email = STRING0 ; @ override <nb> public class NewSignInActivity extends AppCompatActivity { public void requestMagicLink ( ) { } + + @ override + public void onFragmentInteraction ( Boolean shouldSendMagicLink ) { + if ( shouldSendMagicLink ) { + SINGLE + } else { + SINGLE + } + } } <nb> public class WPComMagicLinkFragment extends Fragment { COMMENT public interface OnFragmentInteractionListener { SINGLE - void onFragmentInteraction ( Uri uri ) ; + void onFragmentInteraction ( Boolean shouldSendMagicLink ) ; } }
Sending magic link onclick
<nb> public class PeopleContainer extends LinearLayout { JSONArray peopleList = new JSONArray ( ) ; for ( int i = NUMBER0 ; i < getChildCount ( ) ; i ++ ) { TextView textView = getTextView ( i ) ; - textView . setTextAppearance ( activity , android . R . style . TextAppearance_Medium_Inverse ) ; String text = textView . getText ( ) . toString ( ) ; if ( text . length ( ) == NUMBER0 )
Don t change text view style when parsing shared with members
<nb> public class GenericDataSource extends JDBCDataSource catalogNames . clear ( ) ; } } - } catch ( UnsupportedOperationException e ) { - SINGLE - log . debug ( e ) ; - } catch ( SQLFeatureNotSupportedException e ) { + } catch ( UnsupportedOperationException | SQLFeatureNotSupportedException e ) { SINGLE log . debug ( e ) ; } catch ( SQLException e ) { SINGLE - log . warn ( e ) ; + log . warn ( STRING0 , e ) ; } if ( ! catalogNames . isEmpty ( ) || catalogsFiltered ) { this . catalogs = new ArrayList < > ( ) ;
Error handle fix
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class JavaToKotlinTranslator { } } ; + private static final ProjectRootModificationTracker NEVER_CHANGED = new ProjectRootModificationTracker ( ) { + @ override + public long getModificationCount ( ) { + return NUMBER0 ; + } + } ; + private JavaToKotlinTranslator ( ) { } <nb> public class JavaToKotlinTranslator { JavaCoreApplicationEnvironment applicationEnvironment = new JavaCoreApplicationEnvironment ( DISPOSABLE ) ; JavaCoreProjectEnvironment javaCoreEnvironment = new JavaCoreProjectEnvironment ( DISPOSABLE , applicationEnvironment ) ; + javaCoreEnvironment . getProject ( ) . registerService ( ProjectRootModificationTracker . class , NEVER_CHANGED ) ; + javaCoreEnvironment . addJarToClassPath ( PathUtil . findRtJar ( ) ) ; File annotations = findAnnotations ( ) ; if ( annotations != null && annotations . exists ( ) ) {
Fixed bug in TypeConversionUtil getAllBoxedTypeSupers which created CachedValueProvider Result with null as dependency because the ProjectRootModificationTracker service was not registered
<nb> public class AsyncHttpClientConfigBean extends AsyncHttpClientConfig { idleConnectionInPoolTimeoutInMs = Integer . getInteger ( ASYNC_CLIENT + STRING0 , NUMBER0 * NUMBER1 ) ; idleConnectionTimeoutInMs = Integer . getInteger ( ASYNC_CLIENT + STRING1 , NUMBER0 * NUMBER1 ) ; requestTimeoutInMs = Integer . getInteger ( ASYNC_CLIENT + STRING2 , NUMBER0 * NUMBER1 ) ; + maxConnectionLifeTimeInMs = Integer . getInteger ( ASYNC_CLIENT + STRING3 , - NUMBER2 ) ; redirectEnabled = Boolean . getBoolean ( ASYNC_CLIENT + STRING4 ) ; maxDefaultRedirects = Integer . getInteger ( ASYNC_CLIENT + STRING5 , NUMBER3 ) ; compressionEnabled = Boolean . getBoolean ( ASYNC_CLIENT + STRING6 ) ; <nb> public class AsyncHttpClientConfigBean extends AsyncHttpClientConfig { return this ; } + public AsyncHttpClientConfigBean setMaxConnectionLifeTimeInMs ( int maxConnectionLifeTimeInMs ) { + this . maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs ; + return this ; + } + public AsyncHttpClientConfigBean setIdleConnectionInPoolTimeoutInMs ( int idleConnectionInPoolTimeoutInMs ) { this . idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs ; return this ;
set correct default maxConnectionLifetimeInMs
<nb> public class Connector extends LifecycleMBeanBase { COMMENT public String getProtocol ( ) { - if ( STRING0 . equals - ( getProtocolHandlerClassName ( ) ) + if ( ( STRING0 . equals + ( getProtocolHandlerClassName ( ) ) && ! AprLifecycleListener . isAprAvailable ( ) ) || STRING1 . equals ( getProtocolHandlerClassName ( ) ) ) { return STRING2 ; - } else if ( STRING3 . equals - ( getProtocolHandlerClassName ( ) ) + } else if ( ( STRING3 . equals + ( getProtocolHandlerClassName ( ) ) && ! AprLifecycleListener . isAprAvailable ( ) ) || STRING4 . equals ( getProtocolHandlerClassName ( ) ) ) { return STRING5 ;
Fix protocol when using APR but the NIO connector to be able to use OpenSSL which fixes storeconfig attribute handling
<nb> public class ExportTestResultsAction extends DumbAwareAction { } try { - VirtualFile result = parent . createChildData ( this , outputFile . getName ( ) ) ; + VirtualFile result = parent . findChild ( outputFile . getName ( ) ) ; + if ( result == null ) { + result = parent . createChildData ( this , outputFile . getName ( ) ) ; + } VfsUtil . saveText ( result , outputText ) ; return result ; }
override output file if already exists
<nb> import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + @ ignore ( STRING0 ) public class InstallCommandIntegrationTest { @ rule public DebuggableTemporaryFolder tmp = new DebuggableTemporaryFolder ( ) ;
Disable InstallCommandIntegrationTest due to timeouts
<nb> public class TieredStoreIntegrationTest { CommonUtils . sleepMs ( LOG , mWorkerToMasterHeartbeatIntervalMs * NUMBER0 ) ; SINGLE - int newFile = TachyonFSTestUtils . createByteFile ( mTFS , STRING0 , WriteType . MUST_CACHE , + int newFile = TachyonFSTestUtils . createByteFile ( mTFS , STRING1 , WriteType . MUST_CACHE , MEM_CAPACITY_BYTES ) ; CommonUtils . sleepMs ( LOG , mWorkerToMasterHeartbeatIntervalMs * NUMBER0 ) ; Assert . assertTrue ( mTFS . getFile ( newFile ) . isInMemory ( ) ) ; <nb> public class BlockMasterSync implements Runnable { try { mBlockDataManager . removeBlock ( Users . MASTER_COMMAND_USER_ID , block ) ; } catch ( IOException ioe ) { - LOG . warn ( STRING2 + block + STRING3 ) ; + LOG . warn ( STRING4 + block + STRING3 ) ; } } break ;
Update the log message and unit test path naming
<nb> import NAMESPACE ; COMMENT COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT class Pair { int num ; <nb> public class GroupElementsInSizeM { PriorityQueue < Pair > maxHeap = new PriorityQueue < Pair > ( count . size ( ) , new Comparators ( ) ) ; for ( Integer s : count . keySet ( ) ) { int c = count . get ( s ) ; + SINGLE if ( c > Math . ceil ( input . length * FLOAT0 / m ) ) { return false ; }
Adding some comments
<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 ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + @ ignore public class ReplicaSetMongoClientTest { private MongoClient client ; private MongoCollection < Document > collection ; <nb> public class ReplicaSetMongoClientTest { @ before public void before ( ) throws UnknownHostException { client = MongoClients . create ( Arrays . asList ( new ServerAddress ( ) ) ) ; - collection = client . getDatabase ( MongoClientTestBase . DEFAULT_DB_NAME ) . getCollection ( STRING0 ) ; + collection = client . getDatabase ( STRING0 ) + . getCollection ( STRING1 + System . currentTimeMillis ( ) ) ; collection . admin ( ) . drop ( ) ; }
Ignoring replica set acceptance test because I can t build locally with it failing
<nb> public class PrivacyManager { SINGLE List < PRestriction > listRestriction = new ArrayList < PRestriction > ( ) ; - listRestriction . add ( new PRestriction ( uid , restrictionName , methodName , restricted , asked ) ) ; + if ( restrictionName == null ) + for ( String rRestrictionName : PrivacyManager . getRestrictions ( ) ) + listRestriction . add ( new PRestriction ( uid , rRestrictionName , methodName , restricted , asked ) ) ; + else + listRestriction . add ( new PRestriction ( uid , restrictionName , methodName , restricted , asked ) ) ; SINGLE if ( methodName == null )
Support all restrictions for setRestriction
<nb> public class DockManagerImpl extends DockManager implements PersistentStateCompo return myFactories . get ( type ) ; } - private void createNewDockContainerFor ( DockableContent content , RelativePoint point ) { + public void createNewDockContainerFor ( DockableContent content , RelativePoint point ) { DockContainer container = getFactory ( content . getDockContainerType ( ) ) . createContainer ( content ) ; register ( container ) ;
expose creation of new window
<nb> public final class HdmiControlService extends SystemService { @ override public void binderDied ( ) { synchronized ( mLock ) { - mRecordListenerRecord = null ; + if ( mRecordListenerRecord == this ) { + mRecordListenerRecord = null ; + } } } } <nb> public final class HdmiControlService extends SystemService { @ override public void binderDied ( ) { synchronized ( mLock ) { - mInputChangeListenerRecord = null ; + if ( mInputChangeListenerRecord == this ) { + mInputChangeListenerRecord = null ; + } } } }
Remove listener records only if they are currently used
<nb> import static NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Removed unused imports
<nb> abstract public class GDataExtension { return AuthSubUtil . getRequestUrl ( authorizedUrl . toExternalForm ( ) , SINGLE - STRING0 , + STRING1 , false , true ) ; }
Restore deprecated Fusion Tables authorization domain
<nb> public abstract class AbstractLiquibaseCommand < T extends Configuration > extends run ( namespace , managedLiquibase ) ; } catch ( ValidationFailedException e ) { e . printDescriptiveError ( System . err ) ; + System . exit ( - NUMBER0 ) ; } finally { if ( managedLiquibase != null ) { managedLiquibase . stop ( ) ;
Make database commands exit with non zero status on failure
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class AndroidModuleBuilder extends JavaModuleBuilder { } } } ) ; + + new ReformatCodeProcessor ( project , module , false ) . run ( ) ; } } ) ; }
format generated project
<nb> public class ManageNodeFunctionalTest } - private void assertProperNodeRepresentation ( final Map < String , Object > noderep ) - { - NodeRepresentationTest . verifySerialisation ( noderep ) ; - } - @ test public void shouldRespondWith204WhenNodeDeleted ( ) throws Exception { <nb> public class ManageNodeFunctionalTest } @ test - public void shouldRespondWith404WhenNodeToBeDeletedCannotBeFound ( ) throws Exception + public void shouldRespondWith404AndSensibleEntityBodyWhenNodeToBeDeletedCannotBeFound ( ) throws Exception { ClientResponse response = sendDeleteRequestToServer ( NON_EXISTENT_NODE_ID ) ; assertEquals ( NUMBER0 , response . getStatus ( ) ) ;
Removed unused code and renamed the test that I m about to add to
<nb> public class TelephonyManager { COMMENT COMMENT public String getDeviceId ( ) { + if ( ! isVoiceCapable ( ) ) { + return null ; + } + try { return getSubscriberInfo ( ) . getDeviceId ( ) ; } catch ( RemoteException ex ) {
Make getDeviceId return null for Non phone device
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class PythonConsoleView extends JPanel implements LanguageConsoleView , Ob } ) ; } - private void showConsole ( Runnable runnable ) { + private void showConsole ( @ notnull Runnable runnable ) { PythonConsoleToolWindow toolWindow = PythonConsoleToolWindow . getInstance ( myProject ) ; - if ( toolWindow != null ) { + if ( toolWindow != null && ! ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) { toolWindow . getToolWindow ( ) . activate ( runnable ) ; } else {
Fix console interrupt test
<nb> public class BottomBar extends FrameLayout implements View . OnClickListener , View ( ! ( softMenuIdentifier > NUMBER0 && res . getBoolean ( softMenuIdentifier ) ) ) ) { return ; } + COMMENT COMMENT COMMENT
Pressed the enter key once for some advanced next level functionality
<nb> public final class BufferUtils { private static ConcurrentHashMap < BufferInfo , BufferInfo > trackedBuffers = new ConcurrentHashMap < BufferInfo , BufferInfo > ( ) ; static ClearReferences cleanupthread ; - private static boolean used ; - COMMENT COMMENT COMMENT <nb> public final class BufferUtils { } private static void onBufferAllocated ( Buffer buffer ) { - used = true ; + if ( BufferUtils . trackDirectMemory ) { if ( BufferUtils . cleanupthread == null ) { BufferUtils . cleanupthread = new ClearReferences ( ) ;
removed unnecessary field
<nb> public class SoftLruCache < K , V > extends ReferenceCache < K , V > } return counter . count ( ref . get ( ) ) ; } - return counter . count ( null ) ; + return counter . < V > count ( null ) ; } public V remove ( K key ) <nb> public class WeakLruCache < K , V > extends ReferenceCache < K , V > } return counter . count ( ref . get ( ) ) ; } - return counter . count ( null ) ; + return counter . < V > count ( null ) ; } public V remove ( K key )
Fixed strange compilation error that only happens with some java compilers
<nb> public final class ActivityManagerService extends ActivityManagerNative SINGLE SINGLE - int userId = Binder . getOrigCallingUser ( ) ; final int callingUid = Binder . getCallingUid ( ) ; if ( callingUid != NUMBER0 && callingUid != Process . myUid ( ) ) { throw new SecurityException ( <nb> public final class ActivityManagerService extends ActivityManagerNative int ret = mMainStack . startActivityMayWait ( null , uid , intent , resolvedType , resultTo , resultWho , requestCode , startFlags , - null , null , null , null , options , userId ) ; + null , null , null , null , options , UserHandle . getUserId ( uid ) ) ; return ret ; }
Fix launching activity from a pending intent
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Remove unnecessary import change from WPPrefUtils
<nb> public class Compiler extends AbstractCompiler { InputId inputIdOnAst = newInput . getAstRoot ( this ) . getInputId ( ) ; Preconditions . checkState ( newInput . getInputId ( ) . equals ( inputIdOnAst ) ) ; + inputs . remove ( oldInput ) ; return true ; }
Properly remove references to the original CompilerInput after the hot swap is done
<nb> public interface Status extends Comparable < Status > , TwitterResponse , java . io . Ser COMMENT COMMENT COMMENT - boolean wasRetweetedByMe ( ) ; + boolean isRetweetedByMe ( ) ; COMMENT COMMENT <nb> import static NAMESPACE ; COMMENT COMMENT COMMENT - public boolean wasRetweetedByMe ( ) { + public boolean isRetweetedByMe ( ) { return wasRetweetedByMe ; } <nb> public class TwitterTestUnit extends TwitterTestBase { status = twitterAPI2 . showStatus ( NUMBER0 ) ; assertTrue ( - NUMBER1 <= status . getRetweetCount ( ) ) ; - assertFalse ( status . wasRetweetedByMe ( ) ) ; + assertFalse ( status . isRetweetedByMe ( ) ) ; } public void testStatusMethods ( ) throws Exception {
changing method signature Status wasRetweetedByMe Status isRetweetedByMe
<nb> class AdaptiveLatencyTracker extends AbstractStatsDeque { double mean = mean ( ) ; double exponent = ( - NUMBER0 ) * ( t ) / mean ; - return NUMBER0 - ( NUMBER0 - Math . pow ( Math . E , exponent ) ) ; + return Math . pow ( Math . E , exponent ) ; } double score ( )
simplify AdaptiveLatencyTracker probability calculation
<nb> package NAMESPACE ; import NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
fix test data
<nb> public class SimpleDialog extends Dialog { if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . JELLY_BEAN_MR1 ) v . setTextDirection ( ( ( InternalListView ) parent ) . isLayoutRtl ( ) ? View . TEXT_DIRECTION_RTL : View . TEXT_DIRECTION_LTR ) ; v . setTextAppearance ( v . getContext ( ) , mItemTextAppearance ) ; - ViewCompat . setPaddingRelative ( v , mContentPadding , NUMBER0 , NUMBER0 , NUMBER0 ) ; + v . setCompoundDrawablePadding ( mContentPadding ) ; } v . setTag ( position ) ;
fix bug set padding of RadioButton and CheckBox
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class BeanSerializer implements Serializer { SINGLE Set < String > importedClasses = getAnnotationTypes ( model ) ; + importedClasses . add ( Generated . class . getName ( ) ) ; if ( model . hasLists ( ) ) { importedClasses . add ( List . class . getName ( ) ) ; } <nb> public class BeanSerializer implements Serializer { for ( Annotation annotation : model . getAnnotations ( ) ) { writer . annotation ( annotation ) ; } + + writer . line ( STRING0 , getClass ( ) . getName ( ) , STRING1 ) ; + if ( printSupertype && model . getSuperType ( ) != null ) { writer . beginClass ( model , model . getSuperType ( ) . getType ( ) ) ; } else {
Add Generated annotation
<nb> public class DevicePolicyManagerService extends IDevicePolicyManager . Stub { final int userId = UserHandle . getCallingUserId ( ) ; LockPatternUtils utils = new LockPatternUtils ( mContext ) ; - SINGLE - if ( ! enabled && utils . isSecure ( userId ) ) { - return false ; - } long ident = Binder . clearCallingIdentity ( ) ; try { + SINGLE + if ( ! enabled && utils . isSecure ( userId ) ) { + return false ; + } utils . setLockScreenDisabled ( ! enabled , userId ) ; } finally { Binder . restoreCallingIdentity ( ident ) ;
Fix a SecurityException in setKeyguardEnabledState
<nb> public class JUnitTestSuitePlugin implements Plugin < Project > { @ override public void execute ( final Test test ) { test . dependsOn ( jvmAssembly ) ; - test . setTestClassesDir ( binary . getClassesDir ( ) ) ; - - SINGLE test . setClasspath ( classpathFor ( jvmAssembly , fileOperations ) ) ; - configureReports ( test ) ; }
Remove todo comment
<nb> public class ObjectColorPicker implements IObjectPicker { } public void initialize ( ) { + int size = Math . max ( mRenderer . getViewportWidth ( ) , mRenderer . getViewportHeight ( ) ) ; + mTextureInfo = mRenderer . getTextureManager ( ) . addTexture ( null , size , size , + TextureType . FRAME_BUFFER ) ; genBuffers ( ) ; - mTextureInfo = mRenderer . getTextureManager ( ) . addTexture ( null , mRenderer . getViewportWidth ( ) , - mRenderer . getViewportHeight ( ) , TextureType . FRAME_BUFFER ) ; mIsInitialized = true ; } <nb> public class ObjectColorPicker implements IObjectPicker { GLES20 . glBindRenderbuffer ( GLES20 . GL_RENDERBUFFER , mDepthBufferHandle ) ; GLES20 . glRenderbufferStorage ( GLES20 . GL_RENDERBUFFER , GLES20 . GL_DEPTH_COMPONENT16 , - mRenderer . getViewportWidth ( ) , mRenderer . getViewportHeight ( ) ) ; + mTextureInfo . getWidth ( ) , mTextureInfo . getHeight ( ) ) ; GLES20 . glBindRenderbuffer ( GLES20 . GL_RENDERBUFFER , NUMBER0 ) ; }
Prevent object picker from failing after rotation
<nb> public class TwoWayView extends AdapterView < ListAdapter > implements mSyncPosition = mFirstPosition ; if ( child != null ) { - mSpecificStart = child . getTop ( ) ; + mSpecificStart = ( mIsVertical ? child . getTop ( ) : child . getLeft ( ) ) ; } mSyncMode = SYNC_FIRST_POSITION ;
library Keep scroll position for notifyDataSetChanged in horizontal orientation
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class Tomcat7CometSupport extends AsynchronousProcessor { if ( event == null ) return ; SINGLE - if ( config . getInitParameter ( ApplicationConfig . RESUME_AND_KEEPALIVE ) == null - || config . getInitParameter ( ApplicationConfig . RESUME_AND_KEEPALIVE ) . equalsIgnoreCase ( STRING0 ) ) { + if ( ! resource . transport ( ) . equals ( AtmosphereResource . TRANSPORT . WEBSOCKET ) && + ( config . getInitParameter ( ApplicationConfig . RESUME_AND_KEEPALIVE ) == null + || config . getInitParameter ( ApplicationConfig . RESUME_AND_KEEPALIVE ) . equalsIgnoreCase ( STRING0 ) ) ) { bz51881 ( event ) ; } } catch ( IOException ex ) {
Do not resume the CometEvent when WebSocket is used
<nb> public class CoordinationTransformer implements TreeTransformer { if ( t == null ) { return null ; } - return Tsurgeon . processPattern ( moveRBTregex , moveRBTsurgeon , t ) ; + for ( TregexPattern pattern : moveRBTregex ) { + t = Tsurgeon . processPattern ( pattern , moveRBTsurgeon , t ) ; + } + return t ; } SINGLE
Fix compilation errors with merge
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import static NAMESPACE ; <nb> public final class BidiFormatter { COMMENT COMMENT COMMENT - public String unicodeWrap ( String str , TextDirectionHeuristic heuristic , boolean isolate ) { + public @ nullable String unicodeWrap ( @ nullable String str , TextDirectionHeuristic heuristic , + boolean isolate ) { + if ( str == null ) return null ; return unicodeWrap ( ( CharSequence ) str , heuristic , isolate ) . toString ( ) ; } COMMENT COMMENT COMMENT - public CharSequence unicodeWrap ( CharSequence str , TextDirectionHeuristic heuristic , boolean isolate ) { + public @ nullable CharSequence unicodeWrap ( @ nullable CharSequence str , + TextDirectionHeuristic heuristic , boolean isolate ) { if ( str == null ) return null ; final boolean isRtl = heuristic . isRtl ( str , NUMBER0 , str . length ( ) ) ; SpannableStringBuilder result = new SpannableStringBuilder ( ) ;
Allow null string to BidiFormatter unicodeWrap
<nb> public class TaskListActivity extends ListActivity implements OnScrollListener , } private void switchToAssignedFilter ( ) { - filter = CustomFilterExposer . getAssignedByMeFilter ( getResources ( ) ) ; - setUpTaskList ( ) ; - isFilter = true ; + new Thread ( new Runnable ( ) { + @ override + public void run ( ) { + AndroidUtilities . sleepDeep ( NUMBER0 ) ; + runOnUiThread ( new Runnable ( ) { + @ override + public void run ( ) { + Intent intent = new Intent ( TaskListActivity . this , TaskListActivity . class ) ; + intent . putExtra ( TaskListActivity . TOKEN_FILTER , CustomFilterExposer . getAssignedByMeFilter ( getResources ( ) ) ) ; + intent . putExtra ( TaskListActivity . TOKEN_OVERRIDE_ANIM , true ) ; + startActivityForResult ( intent , NUMBER1 ) ; + transitionForTaskEdit ( ) ; + } + } ) ; + } + } ) . start ( ) ; } public void onScroll ( AbsListView view , int firstVisibleItem , int visibleItemCount ,
New animation when switching to I ve assigned filter
<nb> public abstract class OIndexMVRBTreeAbstract extends OSharedResourceAbstract imp acquireExclusiveLock ( ) ; try { - OLogManager . instance ( ) . info ( this , + OLogManager . instance ( ) . debug ( this , STRING0 + ( iHardMode ? STRING1 : STRING2 ) + STRING3 , name , map . size ( ) , map . getInMemoryEntries ( ) ) ; final int saved = map . optimize ( true ) ; - OLogManager . instance ( ) . info ( this , STRING4 , saved , map . getInMemoryEntries ( ) ) ; + OLogManager . instance ( ) . debug ( this , STRING4 , saved , map . getInMemoryEntries ( ) ) ; } finally { releaseExclusiveLock ( ) ;
Removed debug logs
<nb> public class HttpChannel < T > implements HttpParser . RequestHandler < T > , Runnable case REQUEST_DISPATCH : _request . setHandled ( false ) ; _response . getHttpOutput ( ) . reopen ( ) ; - _request . setTimeStamp ( System . currentTimeMillis ( ) ) ; _request . setDispatcherType ( DispatcherType . REQUEST ) ; for ( HttpConfiguration . Customizer customizer : _configuration . getCustomizers ( ) ) <nb> public class HttpChannel < T > implements HttpParser . RequestHandler < T > , Runnable _expect100Continue = false ; _expect102Processing = false ; - if ( _request . getTimeStamp ( ) == NUMBER0 ) - _request . setTimeStamp ( System . currentTimeMillis ( ) ) ; + _request . setTimeStamp ( System . currentTimeMillis ( ) ) ; _request . setMethod ( httpMethod , method ) ; if ( httpMethod == HttpMethod . CONNECT )
set Request timestamp on startRequest
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class MessageDispatchInterceptor extends ChannelInterceptorBase { } - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - public LinkObject removeFromQueue ( ) { - return null ; - } - - public void startQueue ( ) { if ( run ) { return ;
Remove deprecated code
<nb> public class ReaderPostDetailActivity extends WPActionBarActivity { } COMMENT - COMMENT - COMMENT - COMMENT - if ( ! hasPost ( ) || ! mPost . isWP ( ) ) - return ; - - ReaderActions . UpdateResultListener resultListener = new ReaderActions . UpdateResultListener ( ) { - @ override - public void onUpdateResult ( ReaderActions . UpdateResult result ) { - if ( result == ReaderActions . UpdateResult . CHANGED ) { - SINGLE - mPost = ReaderPostTable . getPost ( mBlogId , mPostId ) ; - refreshLikes ( false ) ; - mIsPostChanged = true ; - - } - } - } ; - ReaderPostActions . updateLikesForPost ( mPost , resultListener ) ; - COMMENT - - COMMENT COMMENT COMMENT private void refreshComments ( ) {
Removed commented out code
<nb> public class FrameLayout extends ViewGroup { mPaddingTop - mPaddingBottom - lp . topMargin - lp . bottomMargin , MeasureSpec . EXACTLY ) ; } else { - childHeightMeasureSpec = getChildMeasureSpec ( widthMeasureSpec , + childHeightMeasureSpec = getChildMeasureSpec ( heightMeasureSpec , mPaddingTop + mPaddingBottom + lp . topMargin + lp . bottomMargin , lp . height ) ; }
Fix typo bug in FrameLayout s measurement code
<nb> public abstract class ResultHandler { proceedListener . onClick ( null , index ) ; } else { SINGLE - prefs . edit ( ) . putBoolean ( PreferencesActivity . KEY_NOT_OUR_RESULTS_SHOWN , true ) ; + prefs . edit ( ) . putBoolean ( PreferencesActivity . KEY_NOT_OUR_RESULTS_SHOWN , true ) . commit ( ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( activity ) ; builder . setMessage ( R . string . msg_not_our_results ) ; builder . setPositiveButton ( R . string . button_ok , proceedListener ) ;
Actually commit pref updates
<nb> public class DocGen extends AbstractProcessor { Joiner . on ( STRING0 ) . join ( STRING1 , STRING2 , - STRING3 , + STRING4 , STRING5 , STRING6 , STRING7 , STRING8 , STRING9 , STRING10 , - STRING11 - + STRING12 , + STRING13 + + STRING14 , STRING15 ) , Locale . ENGLISH ) ; <nb> public class DocGen extends AbstractProcessor { Joiner . on ( STRING0 ) . join ( STRING1 , STRING2 , - STRING3 , + STRING4 , STRING16 , STRING5 , STRING6 , <nb> public class DocGen extends AbstractProcessor { STRING8 , STRING9 , STRING10 , - STRING11 - + STRING12 , + STRING13 + + STRING14 , STRING15 ) , Locale . ENGLISH ) ;
Escape certain camelcase words in wiki output
<nb> public final class EditorImpl extends UserDataHolderBase implements EditorEx , Hi setOpaque ( false ) ; } - @ override - public void paint ( @ notnull Graphics g ) { - super . paint ( g ) ; - } - COMMENT COMMENT COMMENT
remove useless override
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ;
remove non needed import
<nb> public class JavaAnalyzerFactory extends FileAnalyzerFactory { private static final String name = STRING0 ; private static final String [ ] SUFFIXES = { - STRING1 + STRING1 , + STRING2 , } ; public JavaAnalyzerFactory ( ) {
Add android aidl to java group
<nb> public class Capsule implements Runnable , FileVisitor < Path > { if ( appName == null ) appName = getAttribute ( ATTR_APP_NAME ) ; if ( appName == null ) { - appName = getApplicationArtifactId ( getAppArtifact ( args ) ) ; + appName = getAppArtifact ( args ) ; if ( appName != null ) return getAppArtifactLatestVersion ( appName ) ; }
fixed app id bug
<nb> class FormatProcessor { myLastTokenBlock = myWrapper . getLastTokenBlock ( ) ; myCurrentBlock = myFirstTokenBlock ; myTextRangeToWrapper = buildTextRangeToInfoMap ( myFirstTokenBlock ) ; - myLastWhiteSpace = new WhiteSpace ( getLastBlock ( ) . getEndOffset ( ) , false ) ; - myLastWhiteSpace . append ( myWrapper . getEndOffset ( ) , myModel , myDefaultIndentOption ) ; + int lastBlockOffset = getLastBlock ( ) . getEndOffset ( ) ; + myLastWhiteSpace = new WhiteSpace ( lastBlockOffset , false ) ; + myLastWhiteSpace . append ( Math . max ( lastBlockOffset , myWrapper . getEndOffset ( ) ) , myModel , myDefaultIndentOption ) ; myAlignmentsInsideRangesToModify = myWrapper . getAlignmentsInsideRangeToModify ( ) ; } }
use the last block offset if necessary
<nb> public class AntlrParserPlugin extends ASTHelper implements ParserPlugin , Groovy Expression arguments = arguments ( elist ) ; MethodCallExpression expression = new MethodCallExpression ( objectExpression , name , arguments ) ; + boolean implicitThis = ( objectExpression == VariableExpression . THIS_EXPRESSION ) ; + implicitThis = implicitThis || ( objectExpression == VariableExpression . SUPER_EXPRESSION ) ; + expression . setImplicitThis ( implicitThis ) ; configureAST ( expression , methodCallNode ) ; return expression ; }
adding logic fo the implicitThis
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Remove an unnecessary reference to tachyondotNetwork protocol RPCBlockResponse
<nb> public class EnumRule implements Rule < JClassContainer , JType > { private JFieldVar addQuickLookupMap ( JDefinedClass _enum ) { JClass lookupType = _enum . owner ( ) . ref ( Map . class ) . narrow ( _enum . owner ( ) . ref ( String . class ) , _enum ) ; - JFieldVar lookupMap = _enum . field ( JMod . PRIVATE | JMod . STATIC , lookupType , STRING0 ) ; + JFieldVar lookupMap = _enum . field ( JMod . PRIVATE | JMod . STATIC | JMod . FINAL , lookupType , STRING1 ) ; JClass lookupImplType = _enum . owner ( ) . ref ( HashMap . class ) . narrow ( _enum . owner ( ) . ref ( String . class ) , _enum ) ; lookupMap . init ( JExpr . _new ( lookupImplType ) ) ;
Make the quick lookup map final
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class AppIntro2 extends FragmentActivity { public int getCount ( ) { return this . fragments . size ( ) ; } + + public List < Fragment > getFragments ( ) { + return fragments ; + } } public class FadePageTransformer implements ViewPager . PageTransformer {
Added missing method
<nb> package NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public final class PatternTranslator extends AbstractTranslator { @ notnull private JsExpression translateExpressionPattern ( @ notnull JsExpression expressionToMatch , JetExpressionPattern pattern ) { JsExpression expressionToMatchAgainst = translateExpressionForExpressionPattern ( pattern ) ; - JsBinaryOperation eq = equality ( expressionToMatch , expressionToMatchAgainst ) ; - SINGLE - if ( context ( ) . isEcma5 ( ) ) { - if ( expressionToMatchAgainst instanceof JsNumberLiteral || - expressionToMatchAgainst instanceof JsStringLiteral || - expressionToMatchAgainst instanceof JsLiteral . JsBooleanLiteral ) { - JsNameRef valueOf = new JsNameRef ( STRING0 ) ; - valueOf . setQualifier ( expressionToMatch ) ; - return and ( valueOf , eq ) ; - } - } - - return eq ; + return equality ( expressionToMatch , expressionToMatchAgainst ) ; } @ notnull
Remove unnecessary code in PatternTranslator
<nb> public class StoreConfigLifecycleListener implements LifecycleListener { MBeanServer mserver = MBeanUtils . createServer ( ) ; InputStream descriptor = null ; try { - ObjectName objectName = new ObjectName ( STRING0 ) ; + ObjectName objectName = new ObjectName ( server . getDomain ( ) + STRING1 ) ; if ( ! mserver . isRegistered ( objectName ) ) { registry . registerComponent ( storeConfig , objectName , STRING2 ) ; }
Don t use a hard coded domain name
<nb> import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; + import static NAMESPACE ; public final class DateTimeUtils { <nb> public final class DateTimeUtils public static boolean timestampHasTimeZone ( String value ) { try { - TIMESTAMP_WITH_TIME_ZONE_FORMATTER . parseMillis ( value ) ; - return true ; + try { + TIMESTAMP_WITH_TIME_ZONE_FORMATTER . parseMillis ( value ) ; + return true ; + } + catch ( Exception e ) { + TIMESTAMP_WITHOUT_TIME_ZONE_FORMATTER . parseMillis ( value ) ; + return false ; + } } catch ( Exception e ) { - return false ; + throw new IllegalArgumentException ( format ( STRING0 , value ) ) ; } }
Throw exception if timestamp has incorrect format
<nb> public class CropImageView extends FrameLayout { ( int ) actualCropY , ( int ) actualCropWidth , ( int ) actualCropHeight ) ; + mBitmap . recycle ( ) ; return croppedBitmap ; } <nb> public class CropImageView extends FrameLayout { Matrix matrix = new Matrix ( ) ; matrix . postRotate ( degrees ) ; - mBitmap = Bitmap . createBitmap ( mBitmap , NUMBER0 , NUMBER0 , mBitmap . getWidth ( ) , mBitmap . getHeight ( ) , matrix , true ) ; - setImageBitmap ( mBitmap ) ; + final Bitmap rotatedBitmap = Bitmap . createBitmap ( mBitmap , NUMBER0 , NUMBER0 , mBitmap . getWidth ( ) , mBitmap . getHeight ( ) , matrix , true ) ; + mBitmap . recycle ( ) ; + setImageBitmap ( rotatedBitmap ) ; mDegreesRotated += degrees ; mDegreesRotated = mDegreesRotated % NUMBER1 ;
Recycling source bitmap after rotating and cropping
<nb> static class InvokeExpr implements Expr { { Var fvar = ( ( VarExpr ) fexpr ) . var ; Var pvar = ( Var ) RT . get ( fvar . meta ( ) , protocolKey ) ; - if ( pvar != null ) + if ( pvar != null && PROTOCOL_CALLSITES . isBound ( ) ) { this . isProtocol = true ; this . siteIndex = registerProtocolCallsite ( ( ( VarExpr ) fexpr ) . var ) ; <nb> static class InvokeExpr implements Expr { } } - if ( fexpr instanceof KeywordExpr && RT . count ( form ) == NUMBER0 ) + if ( fexpr instanceof KeywordExpr && RT . count ( form ) == NUMBER0 && KEYWORD_CALLSITES . isBound ( ) ) { SINGLE Expr target = analyze ( context , RT . second ( form ) ) ;
don t create callsites when no surrounding fn obj support e g top level inits
<nb> import NAMESPACE ; public class Expr2Test extends TestUtil { int i = NUMBER0 ; - @ test public void testBasicExpr1 ( ) { + COMMENT Key dest = Key . make ( STRING0 ) ; try { File file = TestUtil . find_test_file ( STRING1 ) ;
turn off in progress test
<nb> public final class MediaCodecInfo { } } levelCaps = createFromProfileLevel ( mMime , profile , maxLevel ) ; - if ( levelCaps != null && ! levelCaps . isFormatSupported ( format ) ) { + SINGLE + SINGLE + Map < String , Object > mapWithoutProfile = new HashMap < > ( map ) ; + mapWithoutProfile . remove ( MediaFormat . KEY_PROFILE ) ; + MediaFormat formatWithoutProfile = new MediaFormat ( mapWithoutProfile ) ; + if ( levelCaps != null && ! levelCaps . isFormatSupported ( formatWithoutProfile ) ) { return false ; } }
avoid recursion when evaluating profile support
<nb> import NAMESPACE ; COMMENT COMMENT public class TipManager { + private volatile boolean myIsDisposed = false ; + public static interface TipFactory { JComponent createToolTip ( MouseEvent e ) ; } <nb> public class TipManager { myAlarm . cancelAllRequests ( ) ; myAlarm . addRequest ( new Runnable ( ) { public void run ( ) { - showTooltip ( e ) ; + if ( ! myIsDisposed ) { + showTooltip ( e ) ; + } } } , DebuggerSettings . getInstance ( ) . VALUE_LOOKUP_DELAY ) ; } <nb> public class TipManager { } public void dispose ( ) { + myIsDisposed = true ; + myAlarm . cancelAllRequests ( ) ; myMouseListener = null ; myMouseMotionListener = null ; }
cancel tip showing requests on project disposal
<nb> public abstract class UriNotifier { COMMENT COMMENT COMMENT - public static enum DBOperation { + public enum DBOperation { INSERT , UPDATE , DELETE <nb> public abstract class UriNotifier { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Fix typo in documentation
<nb> public class MetaDataMappingService extends AbstractComponent { } else { indexService = indicesService . indexService ( index ) ; } - SINGLE - if ( indexMetaData . getMappings ( ) . containsKey ( request . type ( ) ) ) { + SINGLE + if ( indexMetaData . getMappings ( ) . containsKey ( request . type ( ) ) && + ! indexService . mapperService ( ) . hasMapping ( request . type ( ) ) ) { indexService . mapperService ( ) . merge ( request . type ( ) , indexMetaData . getMappings ( ) . get ( request . type ( ) ) . source ( ) , false , request . updateAllTypes ( ) ) ; } }
Add each mapping at most once on batch mapping updates
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ExternallyManagedPageCache implements PageCache return delegate . maxCachedPages ( ) ; } + @ override + public void moveFile ( File sourceFile , File targetFile , CopyOption . . . copyOptions ) throws IOException + { + delegate . moveFile ( sourceFile , targetFile , copyOptions ) ; + } + COMMENT COMMENT COMMENT
Fix compilation error
<nb> public interface Inventory { public ItemStack [ ] getContents ( ) ; COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public void setContents ( ItemStack [ ] items ) ; + + COMMENT COMMENT COMMENT COMMENT
Added setContents to Inventory
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Remove unused import
<nb> public class PrepareContractionHierarchies extends AbstractAlgoPreparation < Prepa boolean prepareEdges ( ) { - SINGLE - SINGLE - SINGLE EdgeIterator iter = g . getAllEdges ( ) ; int c = NUMBER0 ; while ( iter . next ( ) )
removed invalid comment
<nb> public class Struts2FactoryTest extends TestCase { @ override protected void configureServlets ( ) { SINGLE - bind ( StrutsPrepareAndExecuteFilter . class ) . in ( Singleton . class ) ; + bind ( StrutsPrepareAndExecuteFilter . class ) + . in ( com . google . inject . Singleton . class ) ; filter ( STRING0 ) . through ( StrutsPrepareAndExecuteFilter . class ) ; } } ,
Fully qualify the Singleton so the stripped import doesn t cause issues in the opensource build
<nb> public class OEntityManager { private Map < String , Class < ? > > entityClasses = new HashMap < String , Class < ? > > ( ) ; public OEntityManager ( ) { - OLogManager . instance ( ) . warn ( this , STRING0 ) ; + OLogManager . instance ( ) . debug ( this , STRING0 ) ; + registerEntityClass ( OUser . class ) ; registerEntityClass ( ORole . class ) ; }
Removed usefulness WAR in log
<nb> public abstract class AsyncStreamHandlerTest extends AbstractBasicTest { Assert . assertNotNull ( values ) ; Assert . assertEquals ( values . length , expected . length ) ; Arrays . sort ( values ) ; - Assert . assertEquals ( expected , values ) ; + Assert . assertEquals ( values , expected ) ; return STATE . ABORT ; }
Fix argument order on assert call
<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 ModuleManagerComponent extends ModuleManagerImpl { ProgressIndicator progressIndicator = myProgressManager . getProgressIndicator ( ) ; if ( progressIndicator == null ) { - myProgressManager . runProcessWithProgressSynchronously ( runnableWithProgress , STRING0 , false , myProject ) ; + myProgressManager . runProcessWithProgressSynchronously ( runnableWithProgress , STRING1 , false , myProject ) ; } else { + progressIndicator . setText ( STRING2 ) ; runnableWithProgress . run ( ) ; } }
setting text for progress
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + COMMENT COMMENT COMMENT
Fix a wrong ordered import
<nb> import static NAMESPACE import static NAMESPACE ; import static NAMESPACE ; + @ lucenetestcase.awaitsfix ( bugUrl = STRING0 ) public class DeleteByQueryTests extends AbstractIntegrationTest { @ test <nb> public class DeleteByQueryTests extends AbstractIntegrationTest { } @ test - @ lucenetestcase.awaitsfix ( bugUrl = STRING1 ) public void testDeleteAllOneIndex ( ) { String json = STRING2 + STRING3 + STRING4 + STRING5 + STRING6 ;
moved AwaitsFix to class level
<nb> public final class Realm implements Closeable { bgRealm . cancelTransaction ( ) ; } - } catch ( final RuntimeException e ) { bgRealm . cancelTransaction ( ) ; if ( callback != null && ! Thread . currentThread ( ) . isInterrupted ( ) ) {
remove white space
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class Workbench implements BusyHandler , new VoidServerRequestCallback ( ) ) ; } } ; - - if ( Desktop . isDesktop ( ) ) - { - if ( BrowseCap . isWindows ( ) ) - commands_ . showShellDialog ( ) . remove ( ) ; - } } public WorkbenchMainView getMainView ( )
enable shell menu on windows
<nb> public class StorageServiceServerTest assert primaryRanges . size ( ) == NUMBER0 ; assert primaryRanges . contains ( new Range < Token > ( new StringToken ( STRING0 ) , new StringToken ( STRING1 ) ) ) ; } - - @ test - public void testGetOperationMode ( ) - { - String operationMode = StorageService . instance . getOperationMode ( ) ; - assert operationMode . equals ( STRING2 ) ; - } }
remove unnecessary and failing test
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + package NAMESPACE ; import NAMESPACE ;
Add missing license header
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; COMMENT COMMENT
remove unused import
<nb> import NAMESPACE ; COMMENT public class App { - private static List < PlayerDetails > allPlayerDetails ; + private static final List < PlayerDetails > allPlayerDetails ; static { allPlayerDetails = new ArrayList < > ( ) ;
Add final keyword
<nb> import NAMESPACE ; import NAMESPACE ; public class MapboxWebMapType extends AirMapType { - private String mapId ; - private String accessToken ; + private final String mapId ; + private final String accessToken ; protected static final String ARG_MAPBOX_ACCESS_TOKEN = STRING0 ; protected static final String ARG_MAPBOX_MAPID = STRING1 ;
Making mapId and accessToken final
<nb> public class EditorConsole extends JScrollPane { } public void write ( byte b [ ] , int offset , int length ) { - if ( console != null ) + if ( console != null ) { console . message ( new String ( b , offset , length ) , err ) ; - else if ( currentConsole != null ) + } else if ( currentConsole != null ) { currentConsole . message ( new String ( b , offset , length ) , err ) ; + } else { + SINGLE + SINGLE + if ( err ) { + systemErr . write ( b , offset , length ) ; + } else { + systemOut . write ( b , offset , length ) ; + } + } final OutputStream echo = err ? stderrFile : stdoutFile ; if ( echo != null ) {
need my f king System out System err
<nb> public class CompatibleMarshallingDecoder extends ReplayingDecoder < Object , Void > ByteInput input = new ChannelBufferByteInput ( buffer ) ; if ( maxObjectSize != Integer . MAX_VALUE ) { input = new LimitingByteInput ( input , maxObjectSize ) ; - } NUMBER0 + } try { unmarshaller . start ( input ) ; Object obj = unmarshaller . readObject ( ) ;
Remove unexpected bad text
<nb> import NAMESPACE ; public interface JointSpaceBindingProvider extends BindingProvider { COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
replaced see with code
<nb> public class OperationRequestHandler implements CommandHandler , OperationCommand continue ; } if ( ! definedProps . contains ( prop ) ) { - throw new CommandFormatException ( STRING0 + prop + STRING1 + definedProps ) ; + if ( ! Util . OPERATION_HEADERS . equals ( prop ) ) { + throw new CommandFormatException ( STRING0 + prop + STRING1 + definedProps ) ; + } } } }
add operation headers to the list of recognized operation properties
<nb> public class AnimatedVectorDrawable extends Drawable implements Animatable2 { private static final boolean DBG_ANIMATION_VECTOR_DRAWABLE = false ; COMMENT - private VectorDrawableAnimator mAnimatorSet = new VectorDrawableAnimatorRT ( this ) ; + private VectorDrawableAnimator mAnimatorSet = new VectorDrawableAnimatorUI ( this ) ; COMMENT COMMENT
Temporarily disable AVD on RT
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import static NAMESPACE ; public final class StreamId <nb> public final class StreamId @ override public int hashCode ( ) { - return Objects . hash ( column , streamKind ) ; + return NUMBER0 * column + streamKind . hashCode ( ) ; } @ override <nb> public final class StreamId if ( obj == null || getClass ( ) != obj . getClass ( ) ) { return false ; } + StreamId other = ( StreamId ) obj ; - return Objects . equals ( this . column , other . column ) && Objects . equals ( this . streamKind , other . streamKind ) ; + return column == other . column && streamKind == other . streamKind ; } @ override
Optimize equals and hashCode in StreamId
<nb> public interface ListenableFuture < V > extends Future < V > { COMMENT COMMENT COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT
Add documentation of the happens before guarantees of ListenableFuture addListener
<nb> public class ArrayFunctions { } } - public static void forEach ( byte [ ] array , Consumer < ? super Byte > consumer ) { - for ( byte i : array ) { - consumer . accept ( i ) ; - } - } - - public static void forEach ( char [ ] array , Consumer < ? super Character > consumer ) { - for ( char i : array ) { - consumer . accept ( i ) ; - } - } - public static void forEach ( short [ ] array , Consumer < ? super Short > consumer ) { for ( short i : array ) { consumer . accept ( i ) ;
Remove unused methods
<nb> public class LdapManager { COMMENT COMMENT COMMENT - public void setGroupmemberField ( String groupMemberField ) { + public void setGroupMemberField ( String groupMemberField ) { this . groupMemberField = groupMemberField ; properties . put ( STRING0 , groupMemberField ) ; }
Renamed setGroupmemberField to setGroupMemberField
<nb> public class MeshLoader extends DefaultHandler implements AssetLoader { if ( sum != FLOAT0 ) { weightsFloatData . position ( weightsFloatData . position ( ) - NUMBER0 ) ; SINGLE - float sumToB = FLOAT0 / sum ; + float sumToB = sum == NUMBER1 ? NUMBER1 : FLOAT0 / sum ; weightsFloatData . put ( w0 * sumToB ) ; weightsFloatData . put ( w1 * sumToB ) ; weightsFloatData . put ( w2 * sumToB ) ;
MeshLoader will no longer generate NaN weights for vertices with no bone weight assignments
<nb> public class TaskView extends FrameLayout implements Task . TaskCallbacks , @ override public void onClick ( final View v ) { final TaskView tv = this ; - final boolean delayViewClick = ( v != this ) ; + final boolean delayViewClick = ( v != this ) && ( v != mActionButtonView ) ; if ( delayViewClick ) { SINGLE postDelayed ( new Runnable ( ) {
Fixing issue with screen pinning not working
<nb> public class Base { } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT static public void copyDir ( File sourceDir , File targetDir ) throws IOException { targetDir . mkdirs ( ) ; String files [ ] = sourceDir . list ( ) ; for ( int i = NUMBER0 ; i < files . length ; i ++ ) { - if ( files [ i ] . equals ( STRING0 ) || files [ i ] . equals ( STRING1 ) ) continue ; + SINGLE + if ( files [ i ] . charAt ( NUMBER0 ) == STRING2 ) continue ; + SINGLE File source = new File ( sourceDir , files [ i ] ) ; File target = new File ( targetDir , files [ i ] ) ; if ( source . isDirectory ( ) ) {
ignore dotfiles and folders on export and save as
<nb> public final class RequestBuilder { public RequestBuilder productNameAsUserAgent ( ) { Application app = ApplicationManager . getApplication ( ) ; if ( app != null && ! app . isDisposed ( ) ) { - return userAgent ( ApplicationInfo . getInstance ( ) . getVersionName ( ) ) ; + ApplicationInfo info = ApplicationInfo . getInstance ( ) ; + return userAgent ( info . getVersionName ( ) + STRING0 + info . getBuild ( ) . asStringWithoutProductCode ( ) ) ; } else { return userAgent ( STRING1 ) ;
include version into user agent
<nb> public class ResConfigFlags { ret . append ( String . format ( STRING0 , screenHeight , screenWidth ) ) ; } } - if ( sdkVersion != NUMBER0 ) { + if ( sdkVersion > getNaturalSdkVersionRequirement ( ) ) { ret . append ( STRING1 ) . append ( sdkVersion ) ; } return ret . toString ( ) ; } + private short getNaturalSdkVersionRequirement ( ) { + if ( + ( uiMode & ( MASK_UI_MODE_TYPE | MASK_UI_MODE_NIGHT ) ) != NUMBER0 + ) { + return NUMBER1 ; + } + if ( + ( screenLayout & ( MASK_SCREENSIZE | MASK_SCREENLONG ) ) != NUMBER0 + || density != DENSITY_DEFAULT + ) { + return NUMBER2 ; + } + return NUMBER0 ; + } + @ override public String toString ( ) { return ! getQualifiers ( ) . equals ( STRING2 ) ? getQualifiers ( ) : STRING3 ;
Don t generate sdkVersion v qualifiers if they re natural
<nb> import NAMESPACE ; public class StaticImportMethodFix implements IntentionAction { private static final Logger LOG = Logger . getInstance ( STRING0 ) ; private final PsiMethodCallExpression myMethodCall ; - private final List < PsiMethod > candidates ; + private List < PsiMethod > candidates ; public StaticImportMethodFix ( PsiMethodCallExpression methodCallExpression ) { myMethodCall = methodCallExpression ; - candidates = getMethodsToImport ( ) ; } @ notnull <nb> public class StaticImportMethodFix implements IntentionAction { && myMethodCall != null && myMethodCall . isValid ( ) && file . getManager ( ) . isInProject ( file ) - && ! candidates . isEmpty ( ) + && ! ( candidates == null ? candidates = getMethodsToImport ( ) : candidates ) . isEmpty ( ) ; }
Peter moaning fix
<nb> public class StartHaDb HighlyAvailableGraphDatabase . CONFIG_KEY_HA_MACHINE_ID , STRING0 , HighlyAvailableGraphDatabase . CONFIG_KEY_HA_ZOO_KEEPER_SERVERS , join ( StartZooKeeperServer . ZOO_KEEPER_SERVERS , STRING1 ) , HighlyAvailableGraphDatabase . CONFIG_KEY_HA_SERVERS , toHaServerFormat ( HA_SERVERS ) , - STRING2 , STRING3 ) ) ; + STRING2 , STRING3 , + STRING4 , STRING3 ) ) ; SINGLE SINGLE SINGLE
Keeps logical logs
<nb> public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas @ override @ notnull public ConfigurationType getType ( ) { - return null ; SINGLE + return UnknownConfigurationType . INSTANCE ; } @ override
save watches per configuration type fixed tests