diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; COMMENT COMMENT <nb> public class JvmMetricPoller implements MetricPoller { private void addThreadMetrics ( long timestamp , MetricList metrics ) { ThreadMXBean bean = ManagementFactory . getThreadM...
Remove unneccessary import and commentted code
<nb> public class ValueArray extends Iced implements Cloneable { _min = NUMBER0 ; _max = NUMBER1 ; _mean = NUMBER2 ; _n = len ; _scale = NUMBER3 ; _size = NUMBER3 ; } public final boolean isFloat ( ) { return _size < NUMBER0 || _scale != NUMBER3 ; } + public final boolean isEnum ( ) { return _domain != null ; }...
added isEnum test for convenience to Column
<nb> import NAMESPACE ; import NAMESPACE ; public class RecyclerViewTouchActionGuardManager { - private static final String TAG = STRING0 ; + private static final String TAG = STRING1 ; private static final boolean LOCAL_LOGV = false ; private static final boolean LOCAL_LOGD = false ;
Fix the TAG string of RecyclerViewTouchActionGuardManager
<nb> public class FileTypeRegistry register ( STRING0 , SWEAVE , icons . iconText ( ) ) ; register ( STRING1 , TEX , icons . iconTex ( ) ) ; register ( STRING2 , TEX , icons . iconTex ( ) ) ; + register ( STRING3 , TEX , icons . iconTex ( ) ) ; + register ( STRING4 , TEX , icons . iconTex ( ) ) ; + register...
add sty cls and bib to file extensions
<nb> public class BeanWithRecipientListTest extends AbstractJUnit38SpringContextTests template . sendBody ( STRING0 , body ) ; MockEndpoint . assertIsSatisfied ( a , b ) ; - - System . out . println ( a . getReceivedExchanges ( ) ) ; } - }
Remove println call
<nb> public class Sketch { String msg = STRING0 + STRING1 + - STRING2 ; + STRING3 ; System . out . println ( msg ) ; } return newName ;
remove extra newline at end of sketch rename message
<nb> public class JSR356Endpoint extends Endpoint { session . addMessageHandler ( new MessageHandler . Whole < ByteBuffer > ( ) { @ override public void onMessage ( ByteBuffer bb ) { - byte [ ] b = new byte [ bb . limit ( ) ] ; + byte [ ] b = bb . hasArray ( ) ? bb . array ( ) : new byte [ bb . limit ( ) ] ; ...
If there is an array available use it
<nb> public final class UpdateChecker { InputStream in = null ; OutputStream out = null ; - String patchFileName = STRING0 + productCode ; + String platform = System . getProperty ( STRING1 , STRING2 ) ; + String patchFileName = STRING0 + platform ; File patchFile = new File ( FileUtil . getTempDirectory ...
saving temp patch file with correct name
<nb> public class AtmosphereProviders { if ( req . getAttribute ( ApplicationConfig . SUPPORT_TRACKABLE ) != null ) { AtmosphereResource < ? , ? > r = ( AtmosphereResource < ? , ? > ) req . getAttribute ( ATMOSPHERE_RESOURCE ) ; - if ( trackableResource == null && r != null && r . getAtmosphereResourceEvent ( )...
Remove the suspend requirement when creating tracking resource on the fly
<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements catch ( StateStorage . StateStorageException e ) { throw e ; } + catch ( ProcessCanceledException e ) { + throw e ; + } catch ( Throwable ex ) { handleInitComponentError ( ex , false , component . getClass ( ) . getNam...
Do not log process canceled exception
<nb> public class ChunkedInputFilter implements InputFilter { COMMENT @ override public long end ( ) throws IOException { - checkError ( ) ; - SINGLE while ( doRead ( readChunk , null ) >= NUMBER0 ) { SINGLE
Remove unnecessary call since doRead calls checkError
<nb> public class RoundedImageView extends ImageView { updateBackgroundDrawableAttrs ( true ) ; if ( mMutateBackground ) { - SINGLE - SINGLE - SINGLE - SINGLE - - if ( BuildConfig . VERSION_CODE >= Build . VERSION_CODES . JELLY_BEAN ) - super . setBackground ( mBackgroundDrawable ) ; - else - su...
correcting some PR comments
<nb> class DebugProcessor { try { ctx . statement ( ) . close ( ) ; SINGLE - String sql = new Executor ( ctx . getDialect ( ) ) . selectZero ( ) . where ( STRING0 ) . getSQL ( ) ; + String sql = new Executor ( ctx . configuration ( ) . getDialect ( ) ) . selectZero ( ) . where ( STRING0 ) . getSQL ( ) ; ctx...
Fixed some compilation errors
<nb> package NAMESPACE ; public interface DatabaseProperties { - int MAX_TEXT_SIZE = NUMBER0 ; - String PROP_URL = STRING0 ; String PROP_DRIVER = STRING1 ; String PROP_USER = STRING2 ; - COMMENT - COMMENT - COMMENT - @ deprecated - String PROP_USER_DEPRECATED = STRING3 ; String PROP_USER_D...
Remove deprecated props from DatabaseProperties
<nb> public class RepositorySelectionPanel extends WizardPanelComposite { private Button testButton ; private Label testResultLabel ; private Composite composite_1 ; + private Button btnCheckButton ; COMMENT COMMENT <nb> public class RepositorySelectionPanel extends WizardPanelComposite { composite_1 ...
add create if required button
<nb> public class DefaultResultSetHandler implements ResultSetHandler { } } } + autoMappingsCache . put ( mapKey , autoMapping ) ; } - autoMappingsCache . put ( mapKey , autoMapping ) ; return autoMapping ; }
Fix automapping cache update position
<nb> public class RedisIdempotentRepository extends ServiceSupport implements Idempot public boolean remove ( String key ) { return setOperations . remove ( processorName , key ) != null ; } + + @ managedoperation ( description = STRING0 ) + public void clear ( ) { + setOperations . remove ( processorName...
IdempotentRepository Add clear operation align RedisIdempotentRepository
<nb> public class NonDelegatingClassLoader extends URLClassLoader { try { synchronized ( getClassLoadingLock ( name ) ) { - Class c = findLoadedClass ( name ) ; + Class < ? > c = findLoadedClass ( name ) ; if ( c != null ) { return c ; } <nb> public class NonDelegatingClassLoaderRunner { NonDelegati...
Fix unchecked rawtypes
<nb> public class TokenException extends SyntaxException { getColumn ( token ) ) ; } + public int getEndColumn ( ) { + int length = NUMBER0 ; + if ( token != null ) { + length = token . getText ( ) . length ( ) ; + } + return getStartColumn ( ) + length ; + } + SINGLE SINGLE private static i...
added better end column info
<nb> public abstract class XmlFormatterTestCase extends FormatterTestCase { public void testDontKeepLineBreaksInText ( ) throws Throwable { final CodeStyleSettings settings = getSettings ( ) ; final XmlCodeStyleSettings xmlSettings = settings . getCustomSettings ( XmlCodeStyleSettings . class ) ; - settings . R...
Remove usages of deprecated CodeStyleSettings RIGHT_MARGIN field
<nb> public abstract class TWLanedLayoutManager extends TWLayoutManager { if ( canUseLanes ( mLanesToRestore ) ) { mLanes = mLanesToRestore ; mItemEntries = mItemEntriesToRestore ; - } - - if ( pendingPosition != RecyclerView . NO_POSITION && - pendingPosition != getFirstVisiblePosition ( ) ) { + } else...
library Only move layout when not trying restore lanes
<nb> public class CachingSoftWrapDataMapper implements SoftWrapDataMapper , SoftWrapAw int offsetsDiff = ( myAfterChangeState . endOffset - myAfterChangeState . startOffset ) - ( myBeforeChangeState . endOffset - myBeforeChangeState . startOffset ) ; - int cacheIndex = myAfterChangeState . endCacheEntryIndex + ...
Improve soft wraps performance
<nb> public class HttpRequestAbortTest extends AbstractHttpClientServerTest Assert . assertSame ( failure , x . getCause ( ) ) ; SINGLE HttpDestinationOverHTTP destination = ( HttpDestinationOverHTTP ) client . getDestination ( scheme , STRING0 , connector . getLocalPort ( ) ) ; - ConnectionPool connectionPool ...
Fixed compilation issue
<nb> public class ReadOnlyGraph implements Graph { } public Vertex getVertex ( final Object id ) { - return new ReadOnlyVertex ( this . graph . getVertex ( id ) ) ; + final Vertex vertex = this . graph . getVertex ( id ) ; + if ( null == vertex ) + return null ; + else + return new ReadOnlyVertex ( ve...
fixed getEdge and getVertex for ReadOnlyGraph where null should be handled appropriately
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class JmsRequestReplyTempQueueMultipleConsumersTest extends CamelTestSupp } private void doSendMessages ( int files , int poolSize ) throws Except...
improved the test which fails randomly on the CI server
<nb> public enum Opcode return opcodesByName . get ( opcodeName . toLowerCase ( ) . hashCode ( ) ) ; } - public static Opcode getOpcodeByValue ( short opcodeValue ) { + public static Opcode getOpcodeByValue ( int opcodeValue ) { return opcodesByValue [ opcodeValue ] ; }
Change Opcode getOpcodeByValue to accept an int
<nb> public class RootFilter implements Filter { @ override public HttpSession getSession ( boolean create ) { + if ( ! create ) { + return null ; + } throw notSupported ( ) ; }
Do not throw UnsupportedOperationException when httpRequest getSession false is called
<nb> public class CompletionProgressIndicator extends ProgressIndicatorBase implement final MessageBusConnection connection = project . getMessageBus ( ) . connect ( ) ; connection . subscribe ( EditorHintListener . TOPIC , listener ) ; assert text != null ; - HintManager . getInstance ( ) . showErrorHint ( edi...
escape xml characters in completion no results hint
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; name , simpleSettableFuture . get ( NUMBER0 , TimeUnit . MILLISECONDS ) , exceptionHandler ) ; - } catch ( Throwable t ) { ...
Fix cxxbridge usage of SettableFuture
<nb> public class GrailsClassUtils { COMMENT COMMENT public static Object getStaticFieldValue ( Class < ? > clazz , String name ) { - try { - Field f = clazz . getDeclaredField ( name ) ; - if ( f != null ) { - f . setAccessible ( true ) ; - return f . get ( null ) ; - } - } - catch ( Exception ig...
Simplify GrailsClassUtils getStaticFieldValue
<nb> public class GuidedStepActivity extends Activity { Log . v ( TAG , STRING0 ) ; super . onCreate ( savedInstanceState ) ; setContentView ( R . layout . guided_step_activity ) ; - GuidedStepFragment . addAsRoot ( this , new FirstStepFragment ( ) , R . id . lb_guidedstep_host ) ; + if ( savedInstanceState =...
Fix addAsRoot restoring bug
<nb> public class WXStreamModule extends WXModule { } else { resp . put ( STRING0 , readAsString ( response . originalData , - headers . get ( STRING1 ) + headers != null ? headers . get ( STRING1 ) : STRING2 ) ) ; } resp . put ( STATUS_TEXT , Status . getStatusText ( response . statusCode ) ) ;
android fix NPE in stream
<nb> public final class SettingsTools { if ( property != null ) { SINGLE + @ suppresswarnings ( STRING0 ) InputStream in = SettingsTools . class . getResourceAsStream ( property ) ; if ( in != null ) { settings = JAXB . unmarshal ( in , Settings . class ) ; <nb> public final class SettingsTools { } ...
Suppress new Eclipse compiler warning
<nb> public class KMeansDriver { COMMENT private static boolean isConverged ( String filePath , JobConf conf , FileSystem fs ) throws IOException { FileStatus [ ] parts = fs . listStatus ( new Path ( filePath ) ) ; - for ( FileStatus part : parts ) - if ( ! part . getPath ( ) . getName ( ) . endsWith ( STRING...
added test that names begin with part to isConverged valid file test
<nb> public class JavaPsiFacadeImpl extends JavaPsiFacadeEx { } public PsiPackage [ ] getSubPackages ( PsiPackage psiPackage , GlobalSearchScope scope ) { - List < PsiPackage > result = new ArrayList < PsiPackage > ( ) ; + LinkedHashSet < PsiPackage > result = new LinkedHashSet < PsiPackage > ( ) ; for ( Ps...
collect subpackages from different finders in one set
<nb> class WallpaperManagerService extends IWallpaperManager . Stub { ComponentName realName = name ; if ( realName == null ) { SINGLE - realName = new ComponentName ( STRING0 , - ImageWallpaper . class . getName ( ) ) ; + SINGLE + SINGLE + clearWallpaperComponentLocked ( ) ; + return ; } ServiceI...
Turn off static live wallpaper for now
<nb> public enum ReaderCardType { return PHOTO ; } - SINGLE - SINGLE - if ( post . isGallery ( ) ) { - ReaderImageScanner scanner = new ReaderImageScanner ( post . getText ( ) , post . isPrivate ) ; - if ( scanner . hasUsableImageCount ( ReaderThumbnailStrip . IMAGE_COUNT , ReaderConstants . MIN_GALLERY...
Don t require gallery format for gallery cards
<nb> public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi myDocument . clear ( ) ; myPsiFile = null ; myBaseLanguage = calcBaseLanguage ( file ) ; + + if ( myContent instanceof DocumentContent ) { + final Document newdocument = FileDocumentManager . getInstance ( ) . getCachedDoc...
strong ref document update fixed
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> class HardcodedContracts { notArgs [ NUMBER0 ] instanceof PsiMethodCallExpression && STRING0 . equals ( ( ( PsiMethodCallExpression ) notArgs [ NUMBER0 ] ) . getMethodExpression ( ) . getRefer...
use a utility method
<nb> public class ChatRoomTableDialog COMMENT private void setNickname ( ChatRoomProviderWrapper provider ) { + if ( provider == null ) + { + return ; + } + nicknameField . setText ( GuiActivator . getMUCService ( ) . getDefaultNickname ( provider . getProtocolProvider ( ) ) ) ;
Fix NPE when no account is configured yet and Add chat room is called
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; public class AppleBundleWithDsym extends NoopBui...
Make AppleBundleWithDsym implement NativeTestable
<nb> public class CppGenerator implements CodeGenerator indent + STRING0 + indent + STRING1 + indent + STRING2 + - indent + STRING3 , + indent + STRING4 , className , propertyName , cppTypeForNumInGroup ) ) ; + sb . append ( String . format ( + indent + STRING5 + + indent + STRING0 + + inden...
add version descriptor methods to group codecs
<nb> public abstract class IteratorUtil } return collection ; } - + COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public abstract class IteratorUtil } return result ; } + + COMMENT + COMMENT + COMMENT + ...
Fixed javadoc added count method for iterables as well
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT public class PositionCacheLogHandler extends LogHandler . Filter { private LogEntry . Start startEntry ;
Adds class comment for PositionCacheLogHandler
<nb> public abstract class Model < M extends Model < M , P , O > , P extends Model . Parameters < M Value v = DKV . get ( key ) ; if ( null == v ) throw new IllegalArgumentException ( description + STRING0 + key ) ; - if ( ! v . isFrame ( ) ) + if ( ! v . isFrame ( ) && ! v . isSubclassOf ( Frame . class ) ) ...
Change a condition checking that a key is referencing a frame
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class AbstractAjaxCallback < T , K > implements Runnable { } else { HttpEntity entity = response . getEntity ( ) ; - InputStream is = entity . getContent ( ) ; + SINGLE ...
Use default write stream method to avoid extra byte allocation
<nb> public class SearchCoreFactory { List < PoiType > additionals = pt . getPoiAdditionals ( ) ; if ( additionals != null ) { for ( PoiType a : additionals ) { - if ( ! a . isReference ( ) && ! results . contains ( a ) && ( nm . matches ( a . getKeyName ( ) ) || nm . matches ( a . getTranslation ( ) ) ) ) { ...
Fix poi additional search
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT public static < T > T [ ] toSorted ( T [ ] self ) { <nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport { COMMENT COMMENT COMMENT - CO...
remove javadoc warning
<nb> public class HgRegularUpdater implements HgUpdater { while ( result . getExitValue ( ) == NUMBER0 ) { SINGLE resolvePossibleConflicts ( updatedFiles ) ; if ( ! HgConflictResolver . findConflicts ( project , repoRoot ) . isEmpty ( ) ) { - return ; + break ; } result = rebaseCommand . continueRebase ( ...
refresh hg repository root after rebasing and update appropriate repository information
<nb> public class BpmnParse extends Parse { boolean isExecutable = Boolean . parseBoolean ( isExecutableStr ) ; if ( ! isExecutable ) { processProcess = false ; - LOGGER . info ( STRING0 + processElement . attribute ( STRING1 ) + STRING2 ) ; + LOGGER . info ( STRING0 + processElement . attribute ( STRING1 ) +...
Log an info message when no isExecutable attribute is set for a process element
<nb> public class Server { COMMENT COMMENT COMMENT - @ jsonignore + SINGLE public String getUrl ( ) { if ( this . url == null ) { if ( ( this . host == null ) || ( this . port == null ) ) {
Remove JsonIgnore from URL so JSON Java Java JSON produces the
<nb> import NAMESPACE ; public class OMMapManager { public static final int DEF_BLOCK_SIZE = NUMBER0 ; private static final int MAX_MEMORY = NUMBER1 ; + private static final int FORCE_DELAY = NUMBER2 ; + private static final int FORCE_RETRY = NUMBER3 ; private static int totalMemory ; <nb> public clas...
Refactored last retry management using constants
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ZenDiscovery extends AbstractLifecycleComponent < Discovery > implemen COMMENT COMMENT COMMENT - @ suppressforbidden ( ...
Remove leftover forbidden suppression in ZD
<nb> import NAMESPACE ; COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class MultipartConfigFactory { } COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class MultipartConfigFactory { } COMMENT - COMMENT + COMM...
Clarify MultipartConfigFactory javadoc
<nb> public class VcsUtil { return localPath ; } + public static String getCanonicalPath ( String path ) + { + String canonPath ; + try { canonPath = new File ( path ) . getCanonicalPath ( ) ; } + catch ( IOException e ) { canonPath = path ; } + return canonPath ; + } + + public static String ge...
add common utility method for all file based case sensitive vcs s
<nb> public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest { } @ test @ slow + @ awaitsfix ( bugUrl = STRING0 ) public void multipleNodesShutdownNonMasterNodes ( ) throws Exception { Settings settings = settingsBuilder ( ) . put ( STRING1 , STRING2 )
add await fix to multipleNodesShutdownNonMasterNodes
<nb> abstract class Mover { SINGLE caretModel . moveToOffset ( NUMBER0 ) ; - document . insertString ( range1 . getStartOffset ( ) , textToInsert2 ) ; - document . deleteString ( range1 . getStartOffset ( ) + textToInsert2 . length ( ) , range1 . getEndOffset ( ) ) ; - - document . insertString ( range2 ....
replace delete insert with replace
<nb> public class OldIndexBackwardsCompatibilityTests extends StaticIndexBackwardComp } void assertNewReplicasWork ( ) throws Exception { - final int numReplicas = randomIntBetween ( NUMBER0 , NUMBER1 ) ; + final int numReplicas = randomIntBetween ( NUMBER2 , NUMBER0 ) ; logger . debug ( STRING0 , numReplic...
Make OldIndexBackwardsCompatibilityTests copy to fewer replicas
<nb> package NAMESPACE ; import static NAMESPACE ; - import static NAMESPACE ; import static NAMESPACE ; - import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; <nb> final class BstOperations { checkNotNull ( mutationRule ) ; BstBalancePolicy < N > balancePolicy = mutatio...
Remove a few lines of unused code
<nb> public class ExecutionPhasesTask extends JobTask { for ( SettableFuture < TaskResult > result : results ) { result . setException ( throwable ) ; } + return ; } if ( operationByServer . isEmpty ( ) ) { return ;
Don t send job requests if there is an error in setupContext
<nb> public abstract class AbstractPreAuthenticatedProcessingFilter extends GenericFi } COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT protected void unsuccessfulAuthentication ( HttpServletRequest request , HttpServletResponse response , AuthenticationException failed ) { Secur...
Modify AbstractPreAuthenticatedProcessingFilter to store authentication exception in request instead of creating a new session
<nb> public class ConcurrentReferenceHashMap < K , V > extends AbstractMap < K , V > implemen protected static int calculateShift ( int minimumValue , int maximumValue ) { int shift = NUMBER0 ; int value = NUMBER1 ; - while ( value < minimumValue && value < minimumValue ) { + while ( value < minimumValue && v...
Fix ConcurrentReferenceHashMap max constraints
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Fixed build problems
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + COMMENT @ target ( { ElementType . METHOD , ElementType . FIELD } ) @ retention ( RetentionPolicy . RUNTIME ) public @ interface ApiProperty { + COMMENT String value ( ) default STRING0 ; + COMMENT + COMMENT + COMMENT + COMMENT ...
added some Javadoc
<nb> public class MetaDataIndexTemplateService extends AbstractComponent { validationErrors . add ( STRING0 ) ; } if ( ! Strings . validFileNameExcludingAstrix ( request . template ) ) { - validationErrors . add ( STRING1 + Strings . INVALID_FILENAME_CHARS ) ; + validationErrors . add ( STRING2 + Strings . IN...
Fix typo in template validation message
<nb> db = ctx . openOrCreateDatabase ( DATABASE_NAME , NUMBER0 , null ) ; values . put ( STRING0 , post . getPost_status ( ) ) ; values . put ( STRING1 , post . isUploaded ( ) ) ; values . put ( STRING2 , post . isPage ( ) ) ; + values . put ( STRING3 , post . getLatitude ( ) ) ; + values . put ( STRING4 , po...
fixed draft issue when re saving content
<nb> public class IpnbFilePanel extends JPanel implements Scrollable , DataProvider , D if ( index < NUMBER0 ) return true ; myIpnbPanels . remove ( index ) ; myIpnbFile . removeCell ( index ) ; - if ( myIpnbFile . getCells ( ) . isEmpty ( ) ) { - final IpnbCodeCell newCell = new IpnbCodeCell ( STRING0 , new ...
do not add cell twice
<nb> public class NodeCmd { output . println ( String . format ( STRING0 , offsets [ i ] , ( i < sprh . length ? sprh [ i ] : STRING1 ) , - ( i < rrlh . length ? rrlh [ i ] : STRING1 ) , - ( i < rwlh . length ? rwlh [ i ] : STRING1 ) , + ( i < rwlh . length ? rrlh [ i ] : STRING1 ) , + ( i < rrlh . length...
put read write latencies in the right columns for nodetool cfhistograms
<nb> public class Main { } String goldenDataDir = APP_TEST_RES + STRING0 ; try { + goldenDataDir = new File ( goldenDataDir ) . getAbsolutePath ( ) ; ImageUtils . requireSimilar ( goldenDataDir + STRING1 , session . getImage ( ) ) ; } catch ( IOException e ) { getLogger ( ) . error ( e , e . getMessage ( ...
Fix tests on jenkins
<nb> import NAMESPACE ; COMMENT public class JavadocNodeImpl implements DetailNode { COMMENT - COMMENT - COMMENT - private static final DetailNode [ ] EMPTY_DETAIL_NODE_ARRAY = new DetailNode [ NUMBER0 ] ; - - COMMENT COMMENT COMMENT private int index ; <nb> public class JavadocNodeImpl implemen...
Fix false positive in mismatched array read write rule
<nb> public class Main { messages . add ( STRING0 + cmdParm ) ; } } + } else if ( STRING1 . equalsIgnoreCase ( command ) + || STRING2 . equalsIgnoreCase ( command ) ) { + if ( commandParams . size ( ) > NUMBER0 ) { + for ( String cmdParm : commandParams ) { + if ( ! cmdParm . startsWith ( STRING3 ) + ...
Don t throw validation errors for schemas flag on snapshot and generateChangeLog
<nb> public class OPlaceholder implements OIdentifiable , Externalizable { @ override public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { rid = ( ORecordId ) in . readObject ( ) ; - recordVersion = ( Integer ) in . readObject ( ) ; + recordVersion = in . readInt ( ) ; }...
fixed read external that made crash distriubuted tests
<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 ; <nb> public class TransferManager { COMMENT private T...
Change threadPool to ExecutorService
<nb> public class TestWsWebSocketContainer extends WebSocketBaseTest { Assert . assertEquals ( NUMBER0 , setB . size ( ) ) ; Assert . assertTrue ( setB . remove ( s1b ) ) ; Assert . assertTrue ( setB . remove ( s2b ) ) ; + + SINGLE + SINGLE + s2a . close ( ) ; + s3a . close ( ) ; + s1b . close ( ) ; ...
Fix a potential cause of a failing CI test
<nb> public class ClusterResource extends RestResource { m . put ( STRING0 , node . getNodeId ( ) ) ; m . put ( STRING1 , node . isMaster ( ) ) ; - m . put ( STRING2 , Tools . getLocalCanonicalHostname ( ) ) ; m . put ( STRING3 , node . getTransportAddress ( ) ) ; m . put ( STRING4 , Tools . getISO8601Strin...
also remove properties from old resource
<nb> public final class CommandLineRunnerTest extends TestCase { private void test ( String [ ] original , String [ ] compiled , DiagnosticType warning ) { exitCodes . clear ( ) ; Compiler compiler = compile ( original ) ; - assertThat ( exitCodes ) . containsExactly ( NUMBER0 ) ; if ( warning == null ) { ...
Move the exit code test to the end of the function so that it doesn t hide real error messages
<nb> public class UltimateRecyclerView extends FrameLayout { COMMENT COMMENT COMMENT - public void setSwipeToDismissCallback ( SwipeToDismissTouchListener . DismissCallbacks dismissCallbacks ) { + public void setSwipeToDismissCallback ( SwipeToDismissTouchListener . DismissCallbacks dismissCallbacks ) throws ...
add throws NullPointerException in setSwipeToDismissCallback
<nb> public class StoreFetcher { ReadOnlyTransactionIdStore transactionIdStore = new ReadOnlyTransactionIdStore ( pageCache , storeDir ) ; long lastCommittedTxId = transactionIdStore . getLastCommittedTransactionId ( ) ; - return pullTransactions ( from , expectedStoreId , storeDir , lastCommittedTxId ) ; + r...
Fix off by one error
<nb> public class RingbufferAddReadOneStressTest extends HazelcastTestSupport { long startMs = System . currentTimeMillis ( ) ; - sleepAndStop ( stop , NUMBER0 * NUMBER1 ) ; + sleepAndStop ( stop , NUMBER2 * NUMBER1 ) ; System . out . println ( STRING0 ) ; producer . assertSucceedsEventually ( ) ; <nb...
Reducing duration of the ringbuffer stress tests nightly is spending too much time here
<nb> public class I18N { } public boolean containsKey ( String key ) { - if ( key . indexOf ( STRING0 ) > NUMBER0 ) { - String prefix = key . substring ( NUMBER0 , key . indexOf ( STRING0 ) - NUMBER1 ) ; + if ( key . indexOf ( STRING0 ) > NUMBER0 ) { + String prefix = key . substring ( NUMBER0 , key . ind...
Fixed bugs in containsKey
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; COMMENT COMMENT <nb> public class IQPingHandler extends IQHandler implements ServerFeaturesProvider { COMMENT @ override public IQ handleIQ ( IQ packet ) { - return IQ . createResultIQ ( packet ...
Ignore error result IQ packets
<nb> public final class InputInnerUsedMethod doSomething ( ) ; } } ) ; - - AbstractAction aa = new AbstractAction ( ) - { - public void actionPerformed ( ActionEvent e ) - { - doSomething ( ) ; - } - } ; - SINGLE } private static void doSomething ( )
removed debugging code tsk tsk
<nb> public class MessagingController implements Runnable Folder localFolder = null ; try { - Store localStore = account . getLocalStore ( ) ; - localFolder = localStore . getFolder ( + localFolder = account . getLocalStore ( ) . getFolder ( account . getOutboxFolderName ( ) ) ; if ( ! localFolder . exi...
kill a temporary variable
<nb> public class TestGenerator { StringBuilder out = new StringBuilder ( ) ; Printer p = new Printer ( out ) ; - p . print ( FileUtil . loadFile ( new File ( STRING0 ) , true ) ) ; + p . print ( FileUtil . loadFile ( new File ( STRING0 ) ) ) ; p . println ( STRING1 , suiteClassPackage , STRING2 ) ; p . p...
Fix line separators in TestGenerator
<nb> public class DebugASTPrinter extends TreeVisitor { } } sb . print ( STRING0 ) ; - node . getBody ( ) . accept ( this ) ; + if ( node . getBody ( ) == null ) { + sb . print ( STRING1 ) ; + } else { + node . getBody ( ) . accept ( this ) ; + } return false ; }
Fixed native function declaration toString
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NA...
Fix buffer allocation
<nb> public class FolderInfoHolder implements Comparable < FolderInfoHolder > { @ override public boolean equals ( Object o ) { - return this . name . equals ( ( ( FolderInfoHolder ) o ) . name ) ; + return o instanceof FolderInfoHolder && name . equals ( ( ( FolderInfoHolder ) o ) . name ) ; } @ overri...
Fix equals method to work with all objects
<nb> public class PdeSketch { SINGLE if ( newFolder . equals ( folder ) ) { PdeBase . showWarning ( STRING0 , - STRING1 + - STRING2 , null ) ; + STRING3 + + STRING4 , null ) ; return false ; }
fixing triple negative error message to make it quadruple negative
<nb> public abstract class AbstractQuickFixMultiFileTest extends DaemonAnalyzerTestCa private void doTest ( final String beforeFileName , boolean withExtraFile ) throws Exception { if ( withExtraFile ) { - configureByFiles ( null , beforeFileName , beforeFileName . replace ( STRING0 , STRING1 ) ) ; + configur...
Fixed letter case in test code
<nb> public class SSLCertificateSocketFactory extends SSLSocketFactory { @ override public String [ ] getDefaultCipherSuites ( ) { - return getDelegate ( ) . getSupportedCipherSuites ( ) ; + return getDelegate ( ) . getDefaultCipherSuites ( ) ; } @ override
Fix SSLCertificateSocketFactory getDefaultCipherSuites
<nb> import NAMESPACE ; COMMENT COMMENT - COMMENT COMMENT public class CallerPrincipalCallback implements Callback { <nb> import NAMESPACE ; COMMENT COMMENT - COMMENT COMMENT public class CertStoreCallback implements Callback { <nb> import NAMESPACE ; COMMENT COMMENT - COMMENT ...
Remove some additional blank lines
<nb> public class PhysicalWebCollection { } SINGLE - Collections . sort ( allPwPairs ) ; - Collections . reverse ( allPwPairs ) ; + Collections . sort ( allPwPairs , Collections . reverseOrder ( ) ) ; SINGLE List < PwPair > ret = new ArrayList < > ( ) ;
Use the reverse comparator where needed
<nb> public class OccupantAddedEvent extends MUCRoomTask { } public String getNickname ( ) { - return presence . getTo ( ) . getResource ( ) . trim ( ) ; + return presence . getFrom ( ) . getResource ( ) . trim ( ) ; } public MUCRole . Role getRole ( ) {
Fix MUC room sync in cluster
<nb> public class GrailsConsole { error ( WARNING , msg ) ; } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public void warn ( String msg ) { + warning ( msg ) ; + } + private void logSimpleError ( String msg ) { if ( progressIndicatorActive ) { out . println ( ) ; <nb> public clas...
adds log and warn methods
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import static NAMESPACE ; public class HystrixCommandTestWithCustomConcurrencyStrategy { @ before - public void resetPlugins ( )...
Fix test lifecycle
<nb> public class RngXmlValidationTest extends HighlightingTestBase { final ExternalResourceManager mgr = ExternalResourceManager . getInstance ( ) ; mgr . addResource ( STRING0 , toAbsolutePath ( STRING1 ) ) ; mgr . addResource ( STRING2 , toAbsolutePath ( STRING3 ) ) ; - mgr . addResource ( STRING4 , toAbsolu...
don t register XSLT resource in RngXmlValidationTest
<nb> public class Graphs { Graph < Integer > digraph = new Graph < Integer > ( Graph . TYPE . DIRECTED , verticies , edges ) ; if ( debug > NUMBER0 ) System . out . println ( digraph . toString ( ) ) ; - System . out . println ( STRING0 ) ; + if ( debug > NUMBER0 ) System . out . println ( STRING0 ) ; List ...
Put the println in the junit tests behind a debug boolean
<nb> public class SignInFragment extends AbstractFragment implements TextWatcher , Con } private void deleteCredentialsInSmartLock ( ) { - if ( isSmartLockAvailable ( ) ) { + if ( ! isSmartLockAvailable ( ) ) { return ; } Credential credential = new Credential . Builder ( mUsername ) . setPassword ( mPa...
fix a wrong test in deleteCredentialsInSmartLock
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT + @ androidincompatible SINGLE public class LineBufferTest extends IoTestCase { public void testProcess ( ) throws IOException {
Suppress another flaky test
<nb> public final class Connection implements Closeable { SINGLE int mtu = Platform . get ( ) . getMtu ( socket ) ; + if ( mtu < NUMBER0 ) mtu = NUMBER0 ; + if ( mtu > NUMBER1 ) mtu = NUMBER1 ; in = new BufferedInputStream ( in , mtu ) ; out = new BufferedOutputStream ( out , mtu ) ; }
Clamp the MTU to a reasonable range