diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class FileUtils {
throw new IOException ( STRING0 + file ) ;
}
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static void createStorageDirPath ( String path ) throws IOException {
+ File dir = new File ( path ) ;
+ String absolutePath = dir . getAbsolutePath ( ) ;
+ if ( ! dir . exists ( ) ) {
+ if ( dir . mkdirs ( ) ) {
+ changeLocalFileToFullPermission ( absolutePath ) ;
+ setLocalFileStickyBit ( absolutePath ) ;
+ LOG . info ( STRING1 , path ) ;
+ } else {
+ throw new IOException ( STRING2 + path ) ;
+ }
+ }
+ }
}
|
Add util method createStorageDirPath in tachyon util io FileUtils java
|
<nb> public class TransactionHandle implements TransactionTerminationHandle
return uriScheme . txUri ( id ) ;
}
- public boolean isPristine ( )
+ public boolean isImplicit ( )
{
return implicitTransaction ;
}
<nb> public class TransactionalService
final HttpServletRequest request )
{
return output - > {
- OutputStream wrappedOutput = transactionHandle . isPristine ( )
+ OutputStream wrappedOutput = transactionHandle . isImplicit ( )
? new InterruptingOutputStream ( output , transactionHandle )
: output ;
transactionHandle . commit (
|
Rename isPristine to isImplicit
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> abstract class OptimizingSearchHelperBase implements OptimizingSearchHelper {
if ( context . getOptions ( ) . getFileType ( ) == StdFileTypes . JAVA ) {
if ( javaLexer == null ) {
- javaLexer = LanguageParserDefinitions . INSTANCE . forLanguage (
- StdFileTypes . JAVA . getLanguage ( )
- ) . createLexer ( context . getProject ( ) ) ;
+ javaLexer = LanguageParserDefinitions . INSTANCE . forLanguage ( JavaLanguage . INSTANCE ) . createLexer ( context . getProject ( ) ) ;
}
javaLexer . start ( refname ) ;
- isJavaReservedWord = JavaTokenType . KEYWORD_BIT_SET . contains ( javaLexer . getTokenType ( ) ) ;
+ isJavaReservedWord = ElementType . KEYWORD_BIT_SET . contains ( javaLexer . getTokenType ( ) ) ;
}
if ( isJavaReservedWord ) {
|
Deprecate duplicate token sets cleanup
|
<nb> import NAMESPACE ;
import NAMESPACE ;
@ path ( STRING0 )
+ @ produces ( STRING1 )
+
+
public class ResourceChat {
@ suspend
- @ produces ( STRING1 )
@ get
public String suspend ( ) {
return STRING2 ;
}
- @ broadcast
- @ consumes ( STRING1 )
+ @ broadcast ( writeEntity = false )
@ post
- public void broadcast ( @ context Broadcaster b , Message message ) {
- b . broadcast ( new Response ( message . author , message . message ) ) ;
+ public Response broadcast ( Message message ) {
+ return new Response ( message . author , message . message ) ;
}
}
|
Simplify the sample
|
<nb> public class JobManagerITCase {
t1 . connectTo ( o1 , ChannelType . INMEMORY , CompressionLevel . NO_COMPRESSION ) ;
SINGLE
- jg . addJar ( new Path ( STRING0 + ServerTestUtils . getTempDir ( ) + File . separator + runtimeExceptionClassName
- + STRING1 ) ) ;
+ jg . addJar ( new Path ( new File ( ServerTestUtils . getTempDir ( ) + File . separator + runtimeExceptionClassName
+ + STRING1 ) . toURI ( ) ) ) ;
SINGLE
jobClient = new JobClient ( jg , configuration ) ;
|
Improved compatibility of JobManagerITCase test with Windows
|
<nb> public class HTTPServer {
private final HttpServer server ;
COMMENT
- COMMENT
- COMMENT
- private boolean runInternally = false ;
-
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class HTTPServer {
System . exit ( NUMBER0 ) ;
}
boolean verbose = false ;
- boolean runInternal = false ;
+ final boolean runInternal = false ;
int port = DEFAULT_PORT ;
for ( int i = NUMBER1 ; i < args . length ; i ++ ) {
if ( STRING0 . equals ( args [ i ] ) || STRING1 . equals ( args [ i ] ) ) {
|
remove unused field
|
<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 ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fix damn import for the umpteenth time
|
<nb> public class ProxyInjector
{
try
{
- String amodid = ( String ) targ . getAnnotationInfo ( ) . get ( STRING0 ) ;
+ String amodid = ( String ) targ . getAnnotationInfo ( ) . get ( STRING1 ) ;
if ( Strings . isNullOrEmpty ( amodid ) )
{
amodid = ASMDataTable . getOwnerModID ( mods , targ ) ;
|
Fix modid field name for ProjectInjector
|
<nb> public class PyImportElementImpl extends PyBaseElementImpl < PyImportElementStub >
}
if ( qName . getComponentCount ( ) == NUMBER0 ) {
if ( resolveImportElement ) {
- return ResolveImportUtil . resolveImportElement ( this , QualifiedName . fromComponents ( name ) ) ;
+ return resolve ( ) ;
}
return this ;
}
|
Reuse resolve that does the same as the previous code
|
<nb> public abstract class ReplayingDecoder < T extends Enum < T > >
cumulation . readerIndex ( input . readerIndex ( ) ) ;
replayable = new ReplayingDecoderBuffer ( cumulation ) ;
} else {
- System . out . println ( STRING0 ) ;
ChannelBuffer cumulation = this . cumulation =
newCumulationBuffer ( ctx , input . readableBytes ( ) ) ;
cumulation . writeBytes ( input ) ;
|
Remove shameful System out println
|
<nb> package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
- import static NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public final class ReflectionUtilTest {
SINGLE
SINGLE
SINGLE
+
+ @ test
+ public void testSetFieldValueForId ( ) {
+ TestRecord record = new TestRecord ( ) ;
+ record . setName ( STRING0 ) ;
+
+ ReflectionUtil . setFieldValueForId ( record , NUMBER0 ) ;
+ Assert . assertEquals ( NUMBER0 , record . getId ( ) . longValue ( ) ) ;
+ }
+
}
|
Added test in ReflectionUtil
|
<nb> public abstract class BreakpointPropertiesPanel {
PsiElement context = breakpoint . getEvaluationElement ( ) ;
myPassCountCheckbox . setSelected ( breakpoint . COUNT_FILTER_ENABLED ) ;
- myConditionCheckbox . setSelected ( breakpoint . CONDITION_ENABLED ) ;
+ myConditionCheckbox . setSelected ( breakpoint . CONDITION_ENABLED || breakpoint . getCondition ( ) == null || breakpoint . getCondition ( ) . isEmpty ( ) ) ;
myConditionCombo . setEnabled ( myBreakpoint . CONDITION_ENABLED ) ;
|
Ease defining breakpoint condition
|
<nb>
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
package NAMESPACE ;
|
fixed license header
|
<nb> public class Toolbar extends ViewGroup {
this ( context , null ) ;
}
- public Toolbar ( Context context , AttributeSet attrs ) {
+ public Toolbar ( Context context , @ nullable AttributeSet attrs ) {
this ( context , attrs , R . attr . toolbarStyle ) ;
}
- public Toolbar ( Context context , AttributeSet attrs , int defStyleAttr ) {
+ public Toolbar ( Context context , @ nullable AttributeSet attrs , int defStyleAttr ) {
SINGLE
SINGLE
super ( ViewUtils . themifyContext ( context , attrs , false , true ) , attrs , defStyleAttr ) ;
|
Mark attrs Nullable in Toolbar constructors
|
<nb> public class GenericTypeOperationHandler extends BatchModeCommandHandler {
return true ;
}
+ @ override
public void addArgument ( CommandArgument arg ) {
}
+ @ override
protected void recognizeArguments ( CommandContext ctx ) throws CommandFormatException {
SINGLE
}
<nb> public class BatchEditLineHandler extends CommandHandlerWithHelp {
}
@ override
+ protected void recognizeArguments ( CommandContext ctx ) throws CommandFormatException {
+ SINGLE
+ }
+
+ @ override
public boolean isAvailable ( CommandContext ctx ) {
if ( ! super . isAvailable ( ctx ) ) {
return false ;
|
it can contain any number of arguments depedning on the command edited
|
<nb> public class ClientSideStreamProxyImpl implements ClientSideStreamProxy , Startab
return Task . fromValue ( handle ) ;
}
- public < T > Task < Void > post ( String provider , Class < T > dataClass , String streamId , final T data )
- {
- SINGLE
- return Task . done ( ) ;
- }
-
public void setRuntime ( final BasicRuntime runtime )
{
this . runtime = runtime ;
|
Removing unused method
|
<nb> public class Presence extends Packet {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
public void setPriority ( int priority ) {
+ if ( priority < - NUMBER0 || priority > NUMBER0 ) {
+ throw new IllegalArgumentException ( STRING0 + priority +
+ STRING1 ) ;
+ }
this . priority = priority ;
}
|
Enforce valid range for priority
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
-
+ import NAMESPACE ;
+ import NAMESPACE ;
public class ConnectionPoolConfig {
<nb> public class ConnectionPoolConfig {
SINGLE
private long _idleTimeoutMs ;
+ private static final Logger LOGGER = LoggerFactory . getLogger ( ConnectionPoolConfig . class ) ;
+
public ConnectionPoolConfig ( ) {
_threadPool = new ThreadPoolConfig ( ) ;
_minConnectionsPerServer = DEFAULT_MIN_CONNECTIONS_PER_SERVER ;
<nb> public class ConnectionPoolConfig {
if ( cfg . containsKey ( MAX_BACKLOG_PER_SERVER_KEY ) ) {
_maxBacklogPerServer = cfg . getInt ( MAX_BACKLOG_PER_SERVER_KEY ) ;
}
+
+ LOGGER . info ( toString ( ) ) ;
+ }
+
+ public String toString ( ) {
+ return STRING0 + _threadPool + STRING1 + _idleTimeoutMs +
+ STRING2 + _minConnectionsPerServer +
+ STRING3 + _maxConnectionsPerServer +
+ STRING4 + _maxBacklogPerServer ;
}
public ThreadPoolConfig getThreadPool ( ) {
|
Log transport connection pool configuration values
|
<nb> public class RecentsView extends FrameLayout {
int topBottomInsets = mSystemInsets . top + mSystemInsets . bottom ;
int childWidth = mEmptyView . getMeasuredWidth ( ) ;
int childHeight = mEmptyView . getMeasuredHeight ( ) ;
- int childLeft = left + Math . max ( NUMBER0 , ( right - left - leftRightInsets - childWidth ) ) / NUMBER1 ;
- int childTop = top + Math . max ( NUMBER0 , ( bottom - top - topBottomInsets - childHeight ) ) / NUMBER1 ;
+ int childLeft = left + mSystemInsets . left +
+ Math . max ( NUMBER0 , ( right - left - leftRightInsets - childWidth ) ) / NUMBER1 ;
+ int childTop = top + mSystemInsets . top +
+ Math . max ( NUMBER0 , ( bottom - top - topBottomInsets - childHeight ) ) / NUMBER1 ;
mEmptyView . layout ( childLeft , childTop , childLeft + childWidth , childTop + childHeight ) ;
}
|
Fixing tiny issue with empty state graphic not being centered correctly
|
<nb> public class ClientSerializerRegistrationsService extends AbstractClientService
SINGLE
SINGLE
Serializer . registerClass ( SerializerRegistrationsMessage . class ) ;
+ Serializer . registerClass ( SerializerRegistrationsMessage . Registration . class ) ;
SINGLE
serviceManager . getClient ( ) . addMessageListener ( this , SerializerRegistrationsMessage . class ) ;
<nb> public class ServerSerializerRegistrationsService extends AbstractHostedService
protected void onInitialize ( HostedServiceManager serviceManager ) {
SINGLE
Serializer . registerClass ( SerializerRegistrationsMessage . class ) ;
+ Serializer . registerClass ( SerializerRegistrationsMessage . Registration . class ) ;
}
@ override
|
Pre register the inner class as well
|
<nb> public class SemanticGraph implements Serializable {
SINGLE
String [ ] wordAndTag = word . split ( STRING0 ) ;
ifl . set ( CoreAnnotations . TextAnnotation . class , wordAndTag [ NUMBER0 ] ) ;
+ ifl . set ( CoreAnnotations . ValueAnnotation . class , wordAndTag [ NUMBER0 ] ) ;
if ( wordAndTag . length > NUMBER1 )
ifl . set ( CoreAnnotations . PartOfSpeechAnnotation . class , wordAndTag [ NUMBER1 ] ) ;
return ifl ;
|
valueOf should set word and value for the words it creates
|
<nb> public class AddCallSuperQuickFix implements LocalQuickFix {
newFunction . append ( STRING0 ) . append ( p . getText ( ) ) ;
}
- parameters = superInit . getParameterList ( ) . getParameters ( ) ;
+ PyParameterList paramList = superInit . getParameterList ( ) ;
+ if ( paramList == null ) return ;
+ parameters = paramList . getParameters ( ) ;
boolean addDouble = false ;
boolean addStar = false ;
for ( int i = NUMBER0 ; i != parameters . length ; i ++ ) {
|
fixed NPE in addCall qFix
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CommittedChangesTreeBrowser extends JPanel implements TypeSafeDataP
private class FilterChangeListener implements ChangeListener {
public void stateChanged ( ChangeEvent e ) {
- updateModel ( ) ;
+ if ( ApplicationManager . getApplication ( ) . isDispatchThread ( ) ) {
+ updateModel ( ) ;
+ } else {
+ ApplicationManager . getApplication ( ) . invokeLater ( new Runnable ( ) {
+ public void run ( ) {
+ updateModel ( ) ;
+ }
+ } ) ;
+ }
}
}
|
show common part for trunk and branch with separate icon when highlight filter merge info
|
<nb> public class SetType extends Type
SINGLE
if ( value . longValue ( ) >= ( encodingType . size ( ) * NUMBER0 ) )
{
- throw new IllegalArgumentException ( STRING0 + this . value . longValue ( ) ) ;
+ throw new IllegalArgumentException ( STRING0 + value . longValue ( ) ) ;
}
}
|
Removed unnecessary this reference
|
<nb> public class WordCompletionContributor extends CompletionContributor {
} ) ;
final PsiElement insertedElement = parameters . getPosition ( ) ;
- Set < CompletionVariant > toAdd = new HashSet < CompletionVariant > ( ) ;
final CompletionData data = CompletionUtil . getCompletionDataByElement ( file ) ;
- data . addKeywordVariants ( toAdd , insertedElement , file ) ;
- for ( CompletionVariant completionVariant : toAdd ) {
- if ( completionVariant . hasKeywordCompletions ( ) ) {
- return true ;
+ if ( ! ( data instanceof SyntaxTableCompletionData ) ) {
+ Set < CompletionVariant > toAdd = new HashSet < CompletionVariant > ( ) ;
+ data . addKeywordVariants ( toAdd , insertedElement , file ) ;
+ for ( CompletionVariant completionVariant : toAdd ) {
+ if ( completionVariant . hasKeywordCompletions ( ) ) {
+ return true ;
+ }
}
}
|
make word completion work in custom file type files
|
<nb> public class CppConfiguration extends BuildConfiguration . Fragment {
runtimeSysroot = defaultSysroot ;
String sysrootFlag ;
- if ( sysroot != null && ! sysroot . equals ( defaultSysroot ) ) {
- SINGLE
+ if ( sysroot != null ) {
sysrootFlag = STRING0 + sysroot ;
} else {
sysrootFlag = null ;
|
Add the sysroot argument even if it is the default for the particular Crosstool
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE $internal . com . google . common . annotations . VisibleForTesting ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Use the correct import in TupleDomainOrcPredicate
|
<nb> public class SearchContext implements Releasable {
SINGLE
}
engineSearcher . release ( ) ;
- if ( ! keepAliveTimeout . isCancelled ( ) ) {
- keepAliveTimeout . cancel ( ) ;
- }
+ keepAliveTimeout . cancel ( ) ;
return true ;
}
|
cancel the timeout in any case
|
<nb> public class UriHandlerSipImpl
SINGLE
SINGLE
SINGLE
- handleUri ( uri , provider ) ;
+ if ( provider . getRegistrationState ( )
+ != RegistrationState . REGISTERED )
+ {
+ handleUri ( uri , provider ) ;
+ }
}
} , initialRegistrationTimeout ) ;
}
|
Adds a check whether provider is registered in sip uri handler
|
<nb> public class OperatorContext
@ override
public synchronized void run ( )
{
- synchronized ( this ) {
- if ( finished ) {
- return ;
- }
- finished = true ;
- blockedMonitor . compareAndSet ( this , null ) ;
- blockedWallNanos . getAndAdd ( getBlockedTime ( ) ) ;
+ if ( finished ) {
+ return ;
}
+ finished = true ;
+ blockedMonitor . compareAndSet ( this , null ) ;
+ blockedWallNanos . getAndAdd ( getBlockedTime ( ) ) ;
}
public long getBlockedTime ( )
|
Remove unnecessary synchronized block
|
<nb> public class DocumentOutlineWidget extends Composite
private void addOrSetItem ( Scope node , int depth , int index )
{
+ if ( node == null )
+ return ;
+
int treeSize = tree_ . getItemCount ( ) ;
if ( index < treeSize )
{
|
defend against null nodes in scope tree
|
<nb> public final class BatchEntryConsumer < T extends Entry >
public void halt ( )
{
running = false ;
+ barrier . alert ( ) ;
}
@ override
<nb> public interface EntryConsumer < T extends Entry > extends Runnable
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
void halt ( ) ;
}
<nb> public final class BatchEntryConsumerTest
}
batchEntryConsumer . halt ( ) ;
- barrier . alert ( ) ;
thread . join ( ) ;
}
<nb> public final class BatchEntryConsumerTest
latch . await ( ) ;
batchEntryConsumer . halt ( ) ;
- barrier . alert ( ) ;
thread . join ( ) ;
}
<nb> public final class BatchEntryConsumerTest
latch . await ( ) ;
batchEntryConsumer . halt ( ) ;
- barrier . alert ( ) ;
thread . join ( ) ;
}
|
Move code to alert on the barrier inside the halt method on BatchEntryConsumer
|
<nb> public class ERBEvaluator {
BufferedReader erb = new BufferedReader ( new InputStreamReader ( ins ) ) ;
String q = eval ( erb , zcontext ) ;
- try { ins . close ( ) ; } catch ( IOException e ) { }
+ try {
+ ins . close ( ) ;
+ } catch ( IOException e ) {
+ throw new ZException ( e ) ;
+ }
return q ;
}
|
Handle exception on ins close
|
<nb>
package NAMESPACE ;
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
import NAMESPACE ;
import NAMESPACE ;
<nb>
package NAMESPACE ;
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
import NAMESPACE ;
|
added missing headers for io classes
|
<nb> public class TachyonFile implements Comparable < TachyonFile > {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Make comment consistent with the code
|
<nb> public class SimpleActivity extends AppCompatActivity {
materialScrollBar . addIndicator ( new AlphabetIndicator ( this ) , true ) ;
SINGLE
+ int x = NUMBER0 ;
List < SampleItem > items = new ArrayList < > ( ) ;
for ( String s : ALPHABET ) {
- for ( int i = NUMBER1 ; i <= new Random ( ) . nextInt ( NUMBER2 ) ; i ++ ) {
- items . add ( new SampleItem ( ) . withName ( s + STRING0 + i ) . withIdentifier ( NUMBER2 + i ) ) ;
+ int count = new Random ( ) . nextInt ( NUMBER3 ) ;
+ for ( int i = NUMBER1 ; i <= count ; i ++ ) {
+ items . add ( new SampleItem ( ) . withName ( s + STRING0 + x ) . withIdentifier ( NUMBER2 + x ) ) ;
+ x ++ ;
}
}
itemAdapter . add ( items ) ;
|
the sample should define unique ids
|
<nb> public class MaxCulBindingConfig implements BindingConfig {
this . loadStoredConfig ( ) ;
}
+ void setPairedInfo ( String dstAddr )
+ {
+ this . dstAddr = dstAddr ;
+ this . paired = true ;
+ saveStoredConfig ( ) ;
+ }
+
private String generateConfigFilename ( )
{
String base = STRING0 ;
<nb> public class MaxCulBindingConfig implements BindingConfig {
COMMENT
COMMENT
COMMENT
- void loadStoredConfig ( )
+ private void loadStoredConfig ( )
{
File cfgFile = new File ( generateConfigFilename ( ) ) ;
<nb> public class MaxCulBindingConfig implements BindingConfig {
COMMENT
COMMENT
COMMENT
- void saveStoredConfig ( )
+ private void saveStoredConfig ( )
{
if ( this . paired )
{
|
Tidy up pairing mode configuration load save
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public abstract class AbstractAccessLogValve extends ValveBase implements Access
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
protected class DateAndTimeElement implements AccessLogElement {
|
Fix typo for date time format specifiers
|
<nb> public class MediaServiceImpl
CallSessionImpl callSession = new CallSessionImpl (
call , this , ( URL ) callDataSinkMappings . get ( call ) ) ;
- activeCallSessions . put ( call , callSession ) ;
-
+ SINGLE
+ SINGLE
+ SINGLE
COMMENT
return callSession ;
|
Fixing a memory leak in the media package Report and fix thereof by Michael Koch
|
<nb>
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
package NAMESPACE ;
<nb> public class CallableMessageSender implements Callable < Boolean > {
boolean readInput = true ;
while ( readInput ) {
- readInput = StringUtils . isNotBlank ( in . readLine ( ) ) ;
+ readInput = StringUtils . isNotBlank ( in . readLine ( ) ) ;
}
LOGGER . debug ( STRING0 , url ) ;
|
Added missing copyright block
|
<nb>
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
package NAMESPACE ;
<nb>
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
package NAMESPACE ;
|
Add missing line to license header
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added a link to the Java tutorial which inspired the QOTM example
|
<nb> public class TrampolineCompiler {
private boolean checkMemberAccessible ( Function f , Trampoline t , ClassMember member ) {
Clazz caller = config . getClazzes ( ) . load ( t . getCallingClass ( ) ) ;
- Clazz target = config . getClazzes ( ) . load ( t . getTarget ( ) ) ;
+ Clazz target = config . getClazzes ( ) . load ( member . getDeclaringClass ( ) . getName ( ) . replace ( STRING0 , STRING1 ) ) ;
String runtimeClassName = null ;
runtimeClassName = t instanceof Invokevirtual
|
The member access checks must use the actual declaring class of the
|
<nb> public class MessageCompose extends K9Activity implements OnClickListener ,
SINGLE
computeAddCcBccVisibility ( ) ;
- showOrHideQuotedText (
- ( QuotedTextMode ) savedInstanceState . getSerializable ( STATE_KEY_QUOTED_TEXT_MODE ) ) ;
-
mQuotedHtmlContent =
( InsertableHtmlContent ) savedInstanceState . getSerializable ( STATE_KEY_HTML_QUOTE ) ;
if ( mQuotedHtmlContent != null && mQuotedHtmlContent . getQuotedContent ( ) != null ) {
<nb> public class MessageCompose extends K9Activity implements OnClickListener ,
mQuotedTextFormat = ( SimpleMessageFormat ) savedInstanceState . getSerializable (
STATE_KEY_QUOTED_TEXT_FORMAT ) ;
+ showOrHideQuotedText (
+ ( QuotedTextMode ) savedInstanceState . getSerializable ( STATE_KEY_QUOTED_TEXT_MODE ) ) ;
+
initializeCrypto ( ) ;
updateFrom ( ) ;
updateSignature ( ) ;
|
Restore instance state in correct order
|
<nb> public class Activator
private void activateJavaxScripting ( BundleContext context )
throws Exception {
+
if ( ! isJavaxScriptingAvailable ( ) ) {
LOGGER . warning ( STRING0 ) ;
+ return ;
}
Class < ? > clazz = context . getBundle ( ) . loadClass ( STRING1 ) ;
|
Added missing return statement
|
<nb> public class ActionToolbarImpl extends JPanel implements ActionToolbar {
add ( mySecondaryActionsButton ) ;
}
- if ( Registry . is ( STRING0 ) && ( ActionPlaces . MAIN_TOOLBAR . equals ( myPlace ) || ActionPlaces . NAVIGATION_BAR . equals ( myPlace ) ) ) {
+ if ( ( ActionPlaces . MAIN_TOOLBAR . equals ( myPlace ) || ActionPlaces . NAVIGATION_BAR . equals ( myPlace ) ) ) {
final AnAction searchEverywhereAction = ActionManager . getInstance ( ) . getAction ( STRING1 ) ;
if ( searchEverywhereAction != null ) {
try {
|
fix missing property
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class XmlCoreEnvironment {
appEnvironment . registerFileType ( DTDFileType . INSTANCE , STRING0 ) ;
appEnvironment . registerFileType ( XmlFileType . INSTANCE , STRING1 ) ;
+
+ appEnvironment . addExplicitExtension ( LanguageParserDefinitions . INSTANCE , XMLLanguage . INSTANCE , new XMLParserDefinition ( ) ) ;
+
+ CoreApplicationEnvironment . registerExtensionPoint ( Extensions . getRootArea ( ) , XmlChildRole . EP_NAME , XmlChildRole . StartTagEndTokenProvider . class ) ;
}
}
|
register new stuff in XmlCoreEnvironment
|
<nb> public class ModelResolver extends AbstractModelConverter implements ModelConver
SINGLE
XmlRootElement rootAnnotation = beanDesc . getClassAnnotations ( ) . get ( XmlRootElement . class ) ;
- if ( rootAnnotation != null && rootAnnotation . name ( ) != null && ! STRING0 . equals ( rootAnnotation . name ( ) ) ) {
+ if ( rootAnnotation != null && ! STRING0 . equals ( rootAnnotation . name ( ) ) && ! STRING1 . equals ( rootAnnotation . name ( ) ) ) {
LOGGER . debug ( rootAnnotation . toString ( ) ) ;
Xml xml = new Xml ( )
. name ( rootAnnotation . name ( ) ) ;
|
fixed unwanted default xml tag
|
<nb> class AppWidgetServiceImpl {
int enforceSystemOrCallingUid ( String packageName ) throws IllegalArgumentException {
int callingUid = Binder . getCallingUid ( ) ;
- int uid = Process . myUid ( ) ;
- if ( UserHandle . getAppId ( uid ) == Process . SYSTEM_UID || uid == NUMBER0 ) {
+ if ( UserHandle . getAppId ( callingUid ) == Process . SYSTEM_UID || callingUid == NUMBER0 ) {
return callingUid ;
}
return enforceCallingUid ( packageName ) ;
|
Fix security check for private allocateAppWidgetId api
|
<nb> public class ImmutableSetTest extends AbstractImmutableSetTest {
CollectionFeature . ALLOWS_NULL_QUERIES )
. createTestSuite ( ) ) ;
+ suite . addTestSuite ( ImmutableSetTest . class ) ;
+
return suite ;
}
<nb> public class ImmutableSortedSetTest extends AbstractImmutableSetTest {
CollectionFeature . ALLOWS_NULL_QUERIES )
. createTestSuite ( ) ) ;
+ suite . addTestSuite ( ImmutableSortedSetTest . class ) ;
+
return suite ;
}
|
Add Google internal memory consumption tests for Immutable List Set Map BiMap SortedMap SortedSet
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed an unused import
|
<nb> public class SequenceFileLoader < K extends Writable , V extends Writable > extends
}
protected Properties getContextProperties ( ) {
- Preconditions . checkNotNull ( signature , STRING0 ) ;
return UDFContext . getUDFContext ( ) . getUDFProperties ( getClass ( ) , new String [ ] { signature } ) ;
}
+ protected String getContextProperty ( String name , String defaultValue ) {
+ return getContextProperties ( ) . getProperty ( signature + name , defaultValue ) ;
+ }
+
protected void setContextProperty ( String name , String value ) {
Preconditions . checkNotNull ( name , STRING1 ) ;
getContextProperties ( ) . setProperty ( signature + name , value ) ;
}
- protected String getContextProperty ( String name , String defaultValue ) {
- return getContextProperties ( ) . getProperty ( signature + name , defaultValue ) ;
- }
-
@ override
public List < OperatorSet > getFeatures ( ) {
return ImmutableList . of ( OperatorSet . PROJECTION ) ;
|
Removes signature not null precondition in SequenceFileLoader
|
<nb> public class DeferredIconImpl < T > implements DeferredIcon {
final TreeUI ui = ( ( JTree ) target ) . getUI ( ) ;
if ( ui instanceof BasicTreeUI ) {
SINGLE
- ( ( BasicTreeUI ) ui ) . setLeftChildIndent ( ( ( Integer ) UIManager . get ( STRING0 ) ) . intValue ( ) ) ;
+ int indent = ( ( Integer ) UIManager . get ( STRING0 ) ) . intValue ( ) ;
+ if ( ( ( BasicTreeUI ) ui ) . getLeftChildIndent ( ) != indent ) {
+ ( ( BasicTreeUI ) ui ) . setLeftChildIndent ( indent ) ;
+ }
}
}
}
|
project tree hanging fixed
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
-
class TransactionCommitment implements Commitment
{
private final boolean hasLegacyIndexChanges ;
<nb> class TransactionCommitment implements Commitment
private final LogPosition logPosition ;
private final TransactionIdStore transactionIdStore ;
private boolean markedAsCommitted ;
- private Consumer < Long > callback ;
TransactionCommitment ( boolean hasLegacyIndexChanges , long transactionId , long transactionChecksum ,
LogPosition logPosition , TransactionIdStore transactionIdStore )
<nb> class TransactionCommitment implements Commitment
@ override
public void publishAsClosed ( )
{
- transactionIdStore . transactionClosed ( transactionId ,
- logPosition . getLogVersion ( ) , logPosition . getByteOffset ( ) ) ;
- if ( callback != null )
- {
- callback . accept ( transactionId ) ;
- }
+ transactionIdStore . transactionClosed ( transactionId , logPosition . getLogVersion ( ) , logPosition . getByteOffset ( ) ) ;
}
@ override
|
Remove some leftovers in TransactionCommitment
|
<nb> public class DataServerMessage {
public void close ( ) {
if ( mMsgType == DATA_SERVER_RESPONSE_MESSAGE ) {
try {
- mFile . close ( ) ;
+ if ( mFile != null ) {
+ mFile . close ( ) ;
+ }
} catch ( IOException e ) {
LOG . error ( mFile + STRING0 + e . getMessage ( ) ) ;
+ } catch ( Exception e ) {
+ LOG . error ( mFile + STRING0 + e . getMessage ( ) ) ;
}
}
}
|
Remote read no file
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
-
public class ExtensionCompare extends ExtensionAdaptor implements SessionChangedListener , SessionListener {
private static final String CRLF = STRING0 ;
|
Tidy up removed unused import from class ExtensionCompare
|
<nb> public class HiveZeppelinDriver extends ZeppelinDriver {
}
private String getLocalWarehouse ( ) {
- return getConf ( ) . getString ( ConfVars . ZEPPELIN_HOME ) + STRING0 ;
+ return new File ( getConf ( ) . getString ( ConfVars . ZEPPELIN_HOME ) + STRING0 ) . getAbsolutePath ( ) ;
}
@ override
|
Convert relative path to absolute path for local warehouse dir
|
<nb> package NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class BaseCheckTestSupport {
assertEquals ( STRING0 + lnr . readLine ( ) ,
expected . length , errs ) ;
- assertTrue ( STRING1 + theWarnings , theWarnings . size ( ) == NUMBER0 ) ;
+ assertEquals ( STRING1 + theWarnings , NUMBER0 , theWarnings . size ( ) ) ;
}
checker . destroy ( ) ;
|
Simplify JUnit assertion
|
<nb> public class CodeItem extends Item < CodeItem > {
COMMENT
public String getConciseIdentity ( ) {
- SINGLE
return STRING0 + Integer . toHexString ( getOffset ( ) ) ;
}
<nb> public class CodeItem extends Item < CodeItem > {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
and added a new one
|
<nb> public class AttachmentView extends FrameLayout {
out . flush ( ) ;
out . close ( ) ;
in . close ( ) ;
- attachmentSaved ( filename . toString ( ) ) ;
+ attachmentSaved ( file . toString ( ) ) ;
new MediaScannerNotifier ( mContext , file ) ;
} catch ( IOException ioe ) {
attachmentNotSaved ( ) ;
|
Displaying the final file name
|
<nb> public abstract class SquidDatabase {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
@ beta
protected void acquireExclusiveLock ( ) {
|
Fix the javadoc for acquireExclusiveLock
|
<nb> public class UpdateRequest extends InstanceShardOperationRequest < UpdateRequest >
if ( script == null && doc == null ) {
validationException = addValidationError ( STRING0 , validationException ) ;
}
+ if ( script != null && doc != null ) {
+ validationException = addValidationError ( STRING1 , validationException ) ;
+ }
return validationException ;
}
|
Reject update request that has both script and doc
|
<nb> With Bazel , add the following lines to the WORKSPACE file :
maven_jar (
name = STRING0 ,
artifact = STRING1 ,
- sha1 = STRING2 ,
+ sha1 = STRING3 ,
)
< / pre >
|
Fix sha1 for guava example
|
<nb> public final class Calendar {
public static final int EDITOR_ACCESS = NUMBER0 ;
COMMENT
public static final int OWNER_ACCESS = NUMBER1 ;
+ COMMENT
public static final int ROOT_ACCESS = NUMBER2 ;
COMMENT
|
handle calendars with an access level of root
|
<nb> import NAMESPACE ;
@ state (
name = STRING0 ,
+ roamingType = RoamingType . DISABLED ,
storages = {
@ storage (
file = StoragePathMacros . APP_CONFIG + STRING1
|
UsagesStatistic must specify roaming disabled
|
<nb> public interface Graph < N > {
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
|
Slightly update wording on Graph equals javadoc
|
<nb> public class CaseRule extends GermanRule {
exceptions . add ( STRING0 ) ;
exceptions . add ( STRING1 ) ;
exceptions . add ( STRING2 ) ;
+ exceptions . add ( STRING3 ) ;
+
exceptions . add ( STRING4 ) ;
exceptions . add ( STRING5 ) ;
exceptions . add ( STRING6 ) ;
|
add exception Euch
|
<nb> public class MimeMappings {
defaultMappings . put ( STRING0 , STRING1 ) ;
defaultMappings . put ( STRING2 , STRING3 ) ;
defaultMappings . put ( STRING4 , STRING5 ) ;
+ defaultMappings . put ( STRING6 , STRING7 ) ;
defaultMappings . put ( STRING8 , STRING9 ) ;
defaultMappings . put ( STRING10 , STRING11 ) ;
defaultMappings . put ( STRING12 , STRING13 ) ;
|
Added mime type mapping json application json
|
<nb> public class ImagePresenter < T > {
modelStreamToken = modelStreamLoader . fetchModelStream ( model , width , height , new ModelStreamLoader . ModelStreamReadyCallback ( ) {
@ override
public boolean onStreamReady ( String id , StreamOpener streamOpener ) {
- if ( loadCount != currentCount ) return false ;
+ if ( loadCount != currentCount || id == null || streamOpener == null ) return false ;
fetchImage ( model , id , streamOpener , width , height , loadCount ) ;
return true ;
|
Stop load in ImagePresenter if id or opener null
|
<nb> public class Account extends AbstractEntity {
if ( otr != null ) {
fingerprints . add ( new XmppUri . Fingerprint ( XmppUri . FingerprintType . OTR , otr ) ) ;
}
+ if ( axolotlService == null ) {
+ return fingerprints ;
+ }
fingerprints . add ( new XmppUri . Fingerprint ( XmppUri . FingerprintType . OMEMO , axolotlService . getOwnFingerprint ( ) . substring ( NUMBER0 ) , axolotlService . getOwnDeviceId ( ) ) ) ;
for ( XmppAxolotlSession session : axolotlService . findOwnSessions ( ) ) {
if ( session . getTrust ( ) . isVerified ( ) && session . getTrust ( ) . isActive ( ) ) {
|
fixed npe cause by race condition when axolotl service isn t initialized
|
<nb> import NAMESPACE ;
@ runwith ( PowerMockRunner . class )
@ preparefortest ( FileSystemMaster . class )
public final class TestRecomputeExecutor {
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
@ test
public void recomputeLauncherTest ( ) throws Exception {
long fileId = NUMBER0 ;
|
Added javadoc to test case
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
COMMENT
public interface IOLimiter
{
|
Remove method specific javadoc
|
<nb> public class UnionTest extends TestCase {
final String [ ] cbvalue = { null } ;
TestLibrary . TestUnion result = lib . testUnionByValueCallbackArgument ( new TestLibrary . UnionCallback ( ) {
public TestLibrary . TestUnion invoke ( TestLibrary . TestUnion v ) {
- System . out . println ( STRING0 + v . f2 ) ;
called [ NUMBER0 ] = true ;
v . setType ( String . class ) ;
v . read ( ) ;
|
remove extraneous output
|
<nb> public final class BloomFilter < T > implements Predicate < T > , Serializable {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class BloomFilter < T > implements Predicate < T > , Serializable {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
- public boolean isCompatible ( BloomFilter that ) {
+ public boolean isCompatible ( BloomFilter < T > that ) {
checkNotNull ( that ) ;
return ( this != that ) &&
( this . numHashFunctions == that . numHashFunctions ) &&
<nb> public final class BloomFilter < T > implements Predicate < T > , Serializable {
COMMENT
COMMENT
COMMENT
- public void putAll ( BloomFilter that ) {
+ public void putAll ( BloomFilter < T > that ) {
checkNotNull ( that ) ;
checkArgument ( this != that , STRING0 ) ;
checkArgument ( this . numHashFunctions == that . numHashFunctions ,
|
surely we just overlooked the proper generics on these signatures
|
<nb> public class PlainStreetEdge extends StreetEdge implements Cloneable {
PlainStreetEdge backPSE ;
if ( backEdge != null && backEdge instanceof PlainStreetEdge ) {
backPSE = ( PlainStreetEdge ) backEdge ;
- RoutingRequest backOptions = backWalkingBike ? options . bikeWalkingOptions : options ;
+ RoutingRequest backOptions = backWalkingBike ?
+ s0 . getOptions ( ) . bikeWalkingOptions : s0 . getOptions ( ) ;
double backSpeed = backPSE . calculateSpeed ( backOptions , backMode ) ;
final double realTurnCost ; SINGLE
|
Assign back options correctly
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import static NAMESPACE ;
import NAMESPACE ;
+ import static NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CamelSourceAdapter extends AbstractCamelAdapter implements Initiali
exchange . getIn ( ) . getHeaders ( ) . put ( MessageHeaders . REPLY_CHANNEL , replyChannel ) ;
replyChannel . subscribe ( new MessageHandler ( ) {
public void handleMessage ( Message < ? > message ) {
+ if ( LOG . isDebugEnabled ( ) ) {
+ LOG . debug ( STRING0 ) ;
+ }
SINGLE
SpringIntegrationBinding . storeToCamelMessage ( message , exchange . getOut ( ) ) ;
}
|
Fixed the CS error of camel components
|
<nb> public class ClientRegressionWithMockNetworkTest extends HazelcastTestSupport {
clientConfig . getNetworkConfig ( ) . setConnectionAttemptLimit ( NUMBER0 ) ;
hazelcastFactory . newHazelcastClient ( clientConfig ) ;
- instance . shutdown ( ) ;
+ hazelcastFactory . shutdownAllMembers ( ) ;
hazelcastFactory . newHazelcastInstance ( ) ;
- assertTrue ( latch . await ( NUMBER1 , TimeUnit . SECONDS ) ) ;
+ assertTrue ( STRING0 , latch . await ( NUMBER1 , TimeUnit . SECONDS ) ) ;
}
<nb> public class TestHazelcastFactory extends TestHazelcastInstanceFactory {
super . shutdownAll ( ) ;
}
+ public void shutdownAllMembers ( ) {
+ super . shutdownAll ( ) ;
+ }
+
@ override
public void terminateAll ( ) {
if ( ! mockNetwork ) {
<nb> public class TestHazelcastInstanceFactory {
public void shutdownAll ( ) {
if ( mockNetwork ) {
registry . shutdown ( ) ;
+ addressMap . clear ( ) ;
} else {
Hazelcast . shutdownAll ( ) ;
}
|
client tests mock network internal address list leak fixed
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
- abstract public class PostfixTemplateTestCase extends LightPlatformCodeInsightFixtureTestCase {
+ abstract public class PostfixTemplateTestCase extends LightCodeInsightFixtureTestCase {
protected void doTest ( ) {
myFixture . configureByFile ( getTestName ( true ) + STRING0 ) ;
myFixture . type ( STRING1 ) ;
myFixture . checkResultByFile ( getTestName ( true ) + STRING2 , true ) ;
}
+
+ @ override
+ protected void setUp ( ) throws Exception {
+ super . setUp ( ) ;
+
+ myFixture . addClass ( STRING3 +
+ STRING4 +
+ STRING5 +
+ STRING6 ) ;
+ }
}
|
Add stub of Boolean class to environment
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
add Beta disclaimer
|
<nb> public abstract class OperationThread extends HazelcastManagedThread {
private final ILogger logger ;
private volatile boolean shutdown ;
+ SINGLE
+ SINGLE
private OperationHandler currentOperationHandler ;
public OperationThread ( String name , int threadId , ScheduleQueue scheduleQueue ,
|
Improved doc in operation thread
|
<nb> abstract class IntToIntBtree {
int usedPercent = ( int ) ( ( count * NUMBER0 ) / leafNodesCapacity ) ;
int usedPercent2 = ( int ) ( ( count * NUMBER0 ) / leafNodesCapacity2 ) ;
IOStatistics . dump ( STRING0 + pagesCount + STRING1 + height + STRING2 + movedMembersCount +
- STRING3 + maxStepsSearchedInHash + STRING4 + ( totalHashStepsSearched / hashSearchRequests ) +
+ STRING3 + maxStepsSearchedInHash + STRING4 + ( hashSearchRequests != NUMBER1 ? totalHashStepsSearched / hashSearchRequests : NUMBER1 ) +
STRING5 + usedPercent + STRING6 + usedPercent2 + STRING7 ) ;
}
|
fixed int division by zero when printing statistics
|
<nb> public class DeleteResponse extends ActionResponse {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
public boolean isFound ( ) {
return found ;
|
Fix javadocs for DeleteResponse isFound
|
<nb> public class UltimateRecyclerView extends FrameLayout {
int totalItemCount = layoutManager . getItemCount ( ) ;
SINGLE
if ( layoutManagerType == null ) {
- if ( layoutManager instanceof LinearLayoutManager ) {
+ if ( layoutManager instanceof GridLayoutManager ) {
+ layoutManagerType = LAYOUT_MANAGER_TYPE . GRID ;
+ } else if ( layoutManager instanceof LinearLayoutManager ) {
layoutManagerType = LAYOUT_MANAGER_TYPE . LINEAR ;
} else if ( layoutManager instanceof StaggeredGridLayoutManager ) {
layoutManagerType = LAYOUT_MANAGER_TYPE . STAGGERED_GRID ;
<nb> public class UltimateRecyclerView extends FrameLayout {
switch ( layoutManagerType ) {
case LINEAR :
+ case GRID :
lastVisibleItemPosition = ( ( LinearLayoutManager ) layoutManager ) . findLastVisibleItemPosition ( ) ;
break ;
case STAGGERED_GRID :
|
distinguish GridLayoutManager from LinearLayoutManager
|
<nb> public class AppLog {
PackageManager packageManager = context . getPackageManager ( ) ;
PackageInfo pkInfo = PackageUtils . getPackageInfo ( context ) ;
- ApplicationInfo applicationInfo = pkInfo != null ? pkInfo . applicationInfo : null ;
+ ApplicationInfo applicationInfo = pkInfo != null ? pkInfo . applicationInfo : null ;
String appName ;
if ( applicationInfo != null && packageManager . getApplicationLabel ( applicationInfo ) != null ) {
appName = packageManager . getApplicationLabel ( applicationInfo ) . toString ( ) ;
<nb> public class AppLog {
PackageManager packageManager = context . getPackageManager ( ) ;
PackageInfo pkInfo = PackageUtils . getPackageInfo ( context ) ;
- ApplicationInfo applicationInfo = pkInfo != null ? pkInfo . applicationInfo : null ;
+ ApplicationInfo applicationInfo = pkInfo != null ? pkInfo . applicationInfo : null ;
String appName ;
if ( applicationInfo != null && packageManager . getApplicationLabel ( applicationInfo ) != null ) {
appName = packageManager . getApplicationLabel ( applicationInfo ) . toString ( ) ;
|
Remove extra whitespace
|
<nb> public class ParserATNSimulator extends ATNSimulator {
succeeded . add ( c ) ;
}
}
- return new Pair ( succeeded , failed ) ;
+ return new Pair < ATNConfigSet , ATNConfigSet > ( succeeded , failed ) ;
}
COMMENT
|
Fix build warning due to use of generics
|
<nb> public class Gdx2DPixmap implements Disposable {
format = ( int ) nativeData [ NUMBER0 ] ;
}
- public Gdx2DPixmap ( int width , int height , int format ) throws IllegalArgumentException {
+ COMMENT
+ public Gdx2DPixmap ( int width , int height , int format ) throws GdxRuntimeException {
pixelPtr = newPixmap ( nativeData , width , height , format ) ;
- if ( pixelPtr == null ) throw new IllegalArgumentException ( STRING0 ) ;
+ if ( pixelPtr == null ) throw new GdxRuntimeException ( STRING0 ) ;
this . basePtr = nativeData [ NUMBER1 ] ;
this . width = ( int ) nativeData [ NUMBER2 ] ;
|
Throw better exception if allocation failed
|
<nb> public class GELFProcessor {
if ( ! lm . isComplete ( ) ) {
incompleteMessages . mark ( ) ;
LOG . debug ( STRING0 ) ;
+ return ;
}
SINGLE
|
you better not handle incomplete messages
|
<nb> public class Wallet extends BaseTaggableObject implements Serializable , BlockCha
for ( int i = NUMBER0 ; i < numInputs ; i ++ ) {
TransactionInput txIn = tx . getInput ( i ) ;
if ( txIn . getConnectedOutput ( ) == null ) {
- log . warn ( STRING0 , i ) ;
+ SINGLE
continue ;
}
|
Suppress noisy log line that is duplicated by LocalTransactionSigner
|
<nb> public class GenerateSourcesMojo extends AbstractAndroidMojo
}
generateBuildConfigForPackage ( packageName ) ;
- SINGLE
- SINGLE
- for ( Artifact artifact : getTransitiveDependencyArtifacts ( APKLIB , AAR ) )
+ SINGLE
+ for ( Artifact artifact : getTransitiveDependencyArtifacts ( APKLIB ) )
{
final File manifest = new File ( getUnpackedLibFolder ( artifact ) , STRING0 ) ;
final String depPackageName = extractPackageNameFromAndroidManifest ( manifest ) ;
<nb> public class AarMojo extends AbstractAndroidMojo
COMMENT
COMMENT
@ pullparameter
- private String [ ] classesJarExcludes = new String [ ] { STRING1 , STRING2 , STRING3 } ;
+ private String [ ] classesJarExcludes = new String [ ] { STRING1 , STRING2 } ;
private List < String > sourceFolders = new ArrayList < String > ( ) ;
|
Include BuildConfig in the aar
|
<nb> class SingleEntityStoreFromBlocking < T > implements SingleEntityStore < T > {
@ override
public Transaction transaction ( ) {
- return null ;
+ return delegate . transaction ( ) ;
}
@ override
|
Fix transaction returning null
|
<nb> public class Config {
return instance ;
}
- public QueueConfig getQConfig ( final String name ) {
+ public QueueConfig getQueueConfig ( final String name ) {
final Set < String > qNames = mapQueueConfigs . keySet ( ) ;
for ( final String pattern : qNames ) {
if ( nameMatches ( name , pattern ) ) {
<nb> class BlockingQueueManager extends BaseManager {
final long maxAge ;
public Q ( String name ) {
- QueueConfig qconfig = Config . get ( ) . getQConfig ( name . substring ( NUMBER0 ) ) ;
+ QueueConfig qconfig = Config . get ( ) . getQueueConfig ( name . substring ( NUMBER0 ) ) ;
maxSizePerJVM = ( qconfig . getMaxSizePerJVM ( ) == NUMBER1 ) ? Integer . MAX_VALUE : qconfig . getMaxSizePerJVM ( ) ;
maxAge = ( qconfig . getTimeToLiveSeconds ( ) == NUMBER1 ) ? Long . MAX_VALUE : qconfig . getTimeToLiveSeconds ( ) * NUMBER2 ;
log ( name + STRING0 + maxSizePerJVM ) ;
|
Renamed getQConfig to getQueueConfig
|
<nb> public class OConcurrentModificationException extends ONeedRetryException {
sb . append ( STRING0 ) ;
sb . append ( rid ) ;
sb . append ( STRING1 ) ;
- sb . append ( operation . toLowerCase ( ) . substring ( operation . length ( ) - NUMBER0 ) ) ;
+ sb . append ( operation . toLowerCase ( ) . substring ( NUMBER1 , operation . length ( ) - NUMBER0 ) ) ;
sb . append ( STRING2 ) ;
sb . append ( databaseVersion ) ;
sb . append ( STRING3 ) ;
|
fixed type in exception
|
<nb> public class GlassFishRequestUpgradeStrategy extends AbstractStandardUpgradeStra
RequestContext wsRequest = RequestContext . Builder . create ( ) .
requestURI ( URI . create ( wsApp . getPath ( ) ) ) . requestPath ( wsApp . getPath ( ) ) .
+ userPrincipal ( request . getUserPrincipal ( ) ) .
connection ( connection ) . secure ( request . isSecure ( ) ) . build ( ) ;
for ( String header : headers . keySet ( ) ) {
|
Add principal in GlassfishRequestUpgradeStrategy
|
<nb> public class Launcher {
}
protected void initExtensions ( ) {
- String tmp = getConfigValue ( STRING0 , STRING1 ) . toString ( ) ;
+ String tmp = getConfigValue ( STRING0 , STRING2 ) . toString ( ) ;
String [ ] extensions = StringUtils . split ( tmp , STRING3 ) ;
for ( String ext : extensions ) {
|
removed dependency of zend ext
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fix wrong import
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class LookupCellRenderer implements ListCellRenderer {
name = PsiUtilBase . getName ( element ) ;
}
}
- else if ( o instanceof XmlElementDescriptor ) {
- name = ( ( XmlElementDescriptor ) o ) . getDefaultName ( ) ;
- }
else if ( o instanceof PsiMetaData ) {
name = ( ( PsiMetaData ) o ) . getName ( ) ;
}
|
delete unnecessary code correct qualified name will be passed to this place through PresentableLookupValue
|
<nb> public class ExpressionInterpreter
return handle . invokeWithArguments ( argumentValues ) ;
}
catch ( Throwable throwable ) {
- Throwables . propagateIfInstanceOf ( throwable , RuntimeException . class ) ;
- Throwables . propagateIfInstanceOf ( throwable , Error . class ) ;
- throw new RuntimeException ( throwable . getMessage ( ) , throwable ) ;
+ if ( throwable instanceof InterruptedException ) {
+ Thread . currentThread ( ) . interrupt ( ) ;
+ }
+ throw Throwables . propagate ( throwable ) ;
}
}
|
Handle InterruptedException in ExpressionInterpreter
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class HttpConfiguration extends BaseActualServer < HttpResponseSet
}
private HttpResponseSetting requestByHttpMethod ( final HttpMethod method , final RequestMatcher matcher ) {
- return request ( and ( by ( method ( method . name ( ) ) ) , matcher ) ) ;
+ return request ( and ( by ( method ( method ) ) , matcher ) ) ;
}
@ override
|
implemented http configuration with http method
|
<nb> public class MimeUtility
return result ;
}
}
+
+ }
+ catch ( OutOfMemoryError oom )
+ {
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ Log . e ( K9 . LOG_TAG , STRING0 + oom . toString ( ) ) ;
}
catch ( Exception e )
{
|
Actually catch an OOM in getTextFromPart
|
<nb> public class GDataImporter implements UrlImporter {
} else {
row . cells . add ( null ) ;
}
- project . rows . add ( row ) ;
- values = getTableRow ( scanner ) ;
}
+ project . rows . add ( row ) ;
+ values = getTableRow ( scanner ) ;
}
}
|
Fix bug causing Fusion Table rows to get imported multiple times
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.