diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> public class ReaderBlogActions { com . wordpress . rest . RestRequest . Listener listener = new RestRequest . Listener ( ) { @ override public void onResponse ( JSONObject jsonObject ) { - SINGLE - SINGLE - SINGLE - if ( actionListener != null ) { - actionListener . onActionResult ( true ) ; - } ...
Endpoint now enables blocking VIP blogs updated code accordingly
<nb> public class MapReduceOutput { return collection ; } - public CommandResult getCommandResult ( ) { - return new CommandResult ( commandResult ) ; - } - COMMENT COMMENT COMMENT
Deleted deprecated method
<nb> public class QueryResults } return fixedValue ; } - switch ( type ) { + switch ( signature . getBase ( ) ) { case BIGINT : if ( value instanceof String ) { return Long . parseLong ( ( String ) value ) ;
Generalize type check in the client
<nb> public final class Bmgr { printRestoreSets ( sets ) ; } } + + SINGLE + synchronized ( observer ) { + while ( ! observer . done ) { + try { + observer . wait ( ) ; + } catch ( InterruptedException ex ) { + } + } + } + + SINGLE mRestore . endRestoreSession ( ) ; } catch ( RemoteExce...
Fix Bmgr s logic around restore completion
<nb> public class SpringQuartzPersistentStoreClusteredAppTest extends TestSupport { assertNotNull ( camel2 ) ; MockEndpoint mock2 = camel2 . getEndpoint ( STRING0 , MockEndpoint . class ) ; - mock . expectedMessageCount ( NUMBER0 ) ; + mock2 . expectedMessageCount ( NUMBER0 ) ; SINGLE SINGLE
Corrected the typo
<nb> public class GotoActionModel implements ChooseByNameModel , CustomMatcherModel , C final Color fg = defaultActionForeground ( isSelected , presentation ) ; - final JLabel actionLabel = createActionLabel ( anAction , templatePresentation . getText ( ) + STRING0 + actionWithParentGroup . getMode ( ) , fg , b...
hide service information
<nb> public class MovieSearchFragment extends SherlockFragment implements OnEditorAct @ override public boolean onContextItemSelected ( MenuItem item ) { + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + if ( ! getUserVisibleHint ( ) ) { + return super . onContextItemSelected ( item ) ; + } ...
Add context menu dispatch fix
<nb> public class Engine implements SensorEventListener , OnTouchListener , ITouchEvent throw new IllegalStateException ( STRING0 ) ; } } + + public void vibrate ( final long [ ] pPattern , final int pRepeat ) throws IllegalStateException { + if ( this . mVibrator != null ) { + this . mVibrator . vibrate ...
Added possibility to vibrate a pattern
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ...
removed some unused imports
<nb> public class Bootstrap { } String errorMessage = buildErrorMessage ( stage , e ) ; if ( foreground ) { - logger . error ( errorMessage ) ; - } else { System . err . println ( errorMessage ) ; System . err . flush ( ) ; + } else { + logger . error ( errorMessage ) ; } Loggers . disableConsoleL...
Fix logging on immediate exit on start
<nb> import NAMESPACE ; COMMENT @ skylarkmodule ( name = STRING0 , namespace = true , doc = STRING1 - + STRING2 - + STRING3 - + STRING4 ) + + STRING5 + + STRING6 + + STRING7 + + STRING8 + + STRING9 ) public class SkylarkNativeModule { SINGLE
Clarify documentation about native module
<nb> public class Activity extends ContextThemeWrapper STRING0 ) ; } + SINGLE + if ( ! mVisibleFromClient && ! mFinished ) { + Log . w ( TAG , STRING1 ) ; + if ( getApplicationInfo ( ) . targetSdkVersion + > android . os . Build . VERSION_CODES . LOLLIPOP_MR1 ) { + throw new IllegalStateException ( ...
Add NoDisplay test when resuming Activity
<nb> public class LocalOpenstreetmapActivity extends OsmandListActivity { sz . attribute ( STRING0 , STRING1 , p . getLatitude ( ) + STRING0 ) ; sz . attribute ( STRING0 , STRING2 , p . getLongitude ( ) + STRING0 ) ; sz . attribute ( STRING0 , STRING3 , p . getId ( ) + STRING0 ) ; + sz . attribute ( STRING0 , S...
Add version to osm
<nb> public class StaticResourcesServlet extends HttpServlet { ClassLoader classLoader = pluginClassLoaders . getClassLoader ( pluginKey ) ; if ( classLoader == null ) { LOG . error ( STRING0 + pluginKey ) ; + response . sendError ( HttpServletResponse . SC_NOT_FOUND ) ; return ; } InputStream in = null ;...
Set HTTP status code in StaticResourcesServlet in case of error
<nb> public class ResName { return new ResName ( packageName , type , name ) ; } - public ResName qualify ( String string ) { - return new ResName ( qualifyResourceName ( string . replace ( STRING0 , STRING1 ) , packageName , null ) ) ; - } - @ override public boolean equals ( Object o ) { if ( this...
remove unused method
<nb> public final class CharsToNameCanonicalizer COMMENT COMMENT COMMENT - public synchronized CharsToNameCanonicalizer makeChild ( final boolean canonicalize , + public CharsToNameCanonicalizer makeChild ( final boolean canonicalize , final boolean intern ) { COMMENT
remove unnecesssary and harmful synchronized from CharToNameCanonicalizer
<nb> public class HttpClientBuilder extends ApacheClientBuilderBase < HttpClientBuilder . setSoTimeout ( timeout ) . build ( ) ; - builder . setRequestExecutor ( new InstrumentedHttpRequestExecutor ( metricRegistry , metricNameStrategy ) ) + builder . setRequestExecutor ( new InstrumentedHttpRequestExecutor (...
fixing an issue where the name prefix for HttpClient metrics would not be applied
<nb> public class PatternRule extends Rule { private String id ; private Language [ ] language ; - private String pattern ; private String description ; private String message ; private int startPositionCorrection = NUMBER0 ; <nb> public class PatternRule extends Rule { } public String toString ( ...
remove unsed var pattern
<nb> public interface ValueGraph < N , V > extends Graph < N > { COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT Map < EndpointPair < N > , V > edgeValues ( ) ;
Fix Eclipse warning missing
<nb> public abstract class AbstractAndroidMojo extends AbstractMojo protected File sourceDirectory ; COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + protected File targetDirectory ; + + COMMENT COMMENT COMMENT COMMENT
defined targetDirectory replaces project getBuild
<nb> public class PaymentBusEventHandler { payment != null ? payment . getExternalKey ( ) : null , paymentTransaction != null ? paymentTransaction . getExternalKey ( ) : null , paymentTransaction != null ? paymentTransaction . getTransactionStatus ( ) : null , - paymentControlPluginNames ) ; + paymentControlP...
Fixes introduced errors
<nb> public class AndroidHarness extends Activity implements TouchListener , DialogInt COMMENT protected boolean mouseEventsInvertY = true ; COMMENT + COMMENT + COMMENT + protected boolean finishOnAppStop = true ; + COMMENT COMMENT COMMENT protected String exitDialogTitle = STRING0 ; <nb> public c...
OGLESContext can now finish the activity when being destroyed this way calling app stop from jME finished the associated activity
<nb> + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + package NAMESPACE ; import NAM...
Add legal boilerplate
<nb> public final class TypeFactory COMMENT @ deprecated public JavaType constructType ( Type type , Class < ? > contextType ) { - return _fromAny ( null , type , EMPTY_BINDINGS ) ; + return constructType ( type , constructType ( contextType ) ) ; } COMMENT <nb> public class ExternalTypeId999Test exte...
resolve context type assuming type bindings from that are expected to work
<nb> public final class Quaternion { axis . normalize ( ) ; - q . fromAngleAxis ( MathUtil . degreesToRadians ( NUMBER0 ) , axis ) ; + q . fromAngleAxis ( NUMBER0 , axis ) ; } else {
fix erroneous conversion to radians
<nb> public class InsertTest extends DatabaseTestCase { SINGLE SINGLE Object [ ] values1 = new Object [ ] { STRING0 , STRING1 } ; - Object [ ] values2 = new Object [ ] { STRING2 , STRING3 , NUMBER0 } ; + Object [ ] values2 = new Object [ ] { STRING2 , STRING3 , Integer . parseInt ( STRING4 ) } ; Object [ ] ...
Restore jdkoren s James Bond reference in InsertTest
<nb> public class Wallet implements Serializable , BlockChainListener , PeerFilterProvi COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT public KeyParameter aesKey = null ;
Fix method name in SendRequest aesKey javadoc
<nb> public abstract class VectorMapJoinGenerateResultOperator extends VectorMapJoinC } ByteSegmentRef byteSegmentRef = hashMapResult . first ( ) ; - while ( true ) { + while ( byteSegmentRef != null ) { SINGLE while ( byteSegmentRef != null ) { <nb> public abstract class VectorMapJoinGenerateResultOp...
Fix Mapjoin overflow deserialization Gopal V reviewed by Matt McCline
<nb> public final class MasterClient implements Closeable { return mClient . getFileStatus ( fileId , path ) ; } catch ( FileDoesNotExistException e ) { throw new IOException ( e ) ; + } catch ( InvalidPathException e ) { + throw new IOException ( e ) ; } catch ( TException e ) { LOG . error ( e . getMess...
catch InvalidPath for getFileStatus to avoid infi loops
<nb> public class GeoPointParserUtil { STRING0 , STRING1 , STRING2 , + STRING3 , STRING4 , STRING5 , STRING6 , <nb> public class GeoPointParserUtil { return new GeoParsedPoint ( matcher . group ( NUMBER0 ) , matcher . group ( NUMBER1 ) , z , params . get ( STRING7 ) ) ; } } - } else if ( host . ...
handle all Google country specific domains i e google at google ru etc
<nb> public class CacheManagingDrawTask extends DrawTask { clearTimeOutCaches ( ) ; break ; case SEEK : - Long seekMills = ( Long ) msg . obj ; - if ( seekMills != null ) { + Long seekMills = ( Long ) msg . obj ; + if ( seekMills != null ) { mCacheTimer . update ( seekMills . longValue ( ) ) ; - mSeek...
fix cache missing c caused b by seek
<nb> public final class MemCacheTicketRegistry extends AbstractTicketRegistry impleme private static int getTimeout ( final Ticket ticket ) { final int ttl = ticket . getExpirationPolicy ( ) . getTimeToLive ( ) . intValue ( ) ; if ( ttl == NUMBER0 ) { - return - NUMBER1 ; + return NUMBER1 ; } return ttl ;...
fixed test cases
<nb> public class WearableController { options . inJustDecodeBounds = true ; BitmapFactory . decodeStream ( contentResolver . openInputStream ( MuzeiContract . Artwork . CONTENT_URI ) , null , options ) ; - options = new BitmapFactory . Options ( ) ; + options . inJustDecodeBounds = false ; if ( options . o...
Fix resizing Wearable images
<nb> static public boolean equiv ( double k1 , Object k2 ) { return equiv ( ( Object ) k1 , k2 ) ; } + static public boolean equiv ( boolean k1 , boolean k2 ) { + return k1 == k2 ; + } + + static public boolean equiv ( Object k1 , boolean k2 ) { + return equiv ( k1 , ( Object ) k2 ) ; + } + + st...
add equiv overload for primitive booleans
<nb> public class AnnotationParser parseDir ( handlers , res , resolver ) ; else { - System . err . println ( STRING0 + res ) ; SINGLE File file = res . getFile ( ) ; if ( isValidClassFileName ( ( file == null ? null : file . getName ( ) ) ) )
Remove accidental checkin of println
<nb> public class __ACTIVITY__ extends DroidGap { super . onCreate ( savedInstanceState ) ; Config . init ( this ) ; + SINGLE super . loadUrl ( Config . getStartUrl ( ) ) ; SINGLE }
Added a comment to explain where the start page is getting set
<nb> public class TrustManagerFactoryTest extends AndroidTestCase { assertFalse ( STRING0 , certificateValid ) ; } + public void testCertificateOfOtherHost ( ) throws Exception { + TrustManagerFactory . addCertificate ( MATCHING_HOST , PORT1 , mCert1 ) ; + TrustManagerFactory . addCertificate ( MATCHING_HOS...
Add test to make sure we don t check the wrong certificates
<nb> public class SecondaryIndexManager return null ; assert cdef . getIndexType ( ) != null ; - logger . info ( STRING0 , cdef ) ; SecondaryIndex index ; try <nb> public class SecondaryIndexManager { index = currentIndex ; index . addColumnDef ( cdef ) ; + logger . info ( STRING0 , cdef ) ; }...
Fix scary message about secondaries always being created at startup
<nb> public class FlatWelcomeFrame extends JFrame implements IdeFrame { final Runnable onDone = new Runnable ( ) { @ override public void run ( ) { - ListScrollingUtil . ensureSelectionExists ( panel . second ) ; - panel . second . requestFocus ( ) ; + final JBList list = panel . second ; + ListScrollingU...
avoid caching for project templates in case of LaF change
<nb> public abstract class AppIntroBase extends AppCompatActivity implements AppIntro SINGLE } + public void setSkipButtonEnabled ( boolean skipButtonEnabled ) { + this . skipButtonEnabled = skipButtonEnabled ; + } + public boolean isSkipButtonEnabled ( ) { return skipButtonEnabled ; }
Set visibility of Skip button
<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 ; + import NAMESPACE ; +...
Fix Capsule imports
<nb> final class ApplicationPackageManager extends PackageManager { if ( itemInfo . showUserIcon != UserHandle . USER_NULL ) { return new BitmapDrawable ( getUserManager ( ) . getUserIcon ( itemInfo . showUserIcon ) ) ; } - Drawable dr = getDrawable ( itemInfo . packageName , itemInfo . icon , appInfo ) ; + D...
Fix NPE from empty PackageInfo
<nb> public class RoutingContext implements Cloneable { remainingWeightHeuristic = new TrivialRemainingWeightHeuristic ( ) ; else remainingWeightHeuristic = heuristicFactory . getInstanceForSearch ( opt ) ; + + LOG . debug ( STRING0 , this . origin ) ; + LOG . debug ( STRING1 , this . origin . getIncoming (...
add some debug logging to RoutingContext constructor to show the computed trip origin and destination
<nb> public class ListRowPresenter extends RowPresenter { private static final String TAG = STRING0 ; private static final boolean DEBUG = false ; + COMMENT + COMMENT + COMMENT + COMMENT + @ deprecated + public static final int ZOOM_FACTOR_NONE = FocusHighlight . ZOOM_FACTOR_NONE ; + + COMMENT +...
Add deprecated constants back to ListRowPresenter
<nb> public class SettingsDialog { cbNotify . setChecked ( notify ) ; } - if ( uid == NUMBER0 || PrivacyManager . isApplication ( uid ) ) + boolean gondemand = PrivacyManager . getSettingBool ( NUMBER0 , PrivacyManager . cSettingOnDemand , true , false ) ; + if ( uid == NUMBER0 || ( PrivacyManager . isAppli...
Hide app on demand when no global on demand
<nb> import static NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; + @ runwith ( Parallelized . class ) public class ZooKeeperUpdatingPersistentDirectoryTest { private static final String PARENT_PATH = STRING0 ;
restore zk updater test run parallelism
<nb> public class StringUtil extends StringUtilRt { } @ notnull - public static String doubleQuote ( @ notnull String str ) { + public static String wrapWithDoubleQuote ( @ notnull String str ) { return STRING0 + str + STRING1 ; }
renaming StringUtil doubleQuote to StringUtil wrapWithDoubleQuote
<nb> final class AjpServerResponseConduit extends AbstractStreamSinkConduit < StreamSin private static final Logger log = Logger . getLogger ( STRING0 ) ; - private static final int MAX_DATA_SIZE = NUMBER0 ; + private static final int MAX_DATA_SIZE = NUMBER1 ; private static final Map < HttpString , Integ...
Use correct MAX_DATA_SIZE in AJP
<nb> package NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMES...
updated call to XMLRPCUtils sanitizeSiteUrl
<nb> class PyUnusedLocalInspectionVisitor extends PyInspectionVisitor { PyNamedParameter namedParameter = element instanceof PyNamedParameter ? ( PyNamedParameter ) element : ( PyNamedParameter ) element . getParent ( ) ; + name = namedParameter . getName ( ) ; SINGLE if ( ( ( PyParameterList ) namedParamet...
restore deleted line once again
<nb> public class StreamStateMachine { public synchronized void closeIfIdle ( ) { - if ( state == State . IDLE ) { - state = State . CLOSED_FINAL ; - } + stateChange ( State . IDLE , State . CLOSED_FINAL ) ; }
Use the method provided for changing state
<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 COMMENT - COMMENT - COMMENT - COMMENT - ...
Fixed javadoc documentation in the main class
<nb> public abstract class BaseDrawerItem < T > implements IDrawerItem , Nameable < T > , Ico return ( T ) this ; } + public T withEnabled ( boolean enabled ) { + this . enabled = enabled ; + return ( T ) this ; + } + public T setEnabled ( boolean enabled ) { this . enabled = enabled ; return ( T ...
add withEnabled because all methods start with with
<nb> public class Util { String email = iniFile . get ( STRING0 , STRING1 ) ; String signature = iniFile . get ( STRING2 , STRING1 ) ; return new String [ ] { name , email , signature } ; + } catch ( FileNotFoundException ex ) { + return null ; } catch ( Throwable ex ) { bug ( null , ex ) ; return null ...
Catch file not found exception support info
<nb> public class ViewPort { processors . remove ( processor ) ; processor . cleanup ( ) ; } + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public void clearProcessors ( ) { + for ( SceneProcessor proc : processors ) { + proc . cleanup ( ) ; + } + processors . clear ( ) ; ...
Added ViewPort clearProcessors to remove all processors from a viewport
<nb> public class Server extends ServerBootstrap { super ( STRING0 , configuration ) ; } - @ option ( name = { STRING1 , STRING2 } , description = STRING3 ) - private boolean configTest = false ; - @ option ( name = { STRING4 , STRING5 } , description = STRING6 ) private boolean local = false ; - @ ...
Remove unused command line parameters r and t
<nb> public class RmiRouteEndpointTest extends RmiRouteTest { public void configure ( ) throws Exception { RmiEndpoint say = new RmiEndpoint ( ) ; say . setCamelContext ( context ) ; - say . setUri ( new URI ( STRING0 ) ) ; + say . setUri ( new URI ( STRING1 ) ) ; from ( STRING2 ) . to ( say ) ; <nb> ...
Fixed the test error of RmiRouteEndpointTest
<nb> public class Registry { SINGLE SINGLE if ( isNative && info != null && info . isPersistent ( ) ) { - return registerToSessionRegistry ( qualifiedName , info ) ; + Class < ? > functionClass ; + try { + functionClass = info . getFunctionClass ( ) ; + } catch ( Exception e ) { + return registerToSes...
getFunctionInfo should register jars under a checks Reviewed by Jesus Camacho Rodriguez
<nb> public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem } public void collapseTrees ( final CharSequence constraint ) { - if ( downloadFragment == null ) { + if ( downloadFragment == null || downloadFragment . getDownloadActivity ( ) == null ) { return ; } downloadFragment ...
Fixed null pointer in downloadindexadapter
<nb> public class CordovaBridge { expectedBridgeSecret = - NUMBER0 ; } + public boolean isSecretEstablished ( ) { + return expectedBridgeSecret != - NUMBER0 ; + } + COMMENT int generateBridgeSecret ( ) { SecureRandom randGen = new SecureRandom ( ) ;
Add an isSecretEstablished getter to CordovaBridge
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Added a missing import
<nb> public class TypeMap { STRING0 , STRING1 , STRING2 , + STRING3 , STRING4 , STRING5 , STRING6 , SINGLE
Fix broken API which locks cloud on error page
<nb> public class WXPerformance { STRING0 , STRING1 , STRING2 , + STRING3 , + STRING4 , + STRING5 , + STRING6 , STRING7 } ; }
android add measures data
<nb> public final class ContactsContract { COMMENT COMMENT public static final String CONTENT_TYPE = STRING0 ; + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public static final String QUERY_PARAMETER_SIP_ADDRESS = STRING1 ; } COMMENT
Add a query parameter to look up a SIP address
<nb> import NAMESPACE ; public abstract class MongoSocketException extends MongoException { private static final long serialVersionUID = - NUMBER0 ; private final ServerAddress serverAddress ; - private IOException ioException ; public MongoSocketException ( final String message , final ServerAddress server...
Removed unnecessary Exception field
<nb> public final class FragmentCompatUtil { SINGLE if ( supportLib != null && - supportLib . getFragmentActivityClass ( ) == activity . getClass ( ) ) { + supportLib . getFragmentActivityClass ( ) . isInstance ( activity ) ) { Object fragment = findFragmentForViewInActivity ( supportLib , activity , view )...
Fix FragmentActivity class equality issue
<nb> import NAMESPACE ; import static NAMESPACE ; - public class DBObjects { - private DBObjects ( ) { - } - + final class DBObjects { public static Document toDocument ( final DBObject obj ) { final Document res = new Document ( ) ; fill ( obj , res ) ; <nb> public class DBObjects { } retur...
Making com mongodb DBObjects package private
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + @ deprecated public class FloatToFixed { private static final float shortSize = Short . MAX_VALUE - Short . MIN_VALUE ; <nb> public class FloatToFixed { private static final float byteSize = Byte . MAX_VALUE - Byte . MIN_VALUE ; private...
You should use regular floats on Android instead of using fixed decimal format most mobile GPUs support float anyway
<nb> public class StickyRecyclerHeadersDecoration extends RecyclerView . ItemDecoration int orientation = getOrientation ( parent ) ; mHeaderRects . clear ( ) ; - if ( parent . getChildCount ( ) > NUMBER0 ) { + if ( parent . getChildCount ( ) > NUMBER0 && mAdapter . getItemCount ( ) > NUMBER0 ) { View first...
Fix crash when deleting the last item from the adapter
<nb> public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp @ override public void visitFile ( PsiFile file ) { final VirtualFile virtualFile = file . getVirtualFile ( ) ; - if ( virtualFile == null ) return ; + if ( virtualFile == null || virtualFile . getFileType ( ) . isBinary ( )...
do not inspect binary files
<nb> public final class NativeDecimalFormat implements Cloneable { } } - NSError * error ; + NSError * error = nil ; BOOL success = [ formatter getObjectValue : & result forString: string range: & range
Fixed failing formatter tests
<nb> public class ASTGenerator { } case ASTNode . QUALIFIED_NAME : QualifiedName qn = ( QualifiedName ) astNode ; + ASTNode temp2 = findDeclaration2 ( qn . getName ( ) , nearestNode ) ; + if ( temp2 instanceof FieldDeclaration ) { + SINGLE + System . out . println ( qn . getName ( ) + STRING0 + getNodeAsS...
oops left out this case
<nb> public class ConfigurationTest extends TestCase { assertNull ( ConfigurationBase . fixURL ( true , null ) ) ; } - public void testSprit ( ) throws Exception { + public void testSplit ( ) throws Exception { String original = STRING0 ; String [ ] split = T4JInternalStringUtil . split ( original , STRIN...
Fixed a minor typo in ConfigurationTest
<nb> public class ActivityUsage extends ActivityBase { ApplicationInfo app = pm . getApplicationInfo ( packages [ NUMBER0 ] , NUMBER0 ) ; icon = pm . getApplicationIcon ( app ) ; } - } catch ( Throwable ex ) { - Util . bug ( null , ex ) ; + } catch ( Throwable ignored ) { } return holder ; }
Ignore package not found in usage data support info
<nb> public class FieldSerializer extends Serializer { try { object = c . newInstance ( ) ; } catch ( Exception e ) { - throw new IOException ( e . toString ( ) ) ; + throw new SerializerException ( STRING0 + c , e ) ; } for ( SavedField savedField : fields ) {
Improved the exception handling when objects fail
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class GeocoderResults { } public void addResult ( GeocoderResult result ) { + if ( results == null ) + results = new ArrayList < GeocoderResult > ( ) ; results . add ( result ) ; }
Create result array if not created when adding a new element
<nb> public class IntMatchFilterTest { assertEquals ( STRING0 , filter , filter2 ) ; assertFalse ( STRING1 , filter . equals ( filter3 ) ) ; assertFalse ( STRING2 , filter . equals ( this ) ) ; - assertFalse ( STRING3 , filter . equals ( null ) ) ; } @ test <nb> public class IntRangeFilterTest { asser...
Remove invocations of equals method with null
<nb> final class UriParser { i = NUMBER0 ; } else { i = uri . indexOf ( STRING0 , i + NUMBER1 ) ; + if ( i == - NUMBER2 ) { + SINGLE + return STRING1 ; + } } - int queryStart = uri . indexOf ( STRING2 , i ) ; - if ( queryStart == - NUMBER2 ) { - queryStart = uri . length ( ) ; - } - return u...
Fix StringIndexOutOfBoundsException if UriParser path was used on a request that contains no path
<nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager public void offsetChildrenTopAndBottom ( int offset ) { final int count = mChildrenCount ; final View [ ] children = mChildren ; + boolean invalidate = false ; for ( int i = NUMBER0 ; i < count ; i ++ ) { final View v = ...
Optimize list view scrolls
<nb> public final class CasEnvironmentContextListener implements ServletContextListen private String collectEnvironmentInfo ( ) { final Properties properties = System . getProperties ( ) ; final Formatter formatter = new Formatter ( ) ; - formatter . format ( STRING0 ) ; + formatter . format ( STRING1 ) ; f...
fixed header alignment
<nb> public abstract class AbstractItem < Item extends AbstractItem < ? , ? > , VH extends R COMMENT @ override public View generateView ( Context ctx ) { - RecyclerView . ViewHolder viewHolder = getViewHolder ( LayoutInflater . from ( ctx ) . inflate ( getLayoutRes ( ) , null , false ) ) ; + VH viewHolder = ...
use correct generic type in generateView no cast necessary
<nb> public class CxxPreprocessAndCompileStep implements Step { } public ImmutableList < String > getCommand ( ) { - return getCommand ( false ) ; - } - - public ImmutableList < String > getCommand ( boolean allowColorsInDiagnostics ) { SINGLE SINGLE SINGLE SINGLE + return getCommand ( false ) ;...
Move comment to the right place
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class SigningInActivity extends Activity { false COMMENT , null COMMENT ) ; if ( settings . getUseTor ( ) ) { - mConn . setProxy ( STRING0 , STRING1 , NUMBER0 ) ; + mConn ...
modified the way this finish
<nb> public class SimperiumUtils { Note object = getNotesBucket ( ) . insertObject ( note . getId ( ) , Note . Schema . getJSON ( note ) ) ; object . save ( ) ; } catch ( BucketObjectNameInvalid e ) { - e . printStackTrace ( ) ; + AppLog . e ( AppLog . T . SIMPERIUM , e . getMessage ( ) ) ; } } }
using AppLog instead of exception printStackTrace
<nb> public class MSSQLTypeConverter extends AbstractTypeConverter { columnTypeString = columnTypeString . replaceFirst ( STRING0 , STRING1 ) ; autoIncrement = true ; } - if ( columnTypeString . equalsIgnoreCase ( STRING2 ) && Long . valueOf ( precision ) > NUMBER0 ) { + if ( columnTypeString . equalsIgnoreCa...
handle null precisions
<nb> public class CropImageActivity extends AppCompatActivity implements CropImageVie if ( outputUri . equals ( Uri . EMPTY ) ) { try { String ext = mOptions . outputCompressFormat == Bitmap . CompressFormat . JPEG ? STRING0 : - mOptions . outputCompressFormat == Bitmap . CompressFormat . PNG ? STRING1 : STRING...
Changed WebP file extension from
<nb> public class Grammar implements AttributeResolver { } } ; public static final Set < String > ParserBlockOptions = new HashSet < String > ( ) { { + add ( STRING0 ) ; } } ; public static final Set < String > LexerBlockOptions = new HashSet < String > ( ) { { + add ( STRING0 ) ; } } ; COMMENT
Allow greedy option for blocks in both lexer and parser
<nb> public class RedisConnection implements RedisCommands { return await ( r ) ; } - public < T , R > void send ( CommandData < T , R > data ) { - channel . writeAndFlush ( data ) ; + public < T , R > ChannelFuture send ( CommandData < T , R > data ) { + return channel . writeAndFlush ( data ) ; } ...
send returns ChannelFuture
<nb> public class DataSourcePopulator implements InitializingBean { SecurityContextHolder . getContext ( ) . setAuthentication ( authRequest ) ; template . execute ( - STRING0 ) ; + STRING1 + + STRING2 + + STRING3 + + STRING4 + + STRING5 ) ; template . execute ( - STRING6 ) ; + STRING7 + + STR...
Formatted ACL SQL for readability
<nb> public class Configuration implements IOReadableWritable { COMMENT public void setLong ( final String key , final long value ) { if ( key == null ) { - LOG . warn ( STRING0 ) ; + LOG . warn ( STRING1 ) ; return ; } <nb> public class Configuration implements IOReadableWritable { public void setF...
fixed minor typos in inline documentation
<nb> public class HgStatusWidget extends EditorBasedWidget implements StatusBarWidget } public void deactivate ( ) { + if ( isDisposed ( ) ) return ; DvcsUtil . removeStatusBarWidget ( myProject , this ) ; } <nb> public class HgStatusWidget extends EditorBasedWidget implements StatusBarWidget update (...
Fix NPE in dispose
<nb> public class MultiMatchQueryBuilder extends AbstractQueryBuilder < MultiMatchQuery } } if ( type == null ) { - throw new ElasticsearchParseException ( STRING0 , MultiMatchQueryParser . NAME , value ) ; + throw new ElasticsearchParseException ( STRING0 , NAME , value ) ; } return type ; }
adapt changes from upstream
<nb> public abstract class Model < M extends Model < M , P , O > , P extends Model . Parameters , COMMENT COMMENT public abstract static class Parameters extends Iced { - public AutoBuffer deepClone ( ) { - return write ( new AutoBuffer ( ) ) . flipForReading ( ) ; - } COMMENT public static final int MA...
Remove dead code
<nb> abstract class PooledByteBuf < T > extends AbstractReferenceCountedByteBuf { if ( handle >= NUMBER0 ) { final long handle = this . handle ; this . handle = - NUMBER1 ; + memory = null ; boolean sameThread = initThread == Thread . currentThread ( ) ; - chunk . arena . free ( chunk , handle , maxLength ,...
Revert Dereference when calling PooledByteBuf deallocate
<nb> public class SpringSimpleExpressionTest extends SpringTestSupport { protected AbstractXmlApplicationContext createApplicationContext ( ) { return new ClassPathXmlApplicationContext ( STRING0 ) ; } - - public void testSimpleEmptyString ( ) throws Exception { - getMockEndpoint ( STRING1 ) . expectedBodie...
Fix the failing test and add one more test to cover both when otherwise conditions
<nb> public abstract class ExtendableListView extends AbsListView { protected void onSizeChanged ( int w , int h ) { if ( getChildCount ( ) > NUMBER0 ) { + stopFlingRunnable ( ) ; mDataChanged = true ; rememberSyncState ( ) ; }
Stop FlingRunnable onSizeChanged fixes crash when forcing columns to change when scrolling at high velocity
<nb> public class VCardManager extends BasicModule implements ServerFeaturesProvider COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT public void setVCard ( String username , Element vCardElement ) throws Exception { boolean created = false ;
Fixed typo in javadoc
<nb> public class ResourceUrlProvider implements ApplicationListener < ContextRefreshed ResourceResolverChain chain = new DefaultResourceResolverChain ( handler . getResourceResolvers ( ) ) ; String resolved = chain . resolveUrlPath ( pathWithinMapping , handler . getLocations ( ) ) ; if ( resolved == null ) { ...
Remove ISE in ResourceUrlProvider
<nb> class PacketReader { COMMENT private XMPPError parseError ( XmlPullParser parser ) throws Exception { String errorCode = null ; + String message = null ; for ( int i = NUMBER0 ; i < parser . getAttributeCount ( ) ; i ++ ) { if ( parser . getAttributeName ( i ) . equals ( STRING0 ) ) { errorCode = par...
Fixes an error while parsing an error message with another format
<nb> public class FileUtilsTest { Assert . assertTrue ( FileUtils . exists ( storageDir . getAbsolutePath ( ) ) ) ; } - COMMENT COMMENT COMMENT
SMALLFIX Fix style