diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class MediaRouteControllerDialog extends Dialog {
mCreated = true ;
if ( update ( ) ) {
mControlView = onCreateMediaControlView ( savedInstanceState ) ;
+ FrameLayout controlFrame =
+ ( FrameLayout ) findViewById ( R . id . media_route_control_frame ) ;
if ( mControlView != null ) {
- FrameLay... | Adding the overridden control view to the layout instead of the control |
<nb> public class PathMeasure {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class PathMeasure {
COMMENT
COMMENT
public boolean getSegment ( float startD , float stopD , Path dst , boolean startWithMoveTo ) {
+ SINGLE
+ SINGLE
+ float length = getLength (... | Enforce API preconditions in Java instead of deferring to Skia |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class ScheduleConditionProvider extends SystemConditionProviderService {
@ override
public void onReceive ( Context context , Intent intent ) {
if ( DEBUG ) Slog . d ( TAG , ST... | Note timezone changes |
<nb> public class Mappings {
if ( ! compiledClasses . contains ( a ) ) {
final TIntHashSet old = myClassToSubclasses . get ( a ) ;
- old . removeAll ( b . toArray ( ) ) ;
-
- myClassToSubclasses . replace ( a , old ) ;
+ if ( old != null ) {
+ old . removeAll ( b . toArray ( ) ) ;
+ myClassToSubclasse... | Fixed stupid NPE in a stupid way classToSubClasses compile server |
<nb> public class DroidGap extends Activity implements CordovaInterface {
return true ;
}
+ SINGLE
+ else if ( keyCode == KeyEvent . KEYCODE_VOLUME_DOWN ) {
+ this . appView . loadUrl ( STRING0 ) ;
+ return super . onKeyUp ( keyCode , event ) ;
+ }
+
+ SINGLE
+ else if ( keyCode == KeyEvent . KEYC... | add volumeupbutton volumedownbutton events |
<nb> public class AtmosphereFramework implements ServletContextProvider {
if ( isInit ) {
initHandlerInterceptors ( w ) ;
- }
-
- if ( logger . isDebugEnabled ( ) ) {
- logger . debug ( STRING0 , h . getClass ( ) . getName ( ) , mapping ) ;
- logger . debug ( STRING1 , h . getClass ( ) . getName ( ) ) ;... | Set the log to info before Atmosphere is started |
<nb> public final class FlacExtractor implements Extractor {
} ) ;
Format mediaFormat = Format . createAudioSampleFormat ( null , MimeTypes . AUDIO_RAW ,
- Format . NO_VALUE , streamInfo . bitRate ( ) ,
+ streamInfo . bitRate ( ) , Format . NO_VALUE ,
streamInfo . channels , streamInfo . sampleRate , null ,... | Fix format constructor parameter order |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class XmlGtTypedHandler extends TypedHandlerDelegate {
private static final Logger LOG = Logger . getInstance ( STRING0 ) ;
pub... | Fixed performance issue |
<nb> public class UriBeaconDiscoveryService extends Service implements MetadataResolv
private void tryToStartScanning ( ) {
PowerManager powerManager = ( PowerManager ) getSystemService ( Context . POWER_SERVICE ) ;
- boolean isScreenOn = powerManager . isScreenOn ( ) ;
- if ( isScreenOn ) {
+ if ( powerMan... | simplified isScreenOn check |
<nb> public class DirectivesEditor
mm = mm . replaceAll ( STRING0 , STRING1 ) ;
mm = mm . replaceAll ( STRING2 , STRING3 ) . replaceAll ( STRING4 , STRING3 ) ;
- System . out . println ( mm ) ;
+ SINGLE
if ( clean )
{ | removed a debugging println |
<nb> public class IndexSnapshotGenerator extends JdbcSnapshotGenerator {
SINGLE
SINGLE
if ( foundObject instanceof UniqueConstraint && ! ( snapshot . getDatabase ( ) instanceof DB2Database ) && ! ( snapshot . getDatabase ( ) instanceof DerbyDatabase ) ) {
- Index exampleIndex = new Index ( ) . setTable ( ( ( Un... | Unique constraint backing index names don t always match the unique constraint name |
<nb> class FullScreenActivity extends Activity {
context . startActivity ( intent ) ;
}
- public static void toActivity ( Context context , String url , String thumb , String title ) {
+ static void toActivity ( Context context , String url , String thumb , String title ) {
STATE = JCVideoPlayer . CURRENT_S... | Fix a big bug |
<nb> public class TestOperationSetBasicInstantMessaging
COMMENT
COMMENT
COMMENT
-
+ COMMENT
public void testReceiveOfflineMessages ( )
{
String messageText =
<nb> public class TestOperationSetBasicInstantMessaging
assertNotNull ( STRING0 , receiveMessage ) ;
assertEquals ( STRING1 , messageText , ... | Added test method to see have we received offline messages |
<nb> public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public static final int PRIVATE_FLAG_AUTOPLAY = NUMBER0 < < NUMBER1 ;
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public static final int PRIVATE_FLAG_EPHEMERAL = NUMBER0 < < NUMBER2 ;
-
- COMMENT
COMMENT
COM... | Assigned a unique value for PRIVATE_FLAG_EPHEMERAL |
<nb> public class Utils {
String [ ] epsortingData = context . getResources ( ) . getStringArray ( R . array . epsortingData ) ;
SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context
. getApplicationContext ( ) ) ;
- String currentPref = prefs . getString ( STRING0 , epsortingData ... | Use constant ref to pref name |
<nb> public class ClearRemoteTransactionOperation extends Operation implements Backup
private Data xidData ;
private transient SerializableXID xid ;
- private transient boolean returnsResponse = true ;
public ClearRemoteTransactionOperation ( ) {
}
<nb> public class ClearRemoteTransactionOperation exten... | removed returnResponse from ClearRemoteTransactionOperation |
<nb> public class JSONArray {
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class JSONObject {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class JSONObject {
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
... | Add isNull to JSONArray and JSONObject reference |
<nb> public class IndexManager
public void addIndexResolver ( String connectorId , ConnectorIndexResolver resolver )
{
checkState ( resolvers . putIfAbsent ( connectorId , resolver ) == null , STRING0 , connectorId ) ;
- resolvers . put ( connectorId , resolver ) ;
}
public Optional < ResolvedIndex > reso... | Remove redundant and incorrect call in IndexManager |
<nb> class CalligraphyLayoutInflater extends LayoutInflater implements ActivityFactor
@ override
@ targetapi ( Build . VERSION_CODES . HONEYCOMB )
public View onActivityCreateView ( View view , String name , AttributeSet attrs ) {
+ if ( view == null && name . indexOf ( STRING0 ) > - NUMBER0 ) {
+ SINGLE
+ ... | leave marker to inflate a view |
<nb> public class LineChartRenderer implements ChartRenderer {
top = rawValueY + offset ;
bottom = rawValueY + offset + textBoundsRect . height ( ) + mAnnotationMargin * NUMBER0 ;
}
- if ( right < chartCalculator . mContentRect . left ) {
+ if ( left < chartCalculator . mContentRect . left ) {
left = rawVal... | Fixed drawing annotations close to left edge of line chart |
<nb> public class WsWebSocketContainer
SINGLE
if ( ! reqHeaders . containsKey ( Constants . ORIGIN_HEADER_NAME ) ) {
List < String > originValues = new ArrayList < > ( NUMBER0 ) ;
- StringBuffer originValue = new StringBuffer ( ) ;
+ StringBuilder originValue = new StringBuilder ( ) ;
originValue . append (... | Use a StringBuilder instead |
<nb> public class RippleDrawable extends LayerDrawable {
mHasValidMask = true ;
- if ( maskType == MASK_NONE ) {
+ final Rect bounds = getBounds ( ) ;
+ if ( maskType == MASK_NONE || bounds . isEmpty ( ) ) {
if ( mMaskBuffer != null ) {
mMaskBuffer . recycle ( ) ;
mMaskBuffer = null ;
<nb> public cl... | Avoid ripple buffer creation for empty bounds |
<nb> public class CompatibleMarshallingDecoder extends ReplayingDecoder < Object , Void >
return obj ;
} catch ( LimitingByteInput . TooBigObjectException e ) {
discardingTooLongFrame = true ;
- throw new TooLongFrameException ( STRING0 ) ;
+ throw new TooLongFrameException ( ) ;
} finally {
SINGLE
SING... | Remove redundant exception message |
<nb> public class Message extends AbstractEntity {
return false ;
}
String [ ] pathParts = url . getPath ( ) . split ( STRING0 ) ;
- String filename = pathParts [ pathParts . length - NUMBER0 ] ;
+ String filename ;
+ if ( pathParts . length > NUMBER1 ) {
+ filename = pathParts [ pathParts . length - NUMB... | fixed url parsing |
<nb> public class ErrorTable extends JTable {
boolean selected ,
boolean focused ,
int row , int column ) {
- setBackground ( Color . RED ) ;
if ( selected ) {
setForeground ( textColorSelected ) ;
setBackground ( bgColorSelected ) ; | remove debug item |
<nb> public abstract class ChooseByNameBase {
myEditor = ( Editor ) DataManager . getInstance ( ) . getDataContext ( myPreviouslyFocusedComponent ) . getData ( DataConstants . EDITOR ) ;
if ( myEditor != null ) {
myTextField . setFocusTraversalKeys ( KeyboardFocusManager . FORWARD_TRAVERSAL_KEYS , Collections . E... | Disabling cdr s feature |
<nb> public class KotlinBytecodeToolWindow extends JPanel implements Disposable {
add ( optionPanel , BorderLayout . NORTH ) ;
COMMENT
- enableInline = new JCheckBox ( STRING0 ) ;
- enableOptimization = new JCheckBox ( STRING1 ) ;
+ enableInline = new JCheckBox ( STRING0 , true ) ;
+ enableOptimization = ... | Enabled inlining and optimization in bytecode tool window by default |
<nb> public class SessionFailRetryLoop implements Closeable
sessionHasFailed . set ( true ) ;
failedSessionThreads . add ( ourThread ) ;
}
- if ( previousParentWatcher . get ( ) != null )
+ Watcher localPreviousParentWatcher = previousParentWatcher . get ( ) ;
+ if ( localPreviousParentWatcher != null )
{... | Fix concurrent edge case |
<nb> public class MetaDataDeleteIndexService extends AbstractComponent {
} ;
nodeIndexDeletedAction . add ( nodeIndexDeleteListener ) ;
- threadPool . schedule ( request . timeout , ThreadPool . Names . SAME , new Runnable ( ) {
+ listener . future = threadPool . schedule ( request . timeout , ThreadPool . Na... | register the future with teh listener when deleting an index so it can be canceled |
<nb> public class Win32LocalFileSystem extends LocalFileSystemBase {
ourIsAvailable = true ;
}
catch ( Throwable t2 ) {
- LOG . error ( STRING0 , t2 ) ;
+ LOG . warn ( STRING0 , t2 ) ;
ourIsAvailable = false ;
}
} | do not throw AssertionError here |
<nb> public class Accounts extends K9ListActivity implements OnItemClickListener , OnC
}
holder . chip . setBackgroundResource ( K9 . COLOR_CHIP_RES_IDS [ account . getAccountNumber ( ) % K9 . COLOR_CHIP_RES_IDS . length ] ) ;
- holder . chip . getBackground ( ) . setAlpha ( ( unreadMessageCount == null || unre... | Don t show account level chips until unread count is known |
<nb> public final class MediaCodecUtil {
SINGLE
if ( Util . SDK_INT < NUMBER0
- && ( STRING0 . equals ( name ) )
+ && ( STRING0 . equals ( name )
|| STRING1 . equals ( name )
|| STRING2 . equals ( name )
|| STRING3 . equals ( name )
- || STRING4 . equals ( name ) ) {
+ || STRING4 . equals ( name ) )... | Fix condition for working around broken decoders |
<nb> public class VerificationDataImpl implements VerificationData {
this . wanted = wanted ;
}
- @ override
public List < Invocation > getAllInvocations ( ) {
return allInvocations ;
}
- @ override
public InvocationMatcher getWanted ( ) {
return wanted ;
}
- }
+ } | removed damned override to fix the build |
<nb> public abstract class HttpMessageDecoder extends ReplayingDecoder < HttpMessageDec
private Object reset ( ) {
HttpMessage message = this . message ;
ChannelBuffer content = this . content ;
- if ( content == null ) {
- content = ChannelBuffers . EMPTY_BUFFER ;
- }
- message . setContent ( content ) ;... | Fixed a bug where HttpMessage s content becomes an EMPTY_BUFFER after messageReceive event is already fired to process chunked encoding |
<nb> public final class Internal {
public static long baseTime ( final TSDB tsdb , final byte [ ] row ) {
return Bytes . getUnsignedInt ( row , tsdb . metrics . width ( ) ) ;
}
-
+
+ COMMENT
+ public static long baseTime ( final long timestamp ) {
+ if ( ( timestamp & Const . SECOND_MASK ) != NUMBER0 ) ... | Add an Internal baseTime overload to normalize an epoch timestamp |
<nb> public final class CreateOptions {
}
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class InStreamOptions {
}
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class MkdirOptions {
}
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COM... | Add docs for advanced apis |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
ss . selEnd = end ;
if ( mText instanceof Spanned )... | use SpannedStringBuilder to build a SpannedString |
<nb> public class AudioService extends IAudioService . Stub implements OnFinished {
mCallingUid = - NUMBER0 ;
mRcClient = null ;
mRccId = ++ sLastRccId ;
+ mPlaybackState = new RccPlaybackState (
+ RemoteControlClient . PLAYSTATE_STOPPED ,
+ RemoteControlClient . PLAYBACK_POSITION_INVALID ,
+ RemoteContro... | Fix RemoteControlStackEntry constructor in AudioService |
<nb> public interface Player extends HumanEntity , CommandSender {
COMMENT
COMMENT
public void setSneaking ( boolean sneak ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void updateInventory ( ) ;
} | Exposes the recently added updateInventory method |
<nb> public class CSSNode {
}
COMMENT
+ COMMENT
+ COMMENT
+ public float getStyleWidth ( ) {
+ return style . width ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ public float getStyleHeight ( ) {
+ return style . height ;
+ }
+
+ COMMENT
COMMENT
COMMENT
public void setDefaultPadding ( ... | Add getters for CSSNode s style width and height |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
... | Remove references to SourceCodeEscapers from javadoc |
<nb> public class PublishProfilePictureActivity extends XmppActivity {
}
} ) ;
- this . defaultUri = PhoneHelper . getSefliUri ( getApplicationContext ( ) ) ;
+ this . defaultUri = PhoneHelper . getSelfiUri ( getApplicationContext ( ) ) ;
}
private void chooseAvatar ( boolean crop ) {
<nb> public clas... | catch all throwables when loading contacts |
<nb> public class GoImportsFileAction extends GoExternalToolsAction {
protected GoExecutor createExecutor ( Module module , @ notnull String title , @ notnull String filePath ) {
File executable = getExecutable ( ) ;
assert executable != null ;
- return GoExecutor . in ( module ) . withExePath ( executable . ge... | Add missing w parameter to goimports |
<nb> public class InternalNioOutputBuffer extends AbstractOutputBuffer < NioChannel > {
SINGLE
registerWriteInterest ( ) ;
}
- if ( written == NUMBER0 ) {
- ( new Exception ( STRING0 ) ) . printStackTrace ( ) ;
- }
- System . out . println ( STRING1 + bytesWritten . addAndGet ( written ) ) ;
return writ... | Remove some accidentally committed test code |
<nb> public final class SourceMapConsumerV3 implements SourceMapConsumer ,
lines = new ArrayList < > ( ) ;
}
- SINGLE
+ SINGLE
+ SINGLE
extensions . putAll ( sourceMapObject . getExtensions ( ) ) ;
new MappingBuilder ( sourceMapObject . getMappings ( ) ) . build ( ) ;
} | Fix TODO in SourceMapConsumerV3 as the GWT version of SourceMapObject does return extensions |
<nb> public class Solo {
public void finalize ( ) throws Throwable {
activityUtils . finalize ( ) ;
}
-
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
-
- public void finishInactiveActivities ( ) {
- activityUtils . finishInactiveActivities ( ) ;
- }
COMMENT
COMMENT | Removed the deprecated method finishInactiveActivities |
<nb> class GradientPanel extends EditorPanel {
colors . add ( i , colors . get ( i - NUMBER0 ) ) ;
dragIndex = selectedIndex = i ;
handleSelected ( colors . get ( selectedIndex ) ) ;
+ updateColor ( ) ;
repaint ( ) ;
break ;
}
<nb> class GradientPanel extends EditorPanel {
percent = Math . max ( perce... | Update the tint when sliders are dragged or added to the timeline |
<nb> public class RiverNodeHelper {
return false ;
}
String river = node . attributes ( ) . get ( STRING0 ) ;
- SINGLE
+ SINGLE
if ( river == null ) {
return true ;
} | Fix comment grammar |
<nb> public class WebView extends AbsoluteLayout
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Improve documentation for WebView loadUrl to specify charset |
<nb> public class MainController implements Choreographer . FrameCallback {
private void destroyBubble ( Bubble bubble ) {
bubble . destroy ( ) ;
+ int bubbleIndex = mBubbles . indexOf ( bubble ) ;
mBubbles . remove ( bubble ) ;
if ( mBubbles . size ( ) > NUMBER0 ) {
- Bubble nextBubble = mBubbles . las... | When destroying a bubble select the closest bubble to the deleted one as the next active |
<nb> public class Client
}
- Thread t = new ClientThread ( db , dotransactions , workload , threadid , threadcount , props , opcount / threadcount , targetperthreadperms ) ;
+ int threadopcount = opcount / threadcount ;
+
+ SINGLE
+ if ( threadid < opcount % threadcount )
+ {
+ ++ threadopcount ;
... | Execute correct number of operations even if not a multiple of thread count |
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- public class ByteArrayCharSequence implements CharSequence {
+ public class ByteArrayCharSequence implements CharSequenceWithStringHash {
private int hash ;
private final byte [ ] myChars ; | avoid iterating all characters during hashCode calculation if possible |
<nb> public class CommonCodeStyleSettings {
public int CALL_PARAMETERS_WRAP = DO_NOT_WRAP ;
public boolean PREFER_PARAMETERS_WRAP = false ;
- public boolean CALL_PARAMETERS_LPAREN_ON_NEXT_LINE = false ;
+ public boolean CALL_PARAMETERS_LPAREN_ON_NEXT_LINE = false ; SINGLE
public boolean CALL_PARAMETERS_RPAR... | docu only Add comment to setting |
<nb> public class ShadowSQLiteDatabase {
resultSet = Robolectric . shadowOf ( stmt ) . getStatement ( ) . executeQuery ( ) ;
} catch ( SQLException e ) {
- throw new RuntimeException ( STRING0 , e ) ;
+ throw new RuntimeException ( STRING1 , e ) ;
}
SINGLE
<nb> public class ShadowSQLiteDatabase {
} ... | Fix error message in ShadowSQLiteDatabase java |
<nb> public class PullToRefreshAttacher {
SINGLE
WindowManager . LayoutParams wlp = new WindowManager . LayoutParams ( width , height ,
WindowManager . LayoutParams . TYPE_APPLICATION_PANEL ,
- WindowManager . LayoutParams . FLAG_NOT_FOCUSABLE | WindowManager . LayoutParams . FLAG_NOT_TOUCHABLE ,
+ WindowMana... | Add FLAG_LAYOUT_IN_SCREEN to WindowLayoutParams |
<nb> public class Notifications extends BroadcastReceiver {
if ( notificationManager == null )
notificationManager = new AndroidNotificationManager ( context ) ;
+ SINGLE
+ if ( type == ReminderService . TYPE_RANDOM )
+ ringTimes = NUMBER0 ;
+
SINGLE
boolean quietHours = ( type == ReminderService . TY... | if you have a random reminder it shouldn t go nonstop mode |
<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> import NAMESPACE ;
import NAMES... | eliminate eclipse warnings |
<nb> public class JavaDocumentationProvider implements CodeDocumentationProvider , Ext
StringBuffer buffer = new StringBuffer ( ) ;
PsiClass parentClass = field . getContainingClass ( ) ;
- if ( parentClass != null ) {
+ if ( parentClass != null && ! ( parentClass instanceof PsiAnonymousClass ) ) {
buffer .... | do not show anonymous parent class name |
<nb>
package NAMESPACE ;
- import static NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class Multimaps {
private final int minSize ;
AtLeastSize ( int minSize ) {
- checkArgument ( minSize >= NUMBER0 ) ;
+ Preconditions . checkArgument ( minSize >= ... | Avoid Preconditions checkArgument static import |
<nb> public class GlobalConfiguration {
}
} else {
if ( isCaching ) {
- try {
- String userhome = System . getProperty ( STRING0 ) ;
- if ( userhome != null ) {
- cacheDir = userhome ;
+ if ( cacheDir == null ) {
+ try {
+ String userhome = System . getProperty ( STRING0 ) ;
+ if ( userhome != nul... | not respecting cacheDir if not in grails profile |
<nb> public class UpdateActionTranslator {
INCREMENT ( STRING0 ) ,
MOVE ( STRING1 ) ,
- MULTIPLY ( STRING2 ) ,
+ MULTIPLY ( STRING3 ) ,
SET_CURRENT_DATE ( STRING4 ) ,
SET_FIELD ( STRING5 ) ,
UNSET_FIELD ( STRING6 ) ; | Fixed errata for mul update operator |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
@ deprecated
public class ServerPort {
<nb> public class SessionManager extends BasicModule implements ClusterEventListener /
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public ab... | Fix some javadoc warnings |
<nb> public final class CompressedString {
} else {
BytesArray bytesArray = data . toBytesArray ( ) ;
this . bytes = CompressorFactory . defaultCompressor ( ) . compress ( bytesArray . array ( ) , bytesArray . arrayOffset ( ) , bytesArray . length ( ) ) ;
- assert CompressorFactory . compressor ( bytes ) == Com... | Fix abusive assertion |
<nb> public final class NetworkInterface extends Object {
COMMENT
COMMENT
COMMENT
- public static NetworkInterface getByName ( String interfaceName ) throws SocketException {
+ private static NetworkInterface getByName ( String interfaceName ) throws SocketException {
if ( interfaceName == null ) {
throw ... | Fixed typo visbility |
<nb> public abstract class AbsListView extends AdapterView < ListAdapter > implements Te
if ( accessibilityId == getAccessibilityViewId ( ) ) {
return this ;
}
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- if ( mDataChanged ) {
- return null ;
- }
return super . findViewByAccessibilityIdTraversal ( access... | Always create nodes for views backed by an adapter |
<nb> class SctpChannelImpl extends AbstractChannel implements SctpChannel {
private int getMessageSize ( MessageEvent e ) {
Object m = e . getMessage ( ) ;
- if ( m instanceof ChannelBuffer ) {
- return ( ( ChannelBuffer ) m ) . readableBytes ( ) ;
+ if ( m instanceof SctpPayload ) {
+ return ( ( SctpPayl... | fixed sctp write buffer watermark count |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DefaultInsertHandler extends TemplateInsertHandler implements Clone
AutoPopupController . getInstance ( project ) . autoPopup... | don t popup member lookup after finishing a class name with dot |
<nb> class ZoomManager {
public final void setInitialScaleInPercent ( int scaleInPercent ) {
mInitialScale = scaleInPercent * FLOAT0 ;
+ mActualScale = mInitialScale > NUMBER0 ? mInitialScale : mDefaultScale ;
+ mInvActualScale = NUMBER1 / mActualScale ;
}
public final float computeScaleWithLimits ( flo... | Set mActualScale when initialScale is set |
<nb> public final class Pm {
if ( nonLocalized != null ) {
return nonLocalized . toString ( ) ;
}
- Resources r = getResources ( pii ) ;
- if ( r != null ) {
- return r . getString ( res ) ;
+ if ( res != NUMBER0 ) {
+ Resources r = getResources ( pii ) ;
+ if ( r != null ) {
+ return r . getString ... | Fix crash by adb shell pm list permissions f s |
<nb> public abstract class AbstractConsoleRunnerWithHistory < T extends LanguageConsole
COMMENT
public static AnAction createConsoleExecAction ( LanguageConsoleImpl languageConsole ,
ProcessHandler processHandler ,
- ProcessBackedConsoleExecuteActionHandler consoleExecuteActionHandler ) {
+ @ suppresswarnings... | ensure API backward compatibility |
<nb> public class PluginRunConfigurationEditor extends SettingsEditor < PluginRunConfig
return ;
}
try {
- prc . addLogFile ( new File ( sandboxHome ) . getCanonicalPath ( ) + File . separator + STRING0 + File . separator + STRING1 + File . separator + STRING2 , myShowLogs . isSelected ( ) ) ;
+ final String ... | add check on log file |
<nb> public class GitMergeUpdater extends GitUpdater {
return changes ;
}
+ @ override
+ public String toString ( ) {
+ return STRING0 ;
+ }
+
private enum MergeError {
CONFLICT ,
LOCAL_CHANGES ,
<nb> public class GitRebaseUpdater extends GitUpdater {
return ! cancelled . get ( ) ;
}
+ @... | Add toString to GitMerge RebaseUpdater for nicer logging |
<nb> import NAMESPACE ;
public class DrawTask implements IDrawTask {
- @ suppresswarnings ( STRING0 )
- private static final String TAG = STRING1 ;
-
- @ suppresswarnings ( STRING0 )
- private final int DEBUG_OPTION = NUMBER0 ;
-
protected AndroidDisplayer mDisp ;
protected Danmakus danmakuList ... | Remove unused codes |
<nb> public class ItemAdapter < Item extends IItem > extends AbstractAdapter < Item > imple
return this ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ public boolean isUseIdDistributor ( ) {
+ return mUseIdDistributor ;
+ }
+
SINGLE
private Filter mItemFilter = new ItemFilter ( ) ; | add getter for UseIdDistributor to ItemAdapter |
<nb> public class CardContainer extends AdapterView < ListAdapter > {
public void run ( ) {
locked = false ; SINGLE
}
- } , duration ) ;
+ } , duration + NUMBER0 ) ;
mTopCard = getChildAt ( getChildCount ( ) - NUMBER1 ) ;
CardModel cardModel = ( CardModel ) getAdapter ( ) . getItem ( NUMBER2 ) ; | Locked cards until dismiss public function for dismiss from CardContainer |
<nb> public final class ThreadCpuStats {
}
COMMENT
- public void start ( ) {
- running = true ;
- Thread t = new Thread ( new CpuStatRunnable ( ) , STRING0 ) ;
- t . start ( ) ;
+ public synchronized void start ( ) {
+ if ( ! running ) {
+ running = true ;
+ Thread t = new Thread ( new CpuStatRunn... | make sure it doesn t spawn multiple threads if already started |
<nb> public class NotificationStackScrollLayout extends ViewGroup
switch ( action & MotionEvent . ACTION_MASK ) {
case MotionEvent . ACTION_DOWN : {
- if ( getChildCount ( ) == NUMBER0 ) {
+ if ( getChildCount ( ) == NUMBER0 || ! isInContentBounds ( ev ) ) {
return false ;
}
boolean isBeingDragged = ! m... | Only handle scroll events when over content |
<nb> public class HttpRequestTest extends ServerTestCase {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ test
+ public void contentTypeHeader ( ) throws Exception {
+ String url = setUp ( new RequestHandler ( ) {
+
+ public void handle ( Request request , HttpServletResponse response ) {... | Add unit test of Content Type header helper |
<nb> public class Test {
COMMENT
private String skip ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
private String instrumentationPackage ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
private String instrumentationRunner ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
private Boolean debug ;
COMMENT
- COMMEN... | Fix names of referenced configuration member variables in javadoc |
<nb> public class LookupImpl extends LightweightHint implements LookupEx , Disposable
}
public void setFocused ( boolean focused ) {
- if ( focused && ! myFocused ) {
+ if ( focused && ! CompletionPreview . hasPreview ( this ) ) {
CompletionPreview . installPreview ( this ) ;
}
myFocused = focused ; | install completion preview for lookup explicitly focused e g explciit completion |
<nb> public class JavaSourceProcessor extends BaseSourceProcessor {
javaTerms . add ( javaTerm ) ;
}
- newContent = sortJavaTerms ( fileName , content , javaTerms ) ;
+ SINGLE
newContent = fixTabsAndIncorrectEmptyLines ( newContent , javaTerms ) ;
} | Temp disable SFormatter for java terms since it breaks registry api |
<nb> public class HashAggregationOperator
}
intermediateValues . set ( position , newValue ) ;
- totalElementSizeInBytes += function . estimateSizeInBytes ( newValue ) - oldSize ;
+ long newSize = NUMBER0 ;
+ if ( newValue != null ) {
+ newSize = function . estimateSizeInBytes ( newValue ) ;
+ }
+ tot... | Fix bug in MAX MIN aggregations with null strings |
<nb>
COMMENT
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 ... | Fix wrong imports on A implementation |
<nb> public class TwoWayView extends AdapterView < ListAdapter > implements
final float x = ev . getX ( ) ;
final float y = ev . getY ( ) ;
- boolean inList = false ;
+ final boolean inList ;
if ( mIsVertical ) {
inList = x > getPaddingLeft ( ) && x < getWidth ( ) - getPaddingRight ( ) ;
} else { | library Remove redundant initializer in TwoWayView |
<nb> public class FileBasedIndexImpl extends FileBasedIndex {
VfsUtilCore . visitChildrenRecursively ( root , new VirtualFileVisitor ( ) {
@ override
public boolean visitFile ( @ notnull VirtualFile file ) {
- if ( visitedRoots != null && root != file && file . isDirectory ( ) && ! visitedRoots . add ( file ) )... | removed explicit virtual file inequality |
<nb> public class BigIntegerCachedClass extends NumberCachedClass {
|| classToTransformFrom == Integer . TYPE
|| classToTransformFrom == Short . TYPE
|| classToTransformFrom == Byte . TYPE
- || classToTransformFrom == Long . TYPE ;
+ || classToTransformFrom == Long . TYPE
+ || BigInteger . class . isAssigna... | include instance check for BigInteger to ensure assignment to BigInteger is pssible for subclasses |
<nb> import NAMESPACE ;
public class GrailsMain {
- private static final String TMP_WAR_LOCATION = STRING0 + File . separator + STRING1 ;
+ private static final String TMP_WAR_LOCATION = STRING2 ;
COMMENT
COMMENT | fixed path to web app |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- public class TestPrintableInterface extends MahoutTestCase {
+ public class TestClusterInterface extends MahoutTestCase {
private static final Type modelType = new TypeToken < Model < Vector > > ( ) {
} . getType ( ) ; | rename the class too |
<nb> class OutMessage extends BasicBSONEncoder {
_encoder = encoder ;
_mongo = m ;
_buffer = _mongo == null ? new PoolOutputBuffer ( ) : _mongo . _bufferPool . get ( ) ;
+ _buffer . reset ( ) ;
+
set ( _buffer ) ;
}
<nb> class OutMessage extends BasicBSONEncoder {
void doneWithMessage ( ) {
if (... | Reset buffer when the object is checked out and before adding back |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT | Remove Javadoc for removed method |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public class MultipleFailureExceptionTest {
assertSame ( e , exception ) ;
}
}
-
+
@ test
public void assertEmptyRethrowsSingleError ( ) throws Exception {
Throwable exception = new AnnotationFor... | Fix typo in assertEmptyThrowsMultipleFailureExceptionForManyThrowables at MultipleFailureExceptionTest |
<nb> public class PatternRuleHandler extends XMLRuleHandler {
if ( name == null ) {
name = ruleGroupDescription ;
}
- } else {
- defaultOff = STRING0 . equals ( attrs . getValue ( DEFAULT ) ) ;
- defaultOn = STRING1 . equals ( attrs . getValue ( DEFAULT ) ) ;
}
+
+ if ( ! ( inRuleGroup && defaultOff )... | fix a problem with rules being on even if off by default |
<nb> public class BytecodeAnalysisIntegrationTest extends JavaCodeInsightFixtureTestC
}
}
} ) ;
+
+ annotationsDir . refresh ( false , true ) ;
}
public void testSdkAndLibAnnotations ( ) { | refresh annotations dir during setUp |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ; | Add forgotten license header |
<nb> public class MapActivityActions implements DialogProvider {
TargetPointsHelper targets = getTargets ( ) ;
String via = STRING0 ;
List < String > names = targets . getIntermediatePointNames ( ) ;
+ List < LatLon > points = targets . getIntermediatePoints ( ) ;
if ( names . size ( ) == NUMBER0 ) {
return... | Fix possible out of bound exception |
<nb> package NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
public class AvoidNestedBlocksCheckTest
extends BaseCheckTestSupport {
+ @ override
+ protected String getP... | unify test input locations |
<nb> public class RolesResource extends RestResource {
@ apioperation ( STRING0 )
public Response addMember ( @ apiparam ( name = STRING1 ) @ pathparam ( STRING1 ) String rolename ,
@ apiparam ( name = STRING2 ) @ pathparam ( STRING2 ) String username ,
- @ apiparam ( name = STRING3 ) String body ) throws NotFo... | explain reason for the empty PUT body |
<nb> public class GetPropertyTest extends TestSupport {
System . out . println ( STRING0 + object ) ;
Object value = object . getProperty ( STRING1 ) ;
- assertEquals ( STRING2 , null , value ) ;
+ assertEquals ( STRING2 , STRING3 , value ) ;
object . setProperty ( STRING1 , STRING4 ) ;
assertEquals ( S... | Fixed broken test |
<nb> public class ManagedAtmosphereHandler extends AbstractReflectorAtmosphereHandler
public Managed ( Object o ) {
this . o = o ;
}
+
+ public String toString ( ) {
+ return o . toString ( ) ;
+ }
}
} | Implement toString support for clustered environment |
<nb> public class AccessibilityUtils {
Settings . Secure . putStringForUser ( context . getContentResolver ( ) ,
Settings . Secure . ENABLED_ACCESSIBILITY_SERVICES ,
enabledServicesBuilder . toString ( ) , userId ) ;
-
- SINGLE
- Settings . Secure . putIntForUser ( context . getContentResolver ( ) ,
- Set... | Remove redundant twiddling of Settings Secure ACCESSIBILITY_ENABLED |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.