diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class HttpServerUpgradeHandler extends HttpObjectAggregator {
@ override
public boolean release ( int decrement ) {
- return upgradeRequest . release ( ) ;
+ return upgradeRequest . release ( decrement ) ;
}
@ override
|
Correctly handle UpgradeEvent release decrement
|
<nb> public final class Maps {
return fromMap . keySet ( ) . retainAll ( keys ) ;
}
}
+
+ @ override public void clear ( ) {
+ try {
+ super . clear ( ) ;
+ } catch ( UnsupportedOperationException e ) {
+ fromMap . clear ( ) ;
+ }
+ }
}
}
<nb> public final class Maps {
return fromMap . keySet ( ) . retainAll ( keys ) ;
}
}
+
+ @ override public void clear ( ) {
+ try {
+ super . clear ( ) ;
+ } catch ( UnsupportedOperationException e ) {
+ fromMap . clear ( ) ;
+ }
+ }
}
}
|
Add more MapInterfaceTests
|
<nb> public enum AwsInjectableTag implements Tag {
return getUrlValue ( STRING0 ) ;
}
+ @ suppresswarnings ( STRING1 )
static String getUrlValue ( String path ) {
BufferedReader reader = null ;
try {
|
suppress pmd warning
|
<nb> class Waiter {
} catch ( IndexOutOfBoundsException exception ) {
int match = index + NUMBER0 ;
if ( match > NUMBER0 ) {
- Assert . assertTrue ( index + STRING0 + classToFilterBy . getSimpleName ( ) + STRING1 + STRING2 , false ) ;
+ Assert . assertTrue ( match + STRING0 + classToFilterBy . getSimpleName ( ) + STRING1 + STRING2 , false ) ;
}
else {
- Assert . assertTrue ( index + STRING0 + classToFilterBy . getSimpleName ( ) + STRING3 , false ) ;
+ Assert . assertTrue ( match + STRING0 + classToFilterBy . getSimpleName ( ) + STRING3 , false ) ;
}
}
views = null ;
|
Assert message correction in waitForAndGetView
|
<nb> final class PolymerPass extends AbstractPostOrderCallback implements HotSwapComp
COMMENT
private boolean isPolymerElementPropExpr ( Node value ) {
return value != null && value . isExprResult ( )
+ && value . getFirstChild ( ) . getFirstChild ( ) != null
&& value . getFirstChild ( ) . getFirstChild ( ) . isGetProp ( )
&& NodeUtil . getRootOfQualifiedName (
value . getFirstChild ( ) . getFirstChild ( ) ) . matchesQualifiedName ( POLYMER_ELEMENT_NAME ) ;
|
Fix a crash by adding a null check when looking at externs ExprResults
|
<nb> public class ActivityManager {
public TaskDescription ( TaskDescription td ) {
mLabel = td . mLabel ;
mIcon = td . mIcon ;
- setPrimaryColor ( td . mColorPrimary ) ;
+ mColorPrimary = td . mColorPrimary ;
mIconFilename = td . mIconFilename ;
}
<nb> public class ActivityManager {
COMMENT
COMMENT
public void setPrimaryColor ( int primaryColor ) {
- mColorPrimary = NUMBER0 | primaryColor ;
+ SINGLE
+ if ( ( primaryColor != NUMBER1 ) && ( Color . alpha ( primaryColor ) != NUMBER2 ) ) {
+ throw new RuntimeException ( STRING0 ) ;
+ }
+ mColorPrimary = primaryColor ;
}
COMMENT
|
Fixing regression with black task bar background
|
<nb> public class SourcePaths {
}
public static Collection < Path > toPaths ( Iterable < ? extends SourcePath > sourcePaths ) {
- Function < SourcePath , Path > transform = new Function < SourcePath , Path > ( ) {
- @ override
- public Path apply ( SourcePath sourcePath ) {
- return sourcePath . resolve ( ) ;
- }
- } ;
SINGLE
- return FluentIterable . from ( sourcePaths ) . transform ( transform ) . toList ( ) ;
+ return FluentIterable . from ( sourcePaths ) . transform ( TO_PATH ) . toList ( ) ;
}
public static ImmutableSortedSet < SourcePath > toSourcePathsSortedByNaturalOrder (
|
De dupe some code
|
<nb> public class ZookeeperElectionTest extends ZooKeeperTestSupport {
LOG . debug ( STRING0 ) ;
candidateOneContext . stop ( ) ; SINGLE
-
assertIsMaster ( electionCandidate2 ) ;
}
<nb> public class ZookeeperElectionTest extends ZooKeeperTestSupport {
ZooKeeperElection electionCandidate1 = createElectionCandidate ( candidateOneContext , NUMBER0 ) ;
assertTrue ( STRING1 , electionCandidate1 . isMaster ( ) ) ;
+
ZooKeeperElection electionCandidate2 = createElectionCandidate ( candidateTwoContext , NUMBER0 ) ;
- SINGLE
- Thread . sleep ( NUMBER1 ) ;
- assertTrue ( STRING2 , electionCandidate2 . isMaster ( ) ) ;
+ assertIsMaster ( electionCandidate2 ) ;
}
@ test
|
fixed test which randomly fail on slow CI server
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- public class ApiUtils {
+ public final class ApiUtils {
public static MocoMonitor mergeMonitor ( final MocoMonitor monitor , final MocoMonitor monitor2 , final MocoMonitor [ ] monitors ) {
return new CompositeMonitor ( asIterable ( monitor , monitor2 , monitors ) ) ;
}
|
added missing final to api utils class
|
<nb> final class HttpReadListener implements ChannelListener < PushBackStreamChannel > {
if ( read > maxRequestSize ) {
UndertowLogger . REQUEST_LOGGER . requestHeaderWasTooLarge ( connection . getPeerAddress ( ) , maxRequestSize ) ;
IoUtils . safeClose ( connection ) ;
+ return ;
}
if ( state . isComplete ( ) ) {
|
Add missing return statement
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public final class HazelcastInstanceProxy implements HazelcastInstance , SerializationServiceSupport {
volatile HazelcastInstanceImpl original ;
|
Improved HazelcastInstanceProxy javadoc
|
<nb> public class DumpClass2 {
public Object makeClosure ( ) {
return new Closure ( this ) {
- public void doCall ( ) {
-
+ public Object doCall ( ) {
+ return null ;
}
public MetaClass getMetaClass ( ) {
return null ;
|
the Closure class has a new doCall method returning Object so void is changed to Object
|
<nb> public class JsonPathCBRTest extends CamelTestSupport {
from ( STRING0 )
. choice ( )
- . when ( PredicateBuilder . isLessThan ( ExpressionBuilder . languageExpression ( STRING1 , STRING2 ) , ExpressionBuilder . constantExpression ( NUMBER0 ) ) )
+ . when ( PredicateBuilder . isLessThan ( ExpressionBuilder . languageExpression ( STRING3 , STRING2 ) , ExpressionBuilder . constantExpression ( NUMBER0 ) ) )
. to ( STRING4 )
. otherwise ( )
. to ( STRING5 ) ;
|
Fixed the test error of JsonPathCBRTest testCheapBicycle
|
<nb> public class ImageDiskCache {
COMMENT
COMMENT
public void loadThumbnailBitmap ( final String url , final ImageView target , final int length ) {
+ if ( url == null ) {
+ Log . w ( TAG , STRING0 ) ;
+ return ;
+ }
final ImageLoader il = ImageLoader . getInstance ( ) ;
target . setTag ( R . id . image_disk_cache_key , url ) ;
if ( diskCache != null ) {
<nb> public class ImageDiskCache {
COMMENT
COMMENT
public void loadCoverBitmap ( final String url , final ImageView target , final int length ) {
+ if ( url == null ) {
+ Log . w ( TAG , STRING1 ) ;
+ return ;
+ }
final ImageLoader il = ImageLoader . getInstance ( ) ;
target . setTag ( R . id . image_disk_cache_key , url ) ;
if ( diskCache != null ) {
|
Fixed NullPointerException in ImageDiskCache
|
<nb> public class UUIDTests extends ElasticsearchTestCase {
public void testUUIDThreaded ( UUIDGenerator uuidSource ) {
HashSet < UUIDGenRunner > runners = new HashSet < > ( ) ;
HashSet < Thread > threads = new HashSet < > ( ) ;
- int count = NUMBER0 ;
+ int count = NUMBER1 ;
int uuids = NUMBER2 ;
for ( int i = NUMBER3 ; i < count ; ++ i ) {
UUIDGenRunner runner = new UUIDGenRunner ( uuids , uuidSource ) ;
|
make test less evil to not cause OOME
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ @ runwith ( HazelcastParallelClassRunner . class )
+ @ category ( { QuickTest . class , ParallelTest . class } )
public class ResponseMessageConstTest extends HazelcastTestSupport {
@ test
|
Added missing RunWith and Category to ResponseMessageConstTest
|
<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 BeanMethodTests {
assertThat ( beanMethod . getRequiredAnnotation ( Bean . class ) , sameInstance ( beanAnno ) ) ;
try {
beanMethod . getRequiredAnnotation ( Override . class ) ;
- fail ( STRING0 ) ;
- } catch ( IllegalArgumentException ex ) { COMMENT }
+ fail ( STRING1 ) ;
+ } catch ( IllegalStateException ex ) { COMMENT }
SINGLE
try {
|
Updated BeanMethodTests to reflect change from IllegalArgumentException IllegalStateException
|
<nb> public class TextEditingTargetWidget
{
rmdFormatButton_ . setVisible ( visible ) ;
knitDocumentButton_ . getElement ( ) . getStyle ( ) . setMarginRight (
- visible ? NUMBER0 : NUMBER1 , Unit . PX ) ;
+ visible ? NUMBER2 : NUMBER1 , Unit . PX ) ;
}
@ override
|
don t set right margin for knit button ends up too far away on qt
|
<nb> public class CommaFeedApplication extends Application < CommaFeedConfiguration > {
SINGLE
factory . getProperties ( ) . put ( AvailableSettings . USE_NEW_ID_GENERATOR_MAPPINGS , STRING0 ) ;
+
+ factory . getProperties ( ) . put ( AvailableSettings . STATEMENT_BATCH_SIZE , STRING1 ) ;
+ factory . getProperties ( ) . put ( AvailableSettings . BATCH_VERSIONED_DATA , STRING2 ) ;
return factory ;
}
} ) ;
|
enable batch inserts updates
|
<nb> public class VcsLogUtil {
}
else {
result . add ( next ) ;
- if ( result . size ( ) >= VcsLogUtil . MAX_SELECTED_COMMITS ) break ;
+ if ( result . size ( ) >= MAX_SELECTED_COMMITS ) break ;
}
}
|
vcs log remove unnecessary qualified field access
|
<nb> public abstract class AbstractCoordinator implements Closeable {
private boolean closed = false ;
private AtomicReference < RuntimeException > failed = new AtomicReference < > ( null ) ;
+ HeartbeatThread ( ) {
+ super ( STRING0 + ( groupId . isEmpty ( ) ? STRING1 : STRING2 + groupId ) ) ;
+ }
+
public void enable ( ) {
synchronized ( AbstractCoordinator . this ) {
this . enabled = true ;
|
Give a name to the coordinator heartbeat thread
|
<nb> class WatchPointsRegistry {
}
public boolean shouldWatch ( File directory ) {
- return ( rootSubset . isInRootsOrAncestorOrAnyRoot ( directory ) || isAncestorOfAnyRoot ( directory , allRequestedRoots , true ) ) && ! isAncestorOfAnyRoot ( directory , currentWatchPoints , true ) ;
+ final boolean result = ( rootSubset . isInRootsOrAncestorOrAnyRoot ( directory ) || isAncestorOfAnyRoot ( directory , allRequestedRoots , true ) ) && ! isAncestorOfAnyRoot ( directory , currentWatchPoints , true ) ;
+ if ( ! result && LOG . isDebugEnabled ( ) ) {
+ LOG . debug ( STRING0 , directory , currentWatchPoints , allRequestedRoots , rootSubset . roots , rootSubset . combinedFileSystemSubset ) ;
+ }
+ return result ;
}
class Delta {
|
Add debug logging to assist investigating problems
|
<nb> public class VolumePreference extends SeekBarPreference implements
}
public void onActivityStop ( ) {
- cleanup ( ) ;
+ if ( mSeekBarVolumizer != null ) {
+ mSeekBarVolumizer . stopSample ( ) ;
+ }
}
COMMENT
|
VolumePreference onActivityStop only stops playback
|
<nb> public class JavaBeanDeserializer implements ObjectDeserializer {
InvocationTargetException {
Object object = null ;
- if ( beanInfo . creatorConstructor == null && beanInfo . buildMethod == null ) {
+ if ( beanInfo . creatorConstructor == null && beanInfo . buildMethod == null && beanInfo . factoryMethod == null ) {
object = createInstance ( null , clazz ) ;
for ( Map . Entry < String , Object > entry : map . entrySet ( ) ) {
|
bug fixed for JSON toJavaObject invoke factory method
|
<nb> public class WindowUtils {
else {
if ( rp != null ) {
Color bg = ( Color ) rp . getClientProperty ( TRANSPARENT_OLD_BG ) ;
- SINGLE
+ SINGLE
+ SINGLE
SINGLE
- if ( bg instanceof apple . laf . CColorPaintUIResource ) {
+ if ( bg != null ) {
bg = new Color ( bg . getRed ( ) , bg . getGreen ( ) , bg . getBlue ( ) , bg . getAlpha ( ) ) ;
}
w . setBackground ( bg ) ;
|
remove apple specific reference
|
<nb> public class BlockGenericPipe extends BlockBuildCraft {
}
private boolean skippedFirstIconRegister ;
- private int renderMask = NUMBER0 ;
COMMENT
public BlockGenericPipe ( ) {
<nb> public class BlockGenericPipe extends BlockBuildCraft {
}
}
+ @ override
+ public IIcon getIcon ( int side , int meta ) {
+ return PipeIconProvider . TYPE . PipeItemsStone . getIcon ( ) ;
+ }
}
|
Removed abandoned mask and provided default texture
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
public class Semaphore {
- private static final Logger LOG = Logger . getInstance ( STRING0 ) ;
-
private static final class Sync extends AbstractQueuedSynchronizer {
public int tryAcquireShared ( int acquires ) {
return getState ( ) == NUMBER0 ? NUMBER1 : - NUMBER1 ;
<nb> public class Semaphore {
public boolean waitFor ( final long timeout ) {
try {
+ if ( sync . tryAcquireShared ( NUMBER1 ) >= NUMBER0 ) return true ;
+
return sync . tryAcquireSharedNanos ( NUMBER1 , TimeUnit . MILLISECONDS . toNanos ( timeout ) ) ;
}
catch ( InterruptedException e ) {
|
Skip Thread isInterruped checks wherever possible
|
<nb> public class CoordinationTransformer implements TreeTransformer {
if ( VERBOSE ) {
System . err . println ( STRING0 + movedRB ) ;
}
- return movedRB ;
+ Tree changedSbar = changeSbarToPP ( movedRB ) ;
+ if ( VERBOSE ) {
+ System . err . println ( STRING1 + movedRB ) ;
+ }
+ return changedSbar ;
+ }
+
+ private static TregexPattern changeSbarToPPTregex =
+ TregexPattern . compile ( STRING2 ) ;
+
+ private static TsurgeonPattern changeSbarToPPTsurgeon =
+ Tsurgeon . parseOperation ( STRING3 ) ;
+
+ public Tree changeSbarToPP ( Tree t ) {
+ if ( t == null ) {
+ return null ;
+ }
+ return Tsurgeon . processPattern ( changeSbarToPPTregex , changeSbarToPPTsurgeon , t ) ;
}
private static TregexPattern findFlatConjpTregex =
|
Convert SBAR to PP in certain circumstances so the converter can find prep pcomp
|
<nb> public class LookupImpl extends LightweightHint implements LookupEx , Disposable ,
}
public void refreshUi ( boolean mayCheckReused , boolean onExplicitAction ) {
+ HeavyProcessLatch . INSTANCE . stopThreadPrioritizing ( ) ;
+
assert ! myUpdating ;
LookupElement prevItem = getCurrentItem ( ) ;
myUpdating = true ;
<nb> public class LookupImpl extends LightweightHint implements LookupEx , Disposable ,
}
public void markReused ( ) {
+ HeavyProcessLatch . INSTANCE . stopThreadPrioritizing ( ) ;
+
synchronized ( myList ) {
myArranger = myArranger . createEmptyCopy ( ) ;
}
<nb> public class LookupImpl extends LightweightHint implements LookupEx , Disposable ,
@ notnull
public Map < LookupElement , List < Pair < String , Object > > > getRelevanceObjects ( @ notnull Iterable < LookupElement > items , boolean hideSingleValued ) {
+ HeavyProcessLatch . INSTANCE . stopThreadPrioritizing ( ) ;
+
synchronized ( myList ) {
return myPresentableArranger . getRelevanceObjects ( items , hideSingleValued ) ;
}
|
disable UI thread prioritizing in more places before taking a lock
|
<nb> package NAMESPACE ;
COMMENT
COMMENT
public enum Biome {
- RAINFOREST ,
SWAMPLAND ,
- SEASONAL_FOREST ,
FOREST ,
- SAVANNA ,
- SHRUBLAND ,
TAIGA ,
DESERT ,
PLAINS ,
- ICE_DESERT ,
- TUNDRA ,
HELL ,
SKY ,
OCEAN ,
|
Purge outdated biomes
|
<nb> public class ComplexHeaderDrawerActivity extends ActionBarActivity {
new SecondaryDrawerItem ( ) . withName ( R . string . drawer_item_help ) . withIcon ( FontAwesome . Icon . faw_question ) . setEnabled ( false ) ,
new DividerDrawerItem ( ) ,
new SecondaryDrawerItem ( ) . withName ( R . string . drawer_item_open_source ) . withIcon ( FontAwesome . Icon . faw_github ) . withIdentifier ( NUMBER0 ) . withCheckable ( false ) ,
- new SecondaryDrawerItem ( ) . withName ( R . string . drawer_item_contact ) . withIcon ( GoogleMaterial . Icon . gmd_format_color_fill ) . withTag ( STRING0 )
+ new SecondaryDrawerItem ( ) . withName ( R . string . drawer_item_contact ) . withTintSelectedIcon ( true ) . withIcon ( new IconicsDrawable ( this , GoogleMaterial . Icon . gmd_add ) . actionBarSize ( ) . paddingDp ( NUMBER1 ) . colorRes ( R . color . material_drawer_dark_primary_text ) ) . withTag ( STRING0 )
) SINGLE
. withOnDrawerItemClickListener ( new Drawer . OnDrawerItemClickListener ( ) {
@ override
|
add sample for new auto tint icon
|
<nb> public final class Job < T extends Keyed > extends Keyed < Job > {
}
static public boolean isCancelledException ( Throwable ex ) {
- return false ; SINGLE
+ return ex instanceof JobCancelledException || ex . getCause ( ) != null && ex . getCause ( ) instanceof JobCancelledException ;
}
private static class Barrier1OnCom extends JAtomic {
|
No longer print out job cancellations
|
<nb> public class SdpUtils
String [ ] formatsArray = new String [ formatsVec . size ( ) ] ;
return sdpFactory . createMediaDescription ( mediaType , NUMBER0 , NUMBER1 ,
- SdpConstants . RTP_AVP , formatsVec . toArray ( formatsArray ) ) ;
+ offer . getMedia ( ) . getProtocol ( ) ,
+ formatsVec . toArray ( formatsArray ) ) ;
}
catch ( Exception e )
{
|
Create disabling answer with the same protocol as the offer
|
<nb> public class ShowcaseView extends RelativeLayout
return this ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public Builder setContentTextPaint ( TextPaint textPaint ) {
showcaseView . setContentTextPaint ( textPaint ) ;
return this ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public Builder setContentTitlePaint ( TextPaint textPaint ) {
showcaseView . setContentTitlePaint ( textPaint ) ;
return this ;
|
Add javadoc to new APIs
|
<nb> public class PaymentSession {
}
try {
SINGLE
- Class Build = Class . forName ( STRING0 ) ;
- Object version = Build . getDeclaredField ( STRING1 ) . get ( Build ) ;
+ Class version = Class . forName ( STRING2 ) ;
SINGLE
- if ( version . getClass ( ) . getDeclaredField ( STRING3 ) . getInt ( version ) >= NUMBER0 ) {
+ if ( version . getDeclaredField ( STRING3 ) . getInt ( version ) >= NUMBER0 ) {
SINGLE
SINGLE
KeyStore keystore = KeyStore . getInstance ( STRING4 ) ;
|
fix broken reflection code for Android
|
<nb> public abstract class AbstractCommand implements PlaybackCommand {
Runnable runnable = new Runnable ( ) {
@ override
public void run ( ) {
- _execute ( context ) . notify ( result ) ;
+ try {
+ _execute ( context ) . notify ( result ) ;
+ }
+ catch ( Throwable e ) {
+ context . error ( e . getMessage ( ) , getLine ( ) ) ;
+ result . setRejected ( ) ;
+ }
}
} ;
<nb> public abstract class AbstractCommand implements PlaybackCommand {
return result ;
}
- catch ( Exception e ) {
+ catch ( Throwable e ) {
context . error ( e . getMessage ( ) , getLine ( ) ) ;
return new ActionCallback . Rejected ( ) ;
}
|
correctly set current command rejection in case of exception
|
<nb> public abstract class KotlinBuiltIns {
new Function1 < String , InputStream > ( ) {
@ override
public InputStream invoke ( String path ) {
- return KotlinBuiltIns . class . getClassLoader ( ) . getResourceAsStream ( path ) ;
+ ClassLoader classLoader = KotlinBuiltIns . class . getClassLoader ( ) ;
+ return classLoader != null ? classLoader . getResourceAsStream ( path ) : ClassLoader . getSystemResourceAsStream ( path ) ;
}
}
) ;
|
Fix occasional NPE from reflection initialization
|
<nb> public class SearchDialog extends DialogWrapper implements ConfigurationCreator
return result ;
}
- private static boolean ourSupportDifferentFileTypes = false ;
+ private static boolean ourSupportDifferentFileTypes = true ;
protected int getRowsCount ( ) {
return ( ourSupportDifferentFileTypes ) ? NUMBER0 : NUMBER1 ;
|
enabling different file types in SS
|
<nb> public class DiffPanelImpl implements DiffPanelEx , ContentChangeListener , TwoSid
return new DiffNavigatable ( currentSide ) ;
}
}
- if ( PlatformDataKeys . HELP_ID . is ( dataId ) ) {
- return STRING0 ;
- }
return super . getData ( dataId ) ;
}
|
remove helpId from old implementation
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
public final class UpgradeService {
<nb> public final class UpgradeService {
COMMENT
@ suppresswarnings ( STRING0 )
private void newVersionString ( StringBuilder changeLog , String version , String [ ] changes ) {
+ if ( Constants . ASTRID_LITE )
+ version = STRING1 + version . substring ( NUMBER0 ) ;
changeLog . append ( STRING2 ) . append ( version ) . append ( STRING3 ) ;
for ( String change : changes )
changeLog . append ( STRING4 ) . append ( change ) . append ( STRING5 ) ;
|
Adjust upgrade messages for altered version names
|
<nb>
- package NAMESPACE ;
+ package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Moved a test class for jmx to internal
|
<nb> public class MySQLTemplates extends SQLTemplates {
add ( Ops . DateTimeOps . YEAR_MONTH , STRING0 ) ;
SINGLE
+ add ( Ops . LIKE , STRING1 ) ;
add ( Ops . ENDS_WITH , STRING2 ) ;
add ( Ops . ENDS_WITH_IC , STRING3 ) ;
add ( Ops . STARTS_WITH , STRING4 ) ;
<nb> public class PostgresTemplates extends SQLTemplates {
add ( Ops . INDEX_OF_2ARGS , STRING5 ) ; SINGLE
SINGLE
+ add ( Ops . LIKE , STRING1 ) ;
add ( Ops . ENDS_WITH , STRING2 ) ;
add ( Ops . ENDS_WITH_IC , STRING3 ) ;
add ( Ops . STARTS_WITH , STRING4 ) ;
<nb> public class SQLTemplates extends Templates {
add ( Ops . SUBSTR_2ARGS , STRING6 ) ;
SINGLE
+ add ( Ops . LIKE , STRING7 ) ;
add ( Ops . ENDS_WITH , STRING8 ) ;
add ( Ops . ENDS_WITH_IC , STRING9 ) ;
add ( Ops . STARTS_WITH , STRING10 ) ;
|
added tests for escaping
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
- public class TargetAndConfiguration {
+ @ immutable
+ public final class TargetAndConfiguration {
private final Target target ;
@ nullable private final BuildConfiguration configuration ;
|
Declare TargetAndConfiguration as final and immutable
|
<nb> public class Athmosphere {
@ provider ( name = ProviderName . FORECASTIO , property = STRING0 )
} )
private Integer ozone ;
+
+ @ providermappings ( {
+ @ provider ( name = ProviderName . WUNDERGROUND , property = STRING1 )
+ } )
+ private Integer uvIndex ;
COMMENT
COMMENT
<nb> public class Athmosphere {
public void setOzone ( Integer ozone ) {
this . ozone = ozone ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ public Integer getUvIndex ( ) {
+ return uvIndex ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setUvIndex ( Integer uvIndex ) {
+ this . uvIndex = uvIndex ;
+ }
COMMENT
COMMENT
|
Adding Uv Index property to Atmosphere class
|
<nb> public class Configuration extends SimpleModificationTracker implements Persiste
@ state (
name = Configuration . COMPONENT_NAME ,
+ defaultStateAsResource = true ,
storages = {
@ storage ( file = StoragePathMacros . PROJECT_FILE ) ,
@ storage ( file = StoragePathMacros . PROJECT_CONFIG_DIR + STRING0 , scheme = StorageScheme . DIRECTORY_BASED )
|
Prj requires defaults
|
<nb> public class VSphereClient extends AWSClient {
String groupName = virtualMachine . getParent ( ) . getName ( ) ;
boolean shouldAddNamedGroup = true ;
- SINGLE
- SINGLE
+ if ( names != null ) {
+ SINGLE
+ throw new RuntimeException ( STRING0 ) ;
+ }
if ( shouldAddNamedGroup ) {
groups . addInstance ( instanceId , groupName ) ;
|
declared the not yet implemented feature by throwing an Exception if it
|
<nb> public class CassandraEmbeddedKeyColumnValueStore implements KeyColumnValueStore
}
@ override
- public RecordIterator < StaticBuffer > getKeys ( StoreTransaction txh ) throws StorageException {
- return new RowIterator ( getMinimumToken ( ) , getMaximumToken ( ) , null , storeManager . getPageSize ( ) ) ;
- }
-
- @ override
public KeyIterator getKeys ( KeyRangeQuery keyRangeQuery , StoreTransaction txh ) throws StorageException {
IPartitioner partitioner = StorageService . getPartitioner ( ) ;
|
Removing old method from embedded store
|
<nb> public class ThemeWebActivity extends WPWebViewActivity {
}
if ( TextUtils . isEmpty ( url ) ) {
- AppLog . e ( AppLog . T . UTILS , STRING0 ) ;
+ AppLog . e ( AppLog . T . UTILS , STRING1 ) ;
Toast . makeText ( activity , activity . getResources ( ) . getText ( R . string . invalid_url_message ) ,
Toast . LENGTH_SHORT ) . show ( ) ;
return ;
|
Fixing incorrect log message
|
<nb> public class FileWatchInputs {
return directories ;
}
- public List < File > getFiles ( ) { return files ; }
+ public List < File > getFiles ( ) {
+ return files ;
+ }
public static Builder newBuilder ( ) {
return new Builder ( ) ;
|
Fixed code layout
|
<nb> public class OrcEncodedDataReader extends CallableWithNdc < Void >
int stripeIx = NUMBER0 ;
for ( StripeInformation stripe : stripes ) {
long stripeStart = stripe . getOffset ( ) ;
- if ( offset > stripeStart ) continue ;
+ if ( offset > stripeStart ) {
+ SINGLE
+ ++ stripeIx ;
+ continue ;
+ }
if ( stripeIxFrom == - NUMBER1 ) {
if ( DebugUtils . isTraceOrcEnabled ( ) ) {
LlapIoImpl . LOG . info ( STRING0 + stripeIx
<nb> public class OrcEncodedDataReader extends CallableWithNdc < Void >
stripeIxFrom = stripeIx ;
}
if ( stripeStart >= maxOffset ) {
+ stripeIxTo = stripeIx ;
if ( DebugUtils . isTraceOrcEnabled ( ) ) {
LlapIoImpl . LOG . info ( STRING1 + stripeIxTo + STRING2 + stripeStart
+ STRING3 + maxOffset + STRING4 + ( stripeIxTo - stripeIxFrom ) + STRING5 ) ;
}
- stripeIxTo = stripeIx ;
break ;
}
++ stripeIx ;
|
bug in split processing in IO elevator causes duplicate rows Sergey Shelukhin
|
<nb> public final class BridgeTypedArray extends TypedArray {
SINGLE
int count = NUMBER0 ;
for ( ResourceValue data : mResourceData ) {
- if ( data != null ) {
+ if ( data != null && ! RenderResources . REFERENCE_NULL . equals ( data . getValue ( ) ) ) {
count ++ ;
}
}
<nb> public final class BridgeTypedArray extends TypedArray {
SINGLE
int index = NUMBER1 ;
for ( int i = NUMBER0 ; i < mResourceData . length ; i ++ ) {
- if ( mResourceData [ i ] != null ) {
+ if ( mResourceData [ i ] != null
+ && ! RenderResources . REFERENCE_NULL . equals ( mResourceData [ i ] . getValue ( ) ) ) {
mIndices [ index ++ ] = i ;
}
}
|
Fix null resource values in LayoutLib
|
<nb> public class RNNCoreAnnotations {
public static int getPredictedClass ( Tree tree ) {
Label label = tree . label ( ) ;
if ( ! ( label instanceof CoreLabel ) ) {
- throw new IllegalArgumentException ( STRING0 ) ;
+ throw new IllegalArgumentException ( STRING1 ) ;
}
return ( ( CoreLabel ) label ) . get ( PredictedClass . class ) ;
}
<nb> public class RNNCoreAnnotations {
public static void setGoldClass ( Tree tree , int goldClass ) {
Label label = tree . label ( ) ;
if ( ! ( label instanceof CoreLabel ) ) {
- throw new IllegalArgumentException ( STRING0 ) ;
+ throw new IllegalArgumentException ( STRING2 ) ;
}
( ( CoreLabel ) label ) . set ( GoldClass . class , goldClass ) ;
}
|
Fix some doc typos
|
<nb> public class EditPostActivity extends AppCompatActivity implements EditorFragmen
super . onCreate ( savedInstanceState ) ;
setContentView ( R . layout . new_edit_post_activity ) ;
- SINGLE
- if ( PackageUtils . isDebugBuild ( ) ) {
- SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( this ) ;
- mShowNewEditor = prefs . getBoolean ( getString ( R . string . pref_key_visual_editor_enabled ) , false ) ;
- }
+ SINGLE
+ SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( this ) ;
+ mShowNewEditor = prefs . getBoolean ( getString ( R . string . pref_key_visual_editor_enabled ) , false ) ;
SINGLE
final ActionBar actionBar = getSupportActionBar ( ) ;
|
Removed isDebugBuild check for displaying the new editor from EditPostActivity
|
<nb> public class NetworkAddressManagerServiceImpl
SINGLE
SINGLE
SINGLE
+
+ if ( localHost == null )
+ {
+ try
+ {
+ localHost = InetAddress . getLocalHost ( ) ;
+ }
+ catch ( UnknownHostException e )
+ {
+ logger . warn ( STRING0 , e ) ;
+ }
+ }
if ( localHost . isAnyLocalAddress ( ) )
{
if ( logger . isTraceEnabled ( ) )
<nb> public class NetworkAddressManagerServiceImpl
return new InetSocketAddress ( getLocalHost ( dst ) , port ) ;
}
StunAddress mappedAddress = queryStunServer ( port ) ;
- InetSocketAddress result = null ;
+ InetSocketAddress result ;
if ( mappedAddress != null )
result = mappedAddress . getSocketAddress ( ) ;
else
<nb> public class NetworkAddressManagerServiceImpl
{
logger . fatal ( STRING1
+ STRING2 , exc ) ;
- resultSocket = null ;
return null ;
}
SINGLE
|
fixed a NPE when localHost was not retrieved
|
<nb> public class Output extends ConfigurableEntity {
return configuration ;
}
- public Map < String , Object > getConfiguration ( AvailableOutputSummary typesRespons ) {
- return getConfiguration ( typesRespons . getRequestedConfiguration ( ) ) ;
+ public Map < String , Object > getConfiguration ( AvailableOutputSummary availableOutputSummary ) {
+ return getConfiguration ( availableOutputSummary . getRequestedConfiguration ( ) ) ;
}
public String getType ( ) {
|
Fixing typo by renaming parameter
|
<nb> public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
SINGLE
Settings nodeSettings = Settings . builder ( )
. put ( settings )
- . put ( NodeEnvironment . MAX_LOCAL_STORAGE_NODES_SETTING . getKey ( ) , NUMBER0 )
+ . put ( NodeEnvironment . MAX_LOCAL_STORAGE_NODES_SETTING . getKey ( ) , numberOfNodes )
. put ( ElectMasterService . DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING . getKey ( ) , minimumMasterNode )
. build ( ) ;
|
Fix number of nodes in discovery disruption tests
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix javadoc typo
|
<nb> public class ShiftReduceParserQuery implements ParserQuery {
@ override
public Tree getBestDependencyParse ( boolean debinarize ) {
- throw new UnsupportedOperationException ( ) ;
+ return null ;
}
@ override
public Tree getBestFactoredParse ( ) {
- throw new UnsupportedOperationException ( ) ;
+ return null ;
}
COMMENT
|
EvaluateTreebank expects null for parses that aren t available
|
<nb> public abstract class LibraryPresentationProvider < P extends LibraryProperties > {
return myKind ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+
@ deprecated
@ nullable
public Icon getIcon ( ) {
- return null ;
+ throw new AbstractMethodError ( ) ;
}
@ nullable
|
add deprecated comment
|
<nb> public class ServerSocketReader extends SocketReader {
} ) ;
}
catch ( PacketRejectedException e ) {
- SINGLE
+ Log . debug ( STRING0 + packet . toXML ( ) , e ) ;
}
}
<nb> public class ServerSocketReader extends SocketReader {
} ) ;
}
catch ( PacketRejectedException e ) {
- SINGLE
+ Log . debug ( STRING1 + packet . toXML ( ) , e ) ;
}
}
<nb> public class ServerSocketReader extends SocketReader {
} ) ;
}
catch ( PacketRejectedException e ) {
- SINGLE
+ Log . debug ( STRING2 + packet . toXML ( ) , e ) ;
}
}
|
Added debugging information
|
<nb> public enum Action {
public String toString ( ) {
- String s = STRING0 ;
switch ( this ) {
case ENEMY :
- s = STRING1 ;
- break ;
+ return STRING1 ;
case GOLD :
- s = STRING2 ;
- break ;
+ return STRING2 ;
case HUNT :
- s = STRING3 ;
- break ;
+ return STRING3 ;
case TALE :
- s = STRING4 ;
- break ;
- default :
- break ;
+ return STRING4 ;
}
- return s ;
- } ;
+ return STRING0 ;
+ }
}
|
Improves a toString method
|
<nb> public final class AstValidator implements CompilerPass {
@ override
public void handleViolation ( String message , Node n ) {
throw new IllegalStateException (
- message + STRING0 + n . toStringTree ( ) ) ;
+ message + STRING0 + n . toStringTree ( )
+ + STRING1
+ + ( ( n . getParent ( ) != null ) ? n . getParent ( ) . toStringTree ( ) : STRING2 ) ) ;
}
} ) ;
}
|
Have the AST validator exception also display the parent node to give more
|
<nb> public class OutputGate < T extends Record > extends AbstractGate < T > {
COMMENT
@ override
public boolean isClosed ( ) throws IOException , InterruptedException {
+
+ boolean allClosed = true ;
+
for ( int i = NUMBER0 ; i < this . getNumberOfOutputChannels ( ) ; i ++ ) {
final AbstractOutputChannel < T > outputChannel = this . getOutputChannel ( i ) ;
if ( ! outputChannel . isClosed ( ) ) {
- return false ;
+ allClosed = false ;
}
}
- return true ;
+ return allClosed ;
}
COMMENT
|
Changed close mechanism of output gate to improve performance of lazy deployment
|
<nb> public class TestBigStore implements RelationshipType
tx . success ( ) ;
tx . finish ( ) ;
tx = db . beginTx ( ) ;
- System . out . println ( STRING0 + i ) ;
}
}
tx . success ( ) ;
<nb> public class TestBigStore implements RelationshipType
assertEquals ( count , verified ) ;
}
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+
private void assertProperties ( Map < String , Object > properties , PropertyContainer entity )
{
int count = NUMBER0 ;
<nb> public class TestBigStore implements RelationshipType
if ( i == NUMBER0 )
{
- System . out . println ( STRING1 ) ;
db . shutdown ( ) ;
db = new EmbeddedGraphDatabase ( PATH ) ;
}
|
Removed some system outs
|
<nb> public class BubbleFlowView extends HorizontalScrollView {
}
} ) ;
+ invalidate ( ) ; SINGLE
view . startAnimation ( slideOffAnim ) ;
mSlideOffAnimationPlaying = true ;
|
Invalidate the view parent for slide off anim
|
<nb> public class AsciidocHelper
public static String createCypherSnippet ( final String query )
{
- String [ ] keywordsToBreakOn = new String [ ] { STRING0 , STRING1 , STRING2 , STRING3 , STRING4 , STRING5 } ;
+ String [ ] keywordsToBreakOn = new String [ ] { STRING0 , STRING1 , STRING2 , STRING3 , STRING4 , STRING5 , STRING6 } ;
String result = STRING7 + query + STRING8 ;
|
adding ORDER BY to cypher snippet formating
|
<nb> public abstract class AbstractDataAccess implements DataAccess
{
if ( ! file . renameTo ( new File ( location + newName ) ) )
{
- throw new IllegalStateException ( STRING0 + newName ) ;
+ throw new IllegalStateException ( STRING1 + getType ( ) + STRING2 + newName ) ;
}
name = newName ;
} catch ( Exception ex )
{
- throw new IllegalStateException ( STRING3 , ex ) ;
+ throw new IllegalStateException ( STRING1 + getType ( ) + STRING4 , ex ) ;
}
} else
{
<nb> public abstract class DataAccessTest
} catch ( Exception ex )
{
}
-
+ da . close ( ) ;
+
da = createDataAccess ( name ) ;
da . create ( NUMBER0 ) ;
da . setInt ( NUMBER1 * NUMBER2 , NUMBER3 ) ;
<nb> public abstract class DataAccessTest
} catch ( Exception ex )
{
}
+ da . close ( ) ;
}
@ test
|
fixing tests on windows
|
<nb> public class MacMainFrameDecorator extends IdeFrameDecorator implements UISettin
@ override
public void toggleFullScreen ( final boolean state ) {
- if ( ! SystemInfo . isMacOSLion || myFrame == null ) return ;
+ if ( ! SystemInfo . isMacOSLion || myFrame == null || myInFullScreen == state ) return ;
myFullscreenQueue . runOrEnqueue ( new Runnable ( ) {
@ override
<nb> public class MacMainFrameDecorator extends IdeFrameDecorator implements UISettin
catch ( InvocationTargetException e ) {
LOG . error ( e ) ;
}
- } else if ( myInFullScreen != state ) {
+ } else {
final ID window = MacUtil . findWindowForTitle ( myFrame . getTitle ( ) ) ;
if ( window == null ) return ;
Foundation . executeOnMainThread ( new Runnable ( ) {
|
do nothing if state didn t change
|
<nb> public class BranchesPanel extends JPanel {
private class MyMouseAdapter extends MouseAdapter {
@ override
public void mouseClicked ( MouseEvent e ) {
- if ( ! myUI . getMainFrame ( ) . areGraphActionsEnabled ( ) ) {
+ if ( ! myUI . areGraphActionsEnabled ( ) ) {
return ;
}
|
vcs log remove explicit call to MainFrame
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ public class ViewManagerRegistry {
private final Map < String , ViewManager > mViewManagers = new HashMap < > ( ) ;
<nb> import NAMESPACE ;
}
}
- COMMENT
+ public ViewManager get ( String className ) {
ViewManager viewManager = mViewManagers . get ( className ) ;
if ( viewManager != null ) {
return viewManager ;
|
Make ViewManagerRegistry class public
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PictureDemo extends SherlockActivity {
previewHolder . setType ( SurfaceHolder . SURFACE_TYPE_PUSH_BUFFERS ) ;
}
+ @ targetapi ( Build . VERSION_CODES . GINGERBREAD )
@ override
public void onResume ( ) {
super . onResume ( ) ;
|
added missing TargetApi annotation
|
<nb> import static NAMESPACE
import static NAMESPACE ;
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added javadoc link to DefaultErrorMessages
|
<nb> public class Ls extends NodeOrRelationshipApp
buf . append ( STRING0 ) . append ( rel . getId ( ) ) ;
}
buf . append ( postfixString + STRING1 ) ;
- buf . append ( getDisplayNameForNode ( rel . getEndNode ( ) ) ) ;
+ buf . append ( getDisplayNameForNode ( direction == Direction . OUTGOING ?
+ rel . getEndNode ( ) : rel . getStartNode ( ) ) ) ;
out . println ( buf ) ;
}
}
|
Fixed an issues with INCOMING relationships where it would display the
|
<nb> public class ConcurrentLinkedHashCache < K , V > implements ICache < K , V >
{
ConcurrentLinkedHashMap < K , V > map = new ConcurrentLinkedHashMap . Builder < K , V > ( )
. weigher ( weigher )
- . initialCapacity ( NUMBER0 )
. maximumWeightedCapacity ( weightedCapacity )
. concurrencyLevel ( DEFAULT_CONCURENCY_LEVEL )
. build ( ) ;
<nb> public class SerializingCache < K , V > implements ICache < K , V >
. weigher ( useMemoryWeigher
? createMemoryWeigher ( )
: Weighers . < FreeableMemory > singleton ( ) )
- . initialCapacity ( capacity )
. maximumWeightedCapacity ( capacity )
. concurrencyLevel ( DEFAULT_CONCURENCY_LEVEL )
. listener ( listener )
|
remove intialCapacity from rowcache
|
<nb> public class AssetsControllerTest {
SINGLE
assertEquals ( STRING0 , result . getContentType ( ) ) ;
- SINGLE
- assertEquals ( STRING1 , byteArrayOutputStream . toString ( ) ) ;
+ SINGLE
+ String sysLineSeparator = System . lineSeparator ( ) ;
+ assertEquals ( STRING2 + sysLineSeparator + STRING3 , byteArrayOutputStream . toString ( ) ) ;
}
|
Fixed system specific line separator for String comparison which let test fail on non Unix systems
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AdviceTest {
public void testEmptyAdviceEntryAndExit ( ) throws Exception {
Class < ? > type = new ByteBuddy ( )
. redefine ( EmptyMethod . class )
+ . visit ( DebuggingWrapper . makeDefault ( ) )
. visit ( Advice . to ( EmptyAdvice . class ) . on ( named ( FOO ) ) . readerFlags ( ClassReader . SKIP_DEBUG ) )
. make ( )
. load ( null , ClassLoadingStrategy . Default . WRAPPER )
|
Added additional tests
|
<nb> public class HikariPool extends PoolBase implements HikariPoolMXBean , IBagStateL
SINGLE
if ( totalConnections . incrementAndGet ( ) > config . getMaximumPoolSize ( ) ) {
totalConnections . decrementAndGet ( ) ; SINGLE
+ LOGGER . debug ( STRING0 , poolName , config . getMaximumPoolSize ( ) ) ;
return true ;
}
<nb> public class HikariPool extends PoolBase implements HikariPoolMXBean , IBagStateL
addConnectionExecutor . execute ( new Runnable ( ) {
@ override
public void run ( ) {
- logPoolState ( STRING1 ) ;
+ logPoolState ( STRING2 ) ;
}
} ) ;
}
|
align log with Before cleanup
|
<nb> public class PropertyFileSnitch extends AbstractNetworkTopologySnitch
private static volatile Map < InetAddress , String [ ] > endpointMap ;
private static volatile String [ ] defaultDCRack ;
+ private volatile boolean gossipStarted ;
+
public PropertyFileSnitch ( ) throws ConfigurationException
{
reloadConfiguration ( ) ;
<nb> public class PropertyFileSnitch extends AbstractNetworkTopologySnitch
if ( StorageService . instance != null ) SINGLE
StorageService . instance . getTokenMetadata ( ) . invalidateCaches ( ) ;
- StorageService . instance . gossipSnitchInfo ( ) ;
+ if ( gossipStarted )
+ StorageService . instance . gossipSnitchInfo ( ) ;
+ }
+
+ @ override
+ public void gossiperStarting ( )
+ {
+ gossipStarted = true ;
}
}
|
Fix NTS test
|
<nb> public interface RuntimeContext {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
hotfox Fix javadoc of getState to comply with constructor changes
|
<nb> public class Container < T extends Actor > extends WidgetGroup {
public void draw ( Batch batch , float parentAlpha ) {
validate ( ) ;
- if ( actor == null ) return ;
if ( isTransform ( ) ) {
applyTransform ( batch , computeTransform ( ) ) ;
drawBackground ( batch , parentAlpha , NUMBER0 , NUMBER0 ) ;
|
Draw background even when actor is null
|
<nb> public class TestShellActivity extends Activity implements LayoutTestController
}
private void setDumpTimeout ( long timeout ) {
+ Log . v ( LOGTAG , STRING0 + timeout ) ;
Message msg = mHandler . obtainMessage ( MSG_DUMP_TIMEOUT ) ;
mHandler . sendMessageDelayed ( msg , timeout ) ;
}
|
add more logging into DRT
|
<nb> public class Guard
public < T extends GuardInternal > T stop ( )
{
- T guardInternal = currentGuard ( ) ;
+ T guardInternal = Guard . this . < T > currentGuard ( ) ;
if ( guardInternal != null )
{
threadLocal . remove ( ) ;
|
Circumvents a javac bug
|
<nb> public class RuntimeInit {
Thread . setDefaultUncaughtExceptionHandler ( new UncaughtHandler ( ) ) ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ SystemProperties . set ( STRING0 ,
+ VMRuntime . getRuntime ( ) . vmLibrary ( ) ) ;
+
+ COMMENT
COMMENT
COMMENT
TimezoneGetter . setInstance ( new TimezoneGetter ( ) {
|
Set persist sys dalvik vm lib at system server startup
|
<nb> public abstract class AbsListView extends AdapterView < ListAdapter > implements Te
final float vscroll = event . getAxisValue ( MotionEvent . AXIS_VSCROLL ) ;
if ( vscroll != NUMBER0 ) {
final int delta = ( int ) ( vscroll * getVerticalScrollFactor ( ) ) ;
- if ( trackMotionScroll ( delta , delta ) ) {
+ if ( ! trackMotionScroll ( delta , delta ) ) {
return true ;
}
}
|
Fix inverted scrolling condition in lists
|
<nb> public final class NewTypeInferenceES5OrLowerTest extends NewTypeInferenceTestBa
STRING0 ) ,
GlobalTypeInfo . COULD_NOT_INFER_CONST_TYPE ) ;
}
+
+ public void testPrototypeTemplateFunctionWithAtTypeJsdoc ( ) {
+ typeCheck ( LINE_JOINER . join (
+ STRING1 ,
+ STRING2 ,
+ STRING3 ,
+ STRING4 ,
+ STRING5 ,
+ STRING6 ,
+ STRING7 ) ) ;
+ }
}
|
Add unit test for generic interface method
|
<nb> public class NanoXmlUtil {
public static void parseFile ( PsiFile psiFile , final IXMLBuilder builder ) {
try {
final VirtualFile virtualFile = psiFile . getVirtualFile ( ) ;
- assert virtualFile != null ;
+ if ( virtualFile == null ) {
+ parse ( new StringReader ( psiFile . getText ( ) ) , builder ) ;
+ return ;
+ }
+
final Document document = FileDocumentManager . getInstance ( ) . getCachedDocument ( virtualFile ) ;
if ( document != null ) {
|
supported non physical fhiles
|
<nb> public class MinGauge extends AbstractMonitor < Long >
COMMENT
COMMENT
COMMENT
- MinGauge ( MonitorConfig config ) {
+ public MinGauge ( MonitorConfig config ) {
this ( config , ClockWithOffset . INSTANCE ) ;
}
|
Fix accessiblity of MinGauge constructor
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add documentation about blocking broadcast
|
<nb>
package NAMESPACE ;
- import static NAMESPACE ;
- import static 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 ;
+ @ ignore ( STRING0 )
public class ThreadsTest {
@ test
|
Skip the unstable cases
|
<nb> public class WXPageActivity extends WXBaseActivity implements IWXRenderListener ,
finish ( ) ;
return true ;
} else if ( id == R . id . action_refresh ) {
- if ( TextUtils . equals ( mUri . getScheme ( ) , STRING0 ) || TextUtils . equals ( mUri . getScheme ( ) , STRING1 ) ) {
- loadWXfromService ( mUri . toString ( ) ) ;
+ String scheme = mUri . getScheme ( ) ;
+ if ( mUri . isHierarchical ( ) && ( TextUtils . equals ( scheme , STRING0 ) || TextUtils . equals ( scheme , STRING1 ) ) ) {
+ String weexTpl = mUri . getQueryParameter ( Constants . WEEX_TPL_KEY ) ;
+ String url = TextUtils . isEmpty ( weexTpl ) ? mUri . toString ( ) : weexTpl ;
+ loadWXfromService ( url ) ;
return true ;
}
}
|
android update reload
|
<nb> public class JarFile extends java . util . jar . JarFile implements Iterable < JarEntryD
private JarFile createJarFileFromFileEntry ( JarEntryData sourceEntry )
throws IOException {
if ( sourceEntry . getMethod ( ) != ZipEntry . STORED ) {
- throw new IllegalStateException ( STRING0
- + sourceEntry . getName ( ) ) ;
+ throw new IllegalStateException ( STRING1
+ + sourceEntry . getName ( ) + STRING2
+ + STRING3
+ + STRING4 ) ;
}
return new JarFile ( this . rootFile , this . pathFromRoot + STRING5
+ sourceEntry . getName ( ) , sourceEntry . getData ( ) ) ;
|
Improve error message when JarFile encounters a compressed nested jar
|
<nb> public interface SharedPreferences {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Remove wrong javadoc comment
|
<nb> public class MetaClass {
SINGLE
try {
Object value = this . getProperty ( object , methodName ) ;
- if ( value instanceof Closure && object != this ) {
+ if ( value instanceof Closure ) { SINGLE
Closure closure = ( Closure ) value ;
- closure . setDelegate ( this ) ;
MetaClass delegateMetaClass = registry . getMetaClass ( closure . getClass ( ) ) ;
return delegateMetaClass . invokeMethod ( closure , STRING0 , arguments ) ;
}
|
Stop the delegate of a closure being ovewritten when it is called as a fieldon an object
|
<nb> public class WifiConfiguration implements Parcelable {
sbuf . append ( this . numNoInternetAccessReports ) . append ( STRING0 ) ;
}
if ( this . updateTime != null ) {
- sbuf . append ( STRING1 ) . append ( this . updateTime ) . append ( STRING0 ) ;
+ sbuf . append ( STRING2 ) . append ( this . updateTime ) . append ( STRING0 ) ;
}
if ( this . creationTime != null ) {
- sbuf . append ( STRING3 ) . append ( this . creationTime ) . append ( STRING0 ) ;
+ sbuf . append ( STRING4 ) . append ( this . creationTime ) . append ( STRING0 ) ;
}
if ( this . didSelfAdd ) sbuf . append ( STRING5 ) ;
if ( this . selfAdded ) sbuf . append ( STRING6 ) ;
|
correctly print wificonfiguration creation and update time
|
<nb> public class XmlHighlightVisitor extends XmlElementVisitor implements HighlightV
tag ,
XmlErrorMessages . message ( STRING0 , name ) ,
getTagProblemInfoType ( tag ) ,
- new CreateNSDeclarationIntentionFix ( tag , STRING1 )
+ null
) ;
return ;
}
|
do not fix unprefixed tags
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
public class HttpHeaderUtils {
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
import static NAMESPACE ;
|
Added license headers
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class FinderRecursivePanel < T > extends JBSplitter implements Data
assert panel != null : Arrays . toString ( pathToSelect ) ;
}
}
+
+ IdeFocusManager . getInstance ( myProject ) . requestFocus ( panel . myList , true ) ;
+
myUpdateSelectedPathModeActive . set ( false ) ;
}
|
focus last list s selected item
|
<nb> class CheckRequiresForConstructors implements HotSwapCompilerPass , NodeTraversal
Preconditions . checkState ( NodeUtil . isNameDeclaration ( n ) ) ;
if ( n . getChildCount ( ) == NUMBER0 && parent == googScopeBlock ) {
Node rhs = n . getFirstFirstChild ( ) ;
- if ( rhs . isQualifiedName ( ) ) {
+ if ( rhs != null && rhs . isQualifiedName ( ) ) {
usages . put ( rhs . getQualifiedName ( ) , rhs ) ;
}
}
<nb> public final class MissingRequireTest extends Es6CompilerTestCase {
testSame ( js ) ;
}
+ public void testTypedefInGoogScope ( ) {
+ String js = LINE_JOINER . join (
+ STRING0 ,
+ STRING1 ,
+ STRING2 ,
+ STRING3 ) ;
+ testSame ( js ) ;
+ }
+
public void testMissingGoogRequireFromGoogModule ( ) {
String good = STRING4
+ STRING5
|
Fix crash that occurs when there is a typedef inside a goog scope
|
<nb> public final class LocaleManager {
GOOGLE_PRODUCT_SEARCH_COUNTRY_TLD . put ( Locale . UK , STRING0 ) ;
}
- SINGLE
- SINGLE
+ SINGLE
private static final Map < Locale , String > GOOGLE_BOOK_SEARCH_COUNTRY_TLD ;
static {
GOOGLE_BOOK_SEARCH_COUNTRY_TLD = new HashMap < Locale , String > ( ) ;
GOOGLE_BOOK_SEARCH_COUNTRY_TLD . putAll ( GOOGLE_COUNTRY_TLD ) ;
- GOOGLE_BOOK_SEARCH_COUNTRY_TLD . remove ( Locale . CHINA ) ;
}
private LocaleManager ( ) { }
|
Updated our list of countries for Book Search
|
<nb> public class BackupTool
if ( arguments . get ( FROM , null ) == null )
{
- exitAbnormally ( STRING0 + dash ( FROM ) ) ;
+ exitAbnormally ( STRING0 + dash ( FROM ) + STRING1 +
+ STRING2 + dash ( FROM ) + STRING3 +
+ STRING2 + dash ( FROM ) + STRING4 +
+ STRING2 + dash ( FROM ) + STRING5 +
+ STRING2 + dash ( FROM ) + STRING6 ) ;
}
if ( arguments . get ( TO , null ) == null )
|
Added some examples of from
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.