diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , I , IPK , T725 , SINGLE assertEquals ( NUMBER0 , create ( ) . selectFrom ( TTriggers ( ) ) . fetch ( ) . size ( ) ) ; - assertEquals ( ++ ID , ( int ) create ( ) . selectFrom ( TTriggers ( ) ) . fetchOne ( TTriggers_ID_GENERATED ( ) ) ) ; + + SINGLE + ID = create ( ) . selectFrom ( TTriggers ( ) ) . fetchOne ( TTriggers_ID_GENERATED ( ) ) ; assertEquals ( ID , ( int ) create ( ) . selectFrom ( TTriggers ( ) ) . fetchOne ( TTriggers_ID ( ) ) ) ; assertEquals ( NUMBER1 * ID , ( int ) create ( ) . selectFrom ( TTriggers ( ) ) . fetchOne ( TTriggers_COUNTER ( ) ) ) ;
Fixed broken test that assumed that no other test would access
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; COMMENT abstract class CharArray implements CharSequenceBackedByArray , Dumpable { private static final Logger LOG = Logger . getInstance ( STRING0 + CharArray . class . getName ( ) ) ; + private static final boolean CHECK = ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ; @ suppresswarnings ( STRING1 ) private static final boolean DISABLE_DEFERRED_PROCESSING = Boolean . getBoolean ( STRING2 ) ; <nb> abstract class CharArray implements CharSequenceBackedByArray , Dumpable { } private void assertConsistency ( ) { + if ( ! CHECK ) return ; if ( isDeferredChangeMode ( ) ) { assert myOriginalSequence == null ; }
disable expensive checks in production
<nb> package NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class VCubDataSource extends GenericXmlBikeRentalDataSource { String nbVelos = attributes . get ( STRING0 ) ; if ( nbVelos != null ) brstation . bikesAvailable = Integer . parseInt ( nbVelos ) ; + @ suppresswarnings ( STRING1 ) + String type = attributes . get ( STRING2 ) ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + brstation . networks = new HashSet < String > ( ) ; + brstation . networks . add ( STRING3 ) ; + brstation . networks . add ( STRING4 ) ; return brstation ; } }
Add compatible networks to VCUB bike share API
<nb> import NAMESPACE ; import NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT public final class NettyClientBossPoolBuilder { <nb> import NAMESPACE ; import NAMESPACE ; COMMENT - COMMENT + COMMENT COMMENT COMMENT public final class NettyServerBossPoolBuilder {
Fixed some typos in camel netty java doc
<nb> public class GeneralCommandLine implements UserDataHolder { commands . add ( exeName ) ; } else if ( myExePath != null ) { - commands . add ( FileUtil . toSystemDependentName ( myExePath ) ) ; + commands . add ( myExePath ) ; } else { commands . add ( STRING0 ) ;
It shouldn t set OS dependent path
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class XBluetoothAdapter extends XHook { String methodName = param . method . getName ( ) ; if ( methodName . equals ( STRING0 ) ) param . setResult ( XRestriction . cDefacedMac ) ; - else if ( methodName . equals ( STRING1 ) ) { - @ suppresswarnings ( STRING2 ) - Set < BluetoothDevice > devices = ( Set < BluetoothDevice > ) param . getResult ( ) ; - devices . clear ( ) ; - param . setResult ( devices ) ; - } else + else if ( methodName . equals ( STRING1 ) ) + param . setResult ( new HashSet < BluetoothDevice > ( ) ) ; + else XUtil . log ( this , Log . WARN , STRING3 + methodName ) ; } }
Fix bluetooth bonded devices
<nb> public class XaLogicalLog public synchronized void close ( ) throws IOException { + if ( fileChannel == null || ! fileChannel . isOpen ( ) ) + { + log . info ( STRING0 + fileName + STRING1 ) ; + return ; + } long endPosition = writeBuffer . getFileChannelPosition ( ) ; if ( xidIdentMap . size ( ) > NUMBER0 ) {
Fixed problem with multiple calls to close
<nb> import NAMESPACE ; public class StringToolsTest extends TestCase { public void testAssureSet ( ) { - - fail ( STRING0 ) ; - String s = STRING1 ; try { StringTools . assureSet ( s , STRING2 ) ;
revert faked exception for testing CI
<nb> public class InlineToAnonymousClassTest extends LightCodeInsightTestCase { doTestNoInline ( STRING0 ) ; } - public void testNoInlineWithSubclasses ( ) throws Exception { - doTestNoInline ( STRING1 ) ; - } - public void testNoInlineMultipleInterfaces ( ) throws Exception { doTestNoInline ( STRING2 ) ; }
remove check on multiple subclasses from inline to anonymous
<nb> public class BinaryInspector { BinaryInspector in = new BinaryInspector ( ) ; in . inspector ( args ) ; SINGLE - in . inspector ( new String [ ] { + COMMENT STRING0 , SINGLE SINGLE - STRING1 } ) ; + COMMENT } private void printToFile ( String s ) throws IOException {
Fix binary inspector
<nb> public class TupleAnalyzer for ( int i = NUMBER0 ; i < descriptor . getVisibleFields ( ) . size ( ) ; i ++ ) { Type outputFieldType = outputDescriptor . getFieldByIndex ( i ) . getType ( ) ; Type descFieldType = descriptor . getFieldByIndex ( i ) . getType ( ) ; - if ( outputFieldType != descFieldType ) { + if ( ! outputFieldType . equals ( descFieldType ) ) { throw new SemanticException ( TYPE_MISMATCH , node , STRING0 , <nb> public abstract class AbstractTestQueries } @ test + public void testUnionArray ( ) + throws Exception + { + assertQuery ( STRING1 , STRING2 ) ; + } + + @ test public void testChainedUnionsWithOrder ( ) throws Exception {
Fix comparison of types in analysis of UNION
<nb> public class TemplateBuilderImpl implements TemplateBuilder { SINGLE for ( RangeMarker element : myElements ) { - myDocument . deleteString ( element . getStartOffset ( ) , element . getEndOffset ( ) ) ; + if ( element != myEndElement ) { + myDocument . deleteString ( element . getStartOffset ( ) , element . getEndOffset ( ) ) ; + } } return template ;
inline template should not cut END variable otherwise we loose some text and can get AIOOBE when counting range markers
<nb> public abstract class AbstractHadoopJob extends AbstractJob { private final Props _props ; private RunningJob _runningJob ; + private final static String voldemortLibPath = STRING0 ; + + private final static String hadoopLibPath = STRING1 ; + public AbstractHadoopJob ( String name , Props props ) { super ( name ) ; this . _props = props ; <nb> public abstract class AbstractHadoopJob extends AbstractJob { SINGLE SINGLE - addToDistributedCache ( STRING0 , conf ) ; + addToDistributedCache ( voldemortLibPath , conf ) ; - String hadoopCacheJarDir = _props . getString ( STRING1 , null ) ; boolean isAddFiles = _props . getBoolean ( STRING2 , false ) ; - if ( hadoopCacheJarDir != null && isAddFiles ) { - addToDistributedCache ( STRING1 , conf ) ; + if ( isAddFiles ) { + addToDistributedCache ( hadoopLibPath , conf ) ; } SINGLE
Exposed property names as constants
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; public class JavaObjectDeserializer implements ObjectDeserializer {
remove unused import
<nb> package NAMESPACE ; COMMENT public abstract class GeometryGroupNode extends Node { - protected static int getGeometryStartIndex ( Geometry geom ) { + public static int getGeometryStartIndex ( Geometry geom ) { if ( geom . startIndex == - NUMBER0 ) { throw new AssertionError ( ) ; }
Made GeometryGroupNode getGeometryStartIndex public
<nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager @ override public ActionMode startActionModeForChild ( View originalView , ActionMode . Callback callback , int type ) { - if ( ( mGroupFlags & FLAG_START_ACTION_MODE_FOR_CHILD_IS_NOT_TYPED ) == NUMBER0 ) { + if ( ( mGroupFlags & FLAG_START_ACTION_MODE_FOR_CHILD_IS_NOT_TYPED ) == NUMBER0 + && type == ActionMode . TYPE_PRIMARY ) { ActionMode mode ; try { mGroupFlags |= FLAG_START_ACTION_MODE_FOR_CHILD_IS_TYPED ;
Don t take the compatibility path for non primary ActionModes
<nb> public class WordVectorSerializer { iter . nextLine ( ) ; } - List < INDArray > arrays = new ArrayList < > ( ) ; while ( iter . hasNext ( ) ) { + line = iter . nextLine ( ) ; String [ ] split = line . split ( STRING0 ) ; String word = split [ NUMBER0 ] ; VocabWord word1 = new VocabWord ( FLOAT0 , word ) ;
Add missing nextLine
<nb> package NAMESPACE ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + + SINGLE public interface PortableAdapter < T > extends Portable { - Object toObject ( ) ; }
Added simple definition over not yet implemented PortableAdapter interface
<nb> public abstract class catelogLinear < adapter extends easyRegularAdapter , binder e protected abstract void onClickItem ( final String route ) ; + protected abstract void onClickItem ( final long route_id ) ; + protected abstract int getColumn ( ) ; protected abstract adapter getAdatperWithdata ( ) ;
add click item long
<nb> public final class LeaderInquireClient { public static synchronized LeaderInquireClient getClient ( String zookeeperAddress , String leaderPath ) { String key = zookeeperAddress + leaderPath ; + LOG . info ( STRING0 + zookeeperAddress ) ; if ( ! sCreatedClients . containsKey ( key ) ) { sCreatedClients . put ( key , new LeaderInquireClient ( zookeeperAddress , leaderPath ) ) ; } <nb> public final class LeaderInquireClient { mZookeeperAddress = zookeeperAddress ; mLeaderPath = leaderPath ; - LOG . info ( STRING1 + mZookeeperAddress ) ; + LOG . info ( STRING2 + mZookeeperAddress ) ; mCLient = CuratorFrameworkFactory . newClient ( mZookeeperAddress , new ExponentialBackoffRetry ( Constants . SECOND_MS , NUMBER0 ) ) ;
Add zookeeper info in info logs
<nb> public class DefaultCacheAccess implements CacheAccess { } } - private void endLongRunningOperation ( ) { - } - public void longRunningOperation ( String operationDisplayName , final Runnable action ) { longRunningOperation ( operationDisplayName , new Factory < Object > ( ) { public Object create ( ) {
Remove unused method
<nb> public class Androlib { } public void buildPackage ( ) throws AndrolibException { - File distDir = new File ( STRING0 ) ; - if ( ! distDir . exists ( ) ) { - distDir . mkdirs ( ) ; + File outApk = new File ( STRING1 ) ; + if ( outApk . exists ( ) ) { + outApk . delete ( ) ; + } else { + File outDir = outApk . getParentFile ( ) ; + if ( ! outDir . exists ( ) ) { + outDir . mkdirs ( ) ; + } } - mAndRes . aaptPackage ( new File ( STRING1 ) , null , null , + mAndRes . aaptPackage ( outApk , null , null , new File ( STRING2 ) , false ) ; } }
deleting out apk file before packaging
<nb> public class AccountModule extends AbstractModule { private void installAccountService ( ) { bind ( AccountService . class ) . to ( DefaultAccountService . class ) . asEagerSingleton ( ) ; } - + protected void installTestModules ( ) { install ( new ClockModule ( ) ) ; } <nb> public class AccountModule extends AbstractModule { installAccountDao ( ) ; installAccountService ( ) ; installAccountUserApi ( ) ; - installTestModules ( ) ; + installTestModules ( ) ; } } <nb> public class AccountModuleWithMocks extends AccountModule { bind ( MockAccountDao . class ) . asEagerSingleton ( ) ; bind ( AccountDao . class ) . to ( MockAccountDao . class ) ; } - + @ override protected void installTestModules ( ) { install ( new MockClockModule ( ) ) ;
Removed extra space before
<nb> public class SocketSslEchoTest extends AbstractSocketTest { CLIENT_CONTEXT = clientContext ; } + @ suppresswarnings ( STRING0 ) + private BogusSslContextFactory ( ) { } + public static SSLContext getServerContext ( ) { return SERVER_CONTEXT ; } <nb> public class SocketSslEchoTest extends AbstractSocketTest { public static char [ ] getKeyStorePassword ( ) { return STRING1 . toCharArray ( ) ; } + + @ suppresswarnings ( STRING0 ) + private BogusKeyStore ( ) { } } } <nb> package NAMESPACE ; import NAMESPACE ; + @ suppresswarnings ( STRING0 ) public class SctpStandardSocketOptions { static { UnsupportedOperatingSystemException . raise ( ) ;
Suppress false positives related with utility class inspections
<nb> public class HttpChannelState _async = null ; return Action . ASYNC_EXPIRED ; case STARTED : - SINGLE - LOG . warn ( STRING0 , new IllegalStateException ( this . getStatusString ( ) ) ) ; + if ( DEBUG ) + LOG . warn ( STRING0 , new IllegalStateException ( this . getStatusString ( ) ) ) ; return Action . WAIT ; } }
Avoid SPDY double dispatch
<nb> public interface TypeWriter < T > { @ override public AnnotationVisitor visitTypeAnnotation ( int typeReference , TypePath typePath , String descriptor , boolean visible ) { - return annotationRetention . isEnabled ( ) + return annotationRetention . isEnabled ( ) || TypeReference . newTypeReference ( TypeReference . METHOD_RECEIVER ) . getValue ( ) == typeReference ? super . visitTypeAnnotation ( typeReference , typePath , descriptor , visible ) : IGNORE_ANNOTATION ; } <nb> public interface TypeWriter < T > { @ override public AnnotationVisitor visitTypeAnnotation ( int typeReference , TypePath typePath , String descriptor , boolean visible ) { - return annotationRetention . isEnabled ( ) + return annotationRetention . isEnabled ( ) || TypeReference . newTypeReference ( TypeReference . METHOD_RECEIVER ) . getValue ( ) == typeReference ? super . visitTypeAnnotation ( typeReference , typePath , descriptor , visible ) : IGNORE_ANNOTATION ; }
Added exception for receiver types on type writer
<nb> import NAMESPACE ; public class TestLoadGraph { private static final String INPUT_FILE = STRING0 ; - private static final String DBURL = STRING1 ; + private static final String DBURL = STRING2 ; private String inputFile = INPUT_FILE ; private String dbURL = DBURL ;
Renamed tinkerpop database GratefulDeadConcerts
<nb> public class LzoBinaryBlockRecordReader < M , W extends BinaryWritable < M > > LOG . debug ( STRING0 + atFirstRecord ) ; updatePosition = ! atFirstRecord ; SINGLE - SINGLE + SINGLE + SINGLE reader_ . parseNextBlock ( ! atFirstRecord ) ; } <nb> public class LzoBinaryBlockRecordReader < M , W extends BinaryWritable < M > > while ( true ) { SINGLE if ( pos_ > end_ ) { reader_ . markNoMoreNewBlocks ( ) ; + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE + SINGLE } value_ . set ( null ) ;
add a comment about pos end
<nb> public class SimpleRiverMouth implements RiverMouth { return ; } - logger . info ( STRING0 ) ; if ( client . admin ( ) . indices ( ) . prepareExists ( index ) . execute ( ) . actionGet ( ) . isExists ( ) ) { if ( Strings . hasLength ( settings ) ) { client . admin ( ) . indices ( ) . prepareUpdateSettings ( index ) . setSettings ( settings ) . execute ( ) . actionGet ( ) ;
remove unnecessary logging
<nb> public class ClassCompiler { String triple = config . getTriple ( ) ; Target target = Target . lookupTarget ( triple ) ; try ( TargetMachine targetMachine = target . createTargetMachine ( triple , - config . getArch ( ) . getLlvmCpu ( ) , null , config . isDebug ( ) ? CodeGenOptLevel . CodeGenLevelNone : null , null , null ) ) { + config . getArch ( ) . getLlvmCpu ( ) , null , config . isDebug ( ) ? CodeGenOptLevel . CodeGenLevelDefault : null , null , null ) ) { targetMachine . setAsmVerbosityDefault ( true ) ; targetMachine . setFunctionSections ( true ) ; targetMachine . setDataSections ( true ) ;
Using default codegen optimization level again
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; + public class RoundRobinLoadBalancer implements ExecutionLoadBalancer { - long count = NUMBER0 ; + final AtomicLong count = new AtomicLong ( ) ; public Member getTarget ( HazelcastInstance hazelcastInstance ) { Object [ ] memberObjects = hazelcastInstance . getCluster ( ) . getMembers ( ) . toArray ( ) ; - return ( MemberImpl ) memberObjects [ ( ( int ) ( count ++ % memberObjects . length ) ) ] ; + return ( MemberImpl ) memberObjects [ ( ( int ) ( Math . abs ( count . incrementAndGet ( ) ) % memberObjects . length ) ) ] ; } }
Fixed RoundRobinLoadBalancer count concurrency issue
<nb> public abstract class ContentProvider implements ComponentCallbacks2 { SINGLE SINGLE SINGLE - return new MatrixCursor ( projection , NUMBER0 ) ; + if ( projection != null ) { + return new MatrixCursor ( projection , NUMBER0 ) ; + } + + SINGLE + SINGLE + SINGLE + SINGLE + Cursor cursor = ContentProvider . this . query ( uri , projection , selection , + selectionArgs , sortOrder , CancellationSignal . fromTransport ( + cancellationSignal ) ) ; + + SINGLE + final int columnCount = cursor . getCount ( ) ; + String [ ] allColumns = new String [ columnCount ] ; + for ( int i = NUMBER0 ; i < columnCount ; i ++ ) { + allColumns [ i ] = cursor . getColumnName ( i ) ; + } + + SINGLE + return new MatrixCursor ( allColumns , NUMBER0 ) ; } final String original = setCallingPackage ( callingPkg ) ; try {
Handle null projection properly if provider app op is not enabled
<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 ; <nb> public class ScratchFileServiceImpl extends ScratchFileService implements Persis @ nullable @ override public SearchScope getAdditionalUseScope ( @ notnull PsiElement element ) { + SearchScope useScope = element . getUseScope ( ) ; + if ( useScope instanceof LocalSearchScope ) return null ; return buildScratchesSearchScope ( ) ; } }
do not enlarge use scope for local scoped elements
<nb> public abstract class AbsListView extends AdapterView < ListAdapter > implements Te treeObserver . addOnGlobalLayoutListener ( this ) ; } } + + if ( mAdapter != null && mDataSetObserver == null ) { + mDataSetObserver = new AdapterDataSetObserver ( ) ; + mAdapter . registerDataSetObserver ( mDataSetObserver ) ; + } } @ override <nb> public abstract class AbsListView extends AdapterView < ListAdapter > implements Te mGlobalLayoutListenerAddedFilter = false ; } } + + if ( mAdapter != null ) { + mAdapter . unregisterDataSetObserver ( mDataSetObserver ) ; + mDataSetObserver = null ; + } } @ override <nb> public class ListView extends AbsListView { COMMENT @ override public void setAdapter ( ListAdapter adapter ) { - if ( null != mAdapter ) { + if ( mAdapter != null ) { mAdapter . unregisterDataSetObserver ( mDataSetObserver ) ; }
Prevent possible leak in AbsListViews
<nb> public abstract class Block implements RenderableObject { glDisable ( GL11 . GL_TEXTURE_2D ) ; } + + public void update ( ) { + SINGLE + } }
Added missing implementation
<nb> public final class ConfigurationHelper { SINGLE } - public static interface ParameterSetter { + public interface ParameterSetter { < T > void set ( EndpointConfiguration config , String name , T value ) ; }
Fixed a CS error of camel core
<nb> public class KafkaStreamingPartitionAssignorTest { PartitionAssignor . Subscription subscription = partitionAssignor . subscription ( Utils . mkSet ( STRING0 , STRING1 ) ) ; + Collections . sort ( subscription . topics ( ) ) ; assertEquals ( Utils . mkList ( STRING0 , STRING1 ) , subscription . topics ( ) ) ; Set < TaskId > standbyTasks = new HashSet < > ( cachedTasks ) ;
Fix KafkaStreamingPartitionAssignorTest testSubscription
<nb> public class XmppConnection implements Runnable { public void resetEverything ( ) { resetStreamId ( ) ; clearIqCallbacks ( ) ; + mStanzaQueue . clear ( ) ; synchronized ( this . disco ) { disco . clear ( ) ; }
reset stanza queue when resetting xmppconnection
<nb> public final class Config { public static final boolean EXTENDED_SM_LOGGING = true ; SINGLE public static final boolean RESET_ATTEMPT_COUNT_ON_NETWORK_CHANGE = true ; SINGLE - public static final boolean ENCRYPT_ON_HTTP_UPLOADED = true ; + public static final boolean ENCRYPT_ON_HTTP_UPLOADED = false ; public static final long MILLISECONDS_IN_DAY = NUMBER0 * NUMBER1 * NUMBER1 * NUMBER2 ; public static final long MAM_MAX_CATCHUP = MILLISECONDS_IN_DAY / NUMBER3 ;
disable automatic aes encryption for the time being
<nb> public class FileNameGenerator { for ( int i = NUMBER0 ; i < string . length ( ) ; i ++ ) { char c = string . charAt ( i ) ; if ( Arrays . binarySearch ( ILLEGAL_CHARACTERS , c ) < NUMBER0 ) { - builder . append ( c ) ; + builder . append ( c ) . replaceFirst ( STRING0 , STRING1 ) ; } } return builder . toString ( ) ;
Remove trailing spaces in filenames
<nb> package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class SenderServiceStarter { intent . putExtra ( SenderService . EXTRA_ONLY_SEND_SILENT_REPORTS , onlySendSilentReports ) ; intent . putExtra ( SenderService . EXTRA_APPROVE_REPORTS_FIRST , approveReportsFirst ) ; - intent . putExtra ( SenderService . EXTRA_REPORT_SENDER_FACTORIES , new ArrayList ( Arrays . asList ( config . reportSenderFactoryClasses ( ) ) ) ) ; + intent . putExtra ( SenderService . EXTRA_REPORT_SENDER_FACTORIES , new ArrayList < Class < ? extends ReportSenderFactory > > ( Arrays . asList ( config . reportSenderFactoryClasses ( ) ) ) ) ; intent . putExtra ( SenderService . EXTRA_ACRA_CONFIG , config ) ; context . startService ( intent ) ;
explicit type on ArrayList remove unused import
<nb> public class MetricRegistry implements MetricSet { public static String name ( String name , String . . . names ) { final StringBuilder builder = new StringBuilder ( ) ; append ( builder , name ) ; - for ( String s : names ) { - append ( builder , s ) ; + if ( names != null ) { + for ( String s : names ) { + append ( builder , s ) ; + } } return builder . toString ( ) ; }
avoid NullPointerException when second argument to name function of MetricRegistry class is null
<nb> package NAMESPACE ; - import static NAMESPACE ; import static NAMESPACE ; import NAMESPACE ;
replace varargs type api Object
<nb> public class TaskStackBuilder implements Iterable < Intent > { COMMENT COMMENT public PendingIntent getPendingIntent ( int requestCode , int flags ) { + if ( mIntents . isEmpty ( ) ) { + throw new IllegalStateException ( + STRING0 ) ; + } + Intent [ ] intents = mIntents . toArray ( new Intent [ mIntents . size ( ) ] ) ; + intents [ NUMBER0 ] . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK | + Intent . FLAG_ACTIVITY_CLEAR_TASK | + Intent . FLAG_ACTIVITY_TASK_ON_HOME ) ; return PendingIntent . getActivities ( mSourceContext , requestCode , intents , flags ) ; } }
Fix a bug in TaskStackBuilder where task stack PendingIntents would
<nb> public class TestLogger implements LoggerExtension , PeerExtension Stream . of ( sequenceDiagram . toArray ( ) ) . map ( o - > ( String ) o ) ) , Stream . of ( STRING0 ) ) . collect ( Collectors . toList ( ) ) ) ; - out . println ( STRING1 ) ; out . println ( seqUml . toUri ( ) ) ; } catch ( Exception ex ) <nb> public class TestLogger implements LoggerExtension , PeerExtension } else { - out . println ( STRING2 ) ; + out . println ( STRING3 ) ; } }
Adding some context when dumMessages is called
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; public abstract class DebuggerUtilsEx extends DebuggerUtils { private static final Logger LOG = Logger . getInstance ( STRING0 ) ; - private static final int MAX_LABEL_SIZE = NUMBER0 ; - COMMENT COMMENT COMMENT <nb> public abstract class DebuggerUtilsEx extends DebuggerUtils { } public static String truncateString ( final String str ) { - if ( str . length ( ) > MAX_LABEL_SIZE ) { - return str . substring ( NUMBER1 , MAX_LABEL_SIZE ) + STRING1 ; + SINGLE + if ( str . length ( ) > XValueNode . MAX_VALUE_LENGTH + NUMBER2 ) { + return str . substring ( NUMBER1 , XValueNode . MAX_VALUE_LENGTH + NUMBER2 ) ; } return str ; }
do not store more than we show for long values in debugger
<nb> public class OpenStreetMapGraphBuilderImpl implements GraphBuilder { if ( intersectionNodes . containsKey ( endNode ) || i == nodes . size ( ) - NUMBER0 - || ( i < nodes . size ( ) - NUMBER0 && nodes . subList ( NUMBER1 , - nodes . size ( ) - NUMBER0 ) . contains ( nodes . get ( i + NUMBER0 ) ) ) ) { + || nodes . subList ( NUMBER1 , i ) . contains ( nodes . get ( i ) ) ) { segmentCoordinates . add ( getCoordinate ( osmEndNode ) ) ; ele = osmEndNode . getTag ( STRING0 ) ; if ( ele != null ) {
correctly split self intersecting ways
<nb> public class IsoChroneSPTRendererAccSampling implements IsoChroneSPTRenderer { sptRequest . setBatch ( true ) ; sptRequest . setRoutingContext ( graphService . getGraph ( sptRequest . getRouterId ( ) ) ) ; final ShortestPathTree spt = sptService . getShortestPathTree ( sptRequest ) ; - sptRequest . cleanup ( ) ; SINGLE long t1 = System . currentTimeMillis ( ) ; <nb> public class IsoChroneSPTRendererAccSampling implements IsoChroneSPTRenderer { isolineBuilder . setDebug ( isoChroneRequest . isIncludeDebugGeometry ( ) ) ; computeInitialPoints ( spt , isolineBuilder , gridSizeMeters * FLOAT0 , V0 , sptRequest . getMaxWalkDistance ( ) ) ; + sptRequest . cleanup ( ) ; long t2 = System . currentTimeMillis ( ) ; List < IsochroneData > isochrones = new ArrayList < IsochroneData > ( ) ;
use generated origin edges in SPT walk
<nb> public class PsiProximityComparator implements Comparator < Object > { if ( contextModule == null ) return null ; - return WeighingService . weigh ( WEIGHER_KEY , element , new ProximityLocation ( context , contextModule , processingContext ) ) ; + return WeighingService . weigh ( WEIGHER_KEY , elementComputable , new ProximityLocation ( context , contextModule , processingContext ) ) ; } }
a better fix for weighers keeping links to all lookup objects use this fix
<nb> public final class Lists { COMMENT COMMENT COMMENT - @ beta @ gwtincompatible ( STRING0 ) public static < E > CopyOnWriteArrayList < E > newCopyOnWriteArrayList ( ) { return new CopyOnWriteArrayList < E > ( ) ; <nb> public final class Lists { COMMENT COMMENT COMMENT - @ beta @ gwtincompatible ( STRING0 ) public static < E > CopyOnWriteArrayList < E > newCopyOnWriteArrayList ( Iterable < ? extends E > elements ) { <nb> public final class Sets { COMMENT COMMENT COMMENT - @ beta @ gwtincompatible ( STRING1 ) public static < E > CopyOnWriteArraySet < E > newCopyOnWriteArraySet ( ) { return new CopyOnWriteArraySet < E > ( ) ; <nb> public final class Sets { COMMENT COMMENT COMMENT - @ beta @ gwtincompatible ( STRING1 ) public static < E > CopyOnWriteArraySet < E > newCopyOnWriteArraySet ( Iterable < ? extends E > elements ) {
Remove Beta from Lists newCopyOnWriteArrayList and Sets newCopyOnWriteArraySet
<nb> public class TouchFeedbackDrawable extends LayerDrawable { if ( mActiveRipplesCount >= MAX_RIPPLES ) { Log . e ( LOG_TAG , STRING0 , new RuntimeException ( ) ) ; + return ; } final Ripple ripple = mTouchedRipples . get ( id ) ;
Prevent new ripples when max reached
<nb> COMMENT package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class DefaultChannelGroup extends AbstractSet < Channel > implements Channel boolean added = map . putIfAbsent ( channel . id ( ) , channel ) == null ; if ( added ) { - channel . addClosureListener ( remover ) ; + channel . closeFuture ( ) . addListener ( remover ) ; } return added ; } <nb> public class DefaultChannelGroup extends AbstractSet < Channel > implements Channel return false ; } - c . removeClosureListener ( remover ) ; + c . closeFuture ( ) . removeListener ( remover ) ; return true ; }
Fix compilation errors
<nb> - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - COMMENT - package NAMESPACE ; import NAMESPACE ;
Removed unnecessary copyright comment in test data
<nb> public abstract class DataAccessTest SINGLE assertNotEquals ( Short . MAX_VALUE / NUMBER0 , da . getShort ( NUMBER1 ) ) ; } + da . close ( ) ; } }
fixing broken tests once again
<nb> import NAMESPACE ; public final class CellInfoLte extends CellInfo implements Parcelable { private static final String LOG_TAG = STRING0 ; - private static final boolean DBG = true ; + private static final boolean DBG = false ; private CellIdentityLte mCellIdentityLte ; private CellSignalStrengthLte mCellSignalStrengthLte ;
Turn off debug in CellInfoLte
<nb> public class TransportStopController extends MenuController { if ( topType == null && type != null && type . isTopType ( ) ) { topType = type ; } - r . desc = rs . getRef ( ) + STRING0 + ( useEnglishNames ? rs . getName ( ) : rs . getEnName ( true ) ) ; + r . desc = rs . getRef ( ) + STRING0 + ( useEnglishNames ? rs . getEnName ( true ) : rs . getName ( ) ) ; r . route = rs ; r . stop = transportStop ; this . routes . add ( r ) ;
Add transport route
<nb> public final class CGIServlet extends HttpServlet { cgiEnv . getEnvironment ( ) , cgiEnv . getWorkingDirectory ( ) , cgiEnv . getParameters ( ) ) ; - SINGLE SINGLE if ( STRING0 . equals ( req . getMethod ( ) ) ) { cgi . setInput ( req . getInputStream ( ) ) ;
Remove statement of the obvious
<nb> public class AtmosphereRequest extends HttpServletRequestWrapper { return this ; } + public AtmosphereRequest contextPath ( String contextPath ) { + b . contextPath = contextPath ; + return this ; + } + private final static class ByteInputStream extends ServletInputStream { private final ByteArrayInputStream bis ;
Add API for contextPath
<nb> class MappedRawLog implements RawLog { for ( int i = NUMBER0 ; i < length ; i += PAGE_LENGTH ) { - buffer . putInt ( i , NUMBER0 ) ; + buffer . put ( i , ( byte ) NUMBER0 ) ; } } }
Java Put a single byte rather than an int for zeroing
<nb> import NAMESPACE ; import NAMESPACE ; public class Runner { - public static Logger logger ; + public static Logger logger = null ; private static final String PATCH_FILE_NAME = STRING0 ; private static final String PATCH_PROPERTIES_ENTRY = STRING1 ; private static final String OLD_BUILD_DESCRIPTION = STRING2 ; <nb> public class Runner { } } - private static void initLogger ( ) { + public final static void initLogger ( ) { + if ( logger == null ) { String tmpDir = System . getProperty ( STRING3 ) ; System . out . println ( STRING4 + tmpDir ) ; SINGLE <nb> public class Runner { logger . addAppender ( update_error ) ; logger . addAppender ( update ) ; logger . setLevel ( Level . ALL ) ; + } } public static void printStackTrace ( Exception e ) {
fixed tests of updater
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> class ResultSetReceiver implements ResultReceiver { @ override public void fail ( @ nonnull Throwable throwable ) { - Messages . sendErrorResponse ( channel , throwable ) ; + Messages . sendErrorResponse ( channel , Exceptions . createSQLActionException ( throwable ) ) ; listener . onFailure ( throwable ) ; }
wrap exceptions on ResultSetReceiver
<nb> package NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> class FunctionExitPointHandler extends HighlightUsagesHandlerBase < PsiElement > { @ override public void computeUsages ( List < PsiElement > targets ) { - if ( myTarget instanceof LeafPsiElement && ( ( LeafPsiElement ) myTarget ) . getElementType ( ) == GoTypes . FUNC ) { - addOccurrence ( myTarget ) ; + if ( myFunction instanceof GoFunctionOrMethodDeclaration ) { + addOccurrence ( ( ( GoFunctionOrMethodDeclaration ) myFunction ) . getFunc ( ) ) ; } new GoRecursiveVisitor ( ) { @ override <nb> public class GoExitPointsHighlightingTest extends GoCodeInsightFixtureTestCase { STRING0 + STRING1 + STRING2 ; - doTest ( text , STRING3 , STRING4 ) ; + doTest ( text , STRING5 , STRING3 , STRING4 ) ; } public void testCaretOnFuncWithReturnAndPanic ( ) {
Highlight func keyword when caret is on return
<nb> public final class MigrationRequestOperation extends BaseMigrationOperation { migrationOperation , destination ) . setTryPauseMillis ( NUMBER0 ) . setReplicaIndex ( getReplicaIndex ( ) ) . build ( ) ; Future future = inv . invoke ( ) ; Boolean result = ( Boolean ) nodeEngine . toObject ( future . get ( timeout , TimeUnit . SECONDS ) ) ; + migrationInfo . doneProcessing ( ) ; responseHandler . sendResponse ( result ) ; } catch ( Throwable e ) { responseHandler . sendResponse ( Boolean . FALSE ) ; <nb> public final class MigrationRequestOperation extends BaseMigrationOperation { getLogger ( ) . warning ( e ) ; success = false ; } finally { - migrationInfo . doneProcessing ( ) ; + SINGLE + migrationInfo . doneProcessing ( ) ; + SINGLE } } else { getLogger ( ) . warning ( STRING0 + migrationInfo ) ;
Fixed a race condition during migration finalization on master node
<nb> public class NotificationStackScrollLayout extends ViewGroup mStackScrollAlgorithm . onExpansionStopped ( ) ; if ( ! mIsExpanded ) { mOwnScrollY = NUMBER0 ; + + SINGLE + getOverlay ( ) . clear ( ) ; } } <nb> public class StackStateAnimator { mHostLayout . getOverlay ( ) . remove ( changingView ) ; } } ) ; + } else if ( event . animationType == + NotificationStackScrollLayout . AnimationEvent . ANIMATION_TYPE_REMOVE_SWIPED_OUT ) { + SINGLE + SINGLE + mHostLayout . getOverlay ( ) . remove ( changingView ) ; } mNewEvents . add ( event ) ; }
Solved notification overlay issue once and for all
<nb> public final class FileSystemMaster extends AbstractMaster { FileDoesNotExistException , InvalidPathException , IOException , AccessControlException { MasterContext . getMasterSource ( ) . incRenamePathOps ( NUMBER0 ) ; long flushCounter = AsyncJournalWriter . INVALID_FLUSH_COUNTER ; + SINGLE try ( InodePathPair inodePathPair = mInodeTree . lockInodePathPair ( srcPath , InodeTree . LockMode . WRITE_PARENT , dstPath , - InodeTree . LockMode . WRITE ) ) { + InodeTree . LockMode . WRITE_PARENT ) ) { LockedInodePath srcInodePath = inodePathPair . getFirst ( ) ; LockedInodePath dstInodePath = inodePathPair . getSecond ( ) ; mPermissionChecker . checkParentPermission ( FileSystemAction . WRITE , srcInodePath ) ;
Fix lock mode in rename
<nb> public class SettingsNavigationActivity extends SettingsBaseActivity { registerListPreference ( settings . ARRIVAL_DISTANCE_FACTOR , screen , arrivalNames , arrivalValues ) ; SINGLE - Float [ ] speedLimitsKm = new Float [ ] { FLOAT0 , FLOAT1 , NUMBER0 f , NUMBER1 f , NUMBER2 f } ; - Float [ ] speedLimitsMiles = new Float [ ] { FLOAT2 , FLOAT0 , FLOAT1 , NUMBER0 f , NUMBER1 f } ; + Float [ ] speedLimitsKm = new Float [ ] { FLOAT3 , FLOAT0 , FLOAT1 , NUMBER0 f , NUMBER1 f , NUMBER2 f } ; + Float [ ] speedLimitsMiles = new Float [ ] { FLOAT3 , FLOAT2 , FLOAT0 , FLOAT1 , NUMBER0 f , NUMBER1 f } ; if ( settings . METRIC_SYSTEM . get ( ) == OsmandSettings . MetricsConstants . KILOMETERS_AND_METERS ) { String [ ] speedNames = new String [ speedLimitsKm . length ] ; for ( int i = NUMBER3 ; i < speedLimitsKm . length ; i ++ ) {
Added zero number speed limit
<nb> public class RenderSessionImpl extends RenderAction < SessionParams > { private void findStatusBar ( RenderResources resources , DisplayMetrics metrics ) { boolean windowFullscreen = getBooleanThemeValue ( resources , - STRING0 , false , ! isThemeAppCompat ( resources ) ) ; + STRING0 , false , true ) ; if ( ! windowFullscreen && ! mWindowIsFloating ) { SINGLE
Fix title bar showing when not required
<nb> public class TexturePacker { writer . write ( STRING0 + left + STRING1 + top + STRING2 ) ; writer . write ( STRING3 + image . getWidth ( ) + STRING1 + image . getHeight ( ) + STRING2 ) ; writer . write ( STRING4 + image . originalWidth + STRING1 + image . originalHeight + STRING2 ) ; - writer . write ( STRING5 + image . offsetX + STRING1 + image . offsetY + STRING2 ) ; + writer . write ( STRING5 + image . offsetX + STRING1 + ( image . originalHeight - image . getHeight ( ) - image . offsetY ) + STRING2 ) ; writer . write ( STRING6 + index + STRING2 ) ; } }
fixed Incorrect offsetY from bottom of original image to non whitespace portion of image
<nb> public class ContactIcqImpl COMMENT public String getPersistentData ( ) { - return STRING0 + getDisplayName ( ) + STRING1 ; + SINGLE + if ( nickName != null ) + return STRING0 + nickName + STRING1 ; + else + return null ; } COMMENT
Fixed exception when retreiving nicknames
<nb> public final class OSSUnderFileSystem extends UnderFileSystem { SINGLE @ override public String getOwner ( String path ) throws IOException { - return null ; + return STRING0 ; } SINGLE @ override public String getGroup ( String path ) throws IOException { - return null ; + return STRING0 ; } SINGLE
Change oss ufs to return empty group owner instead of null
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; COMMENT <nb> public class JBUI { public static class Fonts { public static JBFont label ( ) { - return JBFont . create ( UIManager . getFont ( STRING0 ) ) ; + return JBFont . create ( UIManager . getFont ( STRING0 ) , false ) ; } public static JBFont label ( float size ) {
don t scale system fonts
<nb> public class ViewMessageBodyWriter implements MessageBodyWriter < View < ? > > { configuration . setClassForTemplateLoading ( type , STRING0 ) ; final Template template = configuration . getTemplate ( t . getTemplateName ( ) , detectLocale ( headers ) ) ; - template . process ( t . getModel ( ) , new OutputStreamWriter ( entityStream ) ) ; + template . process ( t . getModel ( ) , new OutputStreamWriter ( entityStream , template . getEncoding ( ) ) ) ; } catch ( TemplateException e ) { throw new ContainerException ( e ) ; } catch ( FileNotFoundException e ) {
Use the template s encoding when rendering it
<nb> public class ORecordId implements ORID { public void fromString ( final String iRecordId ) { if ( ! iRecordId . contains ( SEPARATOR ) ) - throw new IllegalArgumentException ( STRING0 ) ; + throw new IllegalArgumentException ( + STRING1 ) ; final String parts [ ] = iRecordId . split ( SEPARATOR ) ; + + if ( parts . length != NUMBER0 ) + throw new IllegalArgumentException ( + STRING1 ) ; + clusterId = Integer . parseInt ( parts [ NUMBER1 ] ) ; checkClusterLimits ( ) ; clusterPosition = Long . parseLong ( parts [ NUMBER2 ] ) ;
Checked RID format
<nb> COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT - COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class TempBlockMeta extends BlockMetaBase { return CommonUtils . concatPath ( mDir . getDirPath ( ) , mUserId , mBlockId ) ; } + public String getCommitPath ( ) { + return CommonUtils . concatPath ( mDir . getDirPath ( ) , mBlockId ) ; + } + public void setBlockSize ( long newSize ) { mBlockSize = newSize ; }
Add getCommitPath for TempBlockMeta
<nb> final class CompilationSupport { static final ImmutableList < String > LINKER_COVERAGE_FLAGS = ImmutableList . of ( STRING0 , STRING1 ) ; + SINGLE @ visiblefortesting static final ImmutableList < String > CLANG_COVERAGE_FLAGS = - ImmutableList . of ( STRING1 , STRING0 , STRING2 ) ; + ImmutableList . of ( STRING1 , STRING0 ) ; private static final String FRAMEWORK_SUFFIX = STRING3 ;
Remove fprofile dir flag from clang flags
<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 ; + import NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import static NAMESPACE ; import static NAMESPACE ; <nb> public abstract class HibernateStatisticsTestSupport extends HibernateTestSuppor } @ test - @ category ( ProblematicTest . class ) public void testQuery ( ) { final int entityCount = NUMBER0 ; final int queryCount = NUMBER1 ;
removing problematic mark
<nb> public final class Parameters { SINGLE SINGLE parseFailed = true ; - log . warn ( ise . getMessage ( ) ) ; + log . info ( ise . getMessage ( ) ) ; break ; } } catch ( IOException e ) {
Reduce log level for message for hitting parameter count limit from warn to info
<nb> public class WebView extends AbsoluteLayout SINGLE SINGLE SINGLE - private static Boolean sEnforceThreadChecking = false ; + private static volatile boolean sEnforceThreadChecking = false ; COMMENT COMMENT
Fix nit use primative type and make volatile
<nb> public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent } } public void updateCraftingMatrix ( int slot , ItemStack stack ) { - System . out . printf ( STRING0 , slot , stack ) ; craftingSlots . setInventorySlotContents ( slot , stack ) ; updateCraftingResults ( ) ; if ( CoreProxy . proxy . isRenderWorld ( worldObj ) ) { PacketSlotChange packet = new PacketSlotChange ( PacketIds . ADVANCED_WORKBENCH_SETSLOT , xCoord , yCoord , zCoord , slot , stack ) ; CoreProxy . proxy . sendToServer ( packet . getPacket ( ) ) ; - } else { - System . out . printf ( STRING1 , outputSlot ) ; } }
Remove debug code
<nb> import static NAMESPACE COMMENT public class ScriptInputFormat extends FileInputFormat < NullWritable , FaunusVertex > implements Configurable { - SINGLE - private VertexQueryFilter vertexQuery ; private Configuration config ; <nb> import static NAMESPACE COMMENT public class ScriptOutputFormat extends HadoopFileOutputFormat { - SINGLE - @ override public RecordWriter < NullWritable , FaunusVertex > getRecordWriter ( final TaskAttemptContext job ) throws IOException , InterruptedException { return new ScriptRecordWriter ( super . getDataOuputStream ( job ) , DEFAULT_COMPAT . getContextConfiguration ( job ) ) ;
Deleting commented constants
<nb> public final class IngestTest extends AbstractALSServingTest { Pair < String , String > actual = data . get ( i ) ; Assert . assertNull ( actual . getFirst ( ) ) ; String [ ] tokens = actual . getSecond ( ) . split ( STRING0 ) ; - Assert . assertArrayEquals ( EXPECTED_TOPIC [ i ] , tokens ) ; + Assert . assertEquals ( EXPECTED_TOPIC [ i ] [ NUMBER0 ] , tokens [ NUMBER0 ] ) ; + Assert . assertEquals ( EXPECTED_TOPIC [ i ] [ NUMBER1 ] , tokens [ NUMBER1 ] ) ; + Assert . assertEquals ( EXPECTED_TOPIC [ i ] [ NUMBER2 ] , tokens [ NUMBER2 ] ) ; } }
Fix erroneous test change in last commit
<nb> public interface TransferManager { COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT COMMENT COMMENT public void init ( boolean createIfRequired ) throws StorageException ;
init does not actually check existence
<nb> public abstract class BaseActivity extends SherlockFragmentActivity implements @ override public void onCheckinBlocked ( Bundle traktTaskArgs , int wait ) { dismissProgressDialog ( traktTaskArgs ) ; - TraktCancelCheckinDialogFragment newFragment = TraktCancelCheckinDialogFragment - . newInstance ( traktTaskArgs , wait ) ; - FragmentTransaction ft = getSupportFragmentManager ( ) . beginTransaction ( ) ; - newFragment . show ( ft , STRING0 ) ; + SINGLE + if ( ! isFinishing ( ) ) { + TraktCancelCheckinDialogFragment newFragment = TraktCancelCheckinDialogFragment + . newInstance ( traktTaskArgs , wait ) ; + FragmentTransaction ft = getSupportFragmentManager ( ) . beginTransaction ( ) ; + newFragment . show ( ft , STRING0 ) ; + } } private void dismissProgressDialog ( Bundle traktTaskArgs ) {
Only start a new dialog if we are not finishing
<nb> public class TextEditingTarget implements EditingTarget String content = line . substring ( Math . min ( line . length ( ) , prefix . length ( ) ) ) ; - if ( content . matches ( STRING0 ) ) + if ( content . matches ( STRING1 ) ) wordWrap . setWrappingEnabled ( false ) ; else if ( content . trim ( ) . startsWith ( STRING2 ) ) wordWrap . setWrappingEnabled ( true ) ;
Fix reflowing behavior when examples has trailing text
<nb> import NAMESPACE ; COMMENT COMMENT - COMMENT - COMMENT - COMMENT COMMENT + SINGLE + SINGLE + SINGLE public interface GraphDatabaseAPI extends GraphDatabaseService {
Moved comment outside of the javadoc
<nb> public class SubsamplingScaleImageView extends View { int sTileHeight = sHeight ( ) / yTiles ; int subTileWidth = sTileWidth / sampleSize ; int subTileHeight = sTileHeight / sampleSize ; - while ( subTileWidth > maxTileDimensions . x || ( subTileWidth > getWidth ( ) * FLOAT0 && sampleSize < fullImageSampleSize ) ) { + while ( subTileWidth + xTiles + NUMBER0 > maxTileDimensions . x || ( subTileWidth > getWidth ( ) * FLOAT0 && sampleSize < fullImageSampleSize ) ) { xTiles += NUMBER0 ; sTileWidth = sWidth ( ) / xTiles ; subTileWidth = sTileWidth / sampleSize ; } - while ( subTileHeight > maxTileDimensions . y || ( subTileHeight > getHeight ( ) * FLOAT0 && sampleSize < fullImageSampleSize ) ) { + while ( subTileHeight + yTiles + NUMBER0 > maxTileDimensions . y || ( subTileHeight > getHeight ( ) * FLOAT0 && sampleSize < fullImageSampleSize ) ) { yTiles += NUMBER0 ; sTileHeight = sHeight ( ) / yTiles ; subTileHeight = sTileHeight / sampleSize ;
Modified tile map to allow for images close to a multiple of the max bitmap size
<nb> import NAMESPACE ; import NAMESPACE ; public class CurlTaskExecutor { - private Logger logger = Logger . getLoggerFor ( CurlTaskExecutor . class ) ; - public static final String CURLED_FILE = STRING0 ; public Result execute ( Config config , Context context , JobConsoleLogger console ) { <nb> public class CurlTaskExecutor { private Result runCommand ( Context taskContext , Config taskConfig , JobConsoleLogger console ) throws IOException , InterruptedException { ProcessBuilder curl = createCurlCommandWithOptions ( taskContext , taskConfig ) ; - logger . error ( STRING1 + curl . command ( ) ) ; console . printLine ( STRING1 + curl . command ( ) ) ; curl . environment ( ) . putAll ( taskContext . getEnvironmentVariables ( ) ) ; console . printEnvironment ( curl . environment ( ) ) ;
removing random logging calls I had added while testing
<nb> class LinearBekGraphBuilder { if ( ! LinearGraphUtils . getDownNodes ( graph , tail ) . contains ( myLeftChild ) ) { addEdge ( graph , tail , myLeftChild ) ; } - else if ( myMergeWithOldCommit ) { + else { replaceEdge ( graph , tail , myLeftChild ) ; } }
vcs log linear bek remove unnecessary condition it is always true
<nb> public class Http11NioProcessor extends AbstractHttp11Processor { try { rp . setStage ( org . apache . coyote . Constants . STAGE_SERVICE ) ; error = ! adapter . asyncDispatch ( request , response , status ) ; - if ( ! error ) { - if ( attach != null ) { - if ( asyncStateMachine . isAsyncDispatching ( ) ) { - SINGLE - if ( keepAlive && keepAliveTimeout > NUMBER0 ) { - attach . setTimeout ( keepAliveTimeout ) ; - } else { - attach . setTimeout ( soTimeout ) ; - } - } + if ( ! error && attach != null && + asyncStateMachine . isAsyncDispatching ( ) ) { + SINGLE + if ( keepAlive && keepAliveTimeout > NUMBER0 ) { + attach . setTimeout ( keepAliveTimeout ) ; + } else { + attach . setTimeout ( soTimeout ) ; } } } catch ( InterruptedIOException e ) {
Collapse the multiple if statements
<nb> public final class Failure < T > implements Try < T > { COMMENT public static Cause of ( Throwable t ) { Objects . requireNonNull ( t , STRING0 ) ; + if ( t instanceof Cause ) { + return ( Cause ) t ; + } final boolean isFatal = ( t instanceof VirtualMachineError && ! ( t instanceof StackOverflowError ) ) || t instanceof ThreadDeath || t instanceof InterruptedException
Prevents Failure Cause wrapping Failure Cause e g Try of Try of
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class FragmentStatePagerAdapter extends RecyclerView . Adapter < Fra private SparseArray < Fragment . SavedState > mStates = new SparseArray < > ( ) ; private Set < Integer > mIds = new HashSet < > ( ) ; private IContainerIdGenerator mContainerIdGenerator = new IContainerIdGenerator ( ) { + private Random mRandom = new Random ( ) ; + @ override public int genId ( Set < Integer > idContainer ) { - return mIds . size ( ) + NUMBER0 ; + return mRandom . nextInt ( ) ; } } ;
update Default ContainerIdGenerator
<nb> public final class HttpHelper { SINGLE Log . w ( TAG , STRING0 + uri ) ; throw new IOException ( iae . toString ( ) ) ; + } catch ( SecurityException se ) { + SINGLE + Log . w ( TAG , STRING1 + uri ) ; + throw new IOException ( se ) ; } int responseCode ; try {
Catch rare SecurityException when accessing HTTP
<nb> class SenderImpl implements Sender { } try { do { + if ( buffer . remaining ( ) == NUMBER0 ) { + callback . onComplete ( exchange , this ) ; + return ; + } int res = streamSinkChannel . write ( buffer ) ; if ( res == NUMBER0 ) { streamSinkChannel . getWriteSetter ( ) . set ( new ChannelListener < Channel > ( ) {
Fix lockup if sender is used to send and empty buffer
<nb> public class OutputBuffer extends Writer { public void setBufferSize ( int size ) { - if ( size != bb . capacity ( ) ) { + if ( size > bb . capacity ( ) ) { bb = ByteBuffer . allocate ( size ) ; clear ( bb ) ; }
Set the buffer size if it is above the one specified when OutputBuffer object was created
<nb> public class ActFmSyncThread { synchronized ( monitor ) { while ( ( pendingMessages . isEmpty ( ) && ! timeForBackgroundSync ( ) ) || ! actFmPreferenceService . isLoggedIn ( ) || ! syncMigration ) { try { - if ( pendingMessages . isEmpty ( ) && notificationId >= NUMBER0 ) { + if ( ( pendingMessages . isEmpty ( ) || ! actFmPreferenceService . isLoggedIn ( ) ) && notificationId >= NUMBER0 ) { notificationManager . cancel ( notificationId ) ; notificationId = - NUMBER1 ; }
Don t show sync notification if user logged out but still has pending messages edge case
<nb> public class ShadowTypeface { } synchronized public static void reset ( ) { - fonts . clear ( ) ; + SINGLE + SINGLE } @ hiddenapi @ implementation
Fix unknown font id issue
<nb> public class ConnectivityActionReceiver extends BroadcastReceiver { ConnectivityManager cm = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; NetworkInfo networkInfo = cm . getActiveNetworkInfo ( ) ; - if ( networkInfo . getType ( ) == ConnectivityManager . TYPE_WIFI && + if ( networkInfo == null || networkInfo . getType ( ) == ConnectivityManager . TYPE_WIFI && ! networkInfo . isConnected ( ) ) { Log . d ( TAG , STRING0 + String . valueOf ( networkInfo ) ) ; wifiDisconnected ( context ) ; <nb> public class FileUploadService extends IntentService { mDb . updateUpload ( uploadDbObject ) ; } + SINGLE if ( InstantUploadBroadcastReceiver . isOnline ( getApplicationContext ( ) ) ) { Log_OC . d ( TAG , STRING1 ) ; FileUploadService . retry ( getApplicationContext ( ) ) ;
fixed multiple calls of ConnectivityActionReceiver
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; public class FeaturedListFragment extends FilterListFragment { <nb> public class FeaturedListFragment extends FilterListFragment { @ override protected int getLayout ( Activity activity ) { - if ( AndroidUtilities . isTabletSized ( activity ) ) + if ( AstridPreferences . useTabletLayout ( activity ) ) return R . layout . filter_list_fragment_alternative_3pane ; else return R . layout . filter_list_fragment_alternative ;
Fixed a bug with featured list fragment on tablets
<nb> public class SuspendablesScanner extends Task { final List < URL > us = new ArrayList < > ( ) ; if ( ant ) { - SINGLE - SINGLE + for ( FileSet fs : filesets ) + us . add ( fs . getDir ( ) . toURI ( ) . toURL ( ) ) ; final AntClassLoader acl = ( AntClassLoader ) getClass ( ) . getClassLoader ( ) ; classpathToUrls ( acl . getClasspath ( ) . split ( STRING0 ) , us ) ; } else {
Add filesets to classpath
<nb> public class DaemonRunningStats { private long allBuildsTime ; public DaemonRunningStats ( TimeProvider timeProvider , long startAt ) { - System . out . println ( STRING0 ) ; this . runningClock = new Clock ( startAt ) ; this . timeProvider = timeProvider ; }
Remove debugging trace