diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> public class WebSocketProcessorTest { } } ) ; - AtmosphereResourceImpl . class . cast ( resource ) . inClosingPhase ( true ) ; AtmosphereResourceEventImpl . class . cast ( resource . getAtmosphereResourceEvent ( ) ) . isClosedByClient ( true ) ; AsynchronousProcessor . class . cast ( framework . getAsyncSupport ( ) ) . completeLifecycle ( resource , false ) ; processor . close ( w , NUMBER0 ) ;
Fix the test
<nb> public class XmppConnection extends ImConnection { SINGLE SINGLE - debug ( TAG , STRING0 + domain + STRING1 ) ; + debug ( TAG , STRING2 + domain ) ; SINGLE DNSUtil . HostAddress srvHost = DNSUtil . resolveXMPPDomain ( domain ) ; server = srvHost . getHost ( ) ; - serverPort = srvHost . getPort ( ) ; + SINGLE + debug ( TAG , STRING3 + domain + STRING4 + server + STRING5 + serverPort ) ; }
only use hostname from SRV lookup stick to user port setting
<nb> public class HttpBindServlet extends HttpServlet { @ override public void onWritePossible ( ) throws IOException { Log . trace ( STRING0 + remoteAddress + STRING1 ) ; + + SINGLE + SINGLE + context . getResponse ( ) . setBufferSize ( data . length ) ; + context . getResponse ( ) . getOutputStream ( ) . write ( data ) ; context . complete ( ) ; }
Set buffer size to prevent chunked encoding
<nb> public class PartitionColorTransformerPanel extends javax . swing . JPanel { menu . add ( STRING0 + NbBundle . getMessage ( PartitionColorTransformerPanel . class , STRING1 ) + STRING2 ) ; } else { for ( Palette pl : recentPalettes ) { - menu . add ( new PaletteMenuItem ( pl , Math . min ( PALETTE_DISPLAY_LIMIT , colorsCount ) ) ) ; + if ( pl . size ( ) >= colorsCount ) { + menu . add ( new PaletteMenuItem ( pl , Math . min ( PALETTE_DISPLAY_LIMIT , colorsCount ) ) ) ; + } } }
Fix exception when recette palette is smaller than colors count
<nb> public class ResourceBundlePropertiesInsertManagerImpl implements ResourceBundle @ override public Iterator < String > getIn ( String n ) { - final Collection < String > siblings = new HashSet < String > ( ) ; + final Collection < String > siblings = new TreeSet < String > ( Collections . reverseOrder ( ) ) ; for ( PropertiesFile propertiesFile : resourceBundle . getPropertiesFiles ( ) ) { for ( IProperty property : propertiesFile . findPropertiesByKey ( n ) ) { PsiElement sibling = property . getPsiElement ( ) . getNextSibling ( ) ;
insert manager ordering fix
<nb> public class DeclarationResolver { Collection < JetFile > files = trace . get ( BindingContext . PACKAGE_TO_FILES , aPackage . getFqName ( ) ) ; if ( files == null ) { - throw new IllegalStateException ( STRING0 + aPackage + STRING1 ) ; + return Collections . emptyList ( ) ; SINGLE } declarations = Collections2 . transform ( files , new Function < JetFile , PsiElement > ( ) {
Removed assertion since it could appear in normal situation
<nb> class NotesAdapter extends CursorAdapter { mQuery = bucket . query ( ) . order ( Note . Schema . TIMESTAMP_INDEX , Query . SortType . DESCENDING ) ; mAvatarSz = DisplayUtils . dpToPx ( context , NUMBER0 ) ; - reloadNotes ( ) ; } public void closeCursor ( ) { <nb> public class NotificationsListFragment extends ListFragment implements Bucket . Li @ override public void onResume ( ) { super . onResume ( ) ; + refreshNotes ( ) ; + registerReceiver ( ) ; SINGLE mBucket . addListener ( this ) ;
Call refreshNotes in onResume so that the cursor is recreated
<nb> public class GLM extends ModelBuilder < GLMModel , GLMParameters , GLMOutput > { COMMENT private int [ ] activeCols ( final double l1 , final double l2 , final double [ ] grad ) { if ( _taskInfo . _allIn ) return null ; + if ( _parms . _family == Family . multinomial && _parms . _solver == Solver . L_BFGS ) + return null ; SINGLE int selected = NUMBER0 ; int [ ] cols = null ; if ( _parms . _alpha [ NUMBER0 ] > NUMBER0 ) {
Fixed lbfgs multinomial lambda search do not use strong rules for now more predictors than columns in the dataset
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class JetRunConfiguration extends ModuleBasedConfiguration < RunConfigurati @ override public RunProfileState getState ( @ notnull Executor executor , @ notnull ExecutionEnvironment executionEnvironment ) throws ExecutionException { - JavaCommandLineState state = new MyJavaCommandLineState ( this , executionEnvironment ) ; - state . setConsoleBuilder ( TextConsoleBuilderFactory . getInstance ( ) . createBuilder ( getProject ( ) ) ) ; - return state ; + return new MyJavaCommandLineState ( this , executionEnvironment ) ; } @ nullable
remove incorrect and unnecessary TextConsoleBuilder initialization
<nb> public class FileWatcher { } private void resetRoot ( final String path ) { - final NewVirtualFile root = myManagingFS . findRoot ( path , LocalFileSystem . getInstance ( ) ) ; - if ( root != null ) { - root . markDirtyRecursively ( ) ; + final VirtualFile root = LocalFileSystem . getInstance ( ) . findFileByPath ( path ) ; + if ( root instanceof NewVirtualFile ) { + ( ( NewVirtualFile ) root ) . markDirtyRecursively ( ) ; } notifyOnEvent ( ) ;
Handle FS event queue overflow on Windows fixed
<nb> public class GdxSetup { SINGLE project . files . add ( new ProjectFile ( STRING0 , false ) ) ; - project . files . add ( new ProjectFile ( STRING1 , false ) ) ; + project . files . add ( new ProjectFile ( STRING1 ) ) ; project . files . add ( new ProjectFile ( STRING2 , false ) ) ; project . files . add ( new ProjectFile ( STRING3 , false ) ) ; project . files . add ( new ProjectFile ( STRING4 , false ) ) ;
removed the isTemplate value for android res values strings xml
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; COMMENT
removing useless imports
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class BuildCraftEnergy extends BuildCraftMod { @ eventhandler public void init ( FMLInitializationEvent evt ) { - NetworkRegistry . INSTANCE . registerGuiHandler ( instance , new GuiHandler ( ) ) ; + channels = NetworkRegistry . INSTANCE . newChannel + ( DefaultProps . NET_CHANNEL_NAME + STRING0 , new PacketHandlerTransport ( ) ) ; + + NetworkRegistry . INSTANCE . registerGuiHandler ( instance , new GuiHandler ( ) ) ; SINGLE
added missing channel to energy mod
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; COMMENT SINGLE SINGLE + @ runwith ( JUnit4 . class ) public class ConcurrencyTest { COMMENT COMMENT
Adding RunWith annotation to ConcurrencyTest
<nb> public abstract class LightPsiFileImpl extends ElementBase implements PsiFileEx } public boolean isWritable ( ) { - PsiFile file = getContainingFile ( ) ; - if ( file == null ) return false ; - return file . isWritable ( ) ; + return getViewProvider ( ) . getVirtualFile ( ) . isWritable ( ) ; } @ notnull
fixed stack overflow
<nb> public class MainRunner { public Integer runWithCheckForSystemExit ( Runnable runnable ) { SecurityManager oldSecurityManager = System . getSecurityManager ( ) ; System . setSecurityManager ( new NoExitSecurityManager ( oldSecurityManager ) ) ; - PrintStream oldPrintStream = System . out ; + PrintStream oldOut = System . out ; System . setOut ( new PrintStream ( new ByteArrayOutputStream ( ) ) ) ; try { <nb> public class MainRunner { return e . getStatus ( ) ; } finally { System . setSecurityManager ( oldSecurityManager ) ; - System . setOut ( oldPrintStream ) ; + System . setOut ( oldOut ) ; } } }
Renamed oldPrintStream to oldOut to make the naming slightly
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import static NAMESPACE ; <nb> public class PinnedSessionTest extends DatabaseTestCase { @ test public void shouldPinReadsToSameServer ( ) throws InterruptedException { - final Find find = new Find ( ) . readPreference ( ReadPreference . secondary ( ) ) . batchSize ( - NUMBER0 ) ; final ServerAddress serverAddress = session . createServerConnectionProvider ( new ServerConnectionProviderOptions ( true , new ReadPreferenceServerSelector ( ReadPreference . secondary ( ) ) ) ) . getServerDescription ( ) . getAddress ( ) ; SINGLE
Removed unused variable in test
<nb> public class ArtefactTypeAstTransformation extends AbstractArtefactTypeAstTransf public static void performInjection ( SourceUnit sourceUnit , ClassNode cNode , Collection < ClassInjector > injectors ) { try { for ( ClassInjector injector : injectors ) { - injector . performInjectionOnAnnotatedClass ( sourceUnit , cNode ) ; + final String injectorName = injector . getClass ( ) . getName ( ) ; + final String key = STRING0 + injectorName ; + final Object nodeMetaData = cNode . getNodeMetaData ( key ) ; + if ( ! Boolean . TRUE . equals ( nodeMetaData ) ) { + cNode . setNodeMetaData ( key , Boolean . TRUE ) ; + injector . performInjectionOnAnnotatedClass ( sourceUnit , cNode ) ; + } } } catch ( RuntimeException e ) { try {
Don t apply the same ClassInjector to a node twice
<nb> public class OutputEmitter < K extends Key , V extends Value > implements ChannelSel COMMENT public OutputEmitter ( ShipStrategy strategy , byte [ ] salt ) { if ( strategy != ShipStrategy . BROADCAST && strategy != ShipStrategy . PARTITION_HASH - && strategy != ShipStrategy . NONE ) + && strategy != ShipStrategy . FORWARD ) { throw new UnsupportedOperationException ( STRING0 + strategy . name ( ) ) ; } <nb> public class OutputEmitter < K extends Key , V extends Value > implements ChannelSel return broadcast ( numberOfChannels ) ; case PARTITION_HASH : return partition ( pair , numberOfChannels ) ; - case NONE : + case FORWARD : return robin ( numberOfChannels ) ; default : throw new UnsupportedOperationException ( ) ;
Fixed Bug in OutputEmitter
<nb> + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT package NAMESPACE ; import NAMESPACE ;
Add of a missing license header
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; COMMENT <nb> public class BlueprintProduceConsumeImplicitPropertyTest extends CamelBlueprintT } @ test + @ ignore ( STRING0 ) public void testImplicit ( ) throws Exception { getMockEndpoint ( STRING1 ) . expectedMessageCount ( NUMBER0 ) ;
Skip test in camel test blueprint that fails
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ConcurrentCloseTest extends junit . framework . TestCase { System . err . println ( STRING0 ) ; Thread . sleep ( NUMBER0 ) ; System . err . println ( STRING1 ) ; - s . getClass ( ) . getMethod ( STRING2 ) . invoke ( s ) ; + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + Method m = s . getClass ( ) . getMethod ( STRING2 ) ; + m . setAccessible ( true ) ; + m . invoke ( s ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; }
Fixed IllegalAccessException in ConcurrentCloseTest when run on RoboVM
<nb> public class AbstractServerStreamTest { verify ( streamListener , times ( NUMBER0 ) ) . messageRead ( any ( InputStream . class ) ) ; } + COMMENT + COMMENT + COMMENT + @ test + public void completeWithoutClose ( ) { + stream . transportState ( ) . setListener ( new ServerStreamListenerBase ( ) ) ; + SINGLE + stream . transportState ( ) . complete ( ) ; + } + @ test public void setListener_setOnlyOnce ( ) {
add test for complete without close exception in AbstractServerStream
<nb> public class HyperLogLog implements ICardinality , Serializable { return new SerializedHyperLogLog ( this ) ; } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT private static class SerializedHyperLogLog implements Externalizable { HyperLogLog hyperLogLogHolder ;
add some documentation on serialization
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class DesktopGeneratorController implements GeneratorController { container . closeLoader ( ) ; DefaultProcessor defaultProcessor = new DefaultProcessor ( ) ; - defaultProcessor . setContainer ( container . getUnloader ( ) ) ; + defaultProcessor . setContainers ( new ContainerUnloader [ ] { container . getUnloader ( ) } ) ; defaultProcessor . setWorkspace ( workspace ) ; defaultProcessor . process ( ) ; }
Fix compile issue with DesktopGeneratorController
<nb> public class StorageService extends NotificationBroadcasterSupport implements IE { bootstrapTokens = BootStrapper . getRandomTokens ( tokenMetadata , DatabaseDescriptor . getNumTokens ( ) ) ; if ( DatabaseDescriptor . getNumTokens ( ) == NUMBER0 ) - logger . warn ( STRING0 + bootstrapTokens + STRING1 ) ; + logger . warn ( STRING2 , bootstrapTokens ) ; else logger . info ( STRING3 , bootstrapTokens ) ; } <nb> public class StorageService extends NotificationBroadcasterSupport implements IE } bootstrapTokens . add ( midpoint ) ; } - logger . info ( STRING4 + left + STRING5 + right + STRING6 + bootstrapTokens ) ; + logger . info ( STRING7 , left , right , bootstrapTokens ) ; } else - logger . info ( STRING8 + bootstrapTokens ) ; + logger . info ( STRING9 , bootstrapTokens ) ; } }
use parameterized logging
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class EditingPOIActivity implements DialogProvider { private Dialog createPOIDialog ( final int dialogID , Bundle args ) { final Dialog dlg = new Dialog ( ctx ) ; dlg . setContentView ( R . layout . editing_poi ) ; + + dlg . getWindow ( ) . setSoftInputMode ( WindowManager . LayoutParams . SOFT_INPUT_ADJUST_RESIZE ) ; ; + nameText = ( ( EditText ) dlg . findViewById ( R . id . Name ) ) ; openingHours = ( ( EditText ) dlg . findViewById ( R . id . OpeningHours ) ) ; typeText = ( ( AutoCompleteTextView ) dlg . findViewById ( R . id . Type ) ) ;
Fix scrolling in the POI editor
<nb> public interface HttpConnection { HttpConnection shutdownHandler ( @ nullable Handler < Void > handler ) ; COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public interface HttpConnection { COMMENT COMMENT COMMENT + COMMENT COMMENT COMMENT @ fluent <nb> public interface HttpConnection { HttpConnection closeHandler ( Handler < Void > handler ) ; COMMENT - COMMENT + COMMENT COMMENT void close ( ) ; <nb> abstract class Http2ConnectionBase extends ConnectionBase implements Http2FrameL @ override public void close ( ) { + endReadAndFlush ( ) ; shutdown ( ( Long ) NUMBER0 L ) ; }
improve javadoc of http connection
<nb> public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase { } public void testCodeFoldingPassRestartsOnRegionUnfolding ( ) throws Exception { + TestLoggerFactory . enableDebugLogging ( myTestRootDisposable , STRING0 ) ; DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings . getInstance ( ) ; int savedDelay = settings . AUTOREPARSE_DELAY ; settings . AUTOREPARSE_DELAY = NUMBER0 ;
enable debug logging in blinking test
<nb> public class BitmapFont implements Disposable { SINGLE while ( lineEnd > start ) { if ( BitmapFont . isWhitespace ( str . charAt ( lineEnd ) ) ) break ; + else if ( isBreakChar ( str . charAt ( lineEnd - NUMBER0 ) ) ) break ; lineEnd -- ; } if ( lineEnd == start ) { <nb> public class BitmapFont implements Disposable { public boolean isBreakChar ( char c ) { if ( breakChars == null ) return false ; + for ( char br : breakChars ) { if ( c == br ) return true ; }
Check isBreakChar in getWrappedBounds
<nb> public class CallOptionsTest { @ test public void toStringMatches_withDeadline ( ) { - allSet . toString ( ) . contains ( STRING0 ) ; + assertThat ( allSet . toString ( ) ) . contains ( STRING0 ) ; } @ test
Add missing assert in CallOptionsTest
<nb> public enum Material { return false ; } } + + COMMENT + COMMENT + COMMENT + public boolean hasGravity ( ) { + if ( ! isBlock ( ) ) { + return false ; + } + switch ( this ) { + case SAND : + case GRAVEL : + case ANVIL : + return true ; + default : + return false ; + } + } }
Added the hasGravity method to Blocks
<nb> public class MethodDefinition { } private void addTries ( ) { + if ( codeItem . getTries ( ) == null ) { + return ; + } for ( CodeItem . TryItem tryItem : codeItem . getTries ( ) ) { int startAddress = tryItem . startAddress ; int endAddress = tryItem . startAddress + tryItem . instructionCount ;
Check for null code item
<nb> public class SPVBlockStore implements BlockStore { SINGLE SINGLE SINGLE - protected static final Object notFoundMarker = new Object ( ) ; + private static final Object NOT_FOUND_MARKER = new Object ( ) ; protected LinkedHashMap < Sha256Hash , Object > notFoundCache = new LinkedHashMap < Sha256Hash , Object > ( ) { @ override protected boolean removeEldestEntry ( Map . Entry < Sha256Hash , Object > entry ) { <nb> public class SPVBlockStore implements BlockStore { } } while ( cursor != startingPoint ) ; SINGLE - notFoundCache . put ( hash , notFoundMarker ) ; + notFoundCache . put ( hash , NOT_FOUND_MARKER ) ; return null ; } catch ( ProtocolException e ) { throw new RuntimeException ( e ) ; SINGLE
Rename NOT_FOUND_MARKER and make it private
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; public interface BinaryFileStubBuilder { boolean acceptsFile ( final VirtualFile file ) ; @ nullable - StubElement buildStubTree ( final VirtualFile file , byte [ ] content ) ; + StubElement buildStubTree ( final VirtualFile file , byte [ ] content , final Project project ) ; int getStubVersion ( ) ; }
binary stub decompiler get project
<nb> public final class Main { SwingUtilities . updateComponentTreeUI ( frame ) ; frame . pack ( ) ; ltSupport . getConfig ( ) . setLookAndFeelName ( lf . getName ( ) ) ; - } catch ( ClassNotFoundException ex ) { - } catch ( InstantiationException ex ) { - } catch ( IllegalAccessException ex ) { - } catch ( UnsupportedLookAndFeelException ex ) { - SINGLE - SINGLE + } catch ( ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException ex ) { + Tools . showError ( ex ) ; } } }
GUI show an error message if we can t set the Look Feel
<nb> public abstract class FileStructureTestBase extends CodeInsightFixtureTestCase { @ before public void setUp ( ) throws Exception { super . setUp ( ) ; + setupStructurePopup ( ) ; + } + + protected void setupStructurePopup ( ) { myFixture . configureByFile ( getFileName ( getFileExtension ( ) ) ) ; myPopupFixture = new FileStructureTestFixture ( myFixture . getProject ( ) , myFixture . getEditor ( ) , getFile ( ) ) ; myPopupFixture . update ( ) ;
allow dialect selection
<nb> public class Utils { return lasers ; } - public static void handleBufferedDescription ( ISynchronizedTile tileSynch ) throws IOException { + public static void handleBufferedDescription ( ISynchronizedTile tileSynch ) { TileEntity tile = ( TileEntity ) tileSynch ; BlockIndex index = new BlockIndex ( tile . xCoord , tile . yCoord , tile . zCoord ) ; <nb> public class Utils { PacketUpdate payload = BuildCraftCore . bufferedDescriptions . get ( index ) ; BuildCraftCore . bufferedDescriptions . remove ( index ) ; - tileSynch . handleDescriptionPacket ( payload ) ; + try { + tileSynch . handleDescriptionPacket ( payload ) ; + } catch ( IOException ex ) { + ex . printStackTrace ( ) ; + } tileSynch . postPacketHandling ( payload ) ; } }
Catch uncaught IOException
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class TerasologyEngine implements GameEngine { moduleSecurityManager . addAllowedPermission ( PojoEntityManager . class , ReflectPermission . class ) ; moduleSecurityManager . addAllowedPermission ( AssetManager . class , FilePermission . class ) ; moduleSecurityManager . addAllowedPermission ( EnumMap . class , ReflectPermission . class ) ; + moduleSecurityManager . addAllowedPermission ( WorldGeneratorPluginLibrary . class , new RuntimePermission ( STRING0 ) ) ; moduleSecurityManager . addAllowedPermission ( ClassMetadata . class , new RuntimePermission ( STRING1 ) ) ; moduleSecurityManager . addAllowedPermission ( ClassMetadata . class , new RuntimePermission ( STRING2 ) ) ; moduleSecurityManager . addAllowedPermission ( ClassMetadata . class , ReflectPermission . class ) ;
Added permission for WorldGeneratorPluginLibrary
<nb> public class AggregationStrategyWithPreservationTest extends CamelTestSupport { try { int fileCount = NUMBER0 ; for ( ZipEntry ze = zin . getNextEntry ( ) ; ze != null ; ze = zin . getNextEntry ( ) ) { - System . out . println ( ze . toString ( ) ) ; expectedZipFiles . remove ( ze . toString ( ) ) ; fileCount ++ ; }
Remove the Sytem out line of AggregationStrategyWithPreservationTest
<nb> public class XMPPDateTimeFormat { return dateTimeFormatWoMillies . parse ( rfc822Date ) ; } } else { + SINGLE + rfc822Date = rfc822Date . replaceAll ( STRING0 , STRING1 ) ; + synchronized ( dateTimeFormat ) { return dateTimeFormat . parse ( rfc822Date ) ; }
Replace any number of millisecond characters with at most three of them
<nb> public class HttpRequestTest extends ServerTestCase { } COMMENT + COMMENT + COMMENT + @ test + public void singleSslSocketFactory ( ) { + HttpRequest request1 = get ( STRING0 ) . trustAllCerts ( ) ; + HttpRequest request2 = get ( STRING0 ) . trustAllCerts ( ) ; + assertNotNull ( ( ( HttpsURLConnection ) request1 . getConnection ( ) ) + . getSSLSocketFactory ( ) ) ; + assertNotNull ( ( ( HttpsURLConnection ) request2 . getConnection ( ) ) + . getSSLSocketFactory ( ) ) ; + assertEquals ( + ( ( HttpsURLConnection ) request1 . getConnection ( ) ) . getSSLSocketFactory ( ) , + ( ( HttpsURLConnection ) request2 . getConnection ( ) ) . getSSLSocketFactory ( ) ) ; + } + + COMMENT COMMENT COMMENT COMMENT
Add test of reused SSL socket factory
<nb> public class LoadBalancingProxyAJPTestCase extends AbstractLoadBalancingProxyTes server2 . start ( ) ; DefaultServer . setRootHandler ( new ProxyHandler ( new LoadBalancingProxyClient ( ) - . setConnectionsPerThread ( NUMBER0 ) + . setConnectionsPerThread ( NUMBER1 ) . addHost ( new URI ( STRING0 , null , DefaultServer . getHostAddress ( STRING1 ) , port + NUMBER0 , null , null , null ) , STRING2 ) . addHost ( new URI ( STRING0 , null , DefaultServer . getHostAddress ( STRING1 ) , port + NUMBER2 , null , null , null ) , STRING3 ) , NUMBER3 , ResponseCodeHandler . HANDLE_404 ) ) ;
Temporarily increase the number of connections in the test
<nb> public class View implements Drawable . Callback , KeyEvent . Callback , Accessibility COMMENT public void cancelLongPress ( ) { removeLongPressCallback ( ) ; + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + removeTapCallback ( ) ; } COMMENT
Fixed a regression in View cancelLongPress
<nb> package NAMESPACE ; public class MedianOf3Number { - public int median ( int arr [ ] ) { int l = NUMBER0 ; int h = NUMBER1 ; <nb> package NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> package NAMESPACE ; COMMENT COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT public class NotIncluding4 {
Adding some comments
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; COMMENT <nb> public interface EmbeddedDatabase extends DataSource { COMMENT COMMENT - COMMENT COMMENT + @ predestroy void shutdown ( ) ; } <nb> public class EmbeddedDatabaseFactory { COMMENT COMMENT public void setDatabasePopulator ( DatabasePopulator populator ) { - Assert . notNull ( populator , STRING0 ) ; + Assert . notNull ( populator , STRING1 ) ; databasePopulator = populator ; }
added pre destroy
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class StringMultiSchemeWithTopic @ override public Iterable < List < Object > > deserialize ( ByteBuffer bytes ) { - throw new NotImplementedException ( ) ; + throw new UnsupportedOperationException ( ) ; } public Iterable < List < Object > > deserializeWithTopic ( String topic , ByteBuffer bytes ) {
Replace NotImplementedException with UnsupportedOperationException
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class AbstractRTSApplication extends Application { providers . add ( AcceptHeaderByFileSuffixFilter . class ) ; providers . add ( AcceptEncodingGZIPFilter . class ) ; providers . add ( GZIPEncodingInterceptor . class ) ; - providers . add ( AcceptEncodingGZIPInterceptor . class ) ; providers . add ( GZIPDecodingInterceptor . class ) ; return providers ;
Remove deprecated and duplicated class AcceptEncodingGZIPInterceptor
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ItemActivity extends BaseItemActivity implements Scrollable { private String mItemId ; private ImageView mBookmark ; private boolean mFavoriteBound ; - private boolean mOrientationChanged = false ; private boolean mExternalBrowser ; @ inject @ named ( ActivityModule . HN ) ItemManager mItemManager ; @ inject FavoriteManager mFavoriteManager ; <nb> public class ItemActivity extends BaseItemActivity implements Scrollable { } @ override - public void onConfigurationChanged ( Configuration newConfig ) { - super . onConfigurationChanged ( newConfig ) ; - mOrientationChanged = ! mOrientationChanged ; - } - - @ override protected void onResume ( ) { super . onResume ( ) ; mExternalBrowser = Preferences . externalBrowserEnabled ( this ) ;
Remove unused code
<nb> public class MultiWordTreeExpander { COMMENT COMMENT private static TregexPattern intermediateSubstantiveConjunct = - TregexPattern . compile ( STRING0 ) ; + TregexPattern . compile ( STRING1 ) ; COMMENT COMMENT <nb> public class MultiWordTreeExpander { private static TsurgeonPattern expandIntermediateSubstantiveConjunct = Tsurgeon . parseOperation ( STRING2 ) ; + COMMENT + COMMENT + COMMENT + COMMENT + private static TregexPattern intermediateAdjectiveConjunct = + TregexPattern . compile ( STRING3 ) ; + + COMMENT + COMMENT + COMMENT + private static TsurgeonPattern expandIntermediateAdjectiveConjunct = + Tsurgeon . parseOperation ( STRING4 ) ; + SINGLE SINGLE <nb> public class MultiWordTreeExpander { add ( new Pair ( intermediatePrepositionalPhrase , expandPrepositionalPhrase2 ) ) ; add ( new Pair ( intermediatePrepositionalVP , expandPrepositionalVP2 ) ) ; add ( new Pair ( intermediateSubstantiveConjunct , expandIntermediateSubstantiveConjunct ) ) ; + add ( new Pair ( intermediateAdjectiveConjunct , expandIntermediateAdjectiveConjunct ) ) ; } } ; COMMENT
Fix up more conjunct adjective phrases from AnCora multiwords
<nb> public class MemoryTranslog extends AbstractIndexShardComponent implements Trans } @ override public int size ( ) { - return operations . size ( ) ; + return operationCounter . get ( ) ; } @ override public ByteSizeValue estimateMemorySize ( ) {
use the atomic integer counter to represent the size
<nb> public class LocalPSMP extends PlaybackServiceMediaPlayer { statusBeforeSeeking = playerStatus ; setPlayerStatus ( PlayerStatus . SEEKING , media , getPosition ( ) ) ; mediaPlayer . seekTo ( t ) ; + if ( statusBeforeSeeking == PlayerStatus . PREPARED ) { + media . setPosition ( t ) ; + } try { seekLatch . await ( NUMBER0 , TimeUnit . SECONDS ) ; } catch ( InterruptedException e ) {
Fixed problem with seeking before starting playback
<nb> public class VCardEntry { } } if ( type < NUMBER0 ) { - type = Phone . TYPE_HOME ; + type = Im . TYPE_HOME ; } addIm ( protocol , null , type , propValue , isPrimary ) ; } else if ( propName . equals ( VCardConstants . PROPERTY_NOTE ) ) { <nb> public class VCardEntry { builder . withValue ( Data . MIMETYPE , Im . CONTENT_ITEM_TYPE ) ; builder . withValue ( Im . TYPE , imData . type ) ; builder . withValue ( Im . PROTOCOL , imData . protocol ) ; + builder . withValue ( Im . DATA , imData . data ) ; if ( imData . protocol == Im . PROTOCOL_CUSTOM ) { builder . withValue ( Im . CUSTOM_PROTOCOL , imData . customProtocol ) ; } if ( imData . isPrimary ) { builder . withValue ( Data . IS_PRIMARY , NUMBER1 ) ; } + operationList . add ( builder . build ( ) ) ; } }
Fix vCard so that it looks at IM correctly
<nb> public abstract class WsRemoteEndpointImplBase implements RemoteEndpoint { SINGLE while ( payload . hasRemaining ( ) && outputBuffer . hasRemaining ( ) ) { - outputBuffer . put ( - ( byte ) ( payload . get ( ) ^ ( mask [ maskIndex ++ ] & NUMBER0 ) ) ) ; - if ( maskIndex > NUMBER1 ) { - maskIndex = NUMBER2 ; + if ( mask == null ) { + outputBuffer . put ( payload . get ( ) ) ; + } else { + outputBuffer . put ( + ( byte ) ( payload . get ( ) ^ ( mask [ maskIndex ++ ] & NUMBER0 ) ) ) ; + if ( maskIndex > NUMBER1 ) { + maskIndex = NUMBER2 ; + } } } if ( payload . hasRemaining ( ) ) {
Avoid NPE when sending buffered data from the server there is no mask in this case
<nb> public class RelationTriple implements Comparable < RelationTriple > , Iterable < Core SINGLE return Pair . makePair ( relation . get ( longestChunkStart ) . index ( ) - NUMBER0 , - relation . get ( longestChunkStart + longestChunk - NUMBER0 ) . index ( ) + relation . get ( longestChunkStart ) . index ( ) - NUMBER0 + longestChunk ) ; } }
Fix an index out of bounds exception
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class FMLCommonHandler public void onPlayerPreTick ( EntityPlayer player ) { - tickStart ( EnumSet . of ( TickType . PLAYER ) , Side . SERVER , player ) ; + Side side = player instanceof EntityPlayerMP ? Side . SERVER : Side . CLIENT ; + tickStart ( EnumSet . of ( TickType . PLAYER ) , side , player ) ; } public void onPlayerPostTick ( EntityPlayer player ) { - tickEnd ( EnumSet . of ( TickType . PLAYER ) , Side . SERVER , player ) ; + Side side = player instanceof EntityPlayerMP ? Side . SERVER : Side . CLIENT ; + tickEnd ( EnumSet . of ( TickType . PLAYER ) , side , player ) ; } }
Fix up concurrent modification exception ticks for players now occur on both sides
<nb> public class BasicConfiguration implements MonkeyConfiguration { @ override public boolean getBoolOrElse ( String property , boolean dflt ) { String val = props . getProperty ( property ) ; - return val == null ? dflt : Boolean . parseBoolean ( val ) ; + if ( val == null ) { + return dflt ; + } + val = val . trim ( ) ; + return Boolean . parseBoolean ( val ) ; } COMMENT
Trim boolean configuration before parsing
<nb> class UDPRebooted extends UDP { void send ( H2ONode target ) { assert this != none ; - new AutoBuffer ( target ) . putUdp ( udp . rebooted ) . close ( ) ; + new AutoBuffer ( target ) . putUdp ( udp . rebooted ) . put1 ( ordinal ( ) ) . close ( ) ; } void broadcast ( ) { send ( H2O . SELF ) ; } }
Fix flow shutdown bug
<nb> public class Rapids { case STRING0 : return new ASTExec ( this ) ; SINGLE case STRING1 : return new ASTFun ( this ) ; SINGLE case STRING2 : _x ++ ; SINGLE - case STRING3 : case STRING4 : case STRING5 : case STRING6 : case STRING7 : - case STRING8 : case STRING9 : case STRING10 : case STRING11 : case STRING12 : + case STRING3 : case STRING4 : case STRING5 : case STRING6 : case STRING7 : case STRING8 : case STRING9 : case STRING10 : case STRING11 : case STRING12 : return new ASTNum ( this ) ; case STRING13 : return new ASTStr ( this , STRING13 ) ; case STRING14 : return new ASTStr ( this , STRING14 ) ; <nb> public class Rapids { } static boolean isWS ( char c ) { - return c == STRING15 ; + return c == STRING15 || c == STRING16 || c == STRING17 ; } static boolean isQuote ( char c ) {
allow tabs and newlines to count as whitespace
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ;
Remove unnessary imports
<nb> public class NodeProbe SINGLE int counter = NUMBER0 ; + outs . print ( String . format ( STRING0 , STRING1 ) ) ; + outs . print ( String . format ( STRING2 , STRING3 ) ) ; + outs . print ( String . format ( STRING4 , STRING5 ) ) ; + outs . print ( String . format ( STRING6 , STRING7 ) ) ; + outs . println ( STRING8 ) ; for ( Range range : rangeMap . keySet ( ) ) { List < EndPoint > endpoints = rangeMap . get ( range ) ; outs . print ( String . format ( STRING0 , range . left ( ) ) ) ; + outs . print ( String . format ( STRING0 , range . right ( ) ) ) ; outs . print ( String . format ( STRING9 , endpoints . size ( ) ) ) ; outs . print ( String . format ( STRING6 , endpoints . get ( NUMBER0 ) . getHost ( ) ) ) ;
print right side of range in nodeprobe ring output
<nb> public class StackBlurManager { for ( x = NUMBER0 ; x < _width ; x ++ ) { - if ( ! alpha ) - alpha = ( int ) ( Color . alpha ( originalPixels [ y * _height + x ] ) ) != NUMBER1 ; + if ( ! alpha ) { + int index = y * _height + x ; + if ( index >= originalPixels . length ) { + index = originalPixels . length - NUMBER2 ; + } + alpha = ( int ) ( Color . alpha ( originalPixels [ index ] ) ) != NUMBER1 ; + } r [ yi ] = dv [ rsum ] ; g [ yi ] = dv [ gsum ] ;
add patch to prevent the indexOutOfBounds in StackBlurManager
<nb> public class LockHolderImpl implements LockHolder @ override public boolean equals ( Object obj ) { - return obj instanceof SchemaLock ; + return actual . equals ( obj ) ; } } }
Revert Improves index lookup performance by one order of magnitude
<nb> public class MediaGridAdapter extends CursorAdapter { int placeholderResId = MediaUtils . getPlaceholder ( filepath ) ; + imageView . setImageResource ( NUMBER0 ) ; imageView . setErrorImageResId ( placeholderResId ) ; imageView . setDefaultImageResId ( placeholderResId ) ;
FredrichO JonathanL fixed issue with views not recycling on media grid
<nb> public class EventConfiguration COMMENT COMMENT COMMENT - public static final int MAX_EVENT_LENGTH = NUMBER0 ; + public static final int MAX_EVENT_LENGTH = NUMBER1 ; COMMENT COMMENT
Java Double the length of max event length
<nb> public class TestEphemeralFileChannel COMMENT COMMENT EphemeralFileSystemAbstraction fs = new EphemeralFileSystemAbstraction ( ) ; - File root = new File ( STRING0 ) ; + File root = new File ( STRING0 ) . getCanonicalFile ( ) ; File dir1 = new File ( root , STRING1 ) ; File dir2 = new File ( root , STRING2 ) ; File subdir1 = new File ( dir1 , STRING3 ) ;
Make sure TestEphemeralFileChannel listFiles uses correct root file path prefix on Windows
<nb> package NAMESPACE ; public interface NatsConstants { - String NATS_MESSAGE_TIMESTAMP = STRING0 ; - String NATS_SUBSCRIBE_SID = STRING1 ; + String NATS_MESSAGE_TIMESTAMP = STRING2 ; + String NATS_SUBSCRIPTION_ID = STRING3 ; } <nb> public class NatsConsumer extends DefaultConsumer { Exchange exchange = getEndpoint ( ) . createExchange ( ) ; exchange . getIn ( ) . setBody ( msg ) ; exchange . getIn ( ) . setHeader ( NatsConstants . NATS_MESSAGE_TIMESTAMP , System . currentTimeMillis ( ) ) ; - exchange . getIn ( ) . setHeader ( NatsConstants . NATS_SUBSCRIBE_SID , sid ) ; + exchange . getIn ( ) . setHeader ( NatsConstants . NATS_SUBSCRIPTION_ID , sid ) ; try { processor . process ( exchange ) ; } catch ( Exception e ) {
Adjust header names
<nb> public class Contact implements ListItem { } public ArrayList < String > getOtrFingerprints ( ) { - ArrayList < String > fingerprints = new ArrayList < String > ( ) ; + final ArrayList < String > fingerprints = new ArrayList < String > ( ) ; try { if ( this . keys . has ( STRING0 ) ) { - JSONArray prints = this . keys - . getJSONArray ( STRING0 ) ; + final JSONArray prints = this . keys . getJSONArray ( STRING0 ) ; for ( int i = NUMBER0 ; i < prints . length ( ) ; ++ i ) { - fingerprints . add ( prints . getString ( i ) ) ; + final String print = prints . getString ( i ) ; + if ( print != null && ! print . isEmpty ( ) ) { + fingerprints . add ( prints . getString ( i ) ) ; + } } } } catch ( final JSONException ignored ) {
don t include empty fingerprints in list of otrfingerprints
<nb> public class OCommandExecutorSQLCreateClass extends OCommandExecutorSQLAbstract final ODatabaseRecord database = getDatabase ( ) ; database . checkSecurity ( ODatabaseSecurityResources . COMMAND , ORole . PERMISSION_READ ) ; - init ( ( OCommandRequestText ) iRequest ) ; - + init ( ( OCommandRequestText ) iRequest ) ; StringBuilder word = new StringBuilder ( ) ; <nb> public class OServerCommandPostCommand extends OServerCommandAuthenticatedDbAbst if ( ! executor . isIdempotent ( ) && iRequest . httpMethod . equals ( STRING0 ) ) throw new OCommandExecutionException ( STRING1 ) ; - response = executor . execute ( null ) ; + response = db . command ( cmd ) . execute ( ) ; fetchPlan = executor . getFetchPlan ( ) ;
fixed bug on propagating commands among the cluster nodes
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class SimpleDBRecorder implements MonkeyRecorder { CreateDomainRequest createDomainRequest = new CreateDomainRequest ( domain ) ; sdbClient ( ) . createDomain ( createDomainRequest ) ; - } catch ( AmazonServiceException e ) { + } catch ( AmazonClientException e ) { LOGGER . warn ( STRING0 , e ) ; } }
Tolerate AmazonClientException not just AmazonServiceException
<nb> public class LightStubBuilder implements StubBuilder { while ( ! parents . isEmpty ( ) ) { parent = parents . pop ( ) ; childNumber = childNumbers . pop ( ) ; + if ( children != null && children . size ( ) > NUMBER0 ) { + tree . disposeChildren ( children ) ; + } children = kinderGarden . pop ( ) ; parentStub = parentStubs . pop ( ) ; while ( ++ childNumber < children . size ( ) ) { <nb> public class LightTreeUtil { for ( int i = NUMBER0 , size = children . size ( ) ; i < size ; ++ i ) { toBuffer ( tree , children . get ( i ) , buffer , skipTypes ) ; } + tree . disposeChildren ( children ) ; } }
performance dispose light nodes in hotspots
<nb> public class RequestParams { this . builder = builder ; } - SINGLE + SINGLE COMMENT if ( ! TextUtils . isEmpty ( buildUri ) ) return ;
update java docs
<nb> public class TraktAddFragment extends AddFragment { @ override public void onLoadFinished ( Loader < TraktAddLoader . Result > loader , TraktAddLoader . Result data ) { + if ( ! isAdded ( ) ) { + return ; + } setSearchResults ( data . results ) ; setEmptyMessage ( data . emptyTextResId ) ; setProgressVisible ( false , true ) ; <nb> public class TvdbAddFragment extends AddFragment { @ override public void onLoadFinished ( Loader < TvdbAddLoader . Result > loader , TvdbAddLoader . Result data ) { + if ( ! isAdded ( ) ) { + return ; + } setSearchResults ( data . results ) ; setEmptyMessage ( data . emptyTextResId ) ; setProgressVisible ( false , true ) ;
Only set results if views available in AddFragments
<nb> public class ReengagementReceiver extends BroadcastReceiver { @ override public void onReceive ( Context context , Intent intent ) { + if ( ! Preferences . getBoolean ( R . string . p_rmd_enabled , true ) ) + return ; + DependencyInjectionService . getInstance ( ) . inject ( this ) ; int reengagementReminders = Preferences . getInt ( ReengagementService . PREF_REENGAGEMENT_COUNT , NUMBER0 ) ;
Don t show reengagement reminders if reminders are disabled
<nb> - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> COMMENT COMMENT COMMENT - package NAMESPACE ; import NAMESPACE ;
Updated license header
<nb> public abstract class BaseUpdateRequest extends WriteRequest { return isUpsert ; } - SINGLE public BaseUpdateRequest upsert ( final boolean isUpsert ) { this . isUpsert = isUpsert ; return this ; } - SINGLE public abstract boolean isMulti ( ) ; } <nb> public abstract class FindAndModify extends Query { public FindAndModify ( ) { } - SINGLE public FindAndModify where ( final BsonDocument filter ) { this . filter = filter ; return this ; <nb> public abstract class FindAndModify extends Query { this . upsert = upsert ; return this ; } - SINGLE public BsonDocument getFilter ( ) { return filter ;
removed checkstyle suppression
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class InstalledPackagesPanel extends JPanel { myPackagesTable . setPaintBusy ( false ) ; myPackagesTable . getEmptyText ( ) . setText ( StatusText . DEFAULT_EMPTY_TEXT ) ; updateUninstallUpgrade ( ) ; + SINGLE + SINGLE + ActivityTracker . getInstance ( ) . inc ( ) ; } public void doUpdatePackages ( @ notnull final PackageManagementService packageManagementService ) {
update action presentations even if there are no mouse or key events
<nb> public class GrailsConsole { public static final String SPACE = STRING0 ; public static final String ERROR = STRING1 ; public static final String WARNING = STRING2 ; + public static final String STACKTRACE_MESSAGE = STRING3 ; private StringBuilder maxIndicatorString ; private int cursorMove ; <nb> public class GrailsConsole { try { if ( ( verbose || stacktrace ) && error != null ) { printStackTrace ( msg , error ) ; - error ( ERROR , msg ) ; + error ( ERROR , msg ) ; } else { - error ( ERROR , msg ) ; + error ( ERROR , msg + STACKTRACE_MESSAGE ) ; } } finally { postPrintMessage ( ) ;
provide hint to use stacktrace to see the full stack trace
<nb> public class OperatorTakeUntil { verify ( result , times ( NUMBER0 ) ) . onNext ( STRING0 ) ; verify ( result , times ( NUMBER0 ) ) . onNext ( STRING1 ) ; - SINGLE verify ( result , times ( NUMBER0 ) ) . onError ( error ) ; verify ( result , times ( NUMBER1 ) ) . onCompleted ( ) ; verify ( sSource , times ( NUMBER0 ) ) . unsubscribe ( ) ;
Cleaned up comment
<nb> public class ListCollectionsOperation < T > implements AsyncReadOperation < AsyncBatc public BatchCursor < T > call ( final ConnectionSource source , final Connection connection ) { if ( serverIsAtLeastVersionTwoDotEight ( connection ) ) { try { - return executeWrappedCommandProtocol ( databaseName , getCommand ( ) , createCommandDecoder ( ) , binding , + return executeWrappedCommandProtocol ( databaseName , getCommand ( ) , createCommandDecoder ( ) , connection , commandTransformer ( source ) ) ; } catch ( MongoCommandException e ) { return rethrowIfNotNamespaceError ( e , createEmptyBatchCursor ( createNamespace ( ) , decoder ,
ListCollectionsOperation execute now uses the right connection to execute the listConnections command
<nb> import NAMESPACE ; COMMENT mWebView . updateCachedTextfield ( getText ( ) . toString ( ) ) ; } + + @ override + public boolean requestRectangleOnScreen ( Rect rectangle ) { + SINGLE + SINGLE + if ( ! mWebView . inAnimateZoom ( ) ) { + return super . requestRectangleOnScreen ( rectangle ) ; + } + return false ; + } } <nb> public class WebView extends AbsoluteLayout } } + boolean inAnimateZoom ( ) { + return mZoomScale != NUMBER0 ; + } + COMMENT COMMENT COMMENT
Skip requestRectangleOnScreen for WebTextView during
<nb> public class RedissonList < V > extends RedissonExpirable implements RList < V > { private < R > Future < R > indexOfAsync ( Object o , Convertor < R > convertor ) { return commandExecutor . evalReadAsync ( getName ( ) , new RedisCommand < R > ( STRING0 , convertor , NUMBER0 ) , - STRING1 + - STRING2 + - STRING3 , + STRING4 + + STRING5 + + STRING6 + + STRING7 + + STRING8 + + STRING9 + + STRING10 + + STRING10 + + STRING3 , Collections . < Object > singletonList ( getName ( ) ) , o ) ; }
RedissonList contains method speed optimization
<nb> public class Pager extends SimplePager String text = super . createText ( ) ; if ( display . isRowCountExact ( ) ) - return text ; + return STRING0 + text ; else { int pos = text . indexOf ( STRING1 ) ; - if ( pos >= NUMBER0 ) - return text . substring ( NUMBER0 , pos ) ; - else - return text ; + return STRING0 + ( pos >= NUMBER0 ? text . substring ( NUMBER0 , pos ) : text ) ; } }
Add Commits prefix to pager label
<nb> public class FreemarkerComponent extends UriEndpointComponent { public synchronized Configuration getConfiguration ( ) { if ( configuration == null ) { - configuration = new Configuration ( Configuration . VERSION_2_3_21 ) ; + configuration = new Configuration ( ) ; configuration . setTemplateLoader ( new URLTemplateLoader ( ) { @ override protected URL getURL ( String name ) {
Use default constructor to no tie it to a specific version
<nb> public abstract class SettingInjectorService extends IntentService { COMMENT COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT public Status ( String summary , boolean enabled ) {
Add a little comment about the enabled value
<nb> public class ImageUtils COMMENT public static Image getBytesInImage ( byte [ ] imageBytes ) { + if ( imageBytes == null || ! ( imageBytes . length > NUMBER0 ) ) + return null ; + Image image = null ; try {
Adds NPE check
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class AbstractProcessor extends AbstractProcessorLight implement protected void execute ( Runnable runnable ) { SocketWrapperBase < ? > socketWrapper = this . socketWrapper ; if ( socketWrapper == null ) { - getLog ( ) . warn ( sm . getString ( STRING0 ) , new Exception ( ) ) ; + throw new RejectedExecutionException ( sm . getString ( STRING0 ) ) ; } else { socketWrapper . getExecutor ( ) . execute ( runnable ) ; }
Use the standard RejectedExecutionException
<nb> import NAMESPACE ; import 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 ; <nb> public class PyClassNameCompletionContributor extends CompletionContributor { protected void addCompletions ( @ notnull final CompletionParameters parameters , ProcessingContext context , @ notnull final CompletionResultSet resultSet ) { - addVariantsFromIndex ( resultSet , parameters . getOriginalFile ( ) , PyClassNameIndex . KEY , CLASS_INSERT_HANDLER , Condition . TRUE ) ; + addVariantsFromIndex ( resultSet , parameters . getOriginalFile ( ) , PyClassNameIndex . KEY , CLASS_INSERT_HANDLER , Conditions . < PyClass > alwaysTrue ( ) ) ; addVariantsFromIndex ( resultSet , parameters . getOriginalFile ( ) , PyFunctionNameIndex . KEY , FUNCTION_INSERT_HANDLER , TOPLEVEL_FUNCTION ) ; } } ) ;
generify a little bit
<nb> public class JingleConnection implements Downloadable { @ override public void onPrimaryCandidateFound ( boolean success , - final JingleCandidate candidate ) { + final JingleCandidate candidate ) { if ( success ) { final JingleSocks5Transport socksConnection = new JingleSocks5Transport ( JingleConnection . this , candidate ) ; <nb> public class JingleConnection implements Downloadable { private List < Element > getCandidatesAsElements ( ) { List < Element > elements = new ArrayList < > ( ) ; for ( JingleCandidate c : this . candidates ) { - elements . add ( c . toElement ( ) ) ; + if ( c . isOurs ( ) ) { + elements . add ( c . toElement ( ) ) ; + } } return elements ; }
don t offer initiator his own candidates
<nb> public class SwipeAdapterView extends BaseFlingAdapterView implements CardEventL this ( context , null ) ; } - public SwipeFlingAdapterView ( Context context , AttributeSet attrs ) { + public SwipeAdapterView ( Context context , AttributeSet attrs ) { this ( context , attrs , NUMBER0 ) ; }
Fix constructor name
<nb> public class NameUtil { return null ; } + public int matchingDegree ( String name ) { + Iterable < TextRange > iterable = matchingFragments ( name ) ; + if ( iterable == null ) return Integer . MIN_VALUE ; + + int matchingCaps = NUMBER0 ; + int fragmentCount = NUMBER0 ; + for ( TextRange range : iterable ) { + matchingCaps += StringUtil . capitalsOnly ( name . substring ( range . getStartOffset ( ) , range . getEndOffset ( ) ) ) . length ( ) ; + fragmentCount ++ ; + } + + int patternCaps = StringUtil . capitalsOnly ( new String ( myPattern ) ) . length ( ) ; + return - fragmentCount - Math . max ( NUMBER0 , patternCaps - matchingCaps ) * NUMBER1 ; + } + private static boolean isWordSeparator ( char c ) { return Character . isWhitespace ( c ) || c == STRING0 || c == STRING1 ; }
matching degree in NameUtil
<nb> public class AccountManager { COMMENT COMMENT COMMENT - COMMENT - COMMENT COMMENT COMMENT COMMENT <nb> public class AccountManager { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class AccountManager { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
fix some minor javadoc errors in AccountManager
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ActivityModule { @ provides @ peractivity Activity activity ( ) { return this . activity ; } - - @ provides @ peractivity Context provideActivityContext ( ) { - return this . activity ; - } }
Remove unused Context provide method
<nb> public class FlowControlTest extends AbstractTest } } ) ; - SINGLE + SINGLE final CountDownLatch settingsLatch = new CountDownLatch ( NUMBER0 ) ; Session client = newClient ( new Session . Listener . Adapter ( ) { <nb> public abstract class HTTP2Session implements ISession , Parser . Listener { if ( LOG . isDebugEnabled ( ) ) LOG . debug ( STRING0 , frame ) ; + + if ( frame . isReply ( ) ) + return false ; + Map < Integer , Integer > settings = frame . getSettings ( ) ; if ( settings . containsKey ( SettingsFrame . MAX_CONCURRENT_STREAMS ) ) {
Fixed infinite loop when receiving a SETTINGS frame
<nb> public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_IS_DATA_ONLY = NUMBER0 < < NUMBER1 ; COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public static final int FLAG_PRIVILEGED = NUMBER0 < < NUMBER2 ; + + COMMENT COMMENT COMMENT COMMENT <nb> public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_CANT_SAVE_STATE = NUMBER0 < < NUMBER3 ; COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - public static final int FLAG_PRIVILEGED = NUMBER0 < < NUMBER4 ; - - COMMENT COMMENT COMMENT COMMENT
Fix FLAG_PRIVILEGED numbering
<nb> public abstract class AbstractFuture < V > implements ListenableFuture < V > { VALUE_UPDATER = null ; } ATOMIC_HELPER = helper ; + + SINGLE + SINGLE + Class < ? > ensureLoaded = LockSupport . class ; } COMMENT
Prevent rare disastrous classloading in first call to LockSupport park
<nb> class GroupMapper implements RecordMapper < GroupsRecord , Group > { } private ImmutableMap < String , String > tryToReadMapFromMetadata ( String value ) { - if ( ! value . isEmpty ( ) ) { + if ( value != null && ! value . isEmpty ( ) ) { try { return ImmutableMap . copyOf ( mapper . readValue ( value , MAP_STRING_STRING_TYPE ) ) ; } catch ( IOException e ) {
Avoid NPE on null group metadata
<nb> public class Utf8Decoder extends CharsetDecoder { } } if ( jchar == NUMBER0 && inIndexLimit > inIndex + NUMBER1 ) { - if ( ( bArr [ inIndex + NUMBER1 ] & NUMBER2 ) < NUMBER3 ) { + if ( ( bArr [ inIndex + NUMBER1 ] & NUMBER0 ) == NUMBER4 ) { SINGLE SINGLE SINGLE - return CoderResult . malformedForLength ( NUMBER5 ) ; + return CoderResult . malformedForLength ( NUMBER1 ) ; } } break ; <nb> public class TestUtf8Extended { new int [ ] { NUMBER6 , NUMBER7 , NUMBER8 } , NUMBER1 , STRING0 ) . setSkipErrorForJvm ( true ) ) ; + SINGLE + testCases . add ( new Utf8TestCase ( + STRING1 , + new int [ ] { NUMBER9 , NUMBER7 , NUMBER7 , NUMBER8 } , + NUMBER1 , + STRING2 ) . setSkipErrorForJvm ( true ) ) ; } @ test
Add final zero padding test
<nb> public class BuildCraftBuilders extends BuildCraftMod { BuildCraftCore . mainConfigManager . register ( STRING0 , NUMBER0 , STRING1 , ConfigManager . RestartRequirement . NONE ) ; BuildCraftCore . mainConfigManager . register ( STRING2 , false , STRING3 , ConfigManager . RestartRequirement . NONE ) ; - BuildCraftCore . mainConfigManager . register ( STRING4 , true , STRING3 , ConfigManager . RestartRequirement . NONE ) ; + BuildCraftCore . mainConfigManager . register ( STRING4 , true , STRING5 , ConfigManager . RestartRequirement . NONE ) ; BuildCraftCore . mainConfigManager . get ( STRING6 ) . setShowInGui ( false ) ; BuildCraftCore . mainConfigManager . get ( STRING0 ) . setMinValue ( NUMBER1 ) . setMaxValue ( NUMBER0 ) ;
Corrected config comment on doChunkLoading
<nb> public class ShowsActivity extends BaseTopShowsActivity implements CompatActionB @ override protected void onStart ( ) { super . onStart ( ) ; - EasyTracker . getInstance ( ) . activityStart ( this ) ; }
Remove empty line