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 ; <nb> public class BalloonImpl implements Balloon , IdeTooltip . Ui { } public boolean isAnimationEnabled ( ) { - return myAnimationEnabled && myAnimationCycle > NUMBER0 ; + return myAnimationEnabled && myAnimationCycle > NUMBER0 && ! RemoteDesktopDetector . isRemoteSession ( ) ; } public boolean isBlockClicks ( ) {
disable balloons animation for remote desktop sessions
<nb> public class IndentingWriter extends Writer { public void printIntAsDec ( int value ) throws IOException { int bufferIndex = NUMBER0 ; - boolean negative = value < NUMBER0 ; + + if ( value < NUMBER0 ) { + value *= - NUMBER1 ; + write ( STRING0 ) ; + } do { int digit = value % NUMBER2 ; <nb> public class IndentingWriter extends Writer { value = value / NUMBER2 ; } while ( value != NUMBER0 ) ; - if ( negative ) { - write ( STRING0 ) ; - } - while ( bufferIndex > NUMBER0 ) { write ( buffer [ -- bufferIndex ] ) ; }
Fix the printIntAsDec method in Indenting writer to correctly handle negative values
<nb> public class PlayerActivity extends Activity implements SurfaceHolder . Callback , SINGLE private SourceBuilder getSourceBuilder ( ) { - String userAgent = Util . getUserAgent ( this , STRING0 ) ; switch ( contentType ) { case Util . TYPE_SS : return new SmoothStreamingSourceBuilder ( dataSourceFactory , contentUri . toString ( ) ,
Remove dead code
<nb> public class DeepWaterParameters extends Model . Parameters { } public double _clip_gradient = FLOAT0 ; - public boolean _gpu = false ; + public boolean _gpu = true ; public int _device_id = NUMBER0 ; public int [ ] _image_shape = new int [ ] { NUMBER0 , NUMBER0 } ; SINGLE public int _channels = NUMBER1 ;
Make GPU the default
<nb> class JpsJsModuleUtils { Set < JpsLibrary > libraries = JpsUtils . getAllDependencies ( target ) . getLibraries ( ) ; for ( JpsLibrary library : libraries ) { for ( JpsLibraryRoot root : library . getRoots ( JpsOrderRootType . COMPILED ) ) { - String path = JpsPathUtil . urlToOsPath ( root . getUrl ( ) ) ; + String path = JpsPathUtil . urlToPath ( root . getUrl ( ) ) ; SINGLE if ( LibraryUtils . isJsRuntimeLibrary ( new File ( path ) ) ) { result . add ( path ) ; <nb> class JpsJsModuleUtils { result . add ( STRING0 + module . getName ( ) ) ; for ( JpsModuleSourceRoot root : module . getSourceRoots ( JavaSourceRootType . SOURCE ) ) { - result . add ( JpsPathUtil . urlToOsPath ( root . getUrl ( ) ) ) ; + result . add ( JpsPathUtil . urlToPath ( root . getUrl ( ) ) ) ; } } } ) ;
Do not use a method that is not present in some versions fo JPS
<nb> public class PartitionManager { return EmitState . NO_EMITTED ; } Iterable < List < Object > > tups = KafkaUtils . generateTuples ( _spoutConfig , toEmit . msg ) ; - if ( ( tups != null ) && tups . iterator . hasNext ( ) ) { + if ( ( tups != null ) && tups . iterator ( ) . hasNext ( ) ) { if ( _spoutConfig . topicAsStreamId ) { for ( List < Object > tup : tups ) { collector . emit ( _spoutConfig . topic , tup , new KafkaMessageId ( _partition , toEmit . offset ) ) ;
fixed typo in PartitionManager
<nb> public class Requirements { SINGLE SINGLE + if ( XBinder . cServiceName . size ( ) != XBinder . cServiceDescriptor . size ( ) + || XBinder . cServiceName . size ( ) != XBinder . cExceptionClassName . size ( ) ) + sendSupportInfo ( STRING0 , context ) ; + Method listServices = clazz . getDeclaredMethod ( STRING1 ) ; Method getService = clazz . getDeclaredMethod ( STRING2 , String . class ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . JELLY_BEAN ) <nb> public class XBinder extends XHook { STRING3 , STRING4 , STRING5 , + STRING5 , STRING6 , STRING7 , STRING8 <nb> public class XBinder extends XHook { } , new String [ ] { SINGLE } , + new String [ ] { SINGLE + } , new String [ ] { SINGLE } , new String [ ] { SINGLE
Fixed and checking XBinder lists
<nb> public class HorizontalScrollView extends FrameLayout { super . scrollTo ( scrollX , scrollY ) ; } - if ( ! awakenScrollBars ( ) ) { - invalidate ( ) ; - } + awakenScrollBars ( ) ; } @ override <nb> public class ScrollView extends FrameLayout { super . scrollTo ( scrollX , scrollY ) ; } - if ( ! awakenScrollBars ( ) ) { - invalidate ( ) ; - } + awakenScrollBars ( ) ; } @ override
Put back invalidate optimization
<nb> public class NotTranslator implements IInstructionTranslator { SINGLE final TranslationResult result = Helpers . translateOperand ( environment , offset , operand , true ) ; - + instructions . addAll ( result . getInstructions ( ) ) ; + SINGLE offset = baseOffset + instructions . size ( ) ;
Missed instructions in Not translator
<nb> public abstract class DelimitedInputFormat < OT > extends FileInputFormat < OT > { COMMENT private static int MAX_SAMPLE_LEN ; - static { loadGloablConfigParams ( ) ; } + static { loadGlobalConfigParams ( ) ; } - protected static void loadGloablConfigParams ( ) { + protected static void loadGlobalConfigParams ( ) { int maxSamples = GlobalConfiguration . getInteger ( ConfigConstants . DELIMITED_FORMAT_MAX_LINE_SAMPLES_KEY , ConfigConstants . DEFAULT_DELIMITED_FORMAT_MAX_LINE_SAMPLES ) ; int minSamples = GlobalConfiguration . getInteger ( ConfigConstants . DELIMITED_FORMAT_MIN_LINE_SAMPLES_KEY , <nb> public class DelimitedInputFormatSamplingTest { } public static void prepare ( ) { - DelimitedInputFormat . loadGloablConfigParams ( ) ; + DelimitedInputFormat . loadGlobalConfigParams ( ) ; } } }
typo fix Fix typo in DelimitedInputFormat java
<nb> public class JavaSpacePropertyProcessor extends PsiElementVisitor { public void visitTypeParameter ( PsiTypeParameter classParameter ) { createSpaceInCode ( true ) ; } + + public void visitDeclarationStatement ( PsiDeclarationStatement declarationStatement ) { + if ( myRole2 == ChildRole . COMMA ) { + createSpaceInCode ( false ) ; + } + } + }
Formatting comma in declaration statement
<nb> final class WellKnownMutability { . add ( STRING0 ) . add ( STRING1 ) . add ( STRING2 ) + . add ( STRING3 ) . add ( STRING4 ) . add ( STRING5 ) . add ( STRING6 )
Marking EnumValueDescriptor as immutable in WellKnownMutability
<nb> public class DeepWaterModel extends Model < DeepWaterModel , DeepWaterParameters , Dee } @ override - protected Frame predictScoreImpl ( Frame fr , Frame adaptFrm , String destination_key , Job j ) { + protected Frame predictScoreImpl ( Frame fr , Frame adaptFrm , String destination_key , Job j , boolean computeMetrics ) { final boolean makeNative = model_info ( ) . _backend == null ; if ( makeNative ) model_info ( ) . javaToNative ( ) ; - final boolean computeMetrics = ( ! isSupervised ( ) || ( adaptFrm . vec ( _output . responseName ( ) ) != null && ! adaptFrm . vec ( _output . responseName ( ) ) . isBad ( ) ) ) ; SINGLE String [ ] names = makeScoringNames ( ) ; String [ ] [ ] domains = new String [ names . length ] [ ] ;
Fix more merge conflicts
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class BlockJUnit4ClassRunner extends ParentRunner < FrameworkMethod > { @ override protected void runChild ( final FrameworkMethod method , RunNotifier notifier ) { Description description = describeChild ( method ) ; - if ( method . getAnnotation ( Ignore . class ) != null ) { + if ( method . isIgnored ( ) ) { notifier . fireTestIgnored ( description ) ; } else { runLeaf ( methodBlock ( method ) , description , notifier ) ; <nb> public class FrameworkMethod extends FrameworkMember < FrameworkMethod > { COMMENT COMMENT public boolean isIgnored ( ) { - for ( Annotation annotation : getAnnotations ( ) ) { - if ( annotation instanceof Ignore ) { - return true ; - } - } - return false ; + return fMethod . getAnnotation ( Ignore . class ) != null ; } COMMENT
simplified isIgnored check in Framework using it in
<nb> public class DataFlowRunner { for ( PsiClassInitializer initializer : nestedClass . getInitializers ( ) ) { myNestedClosures . putValue ( initializer . getBody ( ) , closureState ) ; } + for ( PsiField field : nestedClass . getFields ( ) ) { + myNestedClosures . putValue ( field , closureState ) ; + } } protected ControlFlowAnalyzer createControlFlowAnalyzer ( ) { <nb> import NAMESPACE ; class Zoo2 { - void foo ( @ nullable Object foo ) { + void foo ( @ nullable Object foo , @ nullable Object bar ) { if ( foo == null ) { return ; } new Runnable ( ) { int hc = foo . hashCode ( ) ; + int hc2 = < warning descr = STRING0 > bar . hashCode ( ) < / warning > ; public void run ( ) { }
analyze inner class field initializers
<nb> public abstract class AbstractGrailsPluginManager implements GrailsPluginManager } - @ override public boolean isShutdown ( ) { return shutdown ; }
remove Override from interface method impl
<nb> public class OrientJdbcPreparedStatementTest extends OrientJdbcBaseTest { } @ test + public void testExecuteUpdateReturnsNumberOfRowsDeleted ( ) throws Exception { + conn . createStatement ( ) . executeQuery ( STRING0 ) ; + conn . createStatement ( ) . executeQuery ( STRING1 ) ; + conn . createStatement ( ) . executeQuery ( STRING2 ) ; + + PreparedStatement statement = conn . prepareStatement ( STRING3 ) ; + statement . setInt ( NUMBER0 , NUMBER1 ) ; + int rowsInserted = statement . executeUpdate ( ) ; + + assertEquals ( NUMBER2 , rowsInserted ) ; + } + + @ test public void shouldExecutePreparedStatement ( ) throws Exception { PreparedStatement stmt = conn . prepareStatement ( STRING4 + STRING5 + STRING6 ) ; assertNotNull ( stmt ) ;
Add test for DELETE
<nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager public void setPadding ( int left , int top , int right , int bottom ) { super . setPadding ( left , top , right , bottom ) ; - if ( ( mPaddingLeft | mPaddingTop | mPaddingRight | mPaddingRight ) != NUMBER0 ) { + if ( ( mPaddingLeft | mPaddingTop | mPaddingRight | mPaddingBottom ) != NUMBER0 ) { mGroupFlags |= FLAG_PADDING_NOT_NULL ; } else { mGroupFlags &= ~ FLAG_PADDING_NOT_NULL ;
Correctly check bottom padding in setPadding
<nb> public class SLRUMap < K , V > { public void put ( K key , V value ) { V oldValue = myProtectedQueue . remove ( key ) ; if ( oldValue != null ) { - onDropFromCache ( key , value ) ; + onDropFromCache ( key , oldValue ) ; } oldValue = myProbationalQueue . put ( getStableKey ( key ) , value ) ; if ( oldValue != null ) { - onDropFromCache ( key , value ) ; + onDropFromCache ( key , oldValue ) ; } }
specify correct value for onDropFromCache when putting data
<nb> public class NUXDialogFragment extends SherlockDialogFragment { mFooterTextView . setText ( args . getString ( ARG_FOOTER ) ) ; mImageView . setImageResource ( args . getInt ( ARG_IMAGE ) ) ; - v . setClickable ( true ) ; - v . setOnClickListener ( new View . OnClickListener ( ) { + View . OnClickListener clickListener = new View . OnClickListener ( ) { @ override public void onClick ( View v ) { dismissAllowingStateLoss ( ) ; } - } ) ; + } ; + + v . setClickable ( true ) ; + v . setOnClickListener ( clickListener ) ; + mFooterTextView . setOnClickListener ( clickListener ) ; return v ; }
make the NUX dialog button clickable
<nb> public class GridLabelRenderer { label = STRING0 ; } String [ ] lines = label . split ( STRING1 ) ; + + SINGLE int labelWidthAdj = NUMBER0 ; if ( mStyles . horizontalLabelsAngle > FLOAT0 && mStyles . horizontalLabelsAngle <= NUMBER1 f ) { Rect textBounds = new Rect ( ) ; mPaintLabel . getTextBounds ( lines [ NUMBER0 ] , NUMBER0 , lines [ NUMBER0 ] . length ( ) , textBounds ) ; - labelWidthAdj = ( int ) Math . round ( Math . abs ( FLOAT1 * textBounds . width ( ) * Math . cos ( mStyles . horizontalLabelsAngle ) ) ) ; + labelWidthAdj = ( float ) Math . abs ( textBounds . width ( ) * Math . cos ( Math . toRadians ( mStyles . horizontalLabelsAngle ) ) ) ; } for ( int li = NUMBER0 ; li < lines . length ; li ++ ) { SINGLE
Fixed error in lining up angled labels
<nb> public final class BluetoothGatt implements BluetoothProfile { COMMENT public static final int GATT_INVALID_ATTRIBUTE_LENGTH = NUMBER0 ; - COMMENT + COMMENT + COMMENT + COMMENT public static final int GATT_CONNECTION_CONGESTED = NUMBER1 ; COMMENT
Hide new congestion constant for now
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class OStatementCache { COMMENT public OStatementCache ( int size ) { this . mapSize = size ; - map = Collections . synchronizedMap ( new LinkedHashMap < String , OStatement > ( size ) { + map = new LinkedHashMap < String , OStatement > ( size ) { protected boolean removeEldestEntry ( final Map . Entry < String , OStatement > eldest ) { return super . size ( ) > mapSize ; } - } ) ; + } ; } COMMENT <nb> public class OStatementCache { COMMENT COMMENT COMMENT - public boolean contains ( String statement ) { + public synchronized boolean contains ( String statement ) { return map . containsKey ( statement ) ; }
Removed useless synchronised of map
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Removed unused imports from LuceneQueryTest
<nb> public class RCompletionManager implements CompletionManager } } ) ; } - else if ( input_ . hasSelection ( ) ) + else if ( ! input_ . isSelectionCollapsed ( ) ) { switch ( c ) {
only do delimiter replacement when there is a non empty selection
<nb> public class CoreWorkload extends Workload SINGLE int keynum = transactioninsertkeysequence . nextInt ( ) ; - String dbkey = buildKeyName ( keynum ) ; + try { + String dbkey = buildKeyName ( keynum ) ; - HashMap < String , ByteIterator > values = buildValues ( dbkey ) ; - db . insert ( table , dbkey , values ) ; - transactioninsertkeysequence . acknowledge ( keynum ) ; + HashMap < String , ByteIterator > values = buildValues ( dbkey ) ; + db . insert ( table , dbkey , values ) ; + } finally { + transactioninsertkeysequence . acknowledge ( keynum ) ; + } } }
Put the acknowledgements into a finally
<nb> public class GtkPreferredJComboboxRendererInspection extends BaseJavaLocalInspec public void visitClass ( final PsiClass aClass ) { final PsiClass superClass = aClass . getSuperClass ( ) ; if ( superClass != null && STRING0 . equals ( superClass . getQualifiedName ( ) ) ) { - holder . registerProblem ( superClass , STRING1 ) ; + final PsiIdentifier nameIdentifier = aClass . getNameIdentifier ( ) ; + holder . registerProblem ( nameIdentifier != null ? nameIdentifier : aClass , + STRING1 ) ; } }
Fix internal inspection to highlight correct psi element
<nb> public class Raptor implements PathService { RaptorState cur = states . get ( i ) ; if ( cur . walkPath != null ) { GraphPath path = new GraphPath ( cur . walkPath , false ) ; + Edge edge0 = path . edges . getLast ( ) ; + if ( edge0 . getToVertex ( ) != state . getVertex ( ) ) { + state = state . getBackState ( ) ; + } + for ( ListIterator < Edge > it = path . edges . listIterator ( path . edges . size ( ) ) ; it . hasPrevious ( ) ; ) { Edge e = it . previous ( ) ; state = e . traverse ( state ) ;
fix bug reported by TriMet in arrive by trips
<nb> public class DefaultIndex extends SonarIndex { @ override public List < Resource > getChildren ( Resource resource ) { - return getChildren ( resource , false ) ; - } - - public List < Resource > getChildren ( Resource resource , boolean acceptExcluded ) { List < Resource > children = Lists . newLinkedList ( ) ; Bucket bucket = getBucket ( resource ) ; if ( bucket != null ) {
Fix quality flaw
<nb> public class NettyConnectionsPool implements ConnectionsPool < String , Channel > { this . sslConnectionPoolEnabled = sslConnectionPoolEnabled ; this . maxIdleTime = maxIdleTime ; this . maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs ; - this . idleConnectionDetector . schedule ( new IdleChannelDetector ( ) , maxIdleTime , maxIdleTime ) ; this . idleConnectionDetector = idleConnectionDetector ; + this . idleConnectionDetector . schedule ( new IdleChannelDetector ( ) , maxIdleTime , maxIdleTime ) ; } private static class IdleChannel {
Fix NPE in NettyConnectionsPool
<nb> public class ColumnFamilyStore implements ColumnFamilyStoreMBean public float getPercentageTombstonesPerLastRead ( ) { long total = metric . tombstoneScannedHistogram . count ( ) + metric . liveScannedHistogram . count ( ) ; - return ( metric . tombstoneScannedHistogram . count ( ) / total ) ; + return ( ( float ) metric . tombstoneScannedHistogram . count ( ) / total ) ; } public long getLiveCellsPerLastRead ( )
use floating pt math for percentages
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ReaderPostListFragment extends Fragment { COMMENT COMMENT COMMENT + @ suppresslint ( STRING0 ) private void animateHeader ( ) { new Handler ( ) . postDelayed ( new Runnable ( ) { @ override
Added SuppressLint NewApi
<nb> public class ASTddply extends ASTOp { private void go ( ) { Futures fs = new Futures ( ) ; for ( int i = NUMBER0 ; i < _frameKeys . length ; ++ i ) { - assert DKV . getGet ( _frameKeys [ i ] ) != null : STRING0 + _frameKeys [ i ] ; + assert DKV . getGet ( _frameKeys [ i ] ) != null : STRING1 + i + STRING2 + _frameKeys [ i ] ; fs . add ( RPC . call ( _frameKeys [ i ] . home_node ( ) , _remoteTasks [ i ] = new RemoteRapids ( _frameKeys [ i ] , _FUN , _funArgs , _grps [ i ] . _ds ) ) ) ; } fs . blockForPending ( ) ;
improve assertion error fail message
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class VerificationModeImpl implements VerificationMode { return STRING0 + wantedInvocationCount + STRING1 + mocksToBeVerifiedInOrder ; } - @ override public void verify ( List < Invocation > invocations , InvocationMatcher wanted ) { if ( new VerificationModeDecoder ( this ) . inOrderMode ( ) ) { invocations = new AllInvocationsFinder ( ) . getAllInvocations ( this . getMocksToBeVerifiedInOrder ( ) ) ;
fixing the build
<nb> class Slurper implements Runnable { return null ; } - int options = Bytes . QUERYOPTION_TAILABLE | Bytes . QUERYOPTION_AWAITDATA | Bytes . QUERYOPTION_NOTIMEOUT ; - + int options = Bytes . QUERYOPTION_TAILABLE | Bytes . QUERYOPTION_AWAITDATA | Bytes . QUERYOPTION_NOTIMEOUT SINGLE SINGLE - if ( indexFilter . containsField ( MongoDBRiver . OPLOG_TIMESTAMP ) ) { - options = options | Bytes . QUERYOPTION_OPLOGREPLAY ; - } + | Bytes . QUERYOPTION_OPLOGREPLAY ; + DBCursor cursor = oplogCollection . find ( indexFilter ) . setOptions ( options ) ; SINGLE
Always use Bytes QUERYOPTION_OPLOGREPLAY for oplog cursor
<nb> public class EnglishWordRepeatRule extends WordRepeatRule { if ( wordRepetitionOf ( STRING0 , tokens , position ) ) { return true ; SINGLE } + if ( wordRepetitionOf ( STRING1 , tokens , position ) ) { + return true ; SINGLE + } return false ; }
en avoid false alarm for Homo sapiens sapiens
<nb> public class Ringtone { private boolean playFallbackRingtone ( ) { if ( mAudioManager . getStreamVolume ( mStreamType ) != NUMBER0 ) { int ringtoneType = RingtoneManager . getDefaultType ( mUri ) ; - if ( ringtoneType != - NUMBER1 && + if ( ringtoneType == - NUMBER1 || RingtoneManager . getActualDefaultRingtoneUri ( mContext , ringtoneType ) != null ) { SINGLE try { <nb> public class Ringtone { } catch ( NotFoundException nfe ) { Log . e ( TAG , STRING0 ) ; } + } else { + Log . w ( TAG , STRING1 + mUri ) ; } } return false ;
Fix logic in fallback ringtone handling
<nb> public class HeadsUpManager implements ViewTreeObserver . OnComputeInternalInsetsL } else if ( ! selfFullscreen && otherFullscreen ) { return NUMBER0 ; } + + if ( remoteInputActive && ! o . remoteInputActive ) { + return - NUMBER0 ; + } else if ( ! remoteInputActive && o . remoteInputActive ) { + return NUMBER0 ; + } + return postTime < o . postTime ? NUMBER0 : postTime == o . postTime ? entry . key . compareTo ( o . entry . key ) : - NUMBER0 ;
Keep HUNs that have an active remote input
<nb> public class OStorageConfiguration implements OSerializableStream { private transient OStorage storage ; private transient byte [ ] record ; - private static final int FIXED_CONFIG_SIZE = NUMBER0 ; + private static final int FIXED_CONFIG_SIZE = NUMBER1 ; public OStorageConfiguration load ( ) throws OSerializationException { record = storage . readRecord ( null , - NUMBER2 , storage . getClusterIdByName ( OStorage . CLUSTER_INTERNAL_NAME ) , CONFIG_RECORD_NUM , null ) . buffer ;
Fixed issue reported by Konrad about fixed size of cfg with large db structure hundreds of files
<nb> public class GraphBuilderTask implements Runnable { private boolean _alwaysRebuild = true ; private List < RoutingRequest > _modeList ; - - private double _contractionFactor = FLOAT0 ; private String _baseGraph = null ; <nb> public class GraphBuilderTask implements Runnable { public void setModes ( List < RoutingRequest > modeList ) { _modeList = modeList ; } - - public void setContractionFactor ( double contractionFactor ) { - _contractionFactor = contractionFactor ; - } public void setPath ( String path ) { graphFile = new File ( path . concat ( STRING0 ) ) ;
Delete unused contraction factor from GraphBuilderTask
<nb> public class Drawer { return this ; } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public Drawer withDisplayBelowToolbar ( boolean displayBelowToolbar ) { + this . mTranslucentStatusBar = displayBelowToolbar ; + return this ; + } + SINGLE protected Toolbar mToolbar ;
add synonym method if you want to display the drawer below the toolbar
<nb> static class DefExpr implements Expr { boolean isDynamic = RT . booleanCast ( RT . get ( mm , dynamicKey ) ) ; if ( isDynamic ) v . setDynamic ( ) ; - if ( ! isDynamic && sym . name . startsWith ( STRING0 ) && sym . name . endsWith ( STRING0 ) && sym . name . length ( ) > NUMBER0 ) + if ( ! isDynamic && sym . name . startsWith ( STRING0 ) && sym . name . endsWith ( STRING0 ) && sym . name . length ( ) > NUMBER1 ) { RT . errPrintWriter ( ) . format ( STRING1 + STRING2 ,
Extend length of symbol detection
<nb> public class WsServerContainer extends WsWebSocketContainer EnumSet < DispatcherType > types = EnumSet . of ( DispatcherType . REQUEST , DispatcherType . FORWARD ) ; - fr . addMappingForUrlPatterns ( types , false , STRING0 ) ; + fr . addMappingForUrlPatterns ( types , true , STRING0 ) ; }
Match after to allow app filters to examine modify the request
<nb> public class GroovyShell extends GroovyObjectSupport { } } ) ; Class scriptClass = parseClass ( gcs ) ; - return InvokerHelper . invokeMethod ( scriptClass , STRING0 , new Object [ ] { args } ) ; + if ( isUnitTestCase ( scriptClass ) ) { + runTest ( scriptClass ) ; + return null ; + } + else { + return InvokerHelper . invokeMethod ( scriptClass , STRING0 , new Object [ ] { args } ) ; + } } public Object getVariable ( String name ) {
Added the ability to run unit tests also in the run method which takes an input stream
<nb> public class Platform { System . err . println ( STRING0 + jarFolder . getAbsolutePath ( ) + STRING1 ) ; - processingRoot = new File ( System . getProperty ( STRING2 ) ) ; + final String userDir = System . getProperty ( STRING2 ) ; + processingRoot = new File ( PApplet . urlDecode ( userDir ) ) ; } } }
Fix a bug that makes Processing fail during startup when the user s home
<nb> public class Symbol implements Serializable { return symbol ; } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT @ override public boolean equals ( final Object o ) { if ( this == o ) { <nb> public class Symbol implements Serializable { return symbol . hashCode ( ) ; } - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT @ override - - public String toString ( ) { return symbol ; }
Tidying up javascript in BSON
<nb> import NAMESPACE ; COMMENT public class FileTypeManagerImpl extends FileTypeManagerEx implements NamedJDOMExternalizable , ExportableApplicationComponent { private static final Logger LOG = Logger . getInstance ( STRING0 ) ; - private static final int VERSION = NUMBER0 ; + private static final int VERSION = NUMBER1 ; private final Set < FileType > myDefaultTypes = new THashSet < FileType > ( ) ; private final ArrayList < FileTypeIdentifiableByVirtualFile > mySpecialFileTypes = new ArrayList < FileTypeIdentifiableByVirtualFile > ( ) ; <nb> public class FileTypeManagerImpl extends FileTypeManagerEx implements NamedJDOME addIgnore ( STRING1 ) ; } - if ( savedVersion < VERSION ) { + if ( savedVersion < NUMBER0 ) { addIgnore ( STRING2 ) ; } + + if ( savedVersion < VERSION ) { + addIgnore ( STRING3 ) ; + addIgnore ( STRING4 ) ; + addIgnore ( STRING5 ) ; + } } private void readGlobalMappings ( final Element e ) {
a couple more standard ignore patterns
<nb> public class StatementFusion extends AbstractPeepholeOptimization { SINGLE return last . hasChildren ( ) ; case Token . FOR : - return NodeUtil . isForIn ( last ) ; + return NodeUtil . isForIn ( last ) && + SINGLE + ! NodeUtil . mayHaveSideEffects ( last . getFirstChild ( ) ) ; } return false ; <nb> public class StatementFusionTest extends CompilerTestCase { public void testFuseIntoForIn ( ) { fuse ( STRING0 , STRING1 ) ; + fuseSame ( STRING2 ) ; } public void testNoFuseIntoWhile ( ) {
Don t change side effect ordering when merging into FOR IN
<nb> public class MorphaAnnotator implements Annotator { for ( CoreLabel token : tokens ) { String text = token . get ( CoreAnnotations . TextAnnotation . class ) ; String posTag = token . get ( CoreAnnotations . PartOfSpeechAnnotation . class ) ; - this . addLemma ( morphology , CoreAnnotations . LemmaAnnotation . class , token , text , posTag ) ; + addLemma ( morphology , CoreAnnotations . LemmaAnnotation . class , token , text , posTag ) ; } } } else {
User suggested patch for MorphaAnnotator
<nb> public class IconicsDrawable extends Drawable { COMMENT + COMMENT + COMMENT + public int getColor ( ) { + return mIconColor ; + } + + COMMENT + COMMENT + COMMENT + public int getContourColor ( ) { + return mContourColor ; + } + + COMMENT + COMMENT + COMMENT + public int getBackgroundColor ( ) { + return mBackgroundColor ; + } + + COMMENT COMMENT COMMENT COMMENT
add new getters suggested by fmeneuhe
<nb> public interface FileDownloader { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT @ nullable List < VirtualFile > downloadFilesWithProgress ( @ nullable String targetDirectoryPath , @ nullable Project project , @ nullable JComponent parentComponent ) ;
Fix typo in FileDownloader javadoc
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class FlatWelcomeFrame extends JFrame implements WelcomeFrameProvider , Id @ override public IdeFrame createFrame ( ) { - return Registry . is ( STRING0 ) ? this : null ; + return Registry . is ( STRING0 ) && ( PlatformUtils . isIntelliJ ( ) || PlatformUtils . isCidr ( ) ) ? this : null ; } private class FlatWelcomeScreen extends JPanel implements WelcomeScreen {
disable new welcome for all except appcode and intellij
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; public final class LocalTachyonMaster { SINGLE + private static Random sRandomGenerator = new Random ( ) ; + private final String mTachyonHome ; private final String mHostname ; <nb> public final class LocalTachyonMaster { SINGLE mUfsCluster = UnderFileSystemCluster . get ( mTachyonHome + STRING0 , tachyonConf ) ; mUfsDirectory = mUfsCluster . getUnderFilesystemAddress ( ) + STRING1 ; + SINGLE SINGLE - mJournalFolder = - mUfsCluster . getUnderFilesystemAddress ( ) + STRING2 + System . currentTimeMillis ( ) ; + synchronized ( sRandomGenerator ) { + mJournalFolder = + mUfsCluster . getUnderFilesystemAddress ( ) + STRING2 + sRandomGenerator . nextLong ( ) ; + } UnderFileSystemUtils . mkdirIfNotExists ( mJournalFolder , tachyonConf ) ; String [ ] masterServiceNames = new String [ ] {
Using a random number instead of a timestamp
<nb> public class AsyncTwitterTest extends TestCase implements TwitterListener { } public void testGetFriends ( ) throws Exception { + twitterAPI2 . createFriendship ( id1 ) ; twitterAPI1 . getFriendsAsync ( id2 , this ) ; waitForResponse ( ) ; boolean found = false ;
ensuring id2 follows id1
<nb> public abstract class AbstractMemoryHttpData extends AbstractHttpData { @ override public void delete ( ) { - SINGLE + if ( byteBuf != null ) { + byteBuf . release ( ) ; + byteBuf = null ; + } } @ override
Fix buffer leak in AbstractMemoryHttpData
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class DefaultXmlExtension extends XmlExtension { final XmlAttributeValue value = xmlAttribute . getValueElement ( ) ; assert value != null ; final int startOffset = value . getTextOffset ( ) ; - editor . getCaretModel ( ) . moveToOffset ( startOffset ) ; + editor . getCaretModel ( ) . moveToOffset ( startOffset ) ; + editor . getScrollingModel ( ) . scrollToCaret ( ScrollType . RELATIVE ) ; } } if ( runAfter != null ) {
create namespace declaration quickfix does not scroll editor
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; COMMENT <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - public class MockFilterChain extends TestCase implements FilterChain { + public class MockFilterChain implements FilterChain { SINGLE private boolean expectToProceed ; <nb> public class MockFilterChain extends TestCase implements FilterChain { this . expectToProceed = expectToProceed ; } - private MockFilterChain ( ) { - super ( ) ; - } - SINGLE public void doFilter ( ServletRequest request , ServletResponse response ) - throws IOException , ServletException { + throws IOException , ServletException { if ( expectToProceed ) { - assertTrue ( true ) ; + TestCase . assertTrue ( true ) ; } else { - fail ( STRING0 ) ; + TestCase . fail ( STRING0 ) ; } } }
MockFilterChain extended TestCase but had no public constructor and no test methods
<nb> public class ProcessStats { } final public float getTotalCpuPercent ( ) { - return ( ( float ) ( mRelUserTime + mRelSystemTime + mRelIrqTime ) * NUMBER0 ) - / ( mRelUserTime + mRelSystemTime + mRelIrqTime + mRelIdleTime ) ; + int denom = mRelUserTime + mRelSystemTime + mRelIrqTime + mRelIdleTime ; + if ( denom <= NUMBER1 ) { + return NUMBER1 ; + } + return ( ( float ) ( mRelUserTime + mRelSystemTime + mRelIrqTime ) * NUMBER0 ) / denom ; } final void buildWorkingProcs ( ) { <nb> public class ProcessStats { long sampleTime = mCurrentSampleTime - mLastSampleTime ; long sampleRealTime = mCurrentSampleRealTime - mLastSampleRealTime ; - long percAwake = ( sampleTime * NUMBER0 ) / sampleRealTime ; + long percAwake = sampleRealTime > NUMBER1 ? ( ( sampleTime * NUMBER0 ) / sampleRealTime ) : NUMBER1 ; if ( percAwake != NUMBER0 ) { pw . print ( STRING0 ) ; pw . print ( percAwake ) ;
Fix some divide by zero errors that could crash the system
<nb> public class JetStandardClasses { parameters . add ( typeParameterDescriptor ) ; PropertyDescriptor propertyDescriptor = new PropertyDescriptor ( classDescriptor , Collections . < AnnotationDescriptor > emptyList ( ) , Modality . FINAL , Visibility . PUBLIC , false , false , STRING0 + ( j + NUMBER0 ) ) ; propertyDescriptor . setType ( typeParameterDescriptor . getDefaultType ( ) , Collections . < TypeParameterDescriptor > emptyList ( ) , classDescriptor . getImplicitReceiver ( ) , ReceiverDescriptor . NO_RECEIVER ) ; - propertyDescriptor . initialize ( new PropertyGetterDescriptor ( propertyDescriptor , Collections . < AnnotationDescriptor > emptyList ( ) , Modality . FINAL , Visibility . PUBLIC , false , true ) , null ) ; + PropertyGetterDescriptor getterDescriptor = new PropertyGetterDescriptor ( propertyDescriptor , Collections . < AnnotationDescriptor > emptyList ( ) , Modality . FINAL , Visibility . PUBLIC , false , true ) ; + getterDescriptor . initialize ( typeParameterDescriptor . getDefaultType ( ) ) ; + propertyDescriptor . initialize ( getterDescriptor , null ) ; writableScope . addPropertyDescriptor ( propertyDescriptor ) ; } writableScope . changeLockLevel ( WritableScope . LockLevel . READING ) ;
specify return type of Tuple property getters
<nb> public abstract class RequestBuilderBase < T extends RequestBuilderBase < T > > { try { uri = URI . create ( url ) . toURL ( ) . toString ( ) ; } catch ( Throwable e ) { - throw new IllegalStateException ( STRING0 + url , e ) ; + throw new IllegalArgumentException ( STRING0 + url , e ) ; } if ( queryParams != null ) {
Throw an IllegalArgumentException instead to match the URI class
<nb> public class CommentDetailFragment extends Fragment implements NotificationFragm ReaderAnim . animateLikeButton ( mBtnLikeIcon , mBtnLikeComment . isActivated ( ) ) ; + SINGLE + AnalyticsTracker . track ( mBtnLikeComment . isActivated ( ) ? Stat . NOTIFICATION_LIKED : Stat . NOTIFICATION_UNLIKED ) ; + boolean commentWasUnapproved = false ; if ( mNotificationsDetailListFragment != null && mComment != null ) { SINGLE
Bump analytics for comments
<nb> public class Application implements SystemListener { } } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public void setTimer ( Timer timer ) { + this . timer = timer ; + + if ( timer != null ) { + timer . reset ( ) ; + } + + if ( renderManager != null ) { + renderManager . setTimer ( timer ) ; + } + } + private void initDisplay ( ) { SINGLE SINGLE settings = context . getSettings ( ) ; - timer = context . getTimer ( ) ; + + SINGLE + if ( timer == null ) { + timer = context . getTimer ( ) ; + } renderer = context . getRenderer ( ) ; }
Added a setTimer method for switching the default
<nb> public class ColumnFamilyStore implements ColumnFamilyStoreMBean public void run ( ) { SpeculativeRetry retryPolicy = ColumnFamilyStore . this . metadata . getSpeculativeRetry ( ) ; - logger . debug ( STRING0 , retryPolicy . value ) ; + logger . debug ( STRING1 , name , retryPolicy . value ) ; switch ( retryPolicy . type ) { case PERCENTILE :
add CF name to log message
<nb> public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe } COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT private void addContentDispositionHeader ( ServletServerHttpRequest request , ServletServerHttpResponse response ) { <nb> public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe return ; } + try { + int status = response . getServletResponse ( ) . getStatus ( ) ; + if ( status < NUMBER0 || status > NUMBER1 ) { + return ; + } + } + catch ( Throwable ex ) { + SINGLE + } + HttpServletRequest servletRequest = request . getServletRequest ( ) ; String requestUri = RAW_URL_PATH_HELPER . getOriginatingRequestUri ( servletRequest ) ;
Skip Content Disposition header if status
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class NNParser System . out . println ( CONST . SEPARATOR ) ; System . out . println ( STRING0 + modelFile ) ; String s ; - BufferedReader input = new BufferedReader ( new FileReader ( modelFile ) ) ; - + BufferedReader input = IOUtils . getBufferedReaderFromClasspathOrFileSystem ( modelFile ) ; + int nDict , nPOS , nLabel ; int eSize , hSize , nTokens , nPreComputed ; nDict = nPOS = nLabel = eSize = hSize = nTokens = nPreComputed = NUMBER0 ;
Use IOUtils to load model file
<nb> public class Metadata { } COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - @ deprecated - public static class Headers extends Metadata { - COMMENT - COMMENT - COMMENT - COMMENT - public Headers ( ) { - } - } - - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - @ deprecated - public static class Trailers extends Metadata { - COMMENT - COMMENT - COMMENT - COMMENT - public Trailers ( ) { - } - } - - COMMENT COMMENT COMMENT public interface BinaryMarshaller < T > {
Remove Metadata Headers and Metadata Trailers
<nb> class DockObserver extends UEventObserver { try { int newState = Integer . parseInt ( event . get ( STRING0 ) ) ; if ( newState != mDockState ) { + int oldState = mDockState ; mDockState = newState ; if ( mSystemReady ) { + SINGLE + SINGLE + SINGLE + if ( oldState != Intent . EXTRA_DOCK_STATE_DESK || + newState != Intent . EXTRA_DOCK_STATE_UNDOCKED ) { + mPowerManager . userActivityWithForce ( SystemClock . uptimeMillis ( ) , + false , true ) ; + } update ( ) ; } } <nb> class DockObserver extends UEventObserver { return ; } SINGLE - mPowerManager . userActivityWithForce ( SystemClock . uptimeMillis ( ) , false , true ) ; Intent intent = new Intent ( Intent . ACTION_DOCK_EVENT ) ; intent . putExtra ( Intent . EXTRA_DOCK_STATE , mDockState ) ;
Do not force screen on when undocking from the desk dock
<nb> public class Transformer implements ClassFileTransformer final MethodNode continued = new MethodNode ( Opcodes . ACC_PRIVATE | ACC_STATIC , original . name , original . desc , original . signature , ( String [ ] ) original . exceptions . toArray ( new String [ original . exceptions . size ( ) ] ) ) ; - String continuedName = original . name + STRING0 ; + String continuedName = STRING1 + original . name ; Integer countUses = nameUseCount . get ( continuedName ) ; nameUseCount . put ( continuedName , countUses == null ? NUMBER0 : countUses + NUMBER0 ) ;
prefixing the async continuation method with async
<nb> public class FormatProcessor { BlockAlignmentProcessor . Context context = new BlockAlignmentProcessor . Context ( myDocument , alignment , myCurrentBlock , myAlignmentMappings , myBackwardShiftedAlignedBlocks , - getIndentOptionsToUse ( myCurrentBlock , myDefaultIndentOption ) , myRightMargin + getIndentOptionsToUse ( myCurrentBlock , myDefaultIndentOption ) , CodeStyleSettings . MAX_RIGHT_MARGIN ) ; BlockAlignmentProcessor . Result result = alignmentProcessor . applyAlignment ( context ) ; final LeafBlockWrapper offsetResponsibleBlock = alignment . getOffsetRespBlockBefore ( myCurrentBlock ) ;
Increase a possible right margin when aligning to CodeStyleSettings MAX_RIGHT_MARGIN
<nb> public final class SqlStageExecution } schedulingComplete . set ( DateTime . now ( ) ) ; - stageState . set ( StageState . SCHEDULED ) ; + stageState . compareAndSet ( StageState . SCHEDULING , StageState . SCHEDULED ) ; SINGLE updateNewExchangesAndBuffers ( true ) ;
Fix task leak due to race condition
<nb> public class StatisticsModelImpl implements StatisticsModel { public boolean isRunning ( StatisticsUI statisticsUI ) { for ( Statistics s : runningList . toArray ( new Statistics [ NUMBER0 ] ) ) { - if ( statisticsUI . getStatisticsClass ( ) . equals ( s ) ) { + if ( statisticsUI . getStatisticsClass ( ) . equals ( s . getClass ( ) ) ) { return true ; } }
Fix StatisticsModel implementation with running list
<nb> public class InspectionProfileImpl implements InspectionProfile . ModifiableModel , private void copyToolsConfigurations ( InspectionProfileImpl profile ) { try { if ( ! profile . myTools . isEmpty ( ) ) { - final Project project = DummyProject . getInstance ( ) ; SINGLE + final InspectionTool tool = profile . myTools . values ( ) . iterator ( ) . next ( ) ; + final Project project = tool . getManager ( ) . getProject ( ) ; final InspectionTool [ ] inspectionTools = getInspectionTools ( project ) ; for ( int i = NUMBER0 ; i < inspectionTools . length ; i ++ ) { readAndWriteToolsConfigs ( inspectionTools [ i ] , profile ) ;
get right project
<nb> import NAMESPACE ; import NAMESPACE ; public final class SiteSettingsTable { - public static final String SETTINGS_TABLE_NAME = STRING0 ; + public static final String SETTINGS_TABLE_NAME = STRING1 ; public static final String ID_COLUMN_NAME = STRING2 ; public static final String ADDRESS_COLUMN_NAME = STRING3 ; <nb> public final class SiteSettingsTable { TITLE_COLUMN_NAME + STRING4 + TAGLINE_COLUMN_NAME + STRING4 + LANGUAGE_COLUMN_NAME + STRING5 + - PRIVACY_COLUMN_NAME + STRING6 + + PRIVACY_COLUMN_NAME + STRING5 + LOCATION_COLUMN_NAME + STRING7 + STRING8 ;
Fixing SQL syntax
<nb> public class AsyncHttpResponseHandler { } } - public Boolean getForceSynchronous ( ) { - return ( forceSynchronous ) ; - } - public void setForceSynchronous ( Boolean value ) { forceSynchronous = value ; } <nb> public class AsyncHttpResponseHandler { onFailure ( statusCode , headers , responseBody , error ) ; } - protected void handleProgressMessage ( int current , int total ) { - onProgress ( current , total ) ; - } - - protected void handleRetryMessage ( ) { - onRetry ( ) ; - } - SINGLE protected void handleMessage ( Message msg ) { Object [ ] response ; <nb> public class AsyncHttpResponseHandler { onProgress ( ( Integer ) response [ NUMBER0 ] , ( Integer ) response [ NUMBER1 ] ) ; break ; case RETRY_MESSAGE : - handleRetryMessage ( ) ; + onRetry ( ) ; break ; } }
removed redundant methods
<nb> public class ShowInfoFragment extends SherlockFragment implements LoaderCallback SINGLE final ImageView poster = ( ImageView ) getView ( ) . findViewById ( R . id . ImageViewShowInfoPoster ) ; ImageProvider . getInstance ( getActivity ( ) ) . loadImage ( poster , mShow . getPoster ( ) , false ) ; - Utils . setPosterBackground ( ( ImageView ) getView ( ) . findViewById ( R . id . background ) , - mShow . getPoster ( ) , getActivity ( ) ) ; + SINGLE + SINGLE SINGLE onLoadTraktRatings ( true ) ;
For now don t set a background in show info
<nb> public class PyPackageManagementService extends PackageManagementService { final String cause = stdoutCause != null ? stdoutCause : stderrCause ; final String message = cause != null ? cause : ee . getMessage ( ) ; final String command = ee . getCommand ( ) + STRING0 + StringUtil . join ( ee . getArgs ( ) , STRING0 ) ; - return new ErrorDescription ( message , command , ee . getStdout ( ) , findErrorSolution ( ee , cause , sdk ) ) ; + return new ErrorDescription ( message , command , ee . getStdout ( ) + STRING1 + ee . getStderr ( ) , findErrorSolution ( ee , cause , sdk ) ) ; } else { return ErrorDescription . fromMessage ( e . getMessage ( ) ) ;
Put stderr after stdout in the packaging error message text
<nb> public class RequestSpecBuilder { } COMMENT - COMMENT + COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT - public RequestSpecBuilder setKeyStore ( KeyStore trustStore ) { - spec . keyStore ( trustStore ) ; + public RequestSpecBuilder setKeyStore ( KeyStore keyStore ) { + spec . keyStore ( keyStore ) ; return this ; }
Fixed typos in javadoc
<nb> package NAMESPACE ; + import static NAMESPACE ; + import static NAMESPACE ; + + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; - import static NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; COMMENT <nb> public class LdapProviderBeanDefinitionParserTests { STRING0 ) ; } + @ test + public void inetOrgContextMapperIsSupported ( ) throws Exception { + setContext ( + STRING1 + + STRING2 ) ; + LdapAuthenticationProvider provider = getProvider ( ) ; + assertTrue ( FieldUtils . getFieldValue ( provider , STRING3 ) instanceof InetOrgPersonContextMapper ) ; + } + private void setContext ( String context ) { appCtx = new InMemoryXmlApplicationContext ( context ) ; }
Allow mapping to a standard Ldap UserDetails through the namespace
<nb> public class WatchRunner implements WatchOperationListener { cliOutputStream . close ( ) ; } catch ( Exception e ) { - logger . log ( Level . WARNING , STRING0 + e ) ; - e . printStackTrace ( ) ; + logger . log ( Level . WARNING , STRING0 + e , e ) ; eventBus . post ( new BadRequestResponse ( cliRequest . getId ( ) , e . getMessage ( ) ) ) ; } } <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT COMMENT public class TestDaemonUtil { private static final String DAEMON_RESOURCE_PATTERN = STRING1 ;
Formatting new lines
<nb> public class SpanishTreebankParserParams extends TregexPoweredTreebankParserPara annotations . put ( STRING0 , new Pair ( STRING1 , new MarkConjTypeFunction ( ) ) ) ; SINGLE - annotations . put ( STRING2 , new Pair ( STRING3 , + annotations . put ( STRING2 , new Pair ( STRING4 , new SimpleStringFunction ( STRING5 ) ) ) ; SINGLE
Try markPronounNPs on both SN and grup nom
<nb> package NAMESPACE ; import NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT COMMENT COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public interface Cache { String getId ( ) ; COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - int getSize ( ) ; - - COMMENT COMMENT COMMENT COMMENT <nb> public interface Cache { COMMENT void clear ( ) ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + int getSize ( ) ; + COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT - COMMENT COMMENT ReadWriteLock getReadWriteLock ( ) ;
Do not deprecate getReadWriteLock just add to the docs that it is not
<nb> public class FunctionType { Map < String , JSType > typeMap = concreteTypes ; if ( typeParameters != null ) { ImmutableMap . Builder < String , JSType > builder = ImmutableMap . builder ( ) ; - for ( String typeParam : concreteTypes . keySet ( ) ) { - if ( ! typeParameters . contains ( typeParam ) ) { - builder . put ( typeParam , concreteTypes . get ( typeParam ) ) ; + for ( Map . Entry < String , JSType > concreteTypeEntry : concreteTypes . entrySet ( ) ) { + if ( ! typeParameters . contains ( concreteTypeEntry . getKey ( ) ) ) { + builder . put ( concreteTypeEntry . getKey ( ) , concreteTypeEntry . getValue ( ) ) ; } } typeMap = builder . build ( ) ;
Convert final entryset capable loop
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT public class BasicDRPCTopology { public static class ExclaimBolt extends BaseBasicBolt { <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT public class ReachTopology { public static Map < String , List < String > > TWEETERS_DB = new HashMap < String , List < String > > ( ) { { <nb> import NAMESPACE ; COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT public class TransactionalGlobalCount { public static final int PARTITION_TAKE_PER_BATCH = NUMBER0 ; <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT + COMMENT + COMMENT COMMENT public interface Tuple extends ITuple {
Fix links to documentation in Javadoc
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + package NAMESPACE ; import NAMESPACE ; <nb> COMMENT COMMENT COMMENT + package NAMESPACE ; import NAMESPACE ; <nb> COMMENT COMMENT COMMENT + package NAMESPACE ; import NAMESPACE ;
Added missing license header
<nb> public class ShadowView { public void clearAnimation ( ) { if ( animation != null ) { animation . cancel ( ) ; + animation = null ; } }
set animation to null when clear animation
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; @ suite.suiteclasses ( { PathNodeTest . class , MvcBaseTest . class , BufferRingTest . class , - UploadingUnitTest . class } ) + UploadingUnitTest . class , + JsonAdaptorTest . class } ) public class AllMvc { }
Attach the JsonAdaptorTest to AllMvc
<nb> public class DelaunayTriangulatorTest extends GdxTest { } void triangulate ( ) { - seed = NUMBER0 ; + SINGLE MathUtils . random . setSeed ( seed ) ; int pointCount = NUMBER1 ;
Removed test seed
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class JpsCompilerConfigurationTest extends JpsSerializationTestCase { ProcessorConfigProfile defaultProfile = configuration . getDefaultAnnotationProcessingConfiguration ( ) ; assertTrue ( defaultProfile . isEnabled ( ) ) ; assertFalse ( defaultProfile . isObtainProcessorsFromClasspath ( ) ) ; - assertEquals ( JpsPathUtil . urlToPath ( getUrl ( STRING0 ) ) , defaultProfile . getProcessorPath ( ) ) ; + assertEquals ( FileUtil . toSystemDependentName ( JpsPathUtil . urlToPath ( getUrl ( STRING0 ) ) ) , defaultProfile . getProcessorPath ( ) ) ; assertEquals ( STRING1 , defaultProfile . getProcessorOptions ( ) . get ( STRING2 ) ) ; assertEquals ( STRING3 , defaultProfile . getProcessorOptions ( ) . get ( STRING4 ) ) ; assertEquals ( STRING5 , defaultProfile . getGeneratedSourcesDirectoryName ( ) ) ;
fixed tests on Windows
<nb> public class HeliosSoloDeployment implements HeliosDeployment { @ visiblefortesting protected void undeployLeftoverJobs ( ) { try { - SINGLE + SINGLE + SINGLE SINGLE final Map < JobId , Job > jobs = heliosClient . jobs ( ) . get ( ) ; if ( jobs . size ( ) > NUMBER0 ) { - log . info ( STRING0 + + log . info ( STRING1 + STRING2 , jobs . keySet ( ) ) ; } <nb> public class HeliosSoloDeployment implements HeliosDeployment { } } } catch ( Exception e ) { - log . warn ( STRING3 , e ) ; + log . warn ( STRING4 , e ) ; } }
Remove mentions of TempJobs in logging
<nb> public class FakeHttpRawMessageGenerator { final Message msg = new Message ( shortMessage ( ingestTime , state . method , state . resource , httpCode , tookMs ) , state . source , Tools . iso8601 ( ) ) ; msg . addFields ( ingestTimeFields ( ingestTime ) ) ; msg . addFields ( resourceFields ( resource ) ) ; + msg . addField ( STRING0 , System . nanoTime ( ) ) ; msg . addField ( STRING1 , state . method . name ( ) ) ; msg . addField ( STRING2 , httpCode ) ; msg . addField ( STRING3 , state . userId ) ;
Add ticks for event deduplication in FakeHttpRawMessageGenerator
<nb> public class Groovy extends Task { append ) ) ) ; } - SINGLE - if ( command == null ) { + SINGLE + SINGLE + if ( command == null || command . trim ( ) . length ( ) == NUMBER0 ) { command = getText ( new BufferedReader ( new FileReader ( srcFile ) ) ) ; } + + if ( command != null ) { execGroovy ( command , out ) ; } else {
added src attribute to specify a groovy source file to the groovy ant task
<nb> public class HtmlConverter { SINGLE text = text . replaceAll ( STRING0 , STRING1 ) ; - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - text = text . replaceAll ( STRING2 , STRING3 ) ; - - SINGLE - text = text . replaceAll ( STRING4 , STRING5 ) ; - StringBuffer sb = new StringBuffer ( text . length ( ) + TEXT_TO_HTML_EXTRA_BUFFER_LENGTH ) ; sb . append ( htmlifyMessageHeader ( ) ) ;
Eliminate non working text replacements
<nb> public class DbCreationTest extends ObjectDBBaseTest { @ afterclass @ override public void afterClass ( ) throws Exception { + pool . close ( ) ; } @ beforemethod <nb> public class DbCreationTest extends ObjectDBBaseTest { ODatabaseHelper . createDatabase ( db , url , getStorageType ( ) ) ; + if ( pool != null ) { + pool . close ( ) ; + } pool = new OPartitionedDatabasePool ( url , STRING0 , STRING0 ) ; SINGLE <nb> public class DbCreationTest extends ObjectDBBaseTest { ODatabaseHelper . createDatabase ( db , url , getStorageType ( ) ) ; db . close ( ) ; } - + if ( pool != null ) { + pool . close ( ) ; + } pool = new OPartitionedDatabasePool ( url , STRING0 , STRING0 ) ; for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) {
fixed missig pool close from db creation tests
<nb> public class PyTestCreator implements TestCreator { fileText . append ( STRING0 ) ; for ( String method : methods ) { - fileText . append ( STRING1 ) . append ( method ) . append ( STRING2 ) ; + fileText . append ( STRING1 ) . append ( method ) . append ( STRING3 ) ; } PsiFile psiFile = PyUtil . getOrCreateFile (
test creator should use tabs instead of all spaces
<nb> public class ToggleDrawable extends Drawable { mSize = typedArray . getDimensionPixelSize ( R . styleable . ToggleDrawable_td_drawableSize , NUMBER0 ) ; mStrokeWidth = typedArray . getDimension ( R . styleable . ToggleDrawable_td_stroke , NUMBER0 ) ; mSpin = typedArray . getBoolean ( R . styleable . ToggleDrawable_td_spin , true ) ; + typedArray . recycle ( ) ; mPaint . setStyle ( Paint . Style . STROKE ) ; mPaint . setStrokeJoin ( Paint . Join . MITER ) ;
Recycle TypedArray after use
<nb> public final class Bootstrap { SINGLE try { - URL url = new URL ( repository ) ; + new URL ( repository ) ; repositoryLocations . add ( repository ) ; repositoryTypes . add ( ClassLoaderFactory . IS_URL ) ; continue ;
Trivial fix an Eclipse warning
<nb> public class AtmosphereFramework implements ServletContextProvider { } for ( String i : broadcasterFilters ) { - if ( i . getClass ( ) . equals ( TrackMessageSizeFilter . class . getName ( ) ) ) { + if ( i . equals ( TrackMessageSizeFilter . class . getName ( ) ) ) { found = true ; } }
Fix logging typo
<nb> public class ReflectionUtils { Type [ ] gpTypes = methodToFind . getGenericParameterTypes ( ) ; methodLoop: for ( Method method : cls . getMethods ( ) ) { - if ( ! method . getName ( ) . equals ( methodToSearch ) || ! method . getReturnType ( ) . isAssignableFrom ( methodToFind . getReturnType ( ) ) ) { + if ( + ! method . getName ( ) . equals ( methodToSearch ) || + ! method . getReturnType ( ) . isAssignableFrom ( methodToFind . getReturnType ( ) ) || + method . getParameterTypes ( ) . length != pTypes . length + ) { continue ; } Class < ? > [ ] pt = method . getParameterTypes ( ) ;
Fix IndexOutOfBoundsException in ReflectionUtils
<nb> public class HlsChunkSource { if ( chunkUri . getLastPathSegment ( ) . endsWith ( AAC_FILE_EXTENSION ) ) { Extractor extractor = new AdtsExtractor ( startTimeUs ) ; extractorWrapper = new HlsExtractorWrapper ( trigger , format , startTimeUs , extractor , - switchingVariantSpliced , adaptiveMaxWidth , adaptiveMaxHeight ) ; + switchingVariantSpliced , MediaFormat . NO_VALUE , MediaFormat . NO_VALUE ) ; } else if ( chunkUri . getLastPathSegment ( ) . endsWith ( MP3_FILE_EXTENSION ) ) { Extractor extractor = new Mp3Extractor ( startTimeUs ) ; extractorWrapper = new HlsExtractorWrapper ( trigger , format , startTimeUs , extractor , - switchingVariantSpliced , adaptiveMaxWidth , adaptiveMaxHeight ) ; + switchingVariantSpliced , MediaFormat . NO_VALUE , MediaFormat . NO_VALUE ) ; } else if ( previousTsChunk == null || previousTsChunk . discontinuitySequenceNumber != segment . discontinuitySequenceNumber || ! format . equals ( previousTsChunk . format ) ) {
Don t pass maxWidth Height for non video streams
<nb> public class XContentFactory { public static XContent xContent ( byte [ ] data , int offset , int length ) { XContentType type = xContentType ( data , offset , length ) ; if ( type == null ) { - throw new ElasticSearchParseException ( STRING0 + Arrays . toString ( data ) ) ; + throw new ElasticSearchParseException ( STRING1 + offset + STRING2 + length + STRING3 + Arrays . toString ( data ) ) ; } return xContent ( type ) ; }
add more info on failure to derive xcontent