diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> import NAMESPACE ;
public class QuickSearchHelper implements ResourceListener {
- public static final int SEARCH_FAVORITE_API_PRIORITY = NUMBER0 ;
- public static final int SEARCH_FAVORITE_API_CATEGORY_PRIORITY = NUMBER1 ;
- public static final int SEARCH_FAVORITE_OBJECT_PRIORITY = NUMBER2 ;
- public static final int SEARCH_WPT_API_PRIORITY = NUMBER0 ;
- public static final int SEARCH_WPT_OBJECT_PRIORITY = NUMBER2 ;
- public static final int SEARCH_HISTORY_API_PRIORITY = NUMBER3 ;
- public static final int SEARCH_HISTORY_OBJECT_PRIORITY = NUMBER2 ;
+ public static final int SEARCH_FAVORITE_API_PRIORITY = NUMBER4 ;
+ public static final int SEARCH_FAVORITE_API_CATEGORY_PRIORITY = NUMBER4 ;
+ public static final int SEARCH_FAVORITE_OBJECT_PRIORITY = NUMBER5 ;
+ public static final int SEARCH_WPT_API_PRIORITY = NUMBER4 ;
+ public static final int SEARCH_WPT_OBJECT_PRIORITY = NUMBER5 ;
+ public static final int SEARCH_HISTORY_API_PRIORITY = NUMBER4 ;
+ public static final int SEARCH_HISTORY_OBJECT_PRIORITY = NUMBER5 ;
private OsmandApplication app ;
private SearchUICore core ;
private SearchResultCollection resultCollection ;
|
Fix fav wpt search priority
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
@ beta
- public final class ExecutionList implements Runnable {
+ public final class ExecutionList {
SINGLE
private static final Logger log =
<nb> public final class ExecutionList implements Runnable {
SINGLE
private boolean executed = false ;
+ COMMENT
+ public ExecutionList ( ) {
+ }
+
COMMENT
COMMENT
COMMENT
<nb> public final class ExecutionList implements Runnable {
COMMENT
COMMENT
COMMENT
- @ override
public void run ( ) {
SINGLE
|
Make ExecutionList no longer extend Runnable as it s never used that way
|
<nb> public class BerkeleyJEStoreManager implements KeyValueStoreManager {
public BerkeleyJEStoreManager ( Configuration configuration ) throws StorageException {
stores = new HashMap < String , BerkeleyJEKeyValueStore > ( ) ;
- directory = new File ( configuration . getString ( STORAGE_DIRECTORY_KEY ) ) ;
+ String storageDir = configuration . getString ( STORAGE_DIRECTORY_KEY ) ;
+ Preconditions . checkArgument ( storageDir != null , STRING0 ) ;
+ directory = new File ( storageDir ) ;
Preconditions . checkArgument ( directory . isDirectory ( ) && directory . canWrite ( ) , STRING1 + directory ) ;
isReadOnly = configuration . getBoolean ( STORAGE_READONLY_KEY , STORAGE_READONLY_DEFAULT ) ;
batchLoading = configuration . getBoolean ( STORAGE_BATCH_KEY , STORAGE_BATCH_DEFAULT ) ;
|
added check for storage directory
|
<nb> public class Compiler extends AbstractCompiler implements ErrorHandler {
}
private void processNewScript ( JsAst ast , Node originalRoot ) {
+ languageMode = options . getLanguageIn ( ) ;
+
Node js = ast . getAstRoot ( this ) ;
Preconditions . checkNotNull ( js ) ;
|
Reset languageMode to languageIn at the beginning of processNewScript
|
<nb> public class JspUtil {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public static String toJavaSourceType ( String type ) {
|
Fix some Javadoc
|
<nb> public class Meeting {
}
public boolean wasNeverStarted ( int expiry ) {
- return ( ! hasStarted ( ) && ! hasEnded ( ) && didExpire ( expiry ) ) ;
+ return ( ! hasStarted ( ) && ! hasEnded ( ) && nobodyJoined ( expiry ) ) ;
+ }
+
+ private boolean nobodyJoined ( int expiry ) {
+ return ( System . currentTimeMillis ( ) - createdTime ) > ( expiry * MILLIS_IN_A_SECOND ) ;
}
public boolean hasExpired ( int expiry ) {
|
remove meeting if nobody joined after a certain number of minutes when the meeting was created
|
<nb> class PackageManagerService extends IPackageManager . Stub {
private int performDexOptLI ( PackageParser . Package pkg , boolean forceDex ) {
boolean performed = false ;
- if ( ( pkg . applicationInfo . flags & ApplicationInfo . FLAG_HAS_CODE ) != NUMBER0 ) {
+ if ( ( pkg . applicationInfo . flags & ApplicationInfo . FLAG_HAS_CODE ) != NUMBER0 && mInstaller != null ) {
String path = pkg . mScanPath ;
int ret = NUMBER0 ;
try {
|
Fix the simulator
|
<nb> public class MaterialViewPagerAnimator {
}
}
+ float initialDistance = - NUMBER0 ;
+
COMMENT
COMMENT
COMMENT
<nb> public class MaterialViewPagerAnimator {
float percent = yOffset / scrollMax ;
+ if ( initialDistance == - NUMBER0 )
+ initialDistance = mHeader . mPagerSlidingTabStrip . getTop ( ) - mHeader . toolbar . getBottom ( ) ;
+
+ float newDistance = ViewHelper . getY ( mHeader . mPagerSlidingTabStrip ) - mHeader . toolbar . getBottom ( ) ;
+
+ percent = NUMBER0 - newDistance / initialDistance ;
+
percent = minMax ( NUMBER1 , percent , NUMBER0 ) ;
{
|
fixed bug on small devices
|
<nb> public class Parse extends Request {
@ override protected Response serve ( ) {
water . parser . ParseDataset2 . parse ( _hex , _srcs ) ;
SINGLE
- System . out . println ( _hex ) ;
- for ( Key k : H2O . localKeySet ( ) )
- System . out . println ( k ) ;
return new Response ( STRING0 + _hex + STRING1 ) ;
}
|
Remove debug print
|
<nb> public class Roster extends Manager {
return userPresences ;
}
+ @ override
public void processPacket ( Packet packet ) throws NotConnectedException {
final XMPPConnection connection = connection ( ) ;
Presence presence = ( Presence ) packet ;
|
Add Override annotation to Roster s packet listener
|
<nb> public class ExplainHandler {
}
public static void handle ( String stmt , ServerConnection c , int offset ) {
- stmt = stmt . substring ( offset ) ;
+ stmt = stmt . substring ( offset ) . trim ( ) ;
RouteResultset rrs = getRouteResultset ( c , stmt ) ;
if ( rrs == null ) {
<nb> public class ExplainHandler {
return false ;
}
- }
+ }
|
fix explain truncate
|
<nb> public class EnglishGrammaticalStructure extends GrammaticalStructure {
COMMENT
public EnglishGrammaticalStructure ( Tree t , Filter < String > puncFilter , HeadFinder hf , boolean threadSafe ) {
SINGLE
- super ( ( new CoordinationTransformer ( hf ) ) . transformTree ( t ) , EnglishGrammaticalRelations . values ( threadSafe ) , threadSafe ? EnglishGrammaticalRelations . valuesLock ( ) : null , hf , puncFilter ) ;
+ super ( ( new CoordinationTransformer ( hf ) ) . transformTree ( t . deepCopy ( ) ) , EnglishGrammaticalRelations . values ( threadSafe ) , threadSafe ? EnglishGrammaticalRelations . valuesLock ( ) : null , hf , puncFilter ) ;
}
COMMENT
|
Deep copy the tree when making new dependencies
|
<nb> public abstract class DataConnection extends HierarchicalStateMachine {
clearSettings ( ) ;
- setDbg ( true ) ;
+ setDbg ( false ) ;
addState ( mDefaultState ) ;
addState ( mInactiveState , mDefaultState ) ;
addState ( mActivatingState , mDefaultState ) ;
|
Turn off HSM debugging in DataConnection to verbose
|
<nb> public final class AnimatorSet extends Animator {
boolean previouslyPaused = mPaused ;
super . pause ( ) ;
if ( ! previouslyPaused && mPaused ) {
- if ( mDelayAnim != null ) {
+ if ( mDelayAnim . isStarted ( ) ) {
+ SINGLE
mDelayAnim . pause ( ) ;
} else {
int size = mNodes . size ( ) ;
<nb> public final class AnimatorSet extends Animator {
boolean previouslyPaused = mPaused ;
super . resume ( ) ;
if ( previouslyPaused && ! mPaused ) {
- if ( mDelayAnim != null ) {
+ if ( mDelayAnim . isStarted ( ) ) {
+ SINGLE
mDelayAnim . resume ( ) ;
} else {
int size = mNodes . size ( ) ;
|
Fix pause resume for AnimatorSet
|
<nb> public class ImConnectionAdapter extends info . guardianproject . otr . app . im . IImConn
for ( ChatSessionAdapter session : mChatSessionManager . mActiveChatSessionAdapters . values ( ) ) {
session . sendPostponedMessages ( ) ;
}
+
+ mService . getStatusBarNotifier ( ) . notifyLoggedIn ( mProviderId , mAccountId ) ;
+
+
} else if ( state == ImConnection . LOGGING_OUT ) {
SINGLE
SINGLE
<nb> public class ImConnectionAdapter extends info . guardianproject . otr . app . im . IImConn
mChatSessionManager . closeAllChatSessions ( ) ;
}
+ mService . getStatusBarNotifier ( ) . notifyDisconnected ( mProviderId , mAccountId ) ;
+
mConnectionState = state ;
} else if ( state == ImConnection . SUSPENDED && error != null ) {
SINGLE
SINGLE
- mService . scheduleReconnect ( NUMBER0 ) ;
+ mService . scheduleReconnect ( NUMBER1 ) ;
+
+
}
updateAccountStatusInDb ( ) ;
|
added calls to status bar notifier for login and disconnect
|
<nb> public class SettingsActivity extends PreferenceActivity implements OnPreference
applicationDir . setKey ( STRING0 ) ;
applicationDir . setDialogTitle ( R . string . application_dir ) ;
applicationDir . setOnPreferenceChangeListener ( this ) ;
- applicationDir . setOnPreferenceChangeListener ( this ) ;
+ cat . addPreference ( applicationDir ) ;
}
- SINGLE
-
-
-
SINGLE
SINGLE
OsmandPlugin . onSettingsActivityCreate ( this , screen ) ;
|
Add blackberry support
|
<nb> public class KMeansV2 extends ModelBuilderSchema < KMeans , KMeansV2 , KMeansV2 . KMeans
@ api ( help = STRING0 , values = { STRING1 , STRING2 , STRING3 , STRING4 } ) SINGLE
public KMeans . Initialization init ;
-
- @ override public KMeansParametersV2 fillFromImpl ( KMeansParameters parms ) {
- super . fillFromImpl ( parms ) ;
- this . init = KMeans . Initialization . Furthest ;
- return this ;
- }
-
- public KMeansParameters fillImpl ( KMeansParameters impl ) {
- super . fillImpl ( impl ) ;
- impl . _init = KMeans . Initialization . Furthest ;
- return impl ;
- }
}
SINGLE
|
Fix a bug in kmeans input parameter schema where init was always being set to Furthest
|
<nb> public class MapRouteInfoControl extends MapControls implements IRouteInformatio
if ( selectFromMapForTarget ) {
getTargets ( ) . navigateToPoint ( latlon , true , - NUMBER0 ) ;
} else {
+ SINGLE
+ getTargets ( ) . clearStartPoint ( true ) ;
getTargets ( ) . setStartPoint ( latlon , true , null ) ;
SINGLE
}
|
Try clearStartPoint true before changing setStartPoint
|
<nb> public class BuildCraftCore extends BuildCraftMod {
public static BCAction actionOff = new ActionMachineControl ( Mode . Off ) ;
public static BCAction actionLoop = new ActionMachineControl ( Mode . Loop ) ;
public static boolean loadDefaultRecipes = true ;
- public static boolean forcePneumaticPower = true ;
public static boolean consumeWaterSources = false ;
SINGLE
@ mod.instance ( STRING0 )
|
removed unused field
|
<nb> public class DcorefChineseBenchmarkSlowITest extends TestCase {
setAll ( lowResults , highResults , expectedResults , BLANC_F1 , FLOAT0 ) ;
- setAll ( lowResults , highResults , expectedResults , CONLL_SCORE , FLOAT1 ) ;
+ setAll ( lowResults , highResults , expectedResults , CONLL_SCORE , FLOAT2 ) ;
Counter < String > results = new ClassicCounter < String > ( ) ;
|
change expected test result
|
<nb> public class VocabConstructor < T extends SequenceElement > {
COMMENT
COMMENT
COMMENT
- protected Builder < T > setEntriesLimit ( int limit ) {
+ public Builder < T > setEntriesLimit ( int limit ) {
this . limit = limit ;
return this ;
}
|
Switch VocabConstructor Builder setEntriesLimit to public
|
<nb> public class AudioHandler extends CordovaPlugin {
public String getFilePath ( String url , String source ) {
DataResource dataResource = DataResource . initiateNewDataRequestForUri ( url , this . webView . pluginManager , cordova , source ) ;
- return dataResource . getRealFile ( ) . getPath ( ) ;
+ if ( dataResource . getUri ( ) . getScheme ( ) . equals ( STRING0 ) || dataResource . getUri ( ) . getScheme ( ) . equals ( STRING1 ) )
+ return dataResource . getUri ( ) . toString ( ) ;
+ else
+ return dataResource . getRealFile ( ) . getPath ( ) ;
}
COMMENT
|
Fixed streaming audio this is pretty important for mobile spec
|
<nb> public class TokenBasedRememberMeServices extends AbstractRememberMeServices {
HttpServletResponse response ) {
if ( cookieTokens . length != NUMBER0 ) {
- throw new InvalidCookieException ( STRING0 + NUMBER1 +
+ throw new InvalidCookieException ( STRING1 +
STRING2 + Arrays . asList ( cookieTokens ) + STRING3 ) ;
}
|
Corrected incorrect numer of tokens error message in TokenBasedRememberMeServices
|
<nb> public class TestDistributedQueries
@ override
public String apply ( MaterializedTuple input )
{
- assertEquals ( input . getFieldCount ( ) , NUMBER0 ) ;
+ assertEquals ( input . getFieldCount ( ) , NUMBER1 ) ;
return ( String ) input . getField ( NUMBER2 ) ;
}
} ) ) ;
|
Fix broken show table test
|
<nb> public class SqliteAndroidDatabaseType extends BaseSqliteDatabaseType implements
return true ;
}
- public String getDriverClassName ( ) {
+ @ override
+ protected String getDriverClassName ( ) {
SINGLE
return null ;
}
|
Made getDriverClassName be protected and not part of the interface
|
<nb> public class DefaultServer extends BlockJUnit4ClassRunner {
private static KeyStore loadKeyStore ( final String name ) throws IOException {
final InputStream stream = DefaultServer . class . getClassLoader ( ) . getResourceAsStream ( name ) ;
+ if ( stream == null ) {
+ throw new RuntimeException ( STRING0 ) ;
+ }
try {
KeyStore loadedKeystore = KeyStore . getInstance ( STRING1 ) ;
loadedKeystore . load ( stream , STORE_PASSWORD ) ;
<nb> public class Http2Server {
stream = Files . newInputStream ( Paths . get ( storeLoc ) ) ;
}
+ if ( stream == null ) {
+ throw new RuntimeException ( STRING0 ) ;
+ }
try ( InputStream is = stream ) {
KeyStore loadedKeystore = KeyStore . getInstance ( STRING1 ) ;
loadedKeystore . load ( is , password ( name ) ) ;
|
Make sure keystore is not null in example
|
<nb> public class PSurfaceJOGL implements PSurface {
if ( screenRect . width == sketchWidth &&
screenRect . height == sketchHeight ) {
fullScreen = true ;
- SINGLE
+ sketch . fullScreen ( ) ;
}
if ( fullScreen || spanDisplays ) {
|
set fullscreen on sketch
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+
import NAMESPACE ;
COMMENT
<nb> import NAMESPACE ;
COMMENT
abstract class AbstractEventData implements EventData {
- private String source ;
- private String mapName ;
- private Address caller ;
- private int eventType ;
+ protected String source ;
+ protected String mapName ;
+ protected Address caller ;
+ protected int eventType ;
public AbstractEventData ( ) {
}
|
relaxed access modifiers
|
<nb> public abstract class AbsListView extends AdapterView < ListAdapter > implements Te
}
SINGLE
- final float screenTravelCount = viewTravelCount / childCount ;
+ final float screenTravelCount = ( float ) viewTravelCount / childCount ;
mScrollDuration = ( int ) ( SCROLL_DURATION / screenTravelCount ) ;
mLastSeenPos = INVALID_POSITION ;
post ( this ) ;
|
Perform a float division for screenTravelCount
|
<nb> class SocketIOConnection {
public void run ( ) {
if ( heartbeat <= NUMBER0 || ts != transport || ts == null || ! ts . isConnected ( ) )
return ;
+
transport . send ( STRING0 ) ;
- transport . getServer ( ) . postDelayed ( this , heartbeat ) ;
+
+ if ( transport != null )
+ transport . getServer ( ) . postDelayed ( this , heartbeat ) ;
}
} ;
heartbeatRunner . run ( ) ;
|
Handle cases where the transport becomes null during the socketIO heartbeat
|
<nb> public class LocationManagerService extends ILocationManager . Stub implements Run
SINGLE
if ( intentsToRemove != null ) {
for ( PendingIntent i : intentsToRemove ) {
- ProximityAlert alert = mProximityAlerts . remove ( i ) ;
+ ProximityAlert alert = mProximityAlerts . get ( i ) ;
mProximitiesEntered . remove ( alert ) ;
+ removeProximityAlertLocked ( i ) ;
}
}
}
|
Remove the ProximityAlerts update Receiver when the last ProximityAlert expires
|
<nb>
package 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 ;
- import NAMESPACE ;
COMMENT
COMMENT
|
Removed unused imports
|
<nb> public class ColumnValidator implements Validator < ColumnDefinition > {
if ( columnDefinition . column . name ( ) . length ( ) > NUMBER0 ) {
success = false ;
- processorManager . logError ( STRING0 +
- STRING1 ) ;
+ processorManager . logError ( STRING2 +
+ STRING1 , columnDefinition . columnFieldName ) ;
}
} else if ( columnType == Column . NORMAL ) {
|
added name of column to validator
|
<nb> public final class BlockMasterSync implements Runnable {
public void registerWithMaster ( ) {
BlockStoreMeta storeMeta = mBlockDataManager . getStoreMeta ( ) ;
try {
- SINGLE
- setWorkerId ( ) ;
- SINGLE
mMasterClient . register ( mWorkerId , storeMeta . getCapacityBytesOnTiers ( ) ,
storeMeta . getUsedBytesOnTiers ( ) , storeMeta . getBlockList ( ) ) ;
} catch ( IOException ioe ) {
<nb> public final class BlockMasterSync implements Runnable {
break ;
SINGLE
case Register :
+ setWorkerId ( ) ;
registerWithMaster ( ) ;
break ;
SINGLE
|
Call setWorkerId outside
|
<nb> public class CardModel {
private Drawable cardLikeImageDrawable ;
private Drawable cardDislikeImageDrawable ;
- private OnCardDimissedListener mOnCardDimissedListener = null ;
+ private OnCardDismissedListener mOnCardDismissedListener = null ;
private OnClickListener mOnClickListener = null ;
- public interface OnCardDimissedListener {
+ public interface OnCardDismissedListener {
void onLike ( ) ;
void onDislike ( ) ;
}
<nb> public class CardModel {
this . cardDislikeImageDrawable = cardDislikeImageDrawable ;
}
- public void setOnCardDimissedListener ( OnCardDimissedListener listener ) {
- this . mOnCardDimissedListener = listener ;
+ public void setOnCardDismissedListener ( OnCardDismissedListener listener ) {
+ this . mOnCardDismissedListener = listener ;
}
- public OnCardDimissedListener getOnCardDimissedListener ( ) {
- return this . mOnCardDimissedListener ;
+ public OnCardDismissedListener getOnCardDismissedListener ( ) {
+ return this . mOnCardDismissedListener ;
}
<nb> public class CardModel {
public OnClickListener getOnClickListener ( ) {
return this . mOnClickListener ;
}
- }
+ }
|
Fix rampant typos
|
<nb> public class GrpcServerImpl extends RPCServer implements CommandServerGrpc . Comma
}
}
- server . shutdownNow ( ) ;
+ server . shutdown ( ) ;
}
@ override
<nb> public class GrpcServerImpl extends RPCServer implements CommandServerGrpc . Comma
timeoutThread ( ) ;
}
} ) ;
-
+
timeoutThread . setDaemon ( true ) ;
timeoutThread . start ( ) ;
}
|
Make the timeout thread shut the server down in an orderly way
|
<nb> public class ShellPane extends ShellWidget implements Shell . Display
super ( editor ) ;
editor . setFileType ( FileTypeRegistry . R , true ) ;
-
+ SINGLE
+ SINGLE
+ editor . setUseWrapMode ( true ) ;
+
uiPrefs . syntaxColorConsole ( ) . bind ( new CommandWithArg < Boolean > ( )
{
public void execute ( Boolean arg )
|
Console horizontal scroll bar obstructs command
|
<nb> public class MultiUserChat {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static RoomInfo getRoomInfo ( XMPPConnection connection , String room )
+ throws XMPPException {
+ DiscoverInfo info = ServiceDiscoveryManager . getInstanceFor ( connection ) . discoverInfo ( room ) ;
+ return new RoomInfo ( info ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MultiUserChat {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public static InvitationsMonitor getInvitationsMonitor ( XMPPConnection conn ) {
|
Added support for discovering room information
|
<nb> public abstract class BreakpointWithHighlighter extends Breakpoint {
return isPositionValid ( position ) ;
}
- protected boolean moveTo ( SourcePosition position ) {
+ public boolean moveTo ( SourcePosition position ) {
if ( ! canMoveTo ( position ) ) {
return false ;
}
<nb> public class FieldBreakpoint extends BreakpointWithHighlighter {
}
}
- protected boolean moveTo ( SourcePosition position ) {
+ public boolean moveTo ( SourcePosition position ) {
final PsiField field = PositionUtil . getPsiElementAt ( getProject ( ) , PsiField . class , position ) ;
if ( field == null ) {
return false ;
|
make BreakpointWithHighlighter moveTo public
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IndexingConfig {
private static final Logger LOGGER = LoggerFactory . getLogger ( IndexingConfig . class ) ;
private List < String > invertedIndexColumns ;
+ private List < String > sortedColumn = new ArrayList < String > ( ) ;
private String loadMode ;
private String lazyLoad ;
- private Map < String , String > streamConfigs ;
+ private Map < String , String > streamConfigs = new HashMap < String , String > ( ) ;
public IndexingConfig ( ) {
}
+ public List < String > getSortedColumn ( ) {
+ return sortedColumn ;
+ }
+
+ public void setSortedColumn ( List < String > sortedColumn ) {
+ this . sortedColumn = sortedColumn ;
+ }
+
public Map < String , String > getStreamConfigs ( ) {
return streamConfigs ;
}
|
adding sorted columns in the indexing config
|
<nb> public class Module extends NinjaAppAbstractModule {
@ override
protected ServletModule setupServlets ( ) {
- SINGLE
+ SINGLE
+ SINGLE
SINGLE
bind ( NinjaServletDispatcher . class ) . asEagerSingleton ( ) ;
|
added some comment
|
<nb>
COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Move SSL test
|
<nb> public class CandleDataSet extends LineScatterCandleRadarDataSet < CandleEntry > {
mLastStart = start ;
mLastEnd = endValue ;
- mYMin = mYVals . get ( start ) . getLow ( ) ;
- mYMax = mYVals . get ( start ) . getHigh ( ) ;
+ mYMin = start < mYVals . size ( ) ? mYVals . get ( start ) . getLow ( ) : Float . MAX_VALUE ;
+ mYMax = start < mYVals . size ( ) ? mYVals . get ( start ) . getHigh ( ) : - Float . MAX_VALUE ;
for ( int i = start + NUMBER0 ; i <= endValue ; i ++ ) {
|
Fix IOOB exception
|
<nb> public class EventReceiverFirehoseFactory implements FirehoseFactory < MapInputRow
{
synchronized ( readLock ) {
try {
- while ( ! closed && nextRow == null ) {
+ while ( nextRow == null ) {
nextRow = buffer . poll ( NUMBER0 , TimeUnit . MILLISECONDS ) ;
+ if ( closed ) {
+ break ;
+ }
}
}
catch ( InterruptedException e ) {
|
Drain buffer when closed until empty
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TestCacheManager {
HazelcastInstance testInstance = Hazelcast . newHazelcastInstance ( ) ;
testInstance . getMap ( testMap ) ;
SINGLE
- distributionSignal . await ( ) ;
+ HazelcastTestSupport . assertOpenEventually ( distributionSignal ) ;
Collection < String > test = cacheManager . getCacheNames ( ) ;
Assert . assertTrue ( test . contains ( testMap ) ) ;
|
testCacheNames latch timeout
|
<nb> public class TablePageQueryTest extends PluggableActivitiTestCase {
private void verifyTaskNames ( String [ ] expectedTaskNames , List < Map < String , Object > > rowData ) {
assertEquals ( expectedTaskNames . length , rowData . size ( ) ) ;
+ String columnKey = STRING0 ;
+
+ SINGLE
+ if ( processEngineConfiguration . getDatabaseType ( ) . equals ( STRING1 ) ) {
+ columnKey = STRING2 ;
+ }
+
for ( int i = NUMBER0 ; i < expectedTaskNames . length ; i ++ ) {
- assertEquals ( expectedTaskNames [ i ] , rowData . get ( i ) . get ( STRING0 ) ) ;
+ assertEquals ( expectedTaskNames [ i ] , rowData . get ( i ) . get ( columnKey ) ) ;
}
}
|
adjust TableData test for proper column name in resultMap from postgres
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
+ @ deprecated
public interface Streamable {
COMMENT
|
Deprecate unused code
|
<nb> public class NettyAsyncHttpProvider extends SimpleChannelUpstreamHandler impleme
HttpRequest nettyRequest ;
if ( m . equals ( HttpMethod . CONNECT ) ) {
nettyRequest = new DefaultHttpRequest ( HttpVersion . HTTP_1_0 , m , AsyncHttpProviderUtils . getAuthority ( uri ) ) ;
- } else if ( config . getProxyServer ( ) != null || request . getProxyServer ( ) != null ) {
- nettyRequest = new DefaultHttpRequest ( HttpVersion . HTTP_1_1 , m , uri . toString ( ) ) ;
} else {
StringBuilder path = new StringBuilder ( uri . getRawPath ( ) ) ;
if ( uri . getQuery ( ) != null ) {
|
don t use full url as host
|
<nb> public class RemoteTaskRunner implements TaskRunner , TaskLogStreamer
@ override
public Optional < ScalingStats > getScalingStats ( )
{
- return Optional . of ( resourceManagement . getStats ( ) ) ;
+ return Optional . fromNullable ( resourceManagement . getStats ( ) ) ;
}
public ZkWorker findWorkerRunningTask ( String taskId )
|
Allow ScalingStats to be null
|
<nb> public class ReaderPost {
post . blogName = JSONUtils . getStringDecoded ( json , STRING0 ) ;
post . published = JSONUtils . getString ( json , STRING1 ) ;
- SINGLE
- SINGLE
- if ( json . has ( STRING2 ) ) {
- post . sortIndex = json . optDouble ( STRING2 ) ;
- } else if ( json . has ( STRING3 ) ) {
+ SINGLE
+ SINGLE
+ if ( json . has ( STRING3 ) ) {
String likeDate = JSONUtils . getString ( json , STRING3 ) ;
post . sortIndex = DateTimeUtils . iso8601ToTimestamp ( likeDate ) ;
} else {
|
Don t set sortIndex based on score
|
<nb> public class JetSourceNavigationHelper {
@ nullable
public static PsiClass getOriginalPsiClassOrCreateLightClass ( @ notnull JetClassOrObject classOrObject ) {
- PsiClass originalClass = getOriginalClass ( classOrObject ) ;
- if ( originalClass != null ) {
- return originalClass ;
- }
if ( LightClassUtil . belongsToKotlinBuiltIns ( ( JetFile ) classOrObject . getContainingFile ( ) ) ) {
Name className = classOrObject . getNameAsName ( ) ;
assert className != null : STRING0 ;
|
Remove redundant check it is included in LightClassUtils getPsiClass
|
<nb> public class LibratoWriterFactoryIT {
postRequestedFor ( urlEqualTo ( STRING0 ) )
. withHeader ( STRING1 , containing ( STRING2 ) )
. withHeader ( STRING3 , containing ( STRING4 ) )
- . withRequestBody ( matchingJsonPath ( STRING5 ) ) ) ;
+ . withRequestBody ( matchingJsonPath ( STRING6 ) ) ) ;
}
}
<nb> public class KafkaWriterTests {
assertThat ( message . topic ( ) ) . isEqualTo ( STRING7 ) ;
assertThat ( message . message ( ) )
- . contains ( STRING8 )
+ . contains ( STRING9 )
. contains ( STRING10 )
. contains ( STRING11 )
. contains ( STRING12 ) ;
|
fixed a couple more tests
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Join extends CompositeOperator < Join > {
this . joinCondition = joinCondition ;
this . binaryConditions = expressions ;
}
+
+ private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException {
+ ois . defaultReadObject ( ) ;
+ final ArrayList < BinaryBooleanExpression > expressions = new ArrayList < BinaryBooleanExpression > ( ) ;
+ this . addBinaryExpressions ( this . joinCondition , expressions ) ;
+ this . binaryConditions = expressions ;
+ }
public void setOuterJoinIndices ( int . . . outerJoinIndices ) {
if ( outerJoinIndices == null )
|
Fixed deserialization bug of Join
|
<nb> public class GroovyClassLoader extends URLClassLoader {
this . su = su ;
}
- protected GroovyClassLoader getDefiningClassLoader ( ) {
+ public GroovyClassLoader getDefiningClassLoader ( ) {
return cl ;
}
|
give access to the defining classloader
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
|
rename hierarchy imports in worker eviction
|
<nb> public class ColorSelector implements Tool , DocumentListener {
}
- static public void main ( String [ ] args ) {
- ColorSelector cs = new ColorSelector ( ) ;
- cs . init ( null ) ;
- EventQueue . invokeLater ( cs ) ;
- }
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
}
|
remove main method to avoid confusion
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
public class QueueStoreConfig {
<nb> package NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
-
public class ServiceConfig {
private boolean enabled ;
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
public class ServicesConfig {
|
Removed author tag
|
<nb> abstract public class AbstractDomElementNode extends SimpleNode {
Optional < Class > parent = hiders . keySet ( ) . stream ( )
. filter ( klass - > klass . isAssignableFrom ( aClass ) ) . min ( INHERITORS_COMPARATOR ) ;
- return parent . map ( hiders : : get ) . orElse ( false ) ;
+ return parent . map ( hiders : : get ) . orElse ( Boolean . FALSE ) . booleanValue ( ) ;
}
|
fixed new autoboxing autounboxing warnings
|
<nb> public final class DataServerHandler extends SimpleChannelInboundHandler < RPCMess
assert msg instanceof RPCFileWriteRequest ;
mUnderFileSystemHandler . handleFileWriteRequest ( ctx , ( RPCFileWriteRequest ) msg ) ;
break ;
+ case RPC_ERROR_RESPONSE :
+ assert msg instanceof RPCErrorResponse ;
+ LOG . error ( STRING0 + msg . toString ( ) ) ;
+ break ;
default :
RPCErrorResponse resp = new RPCErrorResponse ( RPCResponse . Status . UNKNOWN_MESSAGE_ERROR ) ;
ctx . writeAndFlush ( resp ) ;
|
Handle error response in data server handler
|
<nb> public class ObjectiveCImplementationGenerator extends ObjectiveCSourceFileGener
} else if ( value instanceof String ) {
StringLiteral node = ast . newStringLiteral ( ) ;
node . setLiteralValue ( ( String ) value ) ;
- printf ( StatementGenerator . generateStringLiteral ( node ) ) ;
+ print ( StatementGenerator . generateStringLiteral ( node ) ) ;
} else if ( value instanceof Number || value instanceof Character || value instanceof Boolean ) {
print ( value . toString ( ) ) ;
} else if ( value . getClass ( ) . isArray ( ) ) {
|
Fix a bug translating annotations
|
<nb> public abstract class JSON implements JSONStreamAware , JSONAware {
public static < T > T toJavaObject ( JSON json , Class < T > clazz ) {
return TypeUtils . cast ( json , clazz , ParserConfig . getGlobalInstance ( ) ) ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ public < T > T toJavaObject ( Class < T > clazz ) {
+ return TypeUtils . cast ( this , clazz , ParserConfig . getGlobalInstance ( ) ) ;
+ }
public final static String VERSION = STRING0 ;
}
|
add toJavaObject method
|
<nb> final class OperationContextImpl implements OperationContext {
SINGLE
SINGLE
response . get ( FAILURE_DESCRIPTION ) . set ( ofe . getFailureDescription ( ) ) ;
- log . warnf ( ofe , STRING0 , operation . get ( OP ) , operation . get ( OP_ADDR ) ) ;
+ log . warnf ( STRING0 , operation . get ( OP ) , operation . get ( OP_ADDR ) ) ;
completeStep ( ) ;
}
else {
|
Don t log the stack trace for an OFE
|
<nb> public abstract class GeocodeProvider {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public abstract String onGetFromLocation ( double latitude , double longitude , int maxResults ,
<nb> public abstract class GeocodeProvider {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public abstract String onGetFromLocationName ( String locationName ,
<nb> public abstract class LocationProvider {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public abstract class LocationProvider {
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix broken Javadoc links
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
- public class InjectionTarget {
+ public class InjectionTarget implements Serializable {
+
+ private static final long serialVersionUID = NUMBER0 ;
+
private String targetClass ;
private String targetName ;
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
<nb> package NAMESPACE ;
COMMENT
COMMENT
- public class SecurityRoleRef {
+ public class SecurityRoleRef implements Serializable {
+ private static final long serialVersionUID = NUMBER0 ;
- SINGLE
+ SINGLE
COMMENT
COMMENT
|
Fix FindBugs warnings Serializable classes with non serializabe fields
|
<nb> public class NativeServices extends DefaultServiceRegistry implements ServiceReg
try {
net . rubygrapefruit . platform . Native . init ( nativeDir ) ;
} catch ( NativeIntegrationUnavailableException ex ) {
- if ( OperatingSystem . current ( ) . isWindows ( ) ) {
- throw ex ;
- }
LOGGER . debug ( STRING0 ) ;
useNativePlatform = false ;
} catch ( NativeException ex ) {
- if ( OperatingSystem . current ( ) . isWindows ( ) ) {
- throw ex ;
- }
LOGGER . debug ( STRING1 , format ( ex ) ) ;
useNativePlatform = false ;
}
|
Temporarily throw an exception if we fail to load the native integration on Windows
|
<nb> public final class NodeUtil {
return false ;
}
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- @ deprecated
- public static JSDocInfo getFunctionJSDocInfo ( Node n ) {
- Preconditions . checkState ( n . isFunction ( ) ) ;
- JSDocInfo fnInfo = n . getJSDocInfo ( ) ;
- if ( fnInfo == null && NodeUtil . isFunctionExpression ( n ) ) {
- SINGLE
- Node parent = n . getParent ( ) ;
- if ( parent . isAssign ( ) ) {
- SINGLE
- fnInfo = parent . getJSDocInfo ( ) ;
- } else if ( parent . isName ( ) ) {
- SINGLE
- fnInfo = parent . getParent ( ) . getJSDocInfo ( ) ;
- }
- }
- return fnInfo ;
- }
-
static boolean functionHasInlineJsdocs ( Node fn ) {
if ( ! fn . isFunction ( ) ) {
return false ;
|
Remove unused function getFunctionJSDocInfo
|
<nb> public class ShowsActivity extends BaseActivity implements AbsListView . OnScrollL
private static final int VER_TRAKT_SEC_CHANGES = NUMBER0 ;
- private static final int VER_SUMMERTIME_FIX = NUMBER1 ;
+ private static final int VER_SUMMERTIME_FIX = NUMBER2 ;
private Bundle mSavedState ;
|
Use correct version code for summer time fix upgrade
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class NettyBundleActivator implements BundleActivator {
SINGLE
register ( ctx , new OioClientSocketChannelFactory ( executor ) ) ;
register ( ctx , new OioServerSocketChannelFactory ( executor , executor ) ) ;
+ register ( ctx , new NioDatagramChannelFactory ( executor ) ) ;
}
public void stop ( BundleContext ctx ) throws Exception {
|
Added NioDatagramChannelFactory support to OSGi integration
|
<nb> public class ShadowAlertDialog extends ShadowDialog {
}
@ implementation
+ public AlertDialog . Builder setIcon ( int iconId ) {
+ return realBuilder ;
+ }
+
+ @ implementation
public AlertDialog . Builder setPositiveButton ( CharSequence text , final DialogInterface . OnClickListener listener ) {
this . positiveText = text ;
this . positiveListener = listener ;
|
Added AlertDialog Builder setIcon shadow implementation
|
<nb> public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
}
SINGLE
- public void refreshMap ( final boolean force ) {
- if ( ! handler . hasMessages ( NUMBER0 ) || force ) {
+ public void refreshMap ( final boolean updateVectorRendering ) {
+ if ( ! handler . hasMessages ( NUMBER0 ) || updateVectorRendering ) {
handler . removeMessages ( NUMBER0 ) ;
Message msg = Message . obtain ( handler , new Runnable ( ) {
@ override
public void run ( ) {
- refreshMapInternal ( force ) ;
+ refreshMapInternal ( updateVectorRendering ) ;
}
} ) ;
msg . what = NUMBER0 ;
<nb> public class RouteInfoWidgetsFactory {
showArrival . set ( ! showArrival . get ( ) ) ;
leftTimeControl . setImageDrawable ( showArrival . get ( ) ? time : timeToGo ) ;
leftTimeControl . requestLayout ( ) ;
+ map . getMapView ( ) . refreshMap ( ) ;
}
} ) ;
|
Fix small bug
|
<nb> public class GenericDraweeHierarchy implements SettableDraweeHierarchy {
}
SINGLE
- int numOverlays = ( builder . getOverlays ( ) != null ) ? builder . getOverlays ( ) . size ( ) : NUMBER0 ;
int overlaysIndex = numLayers ;
+ int numOverlays =
+ ( ( builder . getOverlays ( ) != null ) ? builder . getOverlays ( ) . size ( ) : NUMBER0 ) +
+ ( ( builder . getPressedStateOverlay ( ) != null ) ? NUMBER1 : NUMBER0 ) ;
numLayers += numOverlays ;
- numLayers += ( builder . getPressedStateOverlay ( ) != null ) ? NUMBER1 : NUMBER0 ;
SINGLE
mControllerOverlayIndex = numLayers ++ ;
|
Fix NPE in PressedStateOverlay
|
<nb> import NAMESPACE ;
COMMENT
public class ReadDataTagged {
- private ArrayList < DataWordTag > v = new ArrayList < DataWordTag > ( ) ;
+ private final ArrayList < DataWordTag > v = new ArrayList < DataWordTag > ( ) ;
private int numElements = NUMBER0 ;
private int totalSentences = NUMBER0 ;
private int totalWords = NUMBER0 ;
<nb> public class ReadDataTagged {
COMMENT
COMMENT
void release ( ) {
- v = null ;
+ v . clear ( ) ;
}
<nb> import NAMESPACE ;
COMMENT
public class TaggerFeature extends Feature {
- private int start ;
- private int end ;
- private FeatureKey key ;
- private int yTag ;
+ private final int start ;
+ private final int end ;
+ private final FeatureKey key ;
+ private final int yTag ;
private final TaggerExperiments domain ;
protected TaggerFeature ( int start , int end , FeatureKey key ,
|
Make some stuff final
|
<nb> public class HystrixYammerMetricsPublisherCommand implements HystrixMetricsPubli
} ) ;
SINGLE
+ createCumulativeCountForEvent ( STRING0 , HystrixRollingNumberEvent . BAD_REQUEST ) ;
createCumulativeCountForEvent ( STRING1 , HystrixRollingNumberEvent . COLLAPSED ) ;
createCumulativeCountForEvent ( STRING2 , HystrixRollingNumberEvent . EXCEPTION_THROWN ) ;
createCumulativeCountForEvent ( STRING3 , HystrixRollingNumberEvent . FAILURE ) ;
<nb> public class HystrixYammerMetricsPublisherCommand implements HystrixMetricsPubli
createCumulativeCountForEvent ( STRING4 , HystrixRollingNumberEvent . TIMEOUT ) ;
SINGLE
+ createRollingCountForEvent ( STRING5 , HystrixRollingNumberEvent . BAD_REQUEST ) ;
createRollingCountForEvent ( STRING6 , HystrixRollingNumberEvent . COLLAPSED ) ;
createRollingCountForEvent ( STRING7 , HystrixRollingNumberEvent . EXCEPTION_THROWN ) ;
createRollingCountForEvent ( STRING8 , HystrixRollingNumberEvent . FAILURE ) ;
|
Add BAD_REQUEST to Yammer metrics publisher
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CliPeon extends GuiceRunnable
@ override
public void configure ( Binder binder )
{
+ binder . bindConstant ( ) . annotatedWith ( Names . named ( STRING0 ) ) . to ( STRING1 ) ;
+ binder . bindConstant ( ) . annotatedWith ( Names . named ( STRING2 ) ) . to ( - NUMBER0 ) ;
+
PolyBind . createChoice (
binder ,
STRING3 ,
|
fix missing service name port bindings for peons
|
<nb> public class AxolotlService {
}
public void registerDevices ( final Jid jid , @ nonnull final Set < Integer > deviceIds ) {
+ if ( deviceIds . contains ( getOwnDeviceId ( ) ) ) {
+ Log . d ( Config . LOGTAG , STRING0 + jid + STRING1 + getOwnDeviceId ( ) ) ;
+ deviceIds . remove ( getOwnDeviceId ( ) ) ;
+ }
for ( Integer i : deviceIds ) {
Log . d ( Config . LOGTAG , STRING2 + jid + STRING1 + i ) ;
}
this . deviceIds . put ( jid , deviceIds ) ;
+ publishOwnDeviceIdIfNeeded ( ) ;
}
public void publishOwnDeviceIdIfNeeded ( ) {
<nb> public class MessageParser extends AbstractParser implements
Set < Integer > deviceIds = mXmppConnectionService . getIqParser ( ) . deviceIds ( item ) ;
AxolotlService axolotlService = account . getAxolotlService ( ) ;
axolotlService . registerDevices ( from , deviceIds ) ;
+ mXmppConnectionService . updateAccountUi ( ) ;
}
}
|
Fix devicelist update handling
|
<nb> public class HongbaoService extends AccessibilityService implements SharedPrefer
new android . os . Handler ( ) . postDelayed (
new Runnable ( ) {
public void run ( ) {
- mUnpackNode . performAction ( AccessibilityNodeInfo . ACTION_CLICK ) ;
+ try {
+ mUnpackNode . performAction ( AccessibilityNodeInfo . ACTION_CLICK ) ;
+ } catch ( Exception e ) {
+ mMutex = false ;
+ mLuckyMoneyPicked = false ;
+ mUnpackCount = NUMBER0 ;
+ }
}
} ,
delayFlag ) ;
|
Fix crash releated open delay
|
<nb> public abstract class AbstractInvokable {
COMMENT
COMMENT
COMMENT
- public final Environment getEnvironment ( ) {
+ SINGLE
+ public Environment getEnvironment ( ) {
return this . environment ;
}
|
Removed final modifier for the sake of the PACT tests
|
<nb> public class HardcodedContracts {
}
if ( element instanceof PsiParameter ) {
- return hasHardcodedContracts ( element . getParent ( ) . getParent ( ) ) ;
+ PsiElement parent = element . getParent ( ) ;
+ return parent != null && hasHardcodedContracts ( parent . getParent ( ) ) ;
}
return false ;
|
fix HardcodedContracts NPE
|
<nb> public class CursorToMessage {
return null ;
}
- final int duration = Integer . parseInt ( msgMap . get ( CallLog . Calls . DURATION ) ) ;
+ final int duration = msgMap . get ( CallLog . Calls . DURATION ) == null ? NUMBER0 :
+ Integer . parseInt ( msgMap . get ( CallLog . Calls . DURATION ) ) ;
final StringBuilder text = new StringBuilder ( ) ;
if ( callType != CallLog . Calls . MISSED_TYPE ) {
|
Fix possible NPE
|
<nb> public class RenderSessionImpl extends RenderAction < SessionParams > {
backgroundView = backgroundLayout ;
backgroundLayout . setOrientation ( LinearLayout . VERTICAL ) ;
LinearLayout . LayoutParams layoutParams = new LinearLayout . LayoutParams (
- LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ;
+ LayoutParams . MATCH_PARENT , NUMBER0 ) ;
layoutParams . weight = NUMBER1 ;
backgroundLayout . setLayoutParams ( layoutParams ) ;
topLayout . addView ( backgroundLayout ) ;
<nb> public class RenderSessionImpl extends RenderAction < SessionParams > {
SINGLE
mContentRoot = new FrameLayout ( context ) ;
layoutParams = new LinearLayout . LayoutParams (
- LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ;
+ LayoutParams . MATCH_PARENT , NUMBER0 ) ;
layoutParams . weight = NUMBER1 ;
mContentRoot . setLayoutParams ( layoutParams ) ;
backgroundLayout . addView ( mContentRoot ) ;
|
Optimize layout rendering in layoutlib DO NOT MERGE
|
<nb> public abstract class AbstractXmlBlock extends AbstractBlock {
final FormattingModelBuilder builder = LanguageFormatting . INSTANCE . forContext ( childLanguage , childPsi ) ;
LOG . assertTrue ( builder != null ) ;
final FormattingModel childModel = builder . createModel ( childPsi , getSettings ( ) ) ;
- result . add ( new AnotherLanguageBlockWrapper ( child ,
- myXmlFormattingPolicy ,
- childModel . getRootBlock ( ) ,
- indent , offset , range ) ) ;
+ Block original = childModel . getRootBlock ( ) ;
+
+ if ( original . isLeaf ( ) || original . getSubBlocks ( ) . size ( ) != NUMBER0 ) {
+ result . add ( new AnotherLanguageBlockWrapper ( child ,
+ myXmlFormattingPolicy , original ,
+ indent , offset , range ) ) ;
+ }
return child ;
}
|
pick up some old commented test and make it pass
|
<nb> public abstract class Renderer {
if ( ! Double . isInfinite ( minx ) )
mMinX = ( int ) minx ;
if ( ! Double . isInfinite ( maxx ) )
- mMaxX = ( int ) maxx ;
+ mMaxX = ( int ) Math . ceil ( maxx ) ;
}
}
|
Do not cut off end values because of Int rounding
|
<nb> public class PostsListAdapter extends RecyclerView . Adapter < RecyclerView . ViewHold
SINGLE
pageHolder . dividerTop . setVisibility ( position == NUMBER0 ? View . VISIBLE : View . GONE ) ;
-
if ( post . isUploading ( ) ) {
pageHolder . disabledOverlay . setVisibility ( View . VISIBLE ) ;
} else {
|
Removed extra line
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public abstract class BackspaceHandlerDelegate {
- public static ExtensionPointName < BackspaceHandlerDelegate > EP_NAME = ExtensionPointName . create ( STRING0 ) ;
+ public static final ExtensionPointName < BackspaceHandlerDelegate > EP_NAME = ExtensionPointName . create ( STRING0 ) ;
public abstract void beforeCharDeleted ( char c , PsiFile file , Editor editor ) ;
public abstract boolean charDeleted ( final char c , final PsiFile file , final Editor editor ) ;
|
add final to EP_NAME
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class BroadcastPlugin implements Plugin , Component , PropertyEventListener
else {
try {
Group group = groupManager . getGroup ( toNode ) ;
- if ( disableGroupPermissions || ( groupMembersAllowed && group . isUser ( fromNode ) ) ||
- group . getAdmins ( ) . contains ( fromNode ) ||
- allowedUsers . contains ( message . getFrom ( ) . toBareJID ( ) ) )
- {
+ if ( disableGroupPermissions ||
+ ( groupMembersAllowed && group . isUser ( message . getFrom ( ) ) ) ||
+ allowedUsers . contains ( message . getFrom ( ) . toBareJID ( ) ) ) {
for ( String user : group . getMembers ( ) ) {
Message newMessage = message . createCopy ( ) ;
JID userJID = XMPPServer . getInstance ( ) . createJID ( user , null ) ;
|
Only local users may broadcast messages
|
<nb> public class AUC extends Request2 {
STRING0 +
STRING1 +
STRING2 +
- STRING3 + ( _fprs . length - idx_bestF1 ) + STRING4 +
+ STRING3 + ( idx_bestF1 ) + STRING4 +
STRING5 +
STRING6 +
STRING7 +
<nb> public class AUC extends Request2 {
STRING8 +
STRING1 +
STRING9 +
- STRING3 + ( _fprs . length - idx_bestF1 ) + STRING10 +
+ STRING3 + ( idx_bestF1 ) + STRING10 +
STRING11 +
STRING6 +
STRING12 +
<nb> public class AUC extends Request2 {
STRING13 +
STRING14 +
STRING15 + _fprs . length + STRING16 +
- STRING17 + _fprs . length + STRING18 +
+ STRING19 +
STRING20 +
STRING21 +
STRING22 +
|
Fix AUC javascript indexing was going backwards in CMs
|
<nb> import NAMESPACE ;
@ stateless
public class FeedEntryStatusDAO extends GenericDAO < FeedEntryStatus > {
- private static Logger log = LoggerFactory
+ protected static Logger log = LoggerFactory
. getLogger ( FeedEntryStatusDAO . class ) ;
@ suppresswarnings ( STRING0 )
<nb> public class FeedEntryStatusDAO extends GenericDAO < FeedEntryStatus > {
FeedSubscription subscription , Date newerThan , int offset ,
int limit , ReadingOrder order , boolean includeContent ) {
- log . info ( STRING1 ) ;
CriteriaQuery < FeedEntryStatus > query = builder . createQuery ( getType ( ) ) ;
Root < FeedEntryStatus > root = query . from ( getType ( ) ) ;
|
remove debug line
|
<nb> public class CCCreateLesson extends DumbAwareAction {
}
final CCProjectService service = CCProjectService . getInstance ( project ) ;
Course course = service . getCourse ( ) ;
- if ( directory != null && course != null && service . getLesson ( directory . getName ( ) ) != null ) {
- EduUtils . enableAction ( event , true ) ;
- return ;
+
+ if ( directory != null && course != null && project . getBaseDir ( ) . equals ( directory ) ) {
+ EduUtils . enableAction ( event , false ) ;
}
EduUtils . enableAction ( event , false ) ;
}
|
don t create new lesson inside lesson dir
|
<nb> public class GroovyBuilder extends ModuleLevelBuilder {
public static void updateDependencies ( CompileContext context ,
List < File > toCompile ,
- Map < ModuleBuildTarget , Collection < GroovycOSProcessHandler . OutputItem > > successfullyCompiled ,
+ Map < ModuleBuildTarget , Collection < GroovycOutputParser . OutputItem > > successfullyCompiled ,
OutputConsumer outputConsumer , Builder builder ) throws IOException {
JavaBuilderUtil . registerFilesToCompile ( context , toCompile ) ;
if ( ! successfullyCompiled . isEmpty ( ) ) {
|
rename GroovyOSProcessHandler to GroovycOutputParser fix merge conflict
|
<nb> public class WifiManager {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public boolean isNanSupported ( ) {
return isFeatureSupported ( WIFI_FEATURE_NAN ) ;
|
NAN Do not expose WifiManager isNanSupported as new API
|
<nb> public class OsmandRenderer {
return object1 . iconOrder - object2 . iconOrder ;
}
} ) ;
- int skewConstant = ( int ) rc . getDensityValue ( NUMBER0 ) ;
+ int skewConstant = ( int ) rc . getDensityValue ( NUMBER1 ) ;
int iconsW = rc . width / skewConstant ;
int iconsH = rc . height / skewConstant ;
int [ ] alreadyDrawnIcons = new int [ iconsW * iconsH / NUMBER2 ] ;
|
Reduce number of icons for square meter
|
<nb> public abstract class AbstractJavadocCheck extends Check {
}
@ override
- public final void leaveToken ( DetailAST ast ) {
- SINGLE
- }
-
- @ override
public final void visitToken ( DetailAST blockCommentAst ) {
if ( JavadocUtils . isJavadocComment ( blockCommentAst ) ) {
this . blockCommentAst = blockCommentAst ;
|
Remove redundant empty method
|
<nb> public class WebView extends AbsoluteLayout
break ;
}
if ( ! inFullScreenMode ( ) ) {
+ mPrivateHandler . removeMessages ( PREVENT_DEFAULT_TIMEOUT ) ;
mPrivateHandler . sendMessageDelayed ( mPrivateHandler
. obtainMessage ( PREVENT_DEFAULT_TIMEOUT ,
action , NUMBER0 ) , TAP_TIMEOUT ) ;
|
Fix layout test failure with fast events touch touch stale node crash
|
<nb>
package NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class GenericExporterMojoTest {
<nb> public class GenericExporterMojoTest {
assertTrue ( file . exists ( ) ) ;
}
- @ test
+ @ test @ ignore
public void Compile ( ) throws MojoExecutionException , MojoFailureException {
new File ( STRING0 ) . mkdir ( ) ;
MavenProject mavenProject = new MavenProject ( ) ;
|
Commented test out
|
<nb> public final class Small {
public static final int REQUEST_CODE_DEFAULT = NUMBER0 ;
private static final String SHARED_PREFERENCES_SMALL = STRING0 ;
- private static final String SHARED_PREFERENCES_KEY_UPGRADE = STRING1 ;
private static final String SHARED_PREFERENCES_KEY_VERSION = STRING2 ;
private static final String SHARED_PREFERENCES_BUNDLE_VERSIONS = STRING3 ;
- private static final String SHARED_PREFERENCES_BUNDLE_URLS = STRING4 ;
private static final String SHARED_PREFERENCES_BUNDLE_MODIFIES = STRING5 ;
private static final String SHARED_PREFERENCES_BUNDLE_UPGRADES = STRING6 ;
|
Remove unused fields
|
<nb> public class String implements CharSequence , Comparable < String > {
public String ( byte [ ] bytes , int i , int j , String s ) throws UnsupportedEncodingException { }
+ public String ( byte bytes [ ] , int offset , int length , Charset charset ) { }
+
public String ( byte [ ] bytes , Charset cs ) { }
public String ( byte [ ] bytes , String s ) throws UnsupportedEncodingException { }
|
Added missing String constructor to stub file
|
<nb> public abstract class DBNDatabaseNode extends DBNNode implements DBSWrapper , DBP
final List < DBNDatabaseNode > toList )
throws DBException
{
+ if ( monitor . isCanceled ( ) ) {
+ return ;
+ }
this . filtered = false ;
List < DBXTreeNode > childMetas = meta . getChildren ( this ) ;
|
Recursive navigator tree read fixed
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ShadowAbsSpinner extends ShadowAdapterView {
super . setSelection ( position ) ;
animatedTransition = animate ;
}
-
+
+ @ override
+ public View getChildAt ( int index ) {
+ return new View ( getContext ( ) ) ;
+ }
+
SINGLE
public boolean isAnimatedTransition ( ) {
return animatedTransition ;
|
added getChildAt to ShadowAbsSpinner
|
<nb> import NAMESPACE ;
public class ReadonlyStatusHandlerImpl extends ReadonlyStatusHandler implements ProjectComponent , JDOMExternalizable {
private final Project myProject ;
- public boolean SHOW_DIALOG ;
+ public boolean SHOW_DIALOG = true ;
public ReadonlyStatusHandlerImpl ( Project project ) {
myProject = project ;
|
ReadonlyStatusHandler should show a confirmation dialog by default
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
<nb> public final class RegisteredServiceEditBean implements Serializable {
private RegisteredServiceAttributeReleasePolicyEditBean attrRelease
= new RegisteredServiceAttributeReleasePolicyEditBean ( ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ private Map < String , Object > customComponent = new HashMap < > ( ) ;
+
public RegisteredServiceAttributeReleasePolicyEditBean getAttrRelease ( ) {
return attrRelease ;
}
<nb> public final class RegisteredServiceEditBean implements Serializable {
public void setLogoUrl ( final String logoUrl ) {
this . logoUrl = logoUrl ;
}
+
+ public Map < String , Object > getCustomComponent ( ) {
+ return customComponent ;
+ }
+
+ public void setCustomComponent ( final Map < String , Object > customComponent ) {
+ this . customComponent = customComponent ;
+ }
}
}
|
create a customComponent node in data model to contain any custom config
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.