diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public abstract class LoadBalancingRxClient < I , O , T extends RxClient < I , O > > impl
MetricEventsListener < ? extends ClientMetricsEvent < ? > > listener ) {
return eventSubject . subscribe ( listener ) ;
}
+
+ public final LoadBalancerExecutor getLoadBalancerExecutor ( ) {
+ return lbExecutor ;
+ }
}
|
Add API to access LoadBalancerExecutor from LoadBalancingRxClient
|
<nb> public class ZMQ
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public final boolean disconnect ( String addr )
- {
- return base . termEndpoint ( addr ) ;
- }
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
Revert Add disconnect method
|
<nb> public class SMTRunnerNotificationsHandler extends SMTRunnerEventsAdapter {
public void onTestingFinished ( @ notnull SMTestProxy . SMRootTestProxy testsRoot ) {
if ( testsRoot . isEmptySuite ( ) &&
+ ! testsRoot . isInterrupted ( ) &&
myConsoleProperties instanceof SMTRunnerConsoleProperties &&
( ( SMTRunnerConsoleProperties ) myConsoleProperties ) . fixEmptySuite ( ) ) {
return ;
|
don t show module suggestions if tests were interrupted e g stopped before tests were collected
|
<nb> public final class DescriptorUtils {
public static String getNameForNamespace ( @ notnull NamespaceDescriptor descriptor ) {
if ( descriptor . getContainingDeclaration ( ) instanceof ModuleDescriptor ) {
return Namer . getAnonymousNamespaceName ( ) ;
+ } else if ( descriptor . getName ( ) . equals ( STRING0 ) ) {
+ return Namer . getAnonymousNamespaceName ( ) ;
} else {
return descriptor . getName ( ) ;
}
|
fix js backend broken recently
|
<nb> public class FileInStreamIntegrationTest {
}
private static List < CreateFileOptions > getOptionSet ( ) {
- List < CreateFileOptions > ret = new ArrayList < CreateFileOptions > ( NUMBER0 ) ;
+ List < CreateFileOptions > ret = new ArrayList < > ( NUMBER0 ) ;
ret . add ( sWriteBoth ) ;
ret . add ( sWriteAlluxio ) ;
ret . add ( sWriteUnderStore ) ;
|
SMALLFIX Removed explicit argument type in FileInStreamIntegrationTest
|
<nb> public class SmsSync extends PreferenceActivity {
STRING0 ) ;
}
}
+
+ @ override public boolean shouldOverrideUrlLoading ( WebView view , String url ) {
+ startActivity ( new Intent ( Intent . ACTION_VIEW ) . setData ( Uri . parse ( url ) ) ) ;
+ return true ;
+
+ }
} ) ;
webView . loadUrl ( STRING1 ) ;
|
Open links in new browser
|
<nb> public class ProducerZooKeeper implements ZkClientChangedListener {
log . warn ( STRING0 + newBrokerString ) ;
}
}
- SINGLE
- this . brokersInfo = new BrokersInfo ( newBrokerStringMap , newTopicPartitionMap ) ;
SINGLE
for ( final Map . Entry < Integer , String > oldEntry : this . brokersInfo . oldBrokerStringMap . entrySet ( ) ) {
final Integer oldBrokerId = oldEntry . getKey ( ) ;
<nb> public class ProducerZooKeeper implements ZkClientChangedListener {
}
}
+ SINGLE
+ this . brokersInfo = new BrokersInfo ( newBrokerStringMap , newTopicPartitionMap ) ;
log . warn ( STRING1 + this . topic ) ;
}
finally {
|
Fixed connection leak thanks tuhu
|
<nb> public class RedirectingStore extends DelegatingStore < ByteArray , byte [ ] > {
}
private RebalancePartitionsInfo redirectingKey ( ByteArray key ) {
- if ( VoldemortState . REBALANCING_MASTER_SERVER . equals ( metadata . getServerState ( ) ) ) {
+ if ( VoldemortState . REBALANCING_MASTER_SERVER . equals ( metadata . getServerState ( ) ) &&
+ ! getName ( ) . equals ( MetadataStore . METADATA_STORE_NAME ) ) {
List < Integer > partitionIds = metadata . getRoutingStrategy ( getName ( ) ) . getPartitionList ( key . get ( ) ) ;
return getRebalancePartitionsInfo ( partitionIds ) ;
|
Metadata store is not a redirecting store
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class BaseBitmapTextureAtlasSourceDecorator extends BaseTextureA
SINGLE
SINGLE
- protected abstract void onDecorateBitmap ( final Canvas pCanvas ) ;
+ protected abstract void onDecorateBitmap ( final Canvas pCanvas ) throws Exception ;
@ override
public int getWidth ( ) {
<nb> public abstract class BaseBitmapTextureAtlasSourceDecorator extends BaseTextureA
final Bitmap bitmap = this . ensureLoadedBitmapIsMutable ( this . mBitmapTextureAtlasSource . onLoadBitmap ( pBitmapConfig ) ) ;
final Canvas canvas = new Canvas ( bitmap ) ;
- this . onDecorateBitmap ( canvas ) ;
+ try {
+ this . onDecorateBitmap ( canvas ) ;
+ } catch ( final Exception e ) {
+ Debug . e ( e ) ;
+ }
return bitmap ;
}
|
Allowing BaseBitmapTextureAtlasSourceDecorator onDecorateBitmap to throw Exception
|
<nb> public class main {
. create ( STRING0 ) ;
Option rewriteLabelOption = OptionBuilder . withLongOpt ( STRING1 )
- . withDescription ( STRING2 )
+ . withDescription ( STRING3 )
. create ( STRING4 ) ;
options . addOption ( versionOption ) ;
|
Updated the description for the rewrite option
|
<nb> public class AllocatorContractTest extends BaseAllocatorTest {
COMMENT
COMMENT
COMMENT
- @ before @ override
+ @ before
+ @ override
public void before ( ) throws Exception {
super . before ( ) ;
mStrategies = new ArrayList < String > ( ) ;
|
Fix annotation style
|
<nb> public class BidirectionalTwoOneToManyTest extends BaseEntityManagerFunctionalTe
}
@ entity ( name = STRING0 )
- public static class Person {
+ public static class Person implements Serializable {
@ id
@ generatedvalue
<nb> public class BidirectionalTwoOneToManyTest extends BaseEntityManagerFunctionalTe
}
@ entity ( name = STRING1 )
- public static class Address {
+ public static class Address implements Serializable {
@ id
@ generatedvalue
<nb> public class CompositeIdAssociationTest extends BaseEntityManagerFunctionalTestC
}
@ entity ( name = STRING0 )
- public static class Person {
+ public static class Person implements Serializable {
@ id
@ generatedvalue
<nb> public class CompositeIdAssociationTest extends BaseEntityManagerFunctionalTestC
}
@ entity ( name = STRING1 )
- public static class Address {
+ public static class Address implements Serializable {
@ id
@ generatedvalue
|
Migrate User Guide from Docbook to Asciidoctor FindBugs fix
|
<nb> public abstract class GitChangesSaver {
COMMENT
COMMENT
- COMMENT
COMMENT
public void restoreLocalChanges ( ) {
load ( ) ;
|
git fix javadoc
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
add link to view pager guide
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ProfileDrawerItem extends AbstractDrawerItem < ProfileDrawerItem > imp
return this ;
}
+ public ProfileDrawerItem withIcon ( @ drawableres int iconRes ) {
+ this . icon = new ImageHolder ( iconRes ) ;
+ return this ;
+ }
+
public ProfileDrawerItem withIcon ( Bitmap iconBitmap ) {
this . icon = new ImageHolder ( iconBitmap ) ;
return this ;
|
add missing withIcon method with an DrawableRes
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fix import order warning from Checkstyle
|
<nb> public class Commands {
beeLine . info ( beeLine . loc ( STRING0 , count )
+ STRING1 + beeLine . locElapsedTime ( end - start ) ) ;
}
- } catch ( Exception e ) {
- beeLine . error ( e ) ;
- throw e ;
} finally {
if ( stmnt != null ) {
stmnt . close ( ) ;
|
beeline always return the same error message twice Chaoyu Tang via Ashutosh Chauhan
|
<nb> import NAMESPACE ;
import NAMESPACE ;
public class AppWidget extends AppWidgetProvider {
+ SINGLE
+
+ @ override
+ public void onUpdate ( Context context ,
+ AppWidgetManager appWidgetManager ,
+ int [ ] appWidgetIds ) {
+ super . onUpdate ( context , appWidgetManager , appWidgetIds ) ;
+
+ for ( int appWidgetId : appWidgetIds ) {
+ Bundle options = appWidgetManager . getAppWidgetOptions ( appWidgetId ) ;
+
+ onAppWidgetOptionsChanged ( context , appWidgetManager , appWidgetId ,
+ options ) ;
+ }
+ }
+
@ override
public void onAppWidgetOptionsChanged ( Context ctxt ,
AppWidgetManager mgr ,
|
added better support for launchers that don t resize on initial placement
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
public class ByNameArrangementEntryMatcher implements ArrangementEntryMatcher {
-
- @ notnull private final String myPattern ;
+ @ notnull private final String myPattern ;
+ @ notnull private final Pattern myCompiledPattern ;
+
public ByNameArrangementEntryMatcher ( @ notnull String pattern ) {
myPattern = pattern ;
+ myCompiledPattern = Pattern . compile ( pattern ) ;
}
@ override
public boolean isMatched ( @ notnull ArrangementEntry entry ) {
if ( entry instanceof NameAwareArrangementEntry ) {
String name = ( ( NameAwareArrangementEntry ) entry ) . getName ( ) ;
- return name != null && name . matches ( myPattern ) ;
+ if ( name == null ) {
+ return false ;
+ }
+ return myCompiledPattern . matcher ( name ) . matches ( ) ;
}
return false ;
}
|
Provide ability to specify name based rules
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class RefreshableTask < T > {
COMMENT
COMMENT
COMMENT
- private final ExecutorService executor = Executors . newSingleThreadExecutor ( ) ;
+ private final ExecutorService executor = Executors . newSingleThreadExecutor ( new ThreadFactory ( ) {
+ @ override
+ public Thread newThread ( Runnable runnable ) {
+ Thread thread = Executors . defaultThreadFactory ( ) . newThread ( runnable ) ;
+ thread . setDaemon ( true ) ;
+ return thread ;
+ }
+ } ) ;
COMMENT
COMMENT
|
Daemonizing the sts thread used for the credential refresh
|
<nb> import NAMESPACE ;
public final class DateTimeUtils
{
- COMMENT
- COMMENT
- COMMENT
- public static final long MILLISECOND_PER_SECOND = NUMBER0 ;
-
private DateTimeUtils ( )
{
}
|
Revert Added milliseconds per second constant
|
<nb> public class MapActivityActions implements DialogProvider {
AccessibleToast . makeText ( mapActivity , R . string . unknown_from_location , Toast . LENGTH_LONG ) . show ( ) ;
return ;
}
+
+ SINGLE
+ SINGLE
+ if ( ! routingHelper . isFollowingMode ( ) ) {
+ settings . PREV_APPLICATION_MODE . set ( settings . APPLICATION_MODE . get ( ) ) ;
+ }
+
ApplicationMode mode = getAppMode ( buttons , settings ) ;
routingHelper . setAppMode ( mode ) ;
settings . OPTIMAL_ROUTE_MODE . setModeValue ( mode , ! nonoptimal . isChecked ( ) ) ;
|
correct an issue with outdated PREV_APPLICATION_MODE after changes of app profile via quickchanger and subsequent only show routing
|
<nb> cat include / telephony / ril . h | \
int RIL_REQUEST_NV_WRITE_ITEM = NUMBER0 ;
int RIL_REQUEST_NV_WRITE_CDMA_PRL = NUMBER1 ;
int RIL_REQUEST_NV_RESET_CONFIG = NUMBER2 ;
- int RIL_REQUEST_SET_RADIO_MODE = NUMBER3 ;
- int RIL_REQUEST_DATA_IDLE = NUMBER4 ;
- int RIL_REQUEST_SET_UICC_SUBSCRIPTION = NUMBER5 ;
- int RIL_REQUEST_ALLOW_DATA = NUMBER6 ;
- int RIL_REQUEST_GET_HARDWARE_CONFIG = NUMBER7 ;
- int RIL_REQUEST_ICC_SIM_AUTHENTICATION = NUMBER8 ;
+ int RIL_REQUEST_SET_UICC_SUBSCRIPTION = NUMBER3 ;
+ int RIL_REQUEST_ALLOW_DATA = NUMBER4 ;
+ int RIL_REQUEST_GET_HARDWARE_CONFIG = NUMBER5 ;
+ int RIL_REQUEST_ICC_SIM_AUTHENTICATION = NUMBER6 ;
int RIL_UNSOL_RESPONSE_BASE = NUMBER9 ;
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = NUMBER9 ;
|
Removed RIL_REQUEST_SET_RADIO_MODE and RIL_REQUEST_DATA_IDLE commands
|
<nb> public class SecureHttpContext implements HttpContext , ManagedService {
public SecureHttpContext ( HttpContext defaultContext , final String realm ) {
this . defaultContext = defaultContext ;
this . realm = realm ;
- SecureHttpContext . subnetUtils = new SubnetUtils ( STRING0 ) . getInfo ( ) ;
}
<nb> public class SecureHttpContext implements HttpContext , ManagedService {
SecureHttpContext . subnetUtils = new SubnetUtils ( netmask ) . getInfo ( ) ;
}
else {
+ SINGLE
+ SecureHttpContext . subnetUtils = new SubnetUtils ( STRING0 ) . getInfo ( ) ;
logger . debug ( STRING1 , SecureHttpContext . subnetUtils . getCidrSignature ( ) ) ;
}
}
|
fixed NPE in error logging thanks Mihail
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
|
removed unnecessary import
|
<nb> public abstract class ExploreByTouchHelper extends AccessibilityDelegateCompat {
COMMENT
private static final String DEFAULT_CLASS_NAME = View . class . getName ( ) ;
+ COMMENT
+ private static final Rect INVALID_PARENT_BOUNDS = new Rect (
+ Integer . MAX_VALUE , Integer . MAX_VALUE , Integer . MIN_VALUE , Integer . MIN_VALUE ) ;
+
SINGLE
private final Rect mTempScreenRect = new Rect ( ) ;
private final Rect mTempParentRect = new Rect ( ) ;
<nb> public abstract class ExploreByTouchHelper extends AccessibilityDelegateCompat {
SINGLE
node . setEnabled ( true ) ;
node . setClassName ( DEFAULT_CLASS_NAME ) ;
+ node . setBoundsInParent ( INVALID_PARENT_BOUNDS ) ;
SINGLE
onPopulateNodeForVirtualView ( virtualViewId , node ) ;
<nb> public abstract class ExploreByTouchHelper extends AccessibilityDelegateCompat {
}
node . getBoundsInParent ( mTempParentRect ) ;
- if ( mTempParentRect . isEmpty ( ) ) {
+ if ( mTempParentRect . equals ( INVALID_PARENT_BOUNDS ) ) {
throw new RuntimeException ( STRING0
+ STRING1 ) ;
}
|
DO NOT MERGE Only throw exception in EBT helper if parent bounds are untouched
|
<nb> public class MapMarkersHelper {
}
if ( colorIndex == - NUMBER0 ) {
if ( sortedMapMarkers . size ( ) > NUMBER1 ) {
- colorIndex = ( sortedMapMarkers . get ( sortedMapMarkers . size ( ) - NUMBER0 ) . colorIndex + NUMBER0 ) % MAP_MARKERS_COLORS_COUNT ;
+ colorIndex = ( sortedMapMarkers . get ( NUMBER1 ) . colorIndex + NUMBER0 ) % MAP_MARKERS_COLORS_COUNT ;
} else {
colorIndex = NUMBER1 ;
}
|
Revert map marker color change
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IndexStatisticsTest
private static class IndexOnlineMonitor extends IndexingService . MonitorAdapter
{
- private final Set < IndexDescriptor > onlineIndexes = new HashSet < > ( ) ;
+ private final Set < IndexDescriptor > onlineIndexes = Collections . newSetFromMap ( new ConcurrentHashMap < > ( ) ) ;
@ override
public void populationCompleteOn ( IndexDescriptor descriptor )
|
Made state in IndexStatisticsTest thread safe
|
<nb> public class GitRefManagerTest extends UsefulTestCase {
}
return infos ;
}
-
- @ override
- public void dispose ( ) {
- }
-
} ) ;
return ContainerUtil . sorted ( refs , new GitRefManager ( manager ) . getComparator ( ) ) ;
}
|
git remove unnecessary method overriding
|
<nb> public final class FuncallExpression extends Expression {
@ override
SkylarkType validate ( ValidationEnvironment env ) throws EvalException {
- SINGLE
+ for ( Argument arg : args ) {
+ arg . getValue ( ) . validate ( env ) ;
+ }
if ( obj != null ) {
SINGLE
<nb>
SINGLE
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class SkylarkFunction extends AbstractFunction {
COMMENT
COMMENT
COMMENT
- @ visiblefortesting
public void configure ( SkylarkBuiltin annotation ) {
Preconditions . checkState ( ! configured ) ;
Preconditions . checkArgument ( getName ( ) . equals ( annotation . name ( ) ) ,
|
Validate function arguments
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class WebViewFactory {
private static Class < WebViewFactoryProvider > getFactoryClass ( ) throws ClassNotFoundException {
try {
- return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY ) ;
- } catch ( ClassNotFoundException e ) {
- Log . e ( LOGTAG , STRING0 ) ;
+ Context webViewContext = AppGlobals . getInitialApplication ( ) . createPackageContext (
+ getWebViewPackageName ( ) ,
+ Context . CONTEXT_INCLUDE_CODE | Context . CONTEXT_IGNORE_SECURITY ) ;
+ ClassLoader clazzLoader = webViewContext . getClassLoader ( ) ;
+ return ( Class < WebViewFactoryProvider > ) Class . forName ( CHROMIUM_WEBVIEW_FACTORY , true ,
+ clazzLoader ) ;
+ } catch ( PackageManager . NameNotFoundException e ) {
+ Log . e ( LOGTAG , STRING1 ) ;
return ( Class < WebViewFactoryProvider > ) Class . forName ( NULL_WEBVIEW_FACTORY ) ;
}
}
|
Cherry pick Load the WebView Java code from an APK
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DefaultServerFactoryTest {
. contains ( DefaultServerFactory . class ) ;
}
+ @ ignore ( STRING0 )
@ test
public void testGracefulShutdown ( ) throws Exception {
ObjectMapper objectMapper = Jackson . newObjectMapper ( ) ;
|
Ignore flaky DefaultServerFactoryTest testGracefulShutdown
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ForceResolveUtil {
public static void forceResolveAllContents ( @ nullable JetType type ) {
if ( type == null ) return ;
+ if ( type instanceof FlexibleType ) {
+ FlexibleType flexibleType = ( FlexibleType ) type ;
+ forceResolveAllContents ( flexibleType . getLowerBound ( ) ) ;
+ forceResolveAllContents ( flexibleType . getUpperBound ( ) ) ;
+ return ;
+ }
+
forceResolveAllContents ( type . getConstructor ( ) ) ;
for ( TypeProjection projection : type . getArguments ( ) ) {
forceResolveAllContents ( projection . getType ( ) ) ;
|
Support forced resolve for lazy flexible types
|
<nb> public class VisibilityModifierCheck
private boolean isImmutableFieldDefinedInFinalClass ( DetailAST variableDef ) {
final DetailAST classDef = variableDef . getParent ( ) . getParent ( ) ;
final Set < String > classModifiers = getModifiers ( classDef ) ;
- return classModifiers . contains ( FINAL_KEYWORD ) && isImmutableField ( variableDef ) ;
+ return ( classModifiers . contains ( FINAL_KEYWORD ) || classDef . getType ( ) == TokenTypes . ENUM_DEF )
+ && isImmutableField ( variableDef ) ;
}
COMMENT
<nb> enum MyEnum1
COMMENT
private int someMember ;
+
+ public final int blah = NUMBER0 ;
}
|
Fix VisibilityModifier allowPublicImmutableFields work in enums
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ShadowResolveInfo {
ResolveInfo resInfo = new ResolveInfo ( ) ;
ActivityInfo actInfo = new ActivityInfo ( ) ;
+ actInfo . applicationInfo = new ApplicationInfo ( ) ;
actInfo . packageName = packageName ;
- actInfo . name = activityName ;
+ actInfo . applicationInfo . packageName = packageName ;
+ actInfo . name = activityName ;
resInfo . activityInfo = actInfo ;
ShadowResolveInfo shResolve = Robolectric . shadowOf ( resInfo ) ;
<nb> public class ResolveInfoTest {
public void testNewResolveInfoWithActivity ( ) {
assertThat ( mResolveInfo . loadLabel ( null ) . toString ( ) , equalTo ( STRING0 ) ) ;
assertThat ( mResolveInfo . activityInfo . packageName , equalTo ( STRING1 ) ) ;
+ assertThat ( mResolveInfo . activityInfo . applicationInfo . packageName , equalTo ( STRING1 ) ) ;
assertThat ( mResolveInfo . activityInfo . name , equalTo ( STRING2 ) ) ;
}
}
|
Add support for applicationInfo to ShadowResolveInfo
|
<nb> public class PeerGroup extends AbstractIdleService implements TransactionBroadca
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
+ @ nullable
public Peer connectTo ( InetSocketAddress address ) {
return connectTo ( address , true ) ;
}
SINGLE
+ @ nullable
protected Peer connectTo ( InetSocketAddress address , boolean incrementMaxConnections ) {
VersionMessage ver = getVersionMessage ( ) . duplicate ( ) ;
ver . bestHeight = chain == null ? NUMBER0 : chain . getBestChainHeight ( ) ;
|
add a couple of missing nullable annotations
|
<nb> public class GitSimpleHandler extends GitTextHandler {
} ) ;
runInCurrentThread ( null ) ;
if ( ex [ NUMBER0 ] != null ) {
- throw ex [ NUMBER0 ] ;
+ throw new VcsException ( STRING0 + printableCommandLine ( ) , ex [ NUMBER0 ] ) ;
}
if ( result [ NUMBER0 ] == null ) {
- throw new VcsException ( STRING1 + myCommandLine . getCommandLineString ( ) ) ;
+ throw new VcsException ( STRING1 + printableCommandLine ( ) ) ;
}
return result [ NUMBER0 ] ;
}
|
git Wrap the VcsException not to loose the cause
|
<nb> public abstract class DBCollection {
COMMENT
COMMENT
protected List < DBObject > getHintFields ( ) {
- return Collections . unmodifiableList ( _hintFields ) ;
+ return _hintFields ;
}
COMMENT
|
not wrap _hintFields into unmodifiable to prevent NPE
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fix quality flaw
|
<nb> public class ButtonlessScrollBarUI extends BasicScrollBarUI {
private void resetAnimator ( ) {
myAnimator . reset ( ) ;
if ( scrollbar != null && scrollbar . getValueIsAdjusting ( ) || myMouseIsOverThumb ) {
+ myAnimator . suspend ( ) ;
myAnimationColorShift = NUMBER0 ;
}
else {
|
Suspend animator ticks while not necessary
|
<nb> public class StandardTypeLocator implements TypeLocator {
loader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
registerImport ( STRING0 ) ;
registerImport ( STRING1 ) ;
- registerImport ( STRING2 ) ;
}
SINGLE
<nb> public class EvaluationTests extends ExpressionTestCase {
evaluate ( STRING3 , STRING4 , String . class , true ) ;
}
- SINGLE
public void testReferences06 ( ) {
- evaluate ( STRING5 , STRING6 , Boolean . class ) ;
+ evaluate ( STRING7 , STRING6 , Boolean . class ) ;
}
public void testReferences06b ( ) {
<nb> public class EvaluationTests extends ExpressionTestCase {
SINGLE
public void testStaticRef02 ( ) {
- evaluate ( STRING8 , STRING6 , Boolean . class ) ;
+ evaluate ( STRING9 , STRING6 , Boolean . class ) ;
}
SINGLE
|
remove java awt as a default import in the StandardTypeLocator
|
<nb> public class ManagementCenterService implements MembershipListener , LifecycleLis
logger . log ( Level . WARNING , STRING0 ) ;
}
}
+ running = true ; SINGLE
}
public void shutdown ( ) {
|
Added management center config
|
<nb> public abstract class AbstractDelegatingCasView extends AbstractCasView {
@ override
protected void renderMergedOutputModel ( final Map < String , Object > model , final HttpServletRequest request ,
final HttpServletResponse response ) throws Exception {
- logger . debug ( STRING0 ) ;
+ logger . debug ( STRING1 ) ;
prepareMergedOutputModel ( model , request , response ) ;
logger . trace ( STRING2 ,
|
cleaned up log statement
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
<nb> 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 ;
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb>
COMMENT
COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
public class ImpsAddressUtils {
|
moved ImpsAddressUtils to
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
|
Add missing Apache headers
|
<nb> import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
<nb> import static NAMESPACE ;
COMMENT
public class OrientGraphJdbcQueryTest extends OrientGraphJdbcBaseTest {
+ @ before
+ public void setup ( ) {
+ new File ( STRING0 ) . mkdir ( ) ;
+
+ }
+
+ @ after
+ public void clean ( ) {
+
+ }
+
@ test
public void testQuery ( ) {
String query = STRING1 ;
|
added workinf folder creation to test
|
<nb> public class ExtraHandler extends BaseAnnotationHandler < HasExtras > {
}
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ restoreMethodCall = handleByteArrayExtraBug ( element , extraKeyStaticField , restoreMethodCall ) ;
+
ifContainsKey . assign ( extraField , restoreMethodCall ) ;
}
+ private JExpression handleByteArrayExtraBug ( Element element , JFieldVar extraKeyStaticField , JExpression restoreMethodCall ) {
+ if ( STRING0 . equals ( element . asType ( ) . toString ( ) ) ) {
+ restoreMethodCall = invoke ( STRING1 ) . invoke ( STRING2 ) . arg ( extraKeyStaticField ) ;
+ }
+ return restoreMethodCall ;
+ }
+
private void createIntentInjectionMethod ( Element element , HasIntentBuilder holder , JFieldVar extraKeyStaticField , String fieldName ) {
JDefinedClass intentBuilderClass = holder . getIntentBuilderClass ( ) ;
JMethod method = intentBuilderClass . method ( PUBLIC , intentBuilderClass , fieldName ) ;
|
Handle bug with byte in extras
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class CollectionChildDescriptionImpl extends DomChildDescriptionImpl impl
private final NotNullFunction < DomInvocationHandler , List < XmlTag > > myTagsGetter = new NotNullFunction < DomInvocationHandler , List < XmlTag > > ( ) {
@ notnull
public List < XmlTag > fun ( final DomInvocationHandler handler ) {
- return DomImplUtil . findSubTags ( handler . getXmlTag ( ) , handler . createEvaluatedXmlName ( getXmlName ( ) ) , handler . getFile ( ) ) ;
+ XmlTag tag = handler . getXmlTag ( ) ;
+ if ( tag == null ) {
+ return Collections . emptyList ( ) ;
+ }
+ return DomImplUtil . findSubTags ( tag , handler . createEvaluatedXmlName ( getXmlName ( ) ) , handler . getFile ( ) ) ;
}
} ;
|
correctly retrieve dom children for elements with no tag
|
<nb> final class RecordingSession {
private void startRecording ( ) {
Timber . d ( STRING0 ) ;
- if ( outputRoot . mkdirs ( ) ) {
+ if ( ! outputRoot . mkdirs ( ) ) {
Timber . e ( STRING1 , outputRoot . getAbsolutePath ( ) ) ;
SINGLE
}
|
Log directory creation failure not success
|
<nb> import NAMESPACE ;
public class PythonNamesValidator implements NamesValidator {
private static final PythonLexer ourLexer = new PythonLexer ( ) ;
- public boolean isKeyword ( @ notnull final String name , final Project project ) {
+ public synchronized boolean isKeyword ( @ notnull final String name , final Project project ) {
ourLexer . start ( name ) ;
if ( ! PyTokenTypes . KEYWORDS . contains ( ourLexer . getTokenType ( ) ) ) {
return false ;
<nb> public class PythonNamesValidator implements NamesValidator {
return ourLexer . getTokenType ( ) == null ;
}
- public boolean isIdentifier ( @ notnull final String name , final Project project ) {
+ public synchronized boolean isIdentifier ( @ notnull final String name , final Project project ) {
ourLexer . start ( name ) ;
if ( ourLexer . getTokenType ( ) != PyTokenTypes . IDENTIFIER ) {
return false ;
|
avoid shared lexer usage from different threads
|
<nb> package NAMESPACE ;
import NAMESPACE ;
- COMMENT
- COMMENT
- COMMENT
public abstract class TimeRange {
public enum Type {
<nb> public abstract class TimeRange {
switch ( Type . valueOf ( rangeType . toUpperCase ( ) ) ) {
case RELATIVE :
- return new RelativeRange ( ( ( Double ) timerangeConfig . get ( STRING0 ) ) . intValue ( ) ) ;
+ return new RelativeRange ( ( ( Number ) timerangeConfig . get ( STRING0 ) ) . intValue ( ) ) ;
case ABSOLUTE :
return new AbsoluteRange ( ( String ) timerangeConfig . get ( STRING1 ) , ( String ) timerangeConfig . get ( STRING2 ) ) ;
case KEYWORD :
|
Cast range to Number instead of Double
|
<nb> public class IssueTrackingDecorator implements Decorator {
for ( Issue issue : issueCache . byComponent ( resource . getEffectiveKey ( ) ) ) {
issues . add ( ( DefaultIssue ) issue ) ;
}
- issueCache . removeAll ( resource . getEffectiveKey ( ) ) ;
+ issueCache . clear ( resource . getEffectiveKey ( ) ) ;
SINGLE
SINGLE
<nb> public class IssueCache implements BatchComponent {
return this ;
}
- public boolean removeAll ( String componentKey ) {
- return cache . remove ( componentKey ) ;
+ public void clear ( String componentKey ) {
+ cache . clear ( componentKey ) ;
}
}
|
Fix issue tracking regression after last optimizations
|
<nb> public class WifiStateMachine extends StateMachine {
public boolean processMessage ( Message message ) {
if ( DBG ) Log . d ( TAG , getName ( ) + message . toString ( ) + STRING0 ) ;
switch ( message . what ) {
- case CMD_START_DRIVER :
- mWakeLock . acquire ( ) ;
- WifiNative . startDriverCommand ( ) ;
- mWakeLock . release ( ) ;
- break ;
- case WifiMonitor . SUPPLICANT_STATE_CHANGE_EVENT :
- SupplicantState state = handleSupplicantStateChange ( message ) ;
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- if ( state == SupplicantState . INTERFACE_DISABLED ) {
- transitionTo ( mDriverStartingState ) ;
- }
+ case CMD_START_DRIVER :
+ mWakeLock . acquire ( ) ;
+ WifiNative . startDriverCommand ( ) ;
+ mWakeLock . release ( ) ;
+ transitionTo ( mDriverStartingState ) ;
break ;
default :
return NOT_HANDLED ;
|
Remove work around for driver state change
|
<nb> public class StackTapPointerEventListener implements PointerEventListener {
if ( mPointerId >= NUMBER0 ) {
int index = motionEvent . findPointerIndex ( mPointerId ) ;
if ( ( motionEvent . getEventTime ( ) - motionEvent . getDownTime ( ) ) > TAP_TIMEOUT_MSEC
+ || index < NUMBER0
|| ( motionEvent . getX ( index ) - mDownX ) > mMotionSlop
|| ( motionEvent . getY ( index ) - mDownY ) > mMotionSlop ) {
mPointerId = - NUMBER1 ;
|
Fix pointer index out of range exception DO NOT MERGE
|
<nb> public class ExpandTabsReader extends FilterReader {
long skipped = NUMBER0 ;
for ( long l = NUMBER0 ; l < n ; l ++ ) {
int c = read ( ) ;
- if ( c == - NUMBER1 ) break ;
+ if ( c == - NUMBER1 ) {
+ break ;
+ }
skipped ++ ;
}
|
Fixed PMD warning if statement without curly braces
|
<nb> public class HttpClientTest extends AbstractHttpClientServerTest
@ test
public void testConnectHostWithMultipleAddresses ( ) throws Exception
{
- SINGLE
String host = STRING0 ;
- Assume . assumeTrue ( InetAddress . getAllByName ( host ) . length > NUMBER0 ) ;
+ try
+ {
+ SINGLE
+ Assume . assumeTrue ( InetAddress . getAllByName ( host ) . length > NUMBER0 ) ;
+ }
+ catch ( Throwable x )
+ {
+ Assume . assumeNoException ( x ) ;
+ }
startClient ( ) ;
client . setFollowRedirects ( false ) ; SINGLE
|
Updated test to run even when not connected to the network
|
<nb> public class FalsingManager implements SensorEventListener {
FalsingLog . i ( STRING0 , STRING1 ) ;
}
mDataCollector . onSucccessfulUnlock ( ) ;
- sessionExitpoint ( true COMMENT ) ;
}
public void onBouncerShown ( ) {
|
Fix early session termination in FalsingManager
|
<nb> public class AttributeRankingBuilder implements RankingBuilder {
@ override
public Number getMaximumValue ( ) {
if ( maximum == null ) {
- AbstractRanking . refreshMinMax ( this , graph ) ;
+ DynamicAttributeRanking . refreshMinMax ( this , graph ) ;
}
return maximum ;
}
<nb> public class AttributeRankingBuilder implements RankingBuilder {
@ override
public Number getMinimumValue ( ) {
if ( minimum == null ) {
- AbstractRanking . refreshMinMax ( this , graph ) ;
+ DynamicAttributeRanking . refreshMinMax ( this , graph ) ;
}
return minimum ;
}
|
Fix min max calculation for dynamic graphs in ranking
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
COMMENT
<nb> public final class Utils {
return isWebSocket ? isOK : true ;
}
+ public static final AtmosphereResource websocketResource ( AtmosphereResource r ) {
+ String parentUUID = ( String ) AtmosphereResourceImpl . class . cast ( r ) . getRequest ( false ) . getAttribute ( SUSPENDED_ATMOSPHERE_RESOURCE_UUID ) ;
+ if ( parentUUID != null ) {
+ r = r . getAtmosphereConfig ( ) . resourcesFactory ( ) . find ( parentUUID ) ;
+ }
+ return r ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Add unit for finding parent resource
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class OrbitRestClient
protected Object handleInvokeException ( Throwable e )
{
- System . out . println ( STRING0 ) ;
return reThrow ( e ) ;
}
<nb> public class OrbitRestClient
{
return ( ( CompletionStage ) invokeResult ) . exceptionally ( e - > {
Throwable throwable = ( Throwable ) e ;
- return handleInvokeException ( throwable . getCause ( ) ) ;
+
+ if ( throwable instanceof ProcessingException )
+ {
+ throwable = throwable . getCause ( ) ;
+ }
+
+ return handleInvokeException ( throwable ) ;
} ) ;
}
return invokeResult ;
}
- catch ( Exception e )
+ catch ( Exception | Error e )
{
return handleInvokeException ( e ) ;
}
|
Removed printline added more explicit Throwable unboxing in Task exceptionally handler
|
<nb> public class Node implements Serializable {
return new StringNode ( token , str , lineno , charno ) ;
}
- public Token getKind ( ) {
+ public Token getToken ( ) {
return token ;
}
public Token getType ( ) {
- return getKind ( ) ;
+ return getToken ( ) ;
}
- public void setKind ( Token token ) {
+ public void setToken ( Token token ) {
this . token = token ;
}
public void setType ( Token token ) {
- setKind ( token ) ;
+ setToken ( token ) ;
}
public boolean hasChildren ( ) {
|
Rename replacement for the Node getType method to Node getToken
|
<nb> abstract public class SupervisedModelBuilder < M extends SupervisedModel < M , P , O > , P
if ( ! isSupervised ( ) ) {
hide ( STRING0 , STRING1 ) ;
+ hide ( STRING2 , STRING1 ) ;
+ hide ( STRING3 , STRING1 ) ;
+ hide ( STRING4 , STRING1 ) ;
+ hide ( STRING5 , STRING1 ) ;
_response = null ;
_response_key = null ;
_vresponse = null ;
|
Ignore balnace class related parameters for DL AE or all unsupervised models built by SuperVisedModelBuilder
|
<nb> final class MetadataUtil
{
private final Map < String , Type > types = ImmutableMap . < String , Type > of (
StandardTypes . BIGINT , BIGINT ,
- VARCHAR . getTypeSignature ( ) . toString ( ) , VARCHAR ) ; SINGLE
+ StandardTypes . VARCHAR , VARCHAR ) ;
public TestingTypeDeserializer ( )
{
<nb> public final class MetadataUtil
StandardTypes . BOOLEAN , BOOLEAN ,
StandardTypes . BIGINT , BIGINT ,
StandardTypes . DOUBLE , DOUBLE ,
- StandardTypes . VARCHAR , VARCHAR ,
- VARCHAR . getTypeSignature ( ) . toString ( ) , VARCHAR ) ; SINGLE
+ StandardTypes . VARCHAR , VARCHAR ) ;
public TestingTypeDeserializer ( )
{
|
Fix testing MetadataUtil for varchar
|
<nb> public class DebugLogs extends BaseActivity {
COMMENT
COMMENT
private String getLogs ( ) throws IOException {
- Process process = Runtime . getRuntime ( ) . exec ( STRING0 + ( isRadioLogs ? STRING1 : STRING2 ) ) ;
+ SINGLE
+ Process process = Runtime . getRuntime ( ) . exec ( STRING3 + ( isRadioLogs ? STRING1 : STRING2 ) + STRING4 ) ;
BufferedReader bufferedReader = new BufferedReader (
new InputStreamReader ( process . getInputStream ( ) ) ) ;
|
Changed logcat to verbose and added time
|
<nb> public class H2OApp {
SINGLE
H2O . main ( args ) ;
- H2O . registerResourceRoot ( new File ( relpath + File . separator + STRING0 ) ) ;
- H2O . registerResourceRoot ( new File ( relpath + File . separator + STRING1 ) ) ;
+ H2O . registerResourceRoot ( new File ( relpath + File . separator + STRING2 ) ) ;
+ H2O . registerResourceRoot ( new File ( relpath + File . separator + STRING3 ) ) ;
SINGLE
H2O . registerGET ( STRING4 , hex . schemas . DeepLearningHandler . class , STRING5 , STRING4 , STRING6 , STRING7 ) ;
|
Fix broken refactor
|
<nb> public abstract class AbstractClientRequest < T > implements ClientRequest < T > {
if ( ! isComplete )
throw new IllegalStateException ( STRING0 ) ;
- if ( result == null )
- throw new StoreTimeoutException ( STRING1 ) ;
-
if ( ! isParsed )
throw new UnreachableStoreException ( STRING2 ) ;
|
Removed null check for server response since null apparently is a valid response
|
<nb> public class TldParsingDeploymentProcessor implements DeploymentUnitProcessor {
if ( ! tlds . containsKey ( key ) ) {
tlds . put ( key , value ) ;
}
+ if ( ! tlds . containsKey ( tld . getTaglibUri ( ) ) ) {
+ tlds . put ( tld . getTaglibUri ( ) , value ) ;
+ }
found = true ;
break ;
}
|
Fix up issue with JSP taglibs
|
<nb> public class DriverPublication implements AutoCloseable
private int determineIndexByTermId ( final int termId )
{
- if ( termId == activeTermId . get ( ) )
+ final int activeTermId = this . activeTermId . get ( ) ;
+ if ( termId == activeTermId )
{
return activeIndex ;
}
- else if ( termId == activeTermId . get ( ) - NUMBER0 )
+ else if ( termId == activeTermId - NUMBER0 )
{
return TermHelper . rotatePrevious ( activeIndex ) ;
}
|
Java Only do a single volatile lookup
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
public class PaymentGatewayProcessor extends ProcessorBase {
private final PluginDispatcher < HostedPaymentPageFormDescriptor > paymentPluginFormDispatcher ;
|
remove confusing comment in PaymentGatewayProcessor
|
<nb> public class SwipeLayout extends FrameLayout {
protected void processHandRelease ( float xvel , float yvel , boolean isCloseBeforeDragged ) {
float minVelocity = mDragHelper . getMinVelocity ( ) ;
View surfaceView = getSurfaceView ( ) ;
- DragEdge currentDragEdge = null ;
- try {
- currentDragEdge = mCurrentDragEdge ;
- } catch ( Exception e ) {
- e . printStackTrace ( ) ;
- }
+ DragEdge currentDragEdge = mCurrentDragEdge ;
if ( currentDragEdge == null || surfaceView == null ) {
return ;
}
|
remove useless try catch
|
<nb> import NAMESPACE ;
import NAMESPACE ;
public class TickEvent extends Event {
- private static enum Type {
+ public enum Type {
WORLD , PLAYER , CLIENT , SERVER , RENDER ;
}
|
Fix up privacy derp in TickEvent
|
<nb> import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
SINGLE
<nb> public class CapsuleTest {
assertEquals ( false , STRING0 . matches ( Capsule . globToRegex ( STRING1 ) ) ) ;
}
+ @ test
+ public void testMove ( ) throws Exception {
+ assertEquals ( Paths . get ( STRING2 ) , Capsule . move ( Paths . get ( STRING3 ) , Paths . get ( STRING3 ) , Paths . get ( STRING4 ) ) ) ;
+ assertEquals ( Paths . get ( STRING5 ) , Capsule . move ( Paths . get ( STRING6 ) , Paths . get ( STRING3 ) , Paths . get ( STRING4 ) ) ) ;
+ }
+
@ ignore
@ suppresswarnings ( STRING7 )
public void testDependencyToLocalJar ( ) throws Exception {
|
add move test
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class RoleVoter implements AccessDecisionVoter {
if ( this . supports ( attribute ) ) {
result = ACCESS_DENIED ;
+ GrantedAuthority [ ] authorities = authentication . getAuthorities ( ) ;
SINGLE
- for ( int i = NUMBER0 ; i < authentication . getAuthorities ( ) . length ; i ++ ) {
- if ( attribute . getAttribute ( ) . equals ( authentication . getAuthorities ( ) [ i ] . getAuthority ( ) ) ) {
+ for ( int i = NUMBER0 ; i < authorities . length ; i ++ ) {
+ if ( attribute . getAttribute ( ) . equals ( authorities [ i ] . getAuthority ( ) ) ) {
return ACCESS_GRANTED ;
}
}
|
RoleVoter can improve performance
|
<nb> public interface AsyncBatchCursor < T > extends Closeable {
COMMENT
int getBatchSize ( ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ boolean isClosed ( ) ;
+
@ override
void close ( ) ;
}
<nb> class AsyncQueryBatchCursor < T > implements AsyncBatchCursor < T > {
return batchSize ;
}
+ @ override
+ public boolean isClosed ( ) {
+ return closed ;
+ }
+
private boolean limitReached ( ) {
return limit != NUMBER0 && count >= limit ;
}
|
Added isClosed method to AsyncBatchCursor
|
<nb> public class Notification implements Parcelable
}
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class Notification implements Parcelable
}
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Improve doc for get set HintAvoidBackgroundClipping
|
<nb> public class DBCollectionTest extends TestCase {
assertEquals ( c . count ( ) , NUMBER0 ) ;
}
- @ tes
+ @ test
public void testMultiInsertWithContinue ( ) {
if ( ! serverIsAtLeastVersion ( FLOAT0 ) ) {
return ;
|
fixed compilation error
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> public class ShadowApplication extends ShadowContextWrapper {
private List < Intent > stoppedServies = new ArrayList < Intent > ( ) ;
private List < ServiceConnection > unboundServiceConnections = new ArrayList < ServiceConnection > ( ) ;
private List < Wrapper > registeredReceivers = new ArrayList < Wrapper > ( ) ;
+ private Set < Intent > stickyIntents = new TreeSet < Intent > ( ) ;
private FakeHttpLayer fakeHttpLayer = new FakeHttpLayer ( ) ;
private Looper mainLooper = ShadowLooper . myLooper ( ) ;
private Scheduler backgroundScheduler = new Scheduler ( ) ;
<nb> public class ShadowApplication extends ShadowContextWrapper {
}
}
+ @ implementation
+ public void sendStickyBroadcast ( Intent intent ) {
+ stickyIntents . add ( intent ) ;
+ sendBroadcast ( intent ) ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Added implementation of sendStickyBroadcast in ShadowAppplication class
|
<nb> import NAMESPACE ;
public final class MapViewerOsmDroid extends BaseActivity implements OnSharedPreferenceChangeListener {
+ SINGLE
private final Logger log = AndroidLogger . forClass ( MapViewerOsmDroid . class ) ;
public static final String updateOpenCellIDMarkers = STRING0 ;
|
add missing comment
|
<nb> import static NAMESPACE
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class BlockJUnit4ClassRunner extends ParentRunner < FrameworkMethod > {
protected Statement withPotentialTimeout ( FrameworkMethod method ,
Object test , Statement next ) {
long timeout = getTimeout ( method . getAnnotation ( Test . class ) ) ;
- return timeout > NUMBER0 ? new FailOnTimeout ( next , timeout ) : next ;
+ if ( timeout <= NUMBER0 ) {
+ return next ;
+ }
+ return FailOnTimeout . builder ( )
+ . withTimeout ( timeout , TimeUnit . MILLISECONDS )
+ . build ( next ) ;
}
COMMENT
|
Update BlockJUnit4ClassRunner to no longer use the deprecated FailOnTimeout ctor
|
<nb> public class JoglGraphics implements Graphics , RenderListener
}
else
{
- if ( minor < NUMBER0 )
+ if ( major == NUMBER1 && minor < NUMBER0 )
{
gl10 = new JoglGL10 ( graphicPanel . getGL ( ) ) ;
}
|
fixed gl version check in JoglGraphics
|
<nb> public class DependencyResolvingClasspath extends AbstractFileCollection {
class ResolveResult implements DependencyGraphVisitor , DependencyArtifactsVisitor {
public final DefaultTaskDependency taskDependency = new DefaultTaskDependency ( ) ;
public final List < Throwable > notFound = new LinkedList < Throwable > ( ) ;
- private final DefaultResolvedArtifactResults artifactResults = new DefaultResolvedArtifactResults ( ) ;
+ public final DefaultResolvedArtifactResults artifactResults = new DefaultResolvedArtifactResults ( ) ;
@ override
public void start ( DependencyGraphNode root ) {
|
Fix variable scope
|
<nb> import NAMESPACE ;
import NAMESPACE ;
public class CucumberActivitySteps extends ActivityInstrumentationTestCase2 < CucumberActivity > {
+ private int mSteps ;
+
public CucumberActivitySteps ( ) {
super ( CucumberActivity . class ) ;
}
@ before
public void before ( ) {
+ assertEquals ( NUMBER0 , mSteps ) ;
}
@ after
public void after ( ) {
+ assertEquals ( NUMBER1 , mSteps ) ;
}
@ given ( STRING0 )
public void I_have_a_test ( ) {
+ assertEquals ( NUMBER2 , ++ mSteps ) ;
}
@ when ( STRING1 )
public void I_test ( ) {
+ assertEquals ( NUMBER3 , ++ mSteps ) ;
}
@ then ( STRING2 )
public void I_succeed ( ) {
+ assertEquals ( NUMBER1 , ++ mSteps ) ;
}
}
|
Added assertions to test
|
<nb> public class JPQLSerializer extends SerializerBase < JPQLSerializer > {
SINGLE
if ( je . getTarget ( ) instanceof EntityPath < ? > ) {
final EntityPath < ? > pe = ( EntityPath < ? > ) je . getTarget ( ) ;
- if ( pe . getMetadata ( ) . getParent ( ) == null ) {
+ if ( pe . getMetadata ( ) . isRoot ( ) ) {
final Entity entityAnnotation = pe . getAnnotatedElement ( ) . getAnnotation ( Entity . class ) ;
if ( entityAnnotation != null && entityAnnotation . name ( ) . length ( ) > NUMBER0 ) {
append ( entityAnnotation . name ( ) ) ;
<nb> public abstract class AbstractStandardTest {
}
@ test
- @ ignore
public void As ( ) {
query ( ) . from ( QAnimal . animal . as ( QCat . class ) ) . count ( ) ;
}
|
Improved handling of delegate paths
|
<nb> public abstract class AbstractHttp11Processor < S > extends AbstractProcessor < S > {
request . setAttribute ( RequestDispatcher . ERROR_EXCEPTION , x ) ;
}
} catch ( IllegalStateException x ) {
- registerForEvent ( false , true ) ;
+ registerForEvent ( true , false ) ;
}
}
|
Fix copy paste error thanks kkolinko
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CarrierText extends TextView {
@ override
protected void onAttachedToWindow ( ) {
super . onAttachedToWindow ( ) ;
- mKeyguardUpdateMonitor = KeyguardUpdateMonitor . getInstance ( mContext ) ;
- mKeyguardUpdateMonitor . registerCallback ( mCallback ) ;
+ if ( ConnectivityManager . from ( mContext ) . isNetworkSupported (
+ ConnectivityManager . TYPE_MOBILE ) ) {
+ mKeyguardUpdateMonitor = KeyguardUpdateMonitor . getInstance ( mContext ) ;
+ mKeyguardUpdateMonitor . registerCallback ( mCallback ) ;
+ } else {
+ SINGLE
+ mKeyguardUpdateMonitor = null ;
+ setText ( STRING0 ) ;
+ }
}
@ override
protected void onDetachedFromWindow ( ) {
super . onDetachedFromWindow ( ) ;
- mKeyguardUpdateMonitor . removeCallback ( mCallback ) ;
+ if ( mKeyguardUpdateMonitor != null ) {
+ mKeyguardUpdateMonitor . removeCallback ( mCallback ) ;
+ }
}
COMMENT
|
CarrierText clear itself when no mob
|
<nb> public class DeclareVariable implements Operation {
GremlinEvaluator . declareVariable ( this . name , varValue ) ;
GremlinEvaluator . declareVariable ( Tokens . LAST_VARIABLE , varValue ) ;
- return ( GremlinEvaluator . DEBUG ) ? varValue : new Atom ( null ) ;
+ return varValue ;
}
public static void decalareWithInit ( String var , Atom value ) {
|
declaring a variable always returns a value now
|
<nb> package NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
updated javadoc comments on flash scope
|
<nb> public class BusinessInvoicePaymentDao {
} else {
invoicePaymentType = null ;
linkedInvoicePaymentId = null ;
+ SINGLE
createdDate = clock . getUTCNow ( ) ;
updatedDate = createdDate ;
}
|
add TODO for BIP
|
<nb> public class LocalStore extends Store implements Serializable {
message . setReplyTo ( Address . unpack ( cursor . getString ( NUMBER0 ) ) ) ;
message . mAttachmentCount = cursor . getInt ( NUMBER1 ) ;
message . setInternalDate ( new Date ( cursor . getLong ( NUMBER2 ) ) ) ;
- message . addHeader ( STRING0 , cursor . getString ( NUMBER3 ) ) ;
+ message . setHeader ( STRING0 , cursor . getString ( NUMBER3 ) ) ;
}
@ override
|
Set the MessageId header rather than Adding it when restoring from the local store
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CloudAzurePlugin extends Plugin {
public void onModule ( DiscoveryModule discoveryModule ) {
discoveryModule . addDiscoveryType ( STRING0 , AzureDiscovery . class ) ;
- discoveryModule . addUnicastHostProvider ( AzureUnicastHostsProvider . class ) ;
}
public void onModule ( IndexStoreModule storeModule ) {
|
azure Revert discovery plugins must declare their UnicastHostsProvider
|
<nb> public class HTML5VideoFullScreen extends HTML5VideoView
@ override
public void showControllerInFullScreen ( ) {
- mMediaController . show ( NUMBER0 ) ;
+ if ( mMediaController != null ) {
+ mMediaController . show ( NUMBER0 ) ;
+ }
}
SINGLE
|
Fix a crash
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class VcsProjectLog {
MessageBusConnection connection = project . getMessageBus ( ) . connect ( project ) ;
connection . subscribe ( ProjectLevelVcsManager . VCS_CONFIGURATION_CHANGED , projectLog : : recreateLog ) ;
if ( projectLog . hasDvcsRoots ( ) ) {
- ApplicationManager . getApplication ( ) . invokeLater ( ( ) - > projectLog . createLog ( ) ) ;
+ ApplicationManager . getApplication ( ) . invokeLater ( projectLog : : createLog ) ;
}
}
}
|
remove unused imports
|
<nb> class SyncManager implements OnAccountsUpdatedListener {
return ;
}
- if ( ! getConnectivityManager ( ) . getBackgroundDataSetting ( ) ) {
- if ( isLoggable ) {
- Log . v ( TAG , STRING0 ) ;
- }
- setStatusText ( STRING1 ) ;
- return ;
- }
+ final boolean backgroundDataUsageAllowed =
+ getConnectivityManager ( ) . getBackgroundDataSetting ( ) ;
if ( mAccounts == null ) setStatusText ( STRING2 ) ;
if ( ! mDataConnectionIsConnected ) setStatusText ( STRING3 ) ;
<nb> class SyncManager implements OnAccountsUpdatedListener {
} else {
final boolean syncAutomatically = masterSyncAutomatically
&& mSyncStorageEngine . getSyncAutomatically ( account , authority ) ;
- boolean syncAllowed = manualSync || syncAutomatically ;
+ boolean syncAllowed =
+ manualSync || ( backgroundDataUsageAllowed && syncAutomatically ) ;
if ( ! syncAllowed ) {
if ( isLoggable ) {
Log . d ( TAG , STRING4 + account + STRING5 + authority
|
Allow manual sync even when background data is disabled
|
<nb> public class EventTrackerHandler extends AbstractHandler {
EventTracker . class . getClassLoader ( ) . getResourceAsStream ( STRING0 ) ) ;
properties . load (
EventTrackerHandler . class . getClassLoader ( ) . getResourceAsStream ( STRING1 ) ) ;
+ properties . putAll ( System . getProperties ( ) ) ;
Injector injector = Guice . createInjector (
new DmaIdListModule ( ) ,
|
Make system properties override properties file
|
<nb> public final class InternetDomainNameTest extends TestCase {
assertFalse ( domain . publicSuffix ( ) . isPublicSuffix ( ) ) ;
}
+ public void testMultipleUnders ( ) {
+ SINGLE
+ SINGLE
+
+ InternetDomainName domain = InternetDomainName . from ( STRING0 ) ;
+ assertTrue ( domain . hasPublicSuffix ( ) ) ;
+ assertEquals ( STRING1 , domain . publicSuffix ( ) . name ( ) ) ;
+ assertEquals ( STRING0 , domain . topPrivateDomain ( ) . name ( ) ) ;
+ }
+
public void testEquality ( ) {
new EqualsTester ( )
. addEqualityGroup (
<nb> public final class InternetDomainNameTest extends TestCase {
tester . testAllPublicStaticMethods ( InternetDomainName . class ) ;
tester . testAllPublicInstanceMethods ( InternetDomainName . from ( STRING2 ) ) ;
}
-
}
|
Add an InternetDomainName test that confirms proper behavior when under TLD patterns overlap
|
<nb> import NAMESPACE ;
COMMENT
public class TransportShardFlushAction extends TransportReplicationAction < ShardFlushRequest , ShardFlushRequest , ActionWriteResponse > {
- public static final String NAME = STRING0 ;
+ public static final String NAME = FlushAction . NAME + STRING1 ;
@ inject
public TransportShardFlushAction ( Settings settings , TransportService transportService , ClusterService clusterService ,
<nb> import NAMESPACE ;
COMMENT
public class TransportShardRefreshAction extends TransportReplicationAction < ReplicationRequest , ReplicationRequest , ActionWriteResponse > {
- public static final String NAME = STRING2 ;
+ public static final String NAME = RefreshAction . NAME + STRING1 ;
@ inject
public TransportShardRefreshAction ( Settings settings , TransportService transportService , ClusterService clusterService ,
|
rename actions back to admin and add suffix s instead
|
<nb> public final class MediaStore
public final static String EXTRA_SIZE_LIMIT = STRING0 ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public final static String EXTRA_DURATION_LIMIT = STRING1 ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add an extra intent parameter for recording duration limit
|
<nb> public class WXEnvironment {
public static String JS_LIB_SDK_VERSION = STRING0 ;
- public static String WXSDK_VERSION = STRING1 ;
+ public static String WXSDK_VERSION = STRING2 ;
public static Application sApplication ;
public static final String DEV_Id = getDevId ( ) ;
public static int sDefaultWidth = NUMBER0 ;
|
android update version
|
<nb> public class InspectionToolRegistrar {
ensureInitialized ( ) ;
final List < InspectionToolWrapper > tools = ContainerUtil . newArrayListWithCapacity ( myInspectionToolFactories . size ( ) ) ;
- final Set < Factory < InspectionToolWrapper > > broken = ContainerUtil . newHashSet ( ) ;
for ( final Factory < InspectionToolWrapper > factory : myInspectionToolFactories ) {
ProgressManager . checkCanceled ( ) ;
final InspectionToolWrapper toolWrapper = factory . create ( ) ;
if ( toolWrapper != null && checkTool ( toolWrapper ) == null ) {
tools . add ( toolWrapper ) ;
}
- else {
- broken . add ( factory ) ;
- }
}
- myInspectionToolFactories . removeAll ( broken ) ;
return tools ;
}
|
ignore broken tools each time to be able to createTools concurrently
|
<nb>
package NAMESPACE ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
public interface TransactionalTask < T > {
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
T execute ( TransactionalTaskContext context ) throws TransactionException ;
}
|
Improved javadoc TransactionalTask
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.