diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> class MtpManager { synchronized MtpRoot [ ] getRoots ( int deviceId ) throws IOException { final MtpDevice device = getDevice ( deviceId ) ; final int [ ] storageIds = device . getStorageIds ( ) ; + if ( storageIds == null ) { + throw new IOException ( STRING0 ) ; + } final MtpRoot [ ] results = new ...
Handle null value returned by MtpDevice getRoots
<nb> public interface Graph { public final static class Initializer { public static Graph init ( ) { - return Dagger_Graph . builder ( ) + return DaggerGraph . builder ( ) . build ( ) ; } }
Fix DaggerGraph against updated snapshot
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Fix check style
<nb> public class JSR356WebSocket extends WebSocket { acquired = semaphore . tryAcquire ( writeTimeout , TimeUnit . MILLISECONDS ) ; if ( acquired ) { ByteBuffer b = ByteBuffer . wrap ( data , offset , length ) ; - session . getAsyncRemote ( ) . sendBinary ( ByteBuffer . wrap ( data , offset , length ) , + se...
Fix double wrapping thanks to Donghwan
<nb> public class GroovyScriptEngine implements ResourceConnector { private final ClassLoader parentLoader ; private final GroovyClassLoader groovyLoader ; private final Map < String , ScriptCacheEntry > scriptCache = new ConcurrentHashMap < String , ScriptCacheEntry > ( ) ; - private CompilerConfiguration conf...
Replace anonymous inner class with instance initializer
<nb> public class Capsule implements Runnable { } private static Path searchJavaHomeInDir ( Path dir ) { - if ( isMac ( ) ) { SINGLE - final Path home = dir . resolve ( STRING0 ) . resolve ( STRING1 ) ; - if ( isJavaHome ( home ) ) - return home ; - } - return searchJavaHomeInDir0 ( dir ) ; - } - ...
Remove mac heuristics for findJavaHome
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ...
handle profiler status when console has more than one tab
<nb> public class TexturePacker { Settings settings = new Settings ( ) ; if ( isModified ( input , output , packFileName , settings ) ) { - process ( input , output , packFileName ) ; + process ( settings , input , output , packFileName ) ; } }
Passed default settings to the process method to avoid double instancing of the default settings
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ContactAccessorSdk3_4 extends ContactAccessor { Log . e ( LOG_TAG , e . getMessage ( ) , e ) ; } - - SINGLE - SINGL...
Removing commented out code
<nb> public class SpiceManager implements Runnable { long end = System . currentTimeMillis ( ) ; Ln . d ( STRING0 , end - start ) ; } - isUnbinding = false ; unbindFromService ( contextWeakReference . get ( ) ) ; this . runner = null ; this . executorService . shutdown ( ) ;
remove multiple unbinding
<nb> public class EmulatorView extends View implements GestureDetector . OnGestureListe while ( lineWrap ) { result = mTranscriptScreen . getScriptLine ( row + lineCount ) ; + + SINGLE + if ( result == null ) + break ; + lineWrap = mTranscriptScreen . getScriptLineWrap ( row + lineCount ) ; textToLi...
Fix uncaught null pointer exception
<nb> public class RemoteTaskRunner implements TaskRunner , TaskLogStreamer if ( ! started ) { log . info ( STRING0 , taskId ) ; } else if ( pendingTasks . remove ( taskId ) != null ) { + pendingTaskPayloads . remove ( taskId ) ; log . info ( STRING1 , taskId ) ; } else if ( completeTasks . containsKey ( tas...
Remove task from pendingTaskPayloads on shutdown if needed
<nb> public class CallDialog { if ( this . callPanel . equals ( callPanel ) ) { + this . callPanel . disposeCallInfoFrame ( ) ; dispose ( ) ; } } <nb> public class CallPanel { Call call = getCall ( ) ; - if ( callInfoFrame != null ) - callInfoFrame . dispose ( ) ; + this . disposeCallInfoFra...
Closes the CallInfoFrame simultaneously with the CallPanel when the last remote peer leaves the call
<nb> public class TieredBlockStore implements BlockStore { for ( StorageDir dir : tier . getStorageDirs ( ) ) { File userFolder = new File ( CommonUtils . concatPath ( dir . getDirPath ( ) , userId ) ) ; if ( userFolder . exists ( ) && ! userFolder . delete ( ) ) { + SINGLE + SINGLE + SINGLE LOG . error (...
Add comment as to why we log error instead of throwing exception
<nb> public class Database extends AbstractDatabase { UserActivity . TABLE , ABTestEvent . TABLE , TagMetadata . TABLE , + History . TABLE , TaskOutstanding . TABLE , TagOutstanding . TABLE ,
Create the history table for new users
<nb> implements EurekaInstanceConfig { Map < String , String > metadataMap = new LinkedHashMap < String , String > ( ) ; Configuration config = ( Configuration ) INSTANCE . getBackingConfigurationSource ( ) ; - for ( Iterator < String > iter = config . subset ( propMetadataNamespace ) + String subsetPrefix = ...
Fix the bug that unable to read metadata from the property file
<nb> public class JUnitTreeConsoleView extends WrappingConsoleView { return myConsolePanel ; } + @ override + public JComponent getPreferredFocusableComponent ( ) { + return myConsolePanel . getTreeView ( ) ; + } + private static class SystemOutput implements InputConsumer { private final Printer my...
restore focus in junit tree instead of console
<nb> class ShowTOCAction extends FBAndroidAction { super ( baseActivity , fbreader ) ; } + static boolean isTOCAvailable ( FBReaderApp reader ) { + return + reader != null && + reader . Model != null && + reader . Model . TOCTree != null && + reader . Model . TOCTree . hasChildren ( ) ; + } + + ...
fixed possible NPE
<nb> public class XmlReader { throw new IOException ( STRING0 , e ) ; } catch ( StringIndexOutOfBoundsException e ) { throw new IOException ( STRING1 , e ) ; + } catch ( NullPointerException e ) { + throw new IOException ( STRING2 , e ) ; + } catch ( IndexOutOfBoundsException e ) { + throw new IOException...
brought npe catcher back for kxml parser
<nb> public class FileReferenceSet { final Function < PsiFile , Collection < PsiFileSystemItem > > value = DEFAULT_PATH_EVALUATOR_OPTION . getValue ( myOptions ) ; if ( value != null ) { - return value . fun ( file ) ; + final Collection < PsiFileSystemItem > items = value . fun ( file ) ; + if ( items != n...
provide support for absolute paths in include directive
<nb> public class IdentityOutputFilter implements OutputFilter { protected OutputBuffer buffer ; - SINGLE - - - COMMENT - COMMENT - COMMENT - public long getContentLength ( ) { - return contentLength ; - } - - - COMMENT - COMMENT - COMMENT - public long getRemaining ( ) { - return ...
Remove unused methods
<nb> public abstract class PreferenceFragment extends Fragment implements COMMENT COMMENT COMMENT - COMMENT COMMENT COMMENT public void setDivider ( Drawable divider ) { <nb> public abstract class PreferenceFragment extends Fragment implements COMMENT COMMENT COMMENT - COMMENT COMMENT COMMEN...
Remove javadoc refs to removed attrs
<nb> public class ByteBuddy { COMMENT COMMENT COMMENT + COMMENT + COMMENT + COMMENT + public DynamicType . Builder < ? extends Enum < ? > > makeEnumeration ( String . . . value ) { + return makeEnumeration ( Arrays . asList ( value ) ) ; + } + + COMMENT + COMMENT + COMMENT COMMENT COMMENT ...
Added forgotten method
<nb> public class ViewCompat { COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT - COMMENT COMMENT COMMENT public static boolean hasOverlappingRendering ( View view ) {
Fix unresolved tag
<nb> import NAMESPACE ; public class GetLineageInfoListOptionsTest { COMMENT - COMMENT + COMMENT COMMENT @ test public void buildTest ( ) { <nb> public class GetLineageInfoListOptionsTest { } COMMENT - COMMENT + COMMENT COMMENT @ test public void defaultsTest ( ) { Assert . assertNot...
Incorporated PR comments
<nb> public class ReaderCommentAdapter extends BaseAdapter { View . OnClickListener authorListener = new View . OnClickListener ( ) { @ override public void onClick ( View view ) { - ReaderActivityLauncher . showReaderBlogDetail ( view . getContext ( ) , comment . blogId ) ; + ReaderActivityLauncher . showRea...
Fixed bug that caused tapping a comment avatar to show detail for the wrong blog
<nb> public class CursorResult < TModel extends Model > implements Closeable { } COMMENT + COMMENT + COMMENT + public void swapCursor ( @ nullable Cursor cursor ) { + if ( this . cursor != null ) { + ( ! this . cursor . isClosed ( ) ) { + this . cursor . close ( ) ; + } + } + this . cursor = cur...
added swap cursor method
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; COMMENT COMMENT COMMENT public class PackageDeserializer { + private static final Logger LOG = Logger . getLogger ( PackageDeserializer . class . getName ( ) ) ; + SINGL...
Log exceptions deserializing Packages
<nb> class DefaultBlurController implements BlurController { rootView = null ; blurView = null ; blurAlgorithm . destroy ( ) ; - internalBitmap . recycle ( ) ; + if ( internalBitmap != null ) { + internalBitmap . recycle ( ) ; + } } @ override
Add not null check in destroy method for bitmap
<nb> public abstract class SquidDatabase { COMMENT COMMENT COMMENT - @ beta protected void acquireExclusiveLock ( ) { if ( readWriteLock . getReadHoldCount ( ) > NUMBER0 && readWriteLock . getWriteHoldCount ( ) == NUMBER0 ) { throw new IllegalStateException ( STRING0 <nb> public abstract class SquidData...
Remove Beta tags from the acquire release lock methods in SquidDatabase
<nb> public class Nio2Endpoint extends AbstractJsseEndpoint < Nio2Channel > { COMMENT COMMENT COMMENT - private boolean useCaches = false ; + private boolean useCaches = true ; public void setUseCaches ( boolean useCaches ) { this . useCaches = useCaches ; } public boolean getUseCaches ( ) { return useCac...
Set useCaches to true for testing before removing it
<nb> public class ParameterProcessor { public static Parameter applyAnnotations ( Swagger swagger , Parameter parameter , Type type , List < Annotation > annotations ) { final AnnotationsHelper helper = new AnnotationsHelper ( annotations ) ; - if ( helper . isContext ( ) ) { + if ( helper . isContext ( ) && ...
Allow VendorExtensions to process Context params
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - class TrialTimeView extends View { + public class TrialTimeView extends View { private Paint mBasePaint ; private Paint mElapsedPaint ; private Paint mOutlinePaint ;
Make TrialTimeView public
<nb> public class TouchImageView extends ImageView { sharedConstructing ( context ) ; } + public TouchImageView ( Context context , AttributeSet attrs , int defStyle ) { + super ( context , attrs , defStyle ) ; + sharedConstructing ( context ) ; + } + private void sharedConstructing ( Context context ...
Added third constructor which includes defStyle
<nb> public class MockProvider this . supportedOperationSets . put ( OperationSetBasicInstantMessaging . class . getName ( ) , mockBImOpSet ) ; + + MockOperationSetBasicTelephony mockTelphonyOpSet = + new MockOperationSetBasicTelephony ( this ) ; + + this . supportedOperationSets . put ( + OperationSe...
Call History Impl and call history tests
<nb> public enum HttpStatus S_204_NO_CONTENT ( NUMBER0 ) , S_205_RESET_CONTENT ( NUMBER1 ) , S_206_PARTIAL_CONTENT ( NUMBER2 ) , + S_207_MULTI_STATUS ( NUMBER3 ) , S_300_MULTIPLE_CHOICES ( NUMBER4 ) , S_301_MOVED_PERMANENTLY ( NUMBER5 ) , S_302_FOUND ( NUMBER6 ) , <nb> public enum HttpStatus S_415_UNS...
Add additional HTTP status codes
<nb> public class GoAutoImportCompletionContributor extends CompletionContributor { private static class NamedElementProcessor implements Processor < GoNamedElement > { @ notnull private final Collection < ElementProcessor > myProcessors ; - @ notnull private final GoFile myContextFile ; @ notnull private fin...
Delete redundant field
<nb> public class UserRouteBuilder extends RouteBuilder { SINGLE . dataFormatProperty ( STRING0 , STRING1 ) SINGLE - . contextPath ( STRING2 ) . port ( NUMBER0 ) + . contextPath ( STRING3 ) . port ( NUMBER0 ) SINGLE . apiContextPath ( STRING4 ) . apiProperty ( STRING5 , STRING6 ) . apiProperty ( STRING7...
Add JMX api for the swagger api
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT - final class LwjglFileHandle extends FileHandle { + public final class LwjglFileHandle extends FileHandle { LwjglFileHandle ( String fileName , FileType type ) { super ( fileName , type ) ; } <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - fin...
changed LwjglFiles and LwjglFileHandle to public as they are useful for command line tools without starting up all of libgdx
<nb> import NAMESPACE ; COMMENT COMMENT COMMENT - public class SlotSharingGroup { + public class SlotSharingGroup implements java . io . Serializable { + private static final long serialVersionUID = NUMBER0 ; + + private final Set < JobVertexID > ids = new TreeSet < JobVertexID > ( ) ; - private...
Fix serializability for SlotSharingGroup
<nb> import NAMESPACE ; COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
Fix a typo in BluetoothLeScanner documentation
<nb> public class RouteInfoControls { if ( cachedSpeed == NUMBER0 ) { setText ( null , null ) ; } else if ( cachedSpeed == RouteDataObject . NONE_MAX_SPEED ) { - setText ( R . string . max_speed_none , STRING0 ) ; + setText ( map . getString ( R . string . max_speed_none ) , STRING0 ) ; } else { String ds...
Add maxspeed none
<nb> public class GitPushDialog extends DialogWrapper { COMMENT public GitPushDialog ( final Project project , final List < VirtualFile > roots , final VirtualFile defaultRoot ) { super ( project , true ) ; - setTitle ( GitBundle . getString ( STRING0 ) ) ; + setTitle ( GitBundle . getString ( STRING1 ) ) ; ...
fixed push dialog title
<nb> public class Jerry { COMMENT public static class JerryParser { - protected final LagartoDOMBuilder builder = new LagartoDOMBuilder ( ) ; + protected final LagartoDOMBuilder builder ; + + public JerryParser ( ) { + this . builder = createLagartoDOMBuilder ( ) ; + } + + COMMENT + COMMENT + ...
Added feature to create custom JerryParser
<nb> public class AdminThread extends ClosableThread implements LibraryFacade } SINGLE + SINGLE final ByteBuffer termBuffer = bufferManagementStrategy . addSenderChannel ( sessionId , channelId , termId ) ;
added comment to remember to error check
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class Handlebar { if ( null != scopes ) scs . addAll ( Arrays . < Object > asList ( scopes ) ) ; scs . add ( parameters ) ; ...
make slots available in handlebars
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - public abstract class RuleRepository implements BatchExtension , ServerExtension { + public abstract cl...
revert change on RuleRepository
<nb> public class TextEnterer { try { inst . sendStringSync ( text ) ; inst . sendKeyDownUpSync ( KeyEvent . KEYCODE_ENTER ) ; - inst . sendKeyDownUpSync ( KeyEvent . KEYCODE_ENTER ) ; } catch ( SecurityException e ) { Assert . assertTrue ( STRING0 , false ) ; }
Changed the behaviour of enterText as in most cases two KeyEvent KEYCODE_ENTER are not needed after entering text
<nb> public class FullRunningAverage implements RunningAverage , Serializable { public FullRunningAverage ( int count , double average ) { this . count = count ; - this . average = average ; + this . average = average ; } COMMENT
Deleted trailing whitespace
<nb> public class InjectionPointTest extends TestCase { methods . add ( point . getMember ( ) . getName ( ) ) ; } } - assertEquals ( points . toString ( ) , ImmutableSet . of ( methodNames ) , methods ) ; + assertEquals ( points . toString ( ) , ImmutableSet . copyOf ( methodNames ) , methods ) ; } stat...
Changing callers of deprecated methods ImmutableSet of E and
<nb> public class MetaInfExtensionModule extends SimpleExtensionModule { } } catch ( ClassNotFoundException e ) { errors . add ( extensionClass ) ; + } catch ( NoClassDefFoundError e ) { + errors . add ( extensionClass ) ; + } catch ( UnsupportedClassVersionError e ) { + errors . add ( extensionClass ) ; ...
Add more catch clauses that may prevent an extension module from loading but still be handled
<nb> public class View implements Drawable . Callback , KeyEvent . Callback , } COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public void setOpticalInsets ( Insets insets ) { + mLayoutInsets = insets ; + } + + COMMENT COMMENT CO...
Add an internal method for setting optical insets
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class CommandLineApplication { public static class MyDataManagerImpl extends DataManagerImpl { public DataContext getDataContex...
DataContext in tests implements UserDataHolder
<nb> package NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; COMMENT COMMENT COMMENT - public class DefaultGradleProject implements ProjectVersion3 , GradleProject , Serializable { + public class DefaultGr...
Implement the protocol interface instead of ProjectVersion3
<nb> public class OtrChatListener implements MessageListener { } catch ( OtrException e ) { - OtrDebugLogger . log ( STRING0 ) ; - - msg . setBody ( STRING0 ) ; - mOtrChatManager . refreshSession ( to , from ) ; - + OtrDebugLogger . log ( STRING0 ) ; + msg . setBody ( STRING1 + body + STRING2 ) ; ...
Revert added auto OTR refresh attempt if there is an error decrypting
<nb> public class RuleCollector extends GrammarTreeVisitor { public MultiMap < String , GrammarAST > ruleToAltLabels = new MultiMap < String , GrammarAST > ( ) ; public Map < String , String > altLabelToRuleName = new HashMap < String , String > ( ) ; - public Rule currentRule ; - public RuleCollector ( Gra...
Remove unused field
<nb> public class Format { System . exit ( - NUMBER0 ) ; } } + + private Format ( ) { } SINGLE }
Add private constructor to tachyon Format
<nb> public class Observable < T > { return create ( OperationFilter . filter ( this , predicate ) ) ; } + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT public Observable < T > distinct ( ) { return create ( OperationDistinct . distinct ( this ) ) ; } + COMMENT + COMMENT + CO...
added javadoc comments to Observable distinct
<nb> public class AceEditor implements DocDisplay , @ override public void onPaste ( PasteEvent event ) { + if ( completionManager_ != null ) + completionManager_ . onPaste ( event ) ; + final Position start = getSelectionStart ( ) ; Scheduler . get ( ) . scheduleDeferred ( new ScheduledCommand ( ) ...
inline paste handling into single handler
<nb> public class CommentDetailFragment extends Fragment implements NotificationFragm final TextView txtName = ( TextView ) getView ( ) . findViewById ( R . id . text_name ) ; final TextView txtDate = ( TextView ) getView ( ) . findViewById ( R . id . text_date ) ; - txtName . setText ( mComment . hasAuthorName...
Replace Html fromHtml with HtmlUtils fastUnescapeHtml
<nb> public class RecyclingDemo extends ListActivity { selection . setText ( items [ position ] ) ; } - class IconicAdapter extends ArrayAdapter { + class IconicAdapter extends ArrayAdapter < String > { IconicAdapter ( ) { super ( RecyclingDemo . this , R . layout . row , items ) ; }
Added generic type
<nb> public class Androlib { } } - public void decodeResourcesFull ( File apkFile , File outDir , + public void decodeResourcesFull ( ExtFile apkFile , File outDir , ResTable resTable ) throws AndrolibException { LOGGER . info ( STRING0 ) ; mAndRes . decode ( resTable , apkFile , outDir ) ; <nb> final...
get apkFile as ExtFile
<nb> public class UniversalChineseGrammaticalStructure extends GrammaticalStructure if ( td1 . reln ( ) == DEPENDENT && td2 . reln ( ) == DEPENDENT && td1DepPOS . equals ( STRING0 ) ) { GrammaticalRelation td3reln = UniversalChineseGrammaticalRelations . valueOf ( td1Dep . value ( ) ) ; if ( td3reln == null ) { ...
Fix another universal not bug
<nb> final class LogicalDisplay { } public void dumpLocked ( PrintWriter pw ) { + pw . println ( STRING0 + mDisplayId ) ; pw . println ( STRING1 + mLayerStack ) ; + pw . println ( STRING2 + mHasContent ) ; pw . println ( STRING3 + ( mPrimaryDisplayDevice != null ? mPrimaryDisplayDevice . getNameLocked (...
Add some missing debug output
<nb> public class CompactSerializerTest extends SchemaLoader expectedClassNames . add ( STRING0 ) ; expectedClassNames . add ( STRING1 ) ; expectedClassNames . add ( STRING2 ) ; + expectedClassNames . add ( STRING3 ) ; discoveredClassNames = new ArrayList < String > ( ) ; String cp = System . getProperty ...
add EchoMessageSerializer to CompactSerializerTest
<nb> import static NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class HttpServerPipelineFactory implements ChannelPipelineFactory { SINGLE SINGLE pipeline . addLast ( STRING0 , new HttpResponseEncoder ( ) ) ; + SINGLE ...
Updated the HTTP snoop example to fully utilize the compression handlers
<nb> public class Parser { if ( ! dimCast . isEmpty ( ) ) { if ( dims [ NUMBER0 ] != - NUMBER1 ) { SINGLE - cast += STRING0 + dims [ NUMBER0 ] + STRING1 ; + cast += STRING2 + dims [ NUMBER0 ] + STRING3 ; } else { SINGLE cast += STRING4 ;
Make array comments show up in cpp and java files
<nb> class Client implements IConnection { COMMENT private int getSleepTimeMs ( ) { - int sleepMs = base_sleep_ms * Math . max ( NUMBER0 , random . nextInt ( NUMBER0 < < retries . get ( ) ) ) ; + int backoff = NUMBER0 < < Math . max ( NUMBER0 , retries . get ( ) ) ; + int sleepMs = base_sleep_ms * Math . ma...
Fixed negative netty sleep values
<nb> public class CacheTests extends ESTestCase { Value that = ( Value ) o ; - return value == that . value ; - + return value . equals ( that . value ) ; } @ override
Use correct equality in CacheTests testReplaceRecomputesSize
<nb> public class PrivacyService { result . methodName = restriction . methodName ; result . restricted = restrict ; result . asked = true ; + result . extra = restriction . extra ; setRestrictionInternal ( result ) ; }
Cache extra for on demand choice
<nb> public class NNParser { COMMENT public int getWordID ( String s ) { SINGLE - if ( s == CONST . ROOT ) s = CONST . NULL ; return wordIDs . containsKey ( s ) ? wordIDs . get ( s ) : wordIDs . get ( CONST . UNKNOWN ) ; } public int getPosID ( String s ) { SINGLE - if ( s == CONST . ROOT ) s = CONS...
Treat ROOT as ROOT and not as a null token
<nb> public class RegexTesterResource extends RestResource { SINGLE final RegexTesterResponse . Match match ; - if ( matcher . groupCount ( ) > NUMBER0 ) { + if ( matched && matcher . groupCount ( ) > NUMBER0 ) { match = RegexTesterResponse . Match . create ( matcher . group ( NUMBER1 ) , matcher . start ( ...
Only create Match when regexp matches example
<nb> public class Pipeline { CONFIGURED , COMPLETED , INSUFFICIENT_SUCCESSES , - RESPONSE_RECEIVED , RESPONSES_RECEIVED , - NOP , ERROR , MASTER_DETERMINED ; <nb> public class Pipeline { break ; } - if ( event . equals ( Event . NOP ) ) - continue ; - Action action = eventActions . get...
Removed unused enums
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; public class ClsTypeElementImpl extends ClsElementImpl implements PsiType...
removed jmock dep
<nb> public class AjpProcessor extends AbstractProcessor { try { SINGLE prepareResponse ( ) ; - SINGLE - flush ( false ) ; } catch ( IOException e ) { setErrorState ( ErrorState . CLOSE_NOW , e ) ; }
Remove call that is always a NO OP
<nb> public class TypeRegistry { ignorablePackagePrefixes [ STRING0 - STRING1 ] = new String [ ] { STRING2 , STRING3 } ; ignorablePackagePrefixes [ STRING4 - STRING1 ] = new String [ ] { STRING5 , STRING6 , STRING7 , STRING8 , } ; - ignorablePackagePrefixes [ STRING9 - STRING1 ] = new String [ ] { STRING10 , ST...
Allow user packages to start with the four characters java
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; <nb> public final class OpenALStreamingSound extends AbstractAsset < StreamingSoundData protected int [ ] buffers = new int [ NUMBER0 ] ; protected int lastUpdatedBuffer ; - p...
Dispose streaming music assets correctly
<nb> class PowerManagerService extends IPowerManager . Stub private Runnable mAutoBrightnessTask = new Runnable ( ) { public void run ( ) { - int value = ( int ) mLightSensorPendingValue ; - if ( value >= NUMBER0 ) { - mLightSensorPendingValue = - NUMBER1 ; - lightSensorChangedLocked ( value ) ; + synch...
Add missing synchronization in mAutoBrightnessTask
<nb> public class RequestBatch < BatchReturnType , ResponseType , RequestArgumentType > { } else { ee = new RuntimeException ( STRING0 , e ) ; } - logger . error ( STRING1 , e ) ; + logger . debug ( STRING1 , e ) ; SINGLE for ( CollapsedRequest < ResponseType , RequestArgumentType > request : requests ) {...
Change RequestBatch logging from ERROR to DEBUG
<nb> public class PlaybackService extends Service implements SharedPreferences . OnShar taskManager = new PlaybackServiceTaskManager ( this , taskManagerCallback ) ; mediaPlayer = new PlaybackServiceMediaPlayer ( this , mediaPlayerCallback ) ; - ComponentName eventReceiver = new ComponentName ( getPackageName (...
properly update ComponentName package
<nb> public class ExtractorMetrics { } } - public ExtractorMetrics ( Map < String , Object > total , Map < String , Object > converters ) { - - } - public Timer getTotalTiming ( ) { return totalTiming ; }
Removing unused constructor
<nb> public class TreeWalkerTest extends BaseCheckTestSupport { verify ( checkConfig , pathToEmptyFile , expected ) ; fail ( ) ; } - catch ( CheckstyleException ignored ) { - SINGLE + catch ( CheckstyleException ex ) { + assertTrue ( ex . getMessage ( ) . startsWith ( STRING0 + + STRING1 + + TokenType...
added missing exception checks
<nb> public class TestOverdueIntegration extends TestIntegrationBase { SINGLE addDaysAndCheckForCompletion ( NUMBER0 , NextEvent . PAYMENT_ERROR , NextEvent . PAYMENT_ERROR ) ; - SINGLE + SINGLE checkODState ( STRING0 ) ; checkChangePlanWithOverdueState ( baseSubscription , true ) ; SINGLE addDaysAn...
fix comments in TestOverdueIntegration
<nb> public final class CheckRegExpTest extends CompilerTestCase { SINGLE testReference ( STRING0 , false ) ; + testReference ( STRING1 , false ) ; testReference ( STRING2 , false ) ; SINGLE
Add test in checkRegExpTest for let RegExp in a function
<nb> public class BodyResolver { @ notnull JetExpression delegateExpression , @ notnull JetScope parentScopeForAccessor ) { + JetScope propertyDeclarationInnerScope = getScopeForProperty ( jetProperty ) ; + resolvePropertyDelegate ( jetProperty , propertyDescriptor , delegateExpression , parentScopeForAccesso...
Create method for resolving delegate with scope for resolve from ResolveSessionUtils
<nb> public class WebAppContext extends ServletContextHandler implements WebAppClassL STRING0 , SINGLE STRING1 , SINGLE STRING2 , SINGLE - STRING3 SINGLE + STRING3 , SINGLE + STRING4 SINGLE } ; SINGLE
Make PushCacheFilter a system class so it is loaded with container classloader
<nb> public class AnnotateToggleAction extends ToggleAction implements DumbAware , Ann exceptionRef . set ( e ) ; } catch ( Throwable t ) { - handler . completed ( file . getPath ( ) ) ; + exceptionRef . set ( new VcsException ( t ) ) ; } }
vcs Handle all exceptions during annotation similarly
<nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager child . onAnimationStart ( ) ; } - more = a . getTransformation ( drawingTime , mChildTransformation , - scalingRequired ? mAttachInfo . mApplicationScale : FLOAT0 ) ; + more = a . getTransformation ( drawingTime , mChildT...
Fix old issue with compatibility scaled apps and Animations
<nb> package NAMESPACE ; COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT
fixed MemberSelector javadoc
<nb> public abstract class MixinChunkProviderServer { this . spongeWorld = ( IMixinWorld ) world ; } - @ inject ( method = STRING0 , at = @ at ( value = STRING1 , args = STRING2 , target = STRING3 ) ) + @ inject ( method = STRING0 , at = @ at ( value = STRING1 , target = STRING3 ) ) public void onOriginalLo...
Remove leftover debug
<nb> public class SentimentModel implements Serializable { throw new RuntimeException ( STRING0 ) ; } Set < String > words = Generics . newHashSet ( ) ; - words . add ( op . unkWord ) ; + words . add ( UNKNOWN_WORD ) ; for ( Tree tree : trainingTrees ) { List < Tree > leaves = tree . getLeaves ( ) ; for...
Fix the unk initialization change the way we initialize random word vectors
<nb> public class State implements Scored { value = value . replace ( equivalentSeparators [ i ] [ NUMBER0 ] , equivalentSeparators [ i ] [ NUMBER1 ] ) ; } if ( separatorRegex . matcher ( value ) . matches ( ) ) { + SINGLE separators . put ( index , leaf . value ( ) ) ; } }
Leave a comment on a potential improvement
<nb> public class MethodGroupingRule implements UsageGroupingRule { if ( ! ( usage instanceof PsiElementUsage ) ) return null ; PsiElement psiElement = ( ( PsiElementUsage ) usage ) . getElement ( ) ; PsiFile containingFile = psiElement . getContainingFile ( ) ; + if ( containingFile == null ) return null ; I...
find usage for db element
<nb> public class CamelSpringDelegatingTestContextLoaderTest { errorEndpoint . assertIsSatisfied ( ) ; } } - SINGLE + SINGLE +
fixed CS error
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; COMMENT COMMENT
fixed broken import
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + COMMENT COMMENT COMMENT <nb> public class ...
Make Toast widget aware of layout direction
<nb> import NAMESPACE ; public class InterceptedNotifications { private static final String TAG = STRING0 ; private static final String EXTRA_INTERCEPT = STRING1 ; - private static final String SYNTHETIC_KEY = STRING2 ; private final Context mContext ; private final PhoneStatusBar mBar ; <nb> public cla...
Fix bug where ZEN notification icon was shown
<nb> public class PythonDockerInterpreterTest implements InterpreterOutputListener { return new InterpreterContext ( STRING0 , STRING1 , + STRING2 , STRING3 , STRING4 , new AuthenticationInfo ( ) ,
MINOR Invalid constructor call in a test causes all CI failure
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public final class AtomicLongMap < K > { COMMENT COMMENT public void removeAllZeros ( ) { - for ( K key : map . keySet ( ) ) { - AtomicLong atomic = ...
Changes AtomicLongMap removeAllZeros to use iterator for removals
<nb> public class SampleFactory implements SampleSource { c . edge = edge ; LineString ls = ( LineString ) ( edge . getGeometry ( ) ) ; - SINGLE - SINGLE - if ( ! ( edge . getFromVertex ( ) instanceof OsmVertex && edge . getToVertex ( ) instanceof OsmVertex ) ) - continue ; + SINGLE + SINGLE + SINGL...
don t require samples to link to OSM vertices