diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class OneWireGenericBindingProvider extends AbstractGenericBindingProvide
COMMENT
COMMENT
protected boolean checkSensorId ( String sensorIdString ) {
- return sensorIdString . matches ( STRING0 ) ;
+ return sensorIdString . matches ( STRING1 ) ;
}
|
refixed sensor id validation
|
<nb> public abstract class PsiFileImpl extends ElementBase implements PsiFileEx , PsiF
}
public boolean isStubBasedChildValid ( @ notnull StubBasedPsiElementBase psi ) {
- StubElement fileStub = getStub ( ) ;
+ StubTree fileStub = derefStub ( ) ;
if ( fileStub != null ) {
synchronized ( myStubLock ) {
- fileStub = getStub ( ) ;
+ fileStub = derefStub ( ) ;
StubElement childStub = psi . getStub ( ) ;
- if ( fileStub != null && childStub != null && fileStub != childStub . getParentStub ( ) ) {
+ if ( fileStub != null && childStub != null && fileStub . getRoot ( ) != childStub . getParentStub ( ) ) {
return false ;
}
}
|
don t load stub if there s none
|
<nb> public interface ANTLRErrorStrategy {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Update the documentation for recoverInline to advise against
|
<nb> public class MessagingController implements Runnable {
if ( account . isMarkMessageAsReadOnView ( ) && ! message . isSet ( Flag . SEEN ) ) {
List < Long > messageIds = Collections . singletonList ( message . getId ( ) ) ;
- setFlagInCache ( account , messageIds , Flag . SEEN , true ) ;
- setFlagSynchronous ( account , messageIds , Flag . SEEN , true , false ) ;
+ setFlag ( account , messageIds , Flag . SEEN , true ) ;
( ( LocalMessage ) message ) . setFlagInternal ( Flag . SEEN , true ) ;
}
|
Replace synchronous setting of a flag with async setting of the flag
|
<nb> public class GremlinPluginTest
neo4j = new ImpermanentGraphDatabase ( ) ;
plugin = new GremlinPlugin ( ) ;
Graph graph = new Neo4jGraph ( neo4j ) ;
+ graph . clear ( ) ;
Vertex marko = graph . addVertex ( STRING0 ) ;
marko . setProperty ( STRING1 , STRING2 ) ;
marko . setProperty ( STRING3 , NUMBER0 ) ;
<nb> public class GremlinPluginTest
JSONArray array = ( JSONArray ) parser . parse ( json . format ( GremlinPluginTest . executeTestScript ( STRING4 , null ) ) ) ;
List < String > ids = new ArrayList < String > ( Arrays . asList ( STRING0 , STRING5 , STRING6 ,
STRING7 , STRING8 , STRING9 ) ) ;
- Assert . assertEquals ( array . size ( ) , NUMBER1 ) ;
+ Assert . assertEquals ( NUMBER1 , array . size ( ) ) ;
for ( Object object : array )
{
String self = ( String ) ( ( JSONObject ) object ) . get ( STRING10 ) ;
|
adjusting clear graph
|
<nb> public class RoutingRequest implements Cloneable , Serializable {
}
public void setMaxTransfers ( int maxTransfers ) {
- if ( maxTransfers > CLAMP_TRANSFERS ) {
- maxTransfers = CLAMP_TRANSFERS ;
- }
+ SINGLE
+ SINGLE
+ SINGLE
this . maxTransfers = maxTransfers ;
}
|
do not clamp max transfers
|
<nb> public abstract class AbstractTarget implements Target {
if ( f . getName ( ) . toLowerCase ( ) . endsWith ( STRING0 ) ) {
continue ;
}
- ZipEntry newEntry = new ZipEntry ( f . getAbsolutePath ( ) . substring ( basePath . length ( ) + NUMBER0 ) ) ;
+ String entryName = f . getAbsolutePath ( ) . substring ( basePath . length ( ) + NUMBER0 ) ;
+ if ( entryName . startsWith ( STRING1 ) ) {
+ SINGLE
+ continue ;
+ }
+ ZipEntry newEntry = new ZipEntry ( entryName ) ;
newEntry . setTime ( f . lastModified ( ) ) ;
out . putNextEntry ( newEntry ) ;
InputStream in = null ;
|
Don t include any resources under META INF robovm when creating archives for folders in the classpath before install
|
<nb> public class DomainTest {
}
@ domain
+ public interface InterfaceType {
+ InterfaceType getRelation ( ) ;
+ List < InterfaceType > getRelation2 ( ) ;
+ List < ? extends InterfaceType > getRelation3 ( ) ;
+ int getRelation4 ( ) ;
+ }
+
+ @ domain
public static class SimpleTypes {
transient int test ;
long id ;
|
refactored querydsl apt packages
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CxxTestStepTest {
}
@ test
+ @ ignore ( STRING0 )
public void timeout ( ) throws IOException , InterruptedException {
CxxTestStep step =
new CxxTestStep (
|
Ignore CxxTestStepTest timeout
|
<nb> public class GroovyShell extends GroovyObjectSupport {
int p = scriptName . lastIndexOf ( STRING0 ) ;
if ( p ++ >= NUMBER0 ) {
if ( scriptName . substring ( p ) . equals ( STRING1 ) ) {
- System . err . println ( STRING2 + scriptName ) ;
throw new CompilationFailedException ( NUMBER0 , null ) ;
}
}
<nb> public class GroovyShell extends GroovyObjectSupport {
if ( scriptClass == null ) {
return null ;
}
- System . err . println ( scriptClass + STRING3 + ( Script . class . isAssignableFrom ( scriptClass ) ) ) ;
- System . err . println ( scriptClass . getSuperclass ( ) ) ;
- System . err . println ( java . util . Arrays . toString ( scriptClass . getInterfaces ( ) ) ) ;
try {
if ( Script . class . isAssignableFrom ( scriptClass ) ) {
SINGLE
|
remove debug output to system err
|
<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 ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Delete unused imports from PersonDetailFragment
|
<nb> public class Configuration
COMMENT
COMMENT
COMMENT
- public static final String COUNTER_VALUES_BUFFER_LENGTH_PROP_NAME = STRING0 ;
+ public static final String COUNTER_VALUES_BUFFER_LENGTH_PROP_NAME = STRING1 ;
COMMENT
COMMENT
|
Java Fix property name for aeron counters buffer length
|
<nb> class ZoomManager {
}
public void updateDoubleTapZoom ( int doubleTapZoom ) {
- if ( mInZoomOverview ) {
- mDoubleTapZoomFactor = doubleTapZoom / FLOAT0 ;
- mTextWrapScale = getReadingLevelScale ( ) ;
- refreshZoomScale ( true ) ;
- }
+ boolean zoomIn = ( mTextWrapScale - mActualScale ) < FLOAT1 ;
+ mDoubleTapZoomFactor = doubleTapZoom / FLOAT0 ;
+ mTextWrapScale = getReadingLevelScale ( ) ;
+ float newScale = zoomIn ? mTextWrapScale
+ : Math . min ( mTextWrapScale , mActualScale ) ;
+ setZoomScale ( newScale , true , true ) ;
}
public void refreshZoomScale ( boolean reflowText ) {
|
Fix updateDoubleTapZoom logic
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RotatingTransactionalState {
SortedMap < Long , Object > toDelete = _curr . headMap ( txid ) ;
for ( long tx : new HashSet < Long > ( toDelete . keySet ( ) ) ) {
_curr . remove ( tx ) ;
- _state . delete ( txPath ( tx ) ) ;
+ try {
+ _state . delete ( txPath ( tx ) ) ;
+ } catch ( RuntimeException e ) {
+ SINGLE
+ SINGLE
+ if ( ! ( e . getCause ( ) instanceof KeeperException . NoNodeException ) ) {
+ throw e ;
+ }
+ }
+
}
}
|
Ignore NoNodeExists exceptions
|
<nb> public class IconGenerator {
SINGLE
SINGLE
- Rect rect = new Rect ( ) ;
- background . getPadding ( rect ) ;
- getContainer ( ) . setPadding ( rect . left , rect . top , rect . right , rect . bottom ) ;
+ if ( background != null ) {
+ Rect rect = new Rect ( ) ;
+ background . getPadding ( rect ) ;
+ getContainer ( ) . setPadding ( rect . left , rect . top , rect . right , rect . bottom ) ;
+ } else {
+ getContainer ( ) . setPadding ( NUMBER0 , NUMBER0 , NUMBER0 , NUMBER0 ) ;
+ }
}
COMMENT
<nb> public class IconGenerator {
return R . style . Bubble_TextAppearance_Light ;
}
}
- }
+ }
|
Allow background to be null
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PinotHelixResourceManager {
_helixZkURL = HelixConfig . getAbsoluteZkPathForHelix ( _zkBaseUrl ) ;
_helixZkManager = HelixSetupUtils . setup ( _helixClusterName , _helixZkURL , _instanceId ) ;
_helixAdmin = _helixZkManager . getClusterManagmentTool ( ) ;
- ZkBaseDataAccessor < ZNRecord > baseAccessor =
- ( ZkBaseDataAccessor < ZNRecord > ) _helixZkManager . getHelixDataAccessor ( ) . getBaseDataAccessor ( ) ;
- String propertyStorePath = PropertyPathConfig . getPath ( PropertyType . PROPERTYSTORE , _helixClusterName ) ;
- _propertyStore =
- new ZkHelixPropertyStore < ZNRecord > ( baseAccessor , propertyStorePath , Arrays . asList ( propertyStorePath ) ) ;
+ _propertyStore = ZkUtils . getZkPropertyStore ( _helixZkManager , _helixClusterName ) ;
_segmentDeletionManager = new SegmentDeletionManager ( _localDiskDir , _helixAdmin , _helixClusterName , _propertyStore ) ;
}
|
Fixed property store accesses failing due to the property store having an incorrect property store ZK path
|
<nb> import NAMESPACE ;
public class TempFolderProvider extends ProviderAdapter {
public TempFolder provide ( ServerFileSystem fs ) {
- File tempDir = new File ( fs . getTempDir ( ) , STRING0 ) ;
+ File tempDir = new File ( fs . getTempDir ( ) , STRING1 ) ;
try {
FileUtils . forceMkdir ( tempDir ) ;
} catch ( IOException e ) {
<nb> public class TempFolderProviderTest {
TempFolder tempUtils = tempFolderProvider . provide ( fs ) ;
tempUtils . newDir ( ) ;
tempUtils . newFile ( ) ;
- assertThat ( new File ( serverTempFolder , STRING0 ) ) . exists ( ) ;
- assertThat ( new File ( serverTempFolder , STRING0 ) . list ( ) ) . hasSize ( NUMBER0 ) ;
+ assertThat ( new File ( serverTempFolder , STRING1 ) ) . exists ( ) ;
+ assertThat ( new File ( serverTempFolder , STRING1 ) . list ( ) ) . hasSize ( NUMBER0 ) ;
}
}
|
Rename server temp folder
|
<nb> public class WifiP2pWfdInfo implements Parcelable {
COMMENT
public WifiP2pWfdInfo ( WifiP2pWfdInfo source ) {
if ( source != null ) {
+ mWfdEnabled = source . mWfdEnabled ;
mDeviceInfo = source . mDeviceInfo ;
mCtrlPort = source . mCtrlPort ;
mMaxThroughput = source . mMaxThroughput ;
|
Fix copy constructor
|
<nb> package 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 ;
<nb> public class CaldroidFragment extends DialogFragment {
}
- }
+ @ override
+ public void onDetach ( ) {
+ super . onDetach ( ) ;
+
+ try {
+ Field childFragmentManager = Fragment . class . getDeclaredField ( STRING0 ) ;
+ childFragmentManager . setAccessible ( true ) ;
+ childFragmentManager . set ( this , null ) ;
+
+ } catch ( NoSuchFieldException e ) {
+ throw new RuntimeException ( e ) ;
+ } catch ( IllegalAccessException e ) {
+ throw new RuntimeException ( e ) ;
+ }
+ }
+ }
|
Fix an issue while using Caldroid as a Tab s Fragment the issue
|
<nb> public class JsonMessageHandler1_0 implements JsonMessageHandler {
ValidationResult validationResult = new ValidationResult ( ) ;
if ( isEmpty ( responseBody ) ) return validationResult ;
- List < Map > errors ;
+ List errors ;
try {
errors = parseResponseToList ( responseBody ) ;
} catch ( Exception e ) {
<nb> public class JsonMessageHandler1_0 implements JsonMessageHandler {
throw new RuntimeException ( STRING0 ) ;
}
- List < String > messages = new ArrayList < String > ( ) ;
+ List messages = new ArrayList < String > ( ) ;
if ( map . containsKey ( STRING1 ) && map . get ( STRING1 ) != null ) {
- messages = ( List < String > ) map . get ( STRING1 ) ;
+ messages = ( List ) map . get ( STRING1 ) ;
for ( Object message : messages ) {
if ( ! ( message instanceof String ) ) {
throw new RuntimeException ( STRING2 ) ;
|
fixed build failure caused due class cast exception
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public class Jetty7CometSupport extends AsynchronousProcessor {
}
c . suspend ( ) ;
} else if ( action . type == Action . TYPE . RESUME ) {
+ SINGLE
+ Boolean resumeOnBroadcast = ( Boolean ) req . getAttribute ( AtmosphereServlet . RESUME_ON_BROADCAST ) ;
+ if ( resumeOnBroadcast != null && resumeOnBroadcast ) {
+ return action ;
+ }
+
logger . debug ( STRING0 , res ) ;
if ( ! resumed . remove ( c ) ) {
|
Make sure we don t re enter the CometSupport when resume is called during a subscribe operation
|
<nb> public class BufferPool {
- protected static BufferPool instance = null ;
+ protected static volatile BufferPool instance = null ;
protected BufferPoolAPI pool = null ;
private BufferPool ( BufferPoolAPI pool ) {
|
volatile should ensure double locking to work properly
|
<nb> public class PostgrePlanNode implements DBCPlanNode , IPropertySource {
IPropertyDescriptor [ ] props = new IPropertyDescriptor [ attributes . size ( ) ] ;
int index = NUMBER0 ;
for ( Map . Entry < String , String > attr : attributes . entrySet ( ) ) {
- props [ index ++ ] = new PropertyDescriptorEx ( null , attr . getKey ( ) , attr . getKey ( ) , null , String . class , false , null , null , false ) ;
+ props [ index ++ ] = new PropertyDescriptorEx ( STRING0 , attr . getKey ( ) , attr . getKey ( ) , null , String . class , false , null , null , false ) ;
}
return props ;
}
<nb> public class PostgrePlanNode implements DBCPlanNode , IPropertySource {
public void setPropertyValue ( Object id , Object value ) {
}
+
+ @ override
+ public String toString ( ) {
+ return getNodeType ( ) + STRING1 + getStartupCost ( ) ;
+ }
}
|
PostgreSQL explain plan
|
<nb> public class ApplicationImpl extends ComponentManagerImpl implements Application
Disposer . dispose ( this ) ;
if ( isInternal ( ) && ! Disposer . isEmpty ( ) ) {
- int ret = Messages . showOkCancelDialog ( STRING0 , STRING1 , Messages . getErrorIcon ( ) ) ;
- if ( ret == NUMBER0 ) {
+ int ret = JOptionPane . showConfirmDialog ( null , STRING0 , STRING1 , JOptionPane . OK_CANCEL_OPTION ) ;
+ if ( ret == JOptionPane . OK_OPTION ) {
try {
+ System . out . println ( STRING2 ) ;
Class . forName ( STRING3 ) . getDeclaredMethod ( STRING4 ) . invoke ( null ) ;
+ System . out . println ( STRING5 ) ;
}
catch ( Exception ignored ) {
}
|
do not use Messages on disposed app
|
<nb> public class HttpRequest {
if ( port != - NUMBER0 )
host = host + STRING0 + Integer . toString ( port ) ;
- URI uri ;
try {
- uri = new URI ( parsed . getProtocol ( ) , host , parsed . getPath ( ) ,
- parsed . getQuery ( ) , null ) ;
+ return new URI ( parsed . getProtocol ( ) , host , parsed . getPath ( ) ,
+ parsed . getQuery ( ) , null ) . toASCIIString ( ) ;
} catch ( URISyntaxException e ) {
IOException io = new IOException ( STRING1 ) ;
io . initCause ( e ) ;
throw new HttpRequestException ( io ) ;
}
- return uri . toASCIIString ( ) ;
}
COMMENT
|
Remove unneeded uri variable
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Account implements BaseAccount {
excludeSpecialFolder ( search , getSpamFolderName ( ) ) ;
excludeSpecialFolder ( search , getOutboxFolderName ( ) ) ;
excludeSpecialFolder ( search , getSentFolderName ( ) ) ;
+ excludeSpecialFolder ( search , getErrorFolderName ( ) ) ;
search . or ( new SearchCondition ( Searchfield . FOLDER , Attribute . EQUALS , getInboxFolderName ( ) ) ) ;
}
|
Exclude error folder from unread starred count
|
<nb> public class TestMatcher < V > extends AbstractMatcher < V > {
public boolean match ( @ notnull MatcherContext < V > context , boolean enforced ) {
InputLocation lastLocation = context . getCurrentLocation ( ) ;
boolean matched = context . runMatcher ( getChildren ( ) . get ( NUMBER0 ) , enforced && ! inverted ) ;
- if ( matched && context . getCurrentLocation ( ) == lastLocation ) {
+ if ( matched && context . getCurrentLocation ( ) == lastLocation && lastLocation . currentChar != Chars . EOI ) {
Checks . fail ( STRING0 , context . getPath ( ) ) ;
}
context . setCurrentLocation ( lastLocation ) ; SINGLE
|
Fixed test testNot rules throwing ParserConstructionException at EOI
|
<nb> public class ProjectFromSourcesBuilder extends ProjectBuilder implements SourceP
}
private static boolean shouldBeTestRoot ( final File srcRoot ) {
- final String name = srcRoot . getName ( ) ;
+ if ( isTestRootName ( srcRoot . getName ( ) ) ) {
+ return true ;
+ }
+ final File parentFile = srcRoot . getParentFile ( ) ;
+ return parentFile != null && isTestRootName ( parentFile . getName ( ) ) ;
+ }
+
+ private static boolean isTestRootName ( final String name ) {
return STRING0 . equalsIgnoreCase ( name ) ||
STRING1 . equalsIgnoreCase ( name ) ||
STRING2 . equalsIgnoreCase ( name ) ||
|
corrected heuristic of test src root criterion
|
<nb> public final class UpdateChecker {
Product product = findProduct ( root , productCode ) ;
if ( product == null ) return null ;
- UpdateChannel channel = product . findUpdateChannelById ( UpdateSettings . getInstance ( ) . CURRENT_UPDATE_CHANNEL ) ;
+ UpdateChannel channel = product . findUpdateChannelById ( ApplicationInfo . getInstance ( ) . getDefaultUpdateChannel ( ) ) ;
if ( channel != null ) return channel ;
for ( UpdateChannel c : product . getChannels ( ) ) {
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class UpdateSettings implements PersistentStateComponent < Element > {
public String CHECK_PERIOD = UpdateSettingsConfigurable . WEEKLY ;
public long LAST_TIME_CHECKED = NUMBER0 ;
- public String CURRENT_UPDATE_CHANNEL = ApplicationInfo . getInstance ( ) . getDefaultUpdateChannel ( ) ;
-
public static UpdateSettings getInstance ( ) {
return ServiceManager . getService ( UpdateSettings . class ) ;
}
|
Fix updater by removing non working channel switching ability and always resorting to AppplictionInfo xml default channel
|
<nb> public class DefaultEvaluatorFactory {
ser . append ( STRING0 ) ;
vars . append ( alias . getArg ( NUMBER0 ) ) ;
- } else if ( join . getType ( ) == JoinType . LEFTJOIN ) {
- SINGLE
-
+ SINGLE
+ SINGLE
+ SINGLE
} else {
throw new IllegalArgumentException ( STRING1 + join ) ;
}
|
commented empty if block out
|
<nb> final class AdvancedLeakAwareByteBuf extends WrappedByteBuf {
}
@ override
+ public ByteBuf retain ( ) {
+ leak . record ( ) ;
+ return super . retain ( ) ;
+ }
+
+ @ override
+ public ByteBuf retain ( int increment ) {
+ leak . record ( ) ;
+ return super . retain ( increment ) ;
+ }
+
+ @ override
public boolean release ( ) {
boolean deallocated = super . release ( ) ;
if ( deallocated ) {
leak . close ( ) ;
+ } else {
+ leak . record ( ) ;
}
return deallocated ;
}
<nb> final class AdvancedLeakAwareByteBuf extends WrappedByteBuf {
boolean deallocated = super . release ( decrement ) ;
if ( deallocated ) {
leak . close ( ) ;
+ } else {
+ leak . record ( ) ;
}
return deallocated ;
}
|
Also record retain and release
|
<nb> import NAMESPACE ;
public final class UpgradeService {
+ public static final int V4_6_2 = NUMBER0 ;
public static final int V4_6_1 = NUMBER1 ;
public static final int V4_6_0 = NUMBER2 ;
public static final int V4_6_0_BETA = NUMBER3 ;
<nb> public final class UpgradeService {
Preferences . setString ( R . string . p_taskRowStyle_v2 , value ? STRING0 : STRING1 ) ; SINGLE
}
}
+
+ if ( from < V4_6_2 ) {
+ Preferences . setBoolean ( R . string . p_show_timer_shortcut , true ) ;
+ }
}
COMMENT
|
Still show timer button for existing users
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public interface GitHubApi {
String ENDPOINT = STRING0 ;
|
Adds comments on GitHubApi file
|
<nb> public abstract class Recycler < T > {
DEFAULT_MAX_CAPACITY = maxCapacity ;
if ( logger . isDebugEnabled ( ) ) {
if ( DEFAULT_MAX_CAPACITY == NUMBER0 ) {
- logger . debug ( STRING0 ) ;
+ logger . debug ( STRING1 ) ;
} else {
- logger . debug ( STRING2 , DEFAULT_MAX_CAPACITY ) ;
+ logger . debug ( STRING3 , DEFAULT_MAX_CAPACITY ) ;
}
}
|
Fix typo in log message during static init of Recycler
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
delete an extra the in DefaultAsyncPersistHandler
|
<nb> import NAMESPACE ;
public class Result < T > implements Comparable < Result < T > >
{
public static String MISSING_SEGMENTS_KEY = STRING0 ;
- public static String MISSING_INTERVALS_KEY = STRING1 ;
private final DateTime timestamp ;
private final T value ;
|
remove unneeded constant
|
<nb> public class PersistenceManager extends AbstractEventSubscriber implements Model
@ override
public void run ( ) {
+ long startTime = System . currentTimeMillis ( ) ;
persistenceServices . get ( serviceName ) . store ( item , alias ) ;
+ logger . trace ( STRING0 ,
+ new Object [ ] { item . getName ( ) , serviceName , System . currentTimeMillis ( ) - startTime } ) ;
}
}
|
added performance log
|
<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 ;
COMMENT
COMMENT
<nb> public final class Tools {
COMMENT
COMMENT
public static int getUTCTimestamp ( ) {
- return ( int ) ( Calendar . getInstance ( ) . getTimeInMillis ( ) / NUMBER0 ) ;
+ DateTime dateTime = new DateTime ( ) ;
+ return ( int ) ( dateTime . getMillis ( ) / NUMBER0 ) ;
}
COMMENT
<nb> public final class Tools {
COMMENT
COMMENT
public static double getUTCTimestampWithMilliseconds ( ) {
-
- return getUTCTimestampWithMilliseconds ( Calendar . getInstance ( ) . getTimeInMillis ( ) ) ;
+ DateTime dateTime = new DateTime ( ) ;
+ return getUTCTimestampWithMilliseconds ( dateTime . getMillis ( ) ) ;
}
COMMENT
|
use DateTime not Calendar for timestamps
|
<nb> public class JavaFormatterBlankLinesTest extends AbstractJavaFormatterTest {
STRING0
) ;
}
+
+ public void testBlankLinesBetweenAbstractMethods ( ) {
+ SINGLE
+ getSettings ( ) . BLANK_LINES_AROUND_METHOD_IN_INTERFACE = NUMBER0 ;
+ getSettings ( ) . BLANK_LINES_AROUND_METHOD = NUMBER1 ;
+
+ doTextTest (
+ STRING1 +
+ STRING2 +
+ STRING3 +
+ STRING4 +
+ STRING5 +
+ STRING3 +
+ STRING6 +
+ STRING3 +
+ STRING7 +
+ STRING8 +
+ STRING0 ,
+
+ STRING1 +
+ STRING2 +
+ STRING3 +
+ STRING9 +
+ STRING4 +
+ STRING9 +
+ STRING5 +
+ STRING3 +
+ STRING9 +
+ STRING6 +
+ STRING3 +
+ STRING9 +
+ STRING7 +
+ STRING8 +
+ STRING0
+ ) ;
+ }
}
|
Option Do not insert a line between abstract methods
|
<nb> public class MaterialListView extends ListView {
}
public void setMaterialListViewAdapter ( MaterialListViewAdapter adapter ) {
- BusProvider . getInstance ( ) . register ( this ) ;
mAdapter = adapter ;
setAdapter ( mAdapter ) ;
setDivider ( null ) ;
<nb> public class MaterialListView extends ListView {
}
@ override
+ protected void onAttachedToWindow ( ) {
+ super . onAttachedToWindow ( ) ;
+ BusProvider . getInstance ( ) . register ( this ) ;
+ }
+
+ @ override
protected void onDetachedFromWindow ( ) {
super . onDetachedFromWindow ( ) ;
BusProvider . getInstance ( ) . unregister ( this ) ;
|
fixed a bug cause crash
|
<nb> public class MapActivity extends Activity implements IMapLocationListener , Senso
if ( mapView . getZoom ( ) != z && ! mapView . mapIsAnimating ( ) ) {
long now = System . currentTimeMillis ( ) ;
SINGLE
- if ( Math . abs ( mapView . getZoom ( ) - z ) > NUMBER0 || ( lastTimeAutoZooming - now ) > NUMBER1 ) {
+ if ( Math . abs ( mapView . getZoom ( ) - z ) > NUMBER2 || ( lastTimeAutoZooming - now ) > NUMBER1 ) {
lastTimeAutoZooming = now ;
mapView . setZoom ( z ) ;
}
|
slightly change auto zoom
|
<nb> public class GuiEditArray extends GuiScreen
}
else if ( button . id == NUMBER0 )
{
- this . currentValues = ( String [ ] ) configElement . getDefaults ( ) ;
+ this . currentValues = configElement . getDefaults ( ) ;
this . entryList = new GuiEditArrayEntries ( this , this . mc , this . configElement , this . beforeValues , this . currentValues ) ;
}
else if ( button . id == NUMBER1 )
|
Fix unneeded cast causing crash in new Config GUI system
|
<nb> public final class ThreadSafeLazyLoadedIvoryTower {
COMMENT
COMMENT
COMMENT
- public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance ( ) {
+ public static synchronized ThreadSafeLazyLoadedIvoryTower getInstance ( ) {
if ( instance == null ) {
instance = new ThreadSafeLazyLoadedIvoryTower ( ) ;
|
Remove extra space
|
<nb> public class SearchView extends LinearLayout {
public void onWindowFocusChanged ( boolean hasWindowFocus ) {
super . onWindowFocusChanged ( hasWindowFocus ) ;
- if ( hasWindowFocus ) {
+ if ( hasWindowFocus && mSearchView . hasFocus ( ) && getVisibility ( ) == VISIBLE ) {
InputMethodManager inputManager = ( InputMethodManager ) getContext ( )
. getSystemService ( Context . INPUT_METHOD_SERVICE ) ;
inputManager . showSoftInput ( this , NUMBER0 ) ;
|
Prevent SearchView dropdown from showing up when SearchView is hidden
|
<nb> public class ReportingTypeConverterLoader extends AnnotationTypeConverterLoader
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static class TypeMapping {
private static int counter ;
|
removed the depreacted tag from TypeMapping since it is used by camel maven plugin
|
<nb> public class BusinessSubscription
mrr = getMrrFromISubscription ( currentPhase . getDuration ( ) , price ) ;
}
else {
- price = null ;
- mrr = null ;
+ price = BigDecimal . ZERO ;
+ mrr = BigDecimal . ZERO ;
}
}
else {
slug = null ;
phase = null ;
billingPeriod = null ;
- price = null ;
- mrr = null ;
+ price = BigDecimal . ZERO ;
+ mrr = BigDecimal . ZERO ;
}
if ( currency != null ) {
<nb> public class BusinessSubscription
static BigDecimal getMrrFromISubscription ( final IDuration duration , final BigDecimal price )
{
if ( duration == null || duration . getUnit ( ) == null || duration . getNumber ( ) == NUMBER0 ) {
- return null ;
+ return BigDecimal . ZERO ;
}
if ( duration . getUnit ( ) . equals ( TimeUnit . UNLIMITED ) ) {
|
set price and mrr of BusinessSubscription to zero not null
|
<nb> public class ChatView extends LinearLayout {
Uri contactUri = ContentUris . withAppendedId ( Imps . Contacts . CONTENT_URI , chatId ) ;
Cursor c = mNewChatActivity . getContentResolver ( ) . query ( contactUri , CHAT_PROJECTION , null , null , null ) ;
-
if ( c == null )
return ;
<nb> public class ChatView extends LinearLayout {
pCursor , cr , Imps . ProviderSettings . PROVIDER_ID_FOR_GLOBAL_SETTINGS ,
false COMMENT , null COMMENT ) ;
messageView . setLinkify ( ! mConn . isUsingTor ( ) || settings . getLinkifyOnTor ( ) ) ;
+ settings . close ( ) ;
pCursor . close ( ) ;
} catch ( RemoteException e ) {
e . printStackTrace ( ) ;
|
closes the settings cursor
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
<nb> public class LocalNotificationOptions {
}
COMMENT
+ COMMENT
+ COMMENT
+ public Calendar getCalendar ( ) {
+ Calendar calendar = Calendar . getInstance ( ) ;
+
+ calendar . setTime ( new Date ( getDate ( ) ) ) ;
+
+ return calendar ;
+ }
+
+ COMMENT
COMMENT
COMMENT
public String getMessage ( ) {
|
Added getCalendar to class LocalNotificationOptions
|
<nb> public class PubSubProvider implements IQProvider
if ( eventType == XmlPullParser . START_TAG )
{
PacketExtension ext = PacketParserUtils . parsePacketExtension ( parser . getName ( ) , parser . getNamespace ( ) , parser ) ;
-
- if ( ext != null )
- {
- pubsub . addExtension ( ext ) ;
- }
+ pubsub . addExtension ( ext ) ;
}
else if ( eventType == XmlPullParser . END_TAG )
{
|
Remove unnecessary check for non null in PubSubProvider
|
<nb> public class HybridTestActivity extends AppCompatActivity {
return new FileDownloadListener ( ) {
@ override
+ public boolean callback ( IDownloadEvent event ) {
+ if ( isFinishing ( ) ) {
+ return false ;
+ }
+ return super . callback ( event ) ;
+ }
+
+ @ override
protected void pending ( final BaseDownloadTask task , final int soFarBytes , final int totalBytes ) {
updateDisplay ( String . format ( STRING0 , task . getDownloadId ( ) , soFarBytes , totalBytes ) ) ;
}
|
Avoid callback when have already finished activity
|
<nb> public class DatabaseHelper extends SQLiteOpenHelper {
SINGLE
SINGLE
SINGLE
- private static final int DATABASE_VERSION = NUMBER0 ;
+ private static final int DATABASE_VERSION = NUMBER1 ;
private Context mContext ;
private int mUserHandle ;
<nb> public class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = NUMBER0 ;
}
+ if ( upgradeVersion < NUMBER1 ) {
+ SINGLE
+ SINGLE
+ SINGLE
+ db . beginTransaction ( ) ;
+ SQLiteStatement stmt = null ;
+ try {
+ stmt = db . compileStatement ( STRING0
+ + STRING1 ) ;
+ loadBooleanSetting ( stmt , Settings . System . SCREEN_BRIGHTNESS_MODE ,
+ R . bool . def_screen_brightness_automatic_mode ) ;
+ db . setTransactionSuccessful ( ) ;
+ } finally {
+ db . endTransaction ( ) ;
+ if ( stmt != null ) stmt . close ( ) ;
+ }
+ upgradeVersion = NUMBER1 ;
+ }
+
SINGLE
if ( upgradeVersion != currentVersion ) {
|
Reset auto brightness setting to default
|
<nb> import NAMESPACE ;
public abstract class AbstractLoader
extends DefaultHandler
{
+ COMMENT
+ private static final String NAMESPACES_FEATURE_ID =
+ STRING0 ;
+
COMMENT
private final Map mPublicIdToResourceNameMap ;
COMMENT
<nb> public abstract class AbstractLoader
final SAXParserFactory factory = SAXParserFactory . newInstance ( ) ;
factory . setValidating ( true ) ;
mParser = factory . newSAXParser ( ) . getXMLReader ( ) ;
+
+ SINGLE
+ mParser . setFeature ( NAMESPACES_FEATURE_ID , true ) ;
mParser . setContentHandler ( this ) ;
mParser . setEntityResolver ( this ) ;
mParser . setErrorHandler ( this ) ;
|
Make namespace URIs available useful for XInclude processing etc
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class SimpleCompactHeaderDrawerActivity extends AppCompatActivity {
<nb> public class SimpleCompactHeaderDrawerActivity extends AppCompatActivity {
setContentView ( R . layout . activity_sample ) ;
SINGLE
- Toolbar toolbar = ( Toolbar ) findViewById ( R . id . toolbar ) ;
+ final Toolbar toolbar = ( Toolbar ) findViewById ( R . id . toolbar ) ;
setSupportActionBar ( toolbar ) ;
SINGLE
<nb> public class SimpleCompactHeaderDrawerActivity extends AppCompatActivity {
findViewById ( R . id . action_mode_bar ) . setBackgroundColor ( UIUtils . getThemeColorFromAttrOrRes ( SimpleCompactHeaderDrawerActivity . this , R . attr . colorPrimary , R . color . material_drawer_primary ) ) ;
}
+ if ( drawerItem instanceof Nameable ) {
+ toolbar . setTitle ( ( ( Nameable ) drawerItem ) . getNameRes ( ) ) ;
+ }
+
return false ;
}
} )
|
add sample how to use the nameable interface
|
<nb> public class SocketBufferHandler {
public void expand ( int newSize ) {
- configureReadBufferForRead ( ) ;
+ configureReadBufferForWrite ( ) ;
readBuffer = ByteBufferUtils . expand ( readBuffer , newSize ) ;
- configureWriteBufferForRead ( ) ;
+ configureWriteBufferForWrite ( ) ;
writeBuffer = ByteBufferUtils . expand ( writeBuffer , newSize ) ;
}
}
|
Fix buffer expansion
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
public class GrailsPluginManagerReloadPlugin implements ReloadEventProcessorPlugin {
public void reloadEvent ( String typename , Class < ? > aClass , String encodedTimestamp ) {
+ CachedIntrospectionResults . clearClassLoader ( aClass . getClassLoader ( ) ) ;
+ ClassPropertyFetcher . clearClassPropertyFetcherCache ( ) ;
GrailsPluginManager pluginManager = PluginManagerHolder . getPluginManager ( ) ;
if ( pluginManager != null ) {
pluginManager . informOfClassChange ( aClass ) ;
|
clear some caches on reload
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ serverside
+ @ batchside
public class SensorMetrics {
private static final Set < Metric > ALLOWED_CORE_METRICS = ImmutableSet . < Metric > of (
|
Add missing annotations
|
<nb> public class AtmosphereFramework implements ServletContextProvider {
initParams . put ( DISABLE_ONSTATE_EVENT , STRING0 ) ;
useStreamForFlushingComments = true ;
broadcasterClassName = lookupDefaultBroadcasterType ( JERSEY_BROADCASTER ) ;
+ broadcasterFactory . destroy ( ) ;
broadcasterFactory = null ;
+ configureBroadcasterFactory ( ) ;
configureBroadcaster ( ) ;
}
|
Fix possible NPE
|
<nb> public class SwegonVentilationBinding extends
}
}
+ if ( messageListener != null ) {
+
+ logger . debug ( STRING0 ) ;
+
+ messageListener . setInterrupted ( true ) ;
+ try {
+ messageListener . join ( ) ;
+ } catch ( InterruptedException e ) {
+ logger . info ( STRING1 , e ) ;
+ }
+ }
+
messageListener = new MessageListener ( ) ;
messageListener . start ( ) ;
<nb> public class SwegonVentilationBinding extends
logger . error (
STRING2 ,
e ) ;
+
+ logger . warn ( STRING3 ) ;
+
+ SINGLE
+ interrupted = true ;
}
SINGLE
|
Fixed issue after configuration update close previous connection before open new one
|
<nb> public class ItemRegistryImpl implements ItemRegistry , ItemsChangeListener {
public Item getItem ( String name ) throws ItemNotFoundException {
for ( Collection < Item > items : itemMap . values ( ) ) {
for ( Item item : items ) {
- if ( item . getName ( ) . matches ( name ) ) {
+ if ( item . getName ( ) . equals ( name ) ) {
return item ;
}
}
|
Fixing performance issue in ItemRegistryImpl
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public class ConvertedClosure extends ConversionHandler {
+ public class ConvertedClosure extends ConversionHandler implements Serializable {
private String methodName ;
-
+
COMMENT
COMMENT
COMMENT
|
Make ConvertedClosure Serializable to match Closure
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public interface TransformablePublisher < T > extends Publisher < T > {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ default Promise < List < T > > toList ( ) {
+ return Streams . toList ( this ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ default Promise < List < T > > toList ( ExecControl execControl ) {
+ return Streams . toList ( execControl , this ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add TransformablePublisher toList
|
<nb> public class MostlySingularMultiMap < K , V > implements Serializable {
return myMap . size ( ) ;
}
+ public boolean containsKey ( @ notnull K key ) {
+ return myMap . containsKey ( key ) ;
+ }
+
public int valuesForKey ( @ notnull K key ) {
Object current = myMap . get ( key ) ;
if ( current == null ) return NUMBER0 ;
|
build settings optimization on chromium project
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class BluetoothSocket implements Closeable {
throw new IOException ( STRING0 + port ) ;
}
}
- mUuid = uuid ;
+ if ( uuid != null )
+ mUuid = uuid ;
+ else mUuid = new ParcelUuid ( new UUID ( NUMBER0 , NUMBER0 ) ) ;
mType = type ;
mAuth = auth ;
mEncrypt = encrypt ;
|
Add serial port profile support and allow to connect to rfcomm channel without sdp discovery
|
<nb> public class CachingBuildEngineTest {
assertTrue ( cache . isEmpty ( ) ) ;
}
+ @ test
public void fetchingFromCacheSeedsFileHashCache ( ) throws Throwable {
ArtifactCache artifactCache = new InMemoryArtifactCache ( ) ;
BuildContext buildContext = this . buildContext . withArtifactCache ( artifactCache ) ;
<nb> public class CachingBuildEngineTest {
SINGLE
SINGLE
FakeFileHashCache fakeFileHashCache =
- new FakeFileHashCache ( ImmutableMap . < Path , HashCode > of ( ) ) ;
+ new FakeFileHashCache ( new HashMap < Path , HashCode > ( ) ) ;
cachingBuildEngine =
new CachingBuildEngine (
toWeighted ( MoreExecutors . newDirectExecutorService ( ) ) ,
|
enable disabled test
|
<nb> public class ContactAccessorSdk5 extends ContactAccessor {
Uri uri = Uri . parse ( path ) ;
return mApp . getActivity ( ) . getContentResolver ( ) . openInputStream ( uri ) ;
}
- if ( path . startsWith ( STRING0 ) || path . startsWith ( STRING1 ) ) {
+ if ( path . startsWith ( STRING0 ) || path . startsWith ( STRING2 ) || path . startsWith ( STRING1 ) ) {
URL url = new URL ( path ) ;
return url . openStream ( ) ;
}
|
Can t add a Photo from a HTTPS address to Contact
|
<nb> public class HttpPostRequestDecoder {
COMMENT
public void destroy ( ) {
checkDestroyed ( ) ;
+ destroyed = true ;
cleanFiles ( ) ;
if ( undecodedChunk != null && undecodedChunk . refCnt ( ) > NUMBER0 ) {
|
Correctly set the destroyed flag
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
<nb> import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- @ runwith ( MockitoJUnitRunner . class )
+ SINGLE
+ SINGLE
public class InvalidUseOfMatchersTest {
- @ mock private IMethods mock ;
+ private IMethods mock = Mockito . mock ( IMethods . class ) ;
@ test
public void should_detect_wrong_number_of_matchers_when_stubbing ( ) {
|
Fixed the test
|
<nb> public class ByteBuddyTutorialExamplesTest {
if ( ! target . getParameterTypes ( ) . get ( targetParameterIndex ) . represents ( String . class ) ) {
throw new IllegalStateException ( target + STRING0 ) ;
}
- StackManipulation constant = new TextConstant ( annotation . loadSilent ( ) . value ( ) ) ; SINGLE
+ StackManipulation constant = new TextConstant ( annotation . loadSilent ( ) . value ( ) ) ;
return new MethodDelegationBinder . ParameterBinding . Anonymous ( constant ) ;
}
}
|
Removed reminder to update documentation
|
<nb> public class RecipientSelectView extends TokenCompleteTextView < Recipient > implem
}
public boolean hasUncompletedText ( ) {
- return ! TextUtils . isEmpty ( currentCompletionText ( ) ) ;
+ String currentCompletionText = currentCompletionText ( ) ;
+ return ! TextUtils . isEmpty ( currentCompletionText ) && ! isPlaceholderText ( currentCompletionText ) ;
+ }
+
+ static private boolean isPlaceholderText ( String currentCompletionText ) {
+ SINGLE
+ return currentCompletionText . startsWith ( STRING0 ) && currentCompletionText . substring ( NUMBER0 ) . matches ( STRING1 ) ;
}
@ override
|
don t consider placeholder token uncompleted text
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class TransactionGuardImpl extends TransactionGuard {
+ private static final Logger LOG = Logger . getInstance ( STRING0 ) ;
private final Queue < Runnable > myQueue = new LinkedBlockingQueue < Runnable > ( ) ;
private final Set < TransactionKind > myMergeableKinds = ContainerUtil . newHashSet ( ) ;
private boolean myInsideTransaction ;
<nb> public class TransactionGuardImpl extends TransactionGuard {
return AccessToken . EMPTY_ACCESS_TOKEN ;
}
if ( myInsideTransaction ) {
- throw new IllegalStateException ( STRING1 ) ;
+ LOG . error ( STRING1 ) ;
+ SINGLE
}
myInsideTransaction = true ;
return new AccessToken ( ) {
|
don t cancel nested transactions for now
|
<nb> public class WorldEditListener extends PluginListener {
player . print ( STRING0 + size ) ;
for ( Countable < Integer > c : distribution ) {
- player . print ( String . format ( STRING1 ,
+ player . print ( String . format ( STRING2 ,
String . valueOf ( c . getAmount ( ) ) ,
c . getAmount ( ) / ( double ) size * NUMBER0 ,
- BlockType . fromID ( c . getID ( ) ) . getName ( ) ) ) ;
+ BlockType . fromID ( c . getID ( ) ) . getName ( ) , c . getID ( ) ) ) ;
}
} else {
player . printError ( STRING3 ) ;
|
distr now indicates the block IDs
|
<nb> public class LocalOpenstreetmapActivity extends OsmandExpandableListActivity {
return true ;
} else if ( itemId == R . id . deletepoimod ) {
OpenstreetmapPoint info = ( OpenstreetmapPoint ) listAdapter . getChild ( group , child ) ;
+ db . deleteAllPOIModifications ( info . getId ( ) ) ;
listAdapter . delete ( info ) ;
return true ;
} else if ( itemId == R . id . uploadpoimods ) {
|
Fix poi modification
|
<nb>
-
package NAMESPACE ;
- import NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
|
removed unnecessary import
|
<nb> public class WelcomeLogin extends ActFmLoginActivity implements AuthListener {
@ override
protected void finishAndShowNext ( ) {
Intent welcomeScreen = new Intent ( this , WelcomeGraphic . class ) ;
- welcomeScreen . putExtra ( WelcomeGraphic . START_SYNC , true ) ;
- noSync = true ; SINGLE
+ if ( actFmPreferenceService . isLoggedIn ( ) ) {
+ welcomeScreen . putExtra ( WelcomeGraphic . START_SYNC , true ) ;
+ noSync = true ; SINGLE
+ }
startActivity ( welcomeScreen ) ;
finish ( ) ;
Preferences . setBoolean ( KEY_SHOWED_WELCOME_LOGIN , true ) ;
|
Fixed bug in welcome sequence
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> public class RestletHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
SINGLE
SINGLE
getOutFilter ( ) . add ( Exchange . ACCEPT_CONTENT_TYPE ) ;
-
- SINGLE
- SINGLE
- SINGLE
}
+
}
|
camel restlet consumer should send back HTTP headers such as Location etc
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class LazyDependencyToModuleResolver implements DependencyToModuleVersion
}
protected void checkDescriptor ( ComponentMetaData metaData ) {
- ModuleDescriptor moduleDescriptor = metaData . getDescriptor ( ) ;
- for ( Configuration configuration : moduleDescriptor . getConfigurations ( ) ) {
- for ( String parent : configuration . getExtends ( ) ) {
- if ( moduleDescriptor . getConfiguration ( parent ) == null ) {
- throw new ModuleVersionResolveException ( metaData . getId ( ) , String . format ( STRING0 , configuration . getName ( ) , parent ) ) ;
- }
- }
- }
}
}
|
Removed some meta data validation that is checked closer to the construction of the meta data
|
<nb> public class PropsData implements Cloneable {
COMMENT
protected String lookupValue ( final String key , final String . . . profiles ) {
if ( profiles != null ) {
- nextprofile:
for ( String profile : profiles ) {
while ( true ) {
final Map < String , PropsEntry > profileMap = this . profileProperties . get ( profile ) ;
- if ( profileMap == null ) {
- continue nextprofile ;
- }
- final PropsEntry value = profileMap . get ( key ) ;
- if ( value != null ) {
- return value . getValue ( ) ;
+ if ( profileMap != null ) {
+ final PropsEntry value = profileMap . get ( key ) ;
+ if ( value != null ) {
+ return value . getValue ( ) ;
+ }
}
+
+ SINGLE
final int ndx = profile . lastIndexOf ( STRING0 ) ;
if ( ndx == - NUMBER0 ) {
break ;
|
Keep iterating profiles even when not used
|
<nb> public class DexMojo extends AbstractAndroidMojo
{
List < String > commands = dexDefaultCommands ( ) ;
- File predexJar = new File ( inputFile . getAbsolutePath ( ) + STRING0 ) ;
+ File predexJar = new File ( inputFile . getAbsolutePath ( ) . replaceFirst ( STRING1 , STRING2 ) ) ;
commands . add ( STRING3 + predexJar . getAbsolutePath ( ) ) ;
commands . add ( inputFile . getAbsolutePath ( ) ) ;
filtered . add ( predexJar ) ;
|
the predexed jars should also have jar extension for proper merge of predexed files
|
<nb> public class LiquibaseServletListener implements ServletContextListener {
}
if ( connection != null ) {
connection . close ( ) ;
- connection . close ( ) ;
}
}
|
Removed extra close method that threw errors
|
<nb> public interface DBT extends StdCallLibrary {
}
}
+ COMMENT
+ int DBTF_MEDIA = NUMBER0 ;
+
+ COMMENT
+ int DBTF_NET = NUMBER1 ;
+
COMMENT
COMMENT
COMMENT
<nb> public interface DBT extends StdCallLibrary {
STRING0 , STRING1 , STRING2 } ) ;
}
}
- }
+ }
|
Update DBT java added DBTF_MEDIA and DBTF_NET
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
|
using Hamcrest CoreMatchers over Matchers
|
<nb> package NAMESPACE
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ORecordSerializerSchemaAware2CSV extends ORecordSerializerCSVAbstra
} else {
SINGLE
- type = OType . STRING ;
+ type = OType . EMBEDDED ;
linkedClass = null ;
linkedType = null ;
<nb> public class ORecordSerializerSchemaAware2CSV extends ORecordSerializerCSVAbstra
type = OType . LINKLIST ;
} else {
- linkedType = OType . getTypeByClass ( firstValue . getClass ( ) ) ;
+ linkedType = OType . getTypeByAssignability ( firstValue . getClass ( ) ) ;
if ( linkedType != OType . LINK ) {
SINGLE
<nb> public class ORecordSerializerSchemaAware2CSV extends ORecordSerializerCSVAbstra
SINGLE
type = OType . LINK ;
linkedClass = getLinkInfo ( database , fieldClassName ) ;
+ } else if ( fieldValue instanceof Date ) {
+ type = OType . DATE ;
}
}
|
Supported Date conversion in from long on marshalling
|
<nb> public class AndroidCommonUtils {
revisionNumber = Integer . parseInt ( revision ) ;
}
catch ( NumberFormatException e ) {
- LOG . info ( e ) ;
+ LOG . debug ( e ) ;
}
}
}
|
remove verbose logging for preview versions
|
<nb> public class ACRAConfiguration implements ReportsCrashes {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class ACRAConfiguration implements ReportsCrashes {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixing Javadoc errors
|
<nb> public class CodeModel extends JavaScriptObject
return pos ;
} - * / ;
- public native final TokenCursor getTokenCursor ( ) COMMENT
- COMMENT
- COMMENT ;
+ public final TokenCursor getTokenCursor ( )
+ {
+ return TokenCursor . create ( this ) ;
+ }
public native final boolean tokenizeUpToRow ( int row ) COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT ;
+
public native final TokenCursor cloneCursor ( ) COMMENT
COMMENT
COMMENT ;
|
corresponding updates in GWT code
|
<nb> public class IndexRemoveJob extends IndexUpdateJob implements ScanJob {
public Predicate < StaticBuffer > getKeyFilter ( ) {
if ( isGlobalGraphIndex ( ) ) {
assert graphIndexId > NUMBER0 ;
- return ( k - > {
- try {
- return indexSerializer . getIndexIdFromKey ( k ) == graphIndexId ;
- } catch ( RuntimeException e ) {
- log . debug ( STRING0 , k , e ) ;
- return false ;
- }
- } ) ;
+ return ( k - > indexSerializer . getIndexIdFromKey ( k ) == graphIndexId ) ;
} else {
return buffer - > {
long vertexId = idManager . getKeyID ( buffer ) ;
|
Revert exception catch in IndexRemoveJob keyFilter
|
<nb> public class PipelineHistoryServiceIntegrationTest {
private PipelineWithTwoStages pipelineTwo ;
private ArtifactsDiskIsFull diskIsFull ;
+ private boolean pipelineCommentFeatureToggleState ;
+
@ before
public void setUp ( ) throws Exception {
goCache . clear ( ) ;
<nb> public class PipelineHistoryServiceIntegrationTest {
configHelper . addSecurityWithAdminConfig ( ) ;
configHelper . setOperatePermissionForGroup ( STRING0 , STRING1 ) ;
+ pipelineCommentFeatureToggleState = featureToggleService . isToggleOn ( Toggles . PIPELINE_COMMENT_FEATURE_TOGGLE_KEY ) ;
featureToggleService . changeValueOfToggle ( Toggles . PIPELINE_COMMENT_FEATURE_TOGGLE_KEY , true ) ;
}
<nb> public class PipelineHistoryServiceIntegrationTest {
dbHelper . onTearDown ( ) ;
pipelineOne . onTearDown ( ) ;
configHelper . onTearDown ( ) ;
+
+ featureToggleService . changeValueOfToggle ( Toggles . PIPELINE_COMMENT_FEATURE_TOGGLE_KEY , pipelineCommentFeatureToggleState ) ;
}
@ test
|
restore original value for pipeline comment feature toggle in test
|
<nb> public class JavaLibraryDescription implements Description < JavaLibraryDescriptio
FlavorableDescription < JavaLibraryDescription . Arg > , Flavored {
public static final BuildRuleType TYPE = new BuildRuleType ( STRING0 ) ;
- public static final String ANNOTATION_PROCESSORS = STRING1 ;
@ visiblefortesting
final JavaCompilerEnvironment javacEnv ;
|
Remove unused field
|
<nb> public class ShareUtils {
dismiss ( ) ;
if ( isForwardingGivenTask ) {
- FragmentTransaction ft = fm . beginTransaction ( ) ;
- Fragment prev = fm . findFragmentByTag ( STRING0 ) ;
- if ( prev != null ) {
- ft . remove ( prev ) ;
+ if ( TraktAction . values ( ) [ args . getInt ( ShareItems . TRAKTACTION ) ] == TraktAction . CHECKIN_EPISODE ) {
+ FragmentTransaction ft = fm . beginTransaction ( ) ;
+ Fragment prev = fm . findFragmentByTag ( STRING0 ) ;
+ if ( prev != null ) {
+ ft . remove ( prev ) ;
+ }
+ ProgressDialog newFragment = ProgressDialog . newInstance ( ) ;
+ newFragment . show ( ft , STRING0 ) ;
}
- ProgressDialog newFragment = ProgressDialog . newInstance ( ) ;
- newFragment . show ( ft , STRING0 ) ;
SINGLE
SINGLE
|
Only show progress dialog when checking in
|
<nb> public class HttpDownloader extends Downloader {
File destination = new File ( status . getFeedFile ( )
. getFile_url ( ) ) ;
if ( ! destination . exists ( ) ) {
- connection = httpEntity . getContent ( ) ;
+ connection = AndroidHttpClient . getUngzippedContent ( httpEntity ) ;
InputStream in = new BufferedInputStream ( connection ) ;
out = new BufferedOutputStream ( new FileOutputStream (
destination ) ) ;
|
Added support for gzip encoded downloads
|
<nb> public abstract class PagerAdapter {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public void finishUpdate ( View container ) {
}
|
Fix documentation link for PagerAdapter deprecated method
|
<nb>
COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
COMMENT
COMMENT
<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 ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Moved DDbDDlFormat to the editor package
|
<nb> implements ConfirmationDialogFragmentListener {
args . putParcelable ( ARG_TARGET_FILE , file ) ;
frag . setArguments ( args ) ;
- frag . setOnConfirmationListener ( frag ) ;
-
return frag ;
}
<nb> implements ConfirmationDialogFragmentListener {
public Dialog onCreateDialog ( Bundle savedInstanceState ) {
Dialog dialog = super . onCreateDialog ( savedInstanceState ) ;
mTargetFile = getArguments ( ) . getParcelable ( ARG_TARGET_FILE ) ;
+
+ setOnConfirmationListener ( this ) ;
+
return dialog ;
}
|
Fixed bug in setting of listener for dialog fragment
|
<nb> public class PersistentHashMapValueStorage {
void dispose ( ) ;
}
- private static class MappedReader implements RAReader {
- private final PagedFileStorage myHolder ;
-
- private MappedReader ( File file , PagedFileStorage . StorageLock lock ) throws IOException {
- myHolder = new PagedFileStorage ( file , lock ) ;
- myHolder . length ( ) ;
- }
-
- public void get ( final long addr , final byte [ ] dst , final int off , final int len ) {
- myHolder . get ( ( int ) addr , dst , off , len ) ;
- }
-
- public void dispose ( ) {
- myHolder . close ( ) ;
- }
- }
-
private static class FileReader implements RAReader {
private final RandomAccessFile myFile ;
|
remove unused code
|
<nb> public class StatelessWithTimersTest extends ActorBaseTest
registerTimer ( ( ) - > {
sync . task ( STRING0 ) . complete ( msg ) ;
return Task . done ( ) ;
- } , NUMBER0 , NUMBER0 , TimeUnit . MILLISECONDS ) ;
+ } , NUMBER0 , TimeUnit . MILLISECONDS ) ;
return Task . fromValue ( msg ) ;
}
|
using single shot timer
|
<nb> public class RunnerContentUi implements ContentUI , Disposable , CellTransform . Fac
@ override
public void dragOutCancelled ( TabInfo source ) {
+ source . setHidden ( false ) ;
mySession . cancel ( ) ;
mySession = null ;
}
|
correctly cancel drag of debugger contents by Esc
|
<nb> public class DownloadManager {
STRING0 ) ;
}
} else {
- if ( ! file . mkdir ( ) ) {
+ if ( ! file . mkdirs ( ) ) {
throw new IllegalStateException ( STRING1 +
file . getAbsolutePath ( ) ) ;
}
|
Handle nested folder case
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
|
Add license header
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RBuildFilesFunction implements QueryFunction {
if ( ! ( env instanceof SkyQueryEnvironment ) ) {
throw new QueryException ( STRING0 ) ;
}
- ImmutableList . Builder < String > fileNames = ImmutableList . builder ( ) ;
- for ( Argument arg : args ) {
- fileNames . add ( arg . getWord ( ) ) ;
- }
( ( SkyQueryEnvironment ) env )
. getRBuildFiles (
Collections2 . transform ( args , ARGUMENT_TO_PATH_FRAGMENT ) , ( Callback < Target > ) callback ) ;
|
Remove dead code in rbuildfiles
|
<nb> public class FileUtil {
return success ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public static String sanitizeFileName ( String name ) {
StringBuilder result = new StringBuilder ( ) ;
|
sanitize file names
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.