diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class TestCommand extends BuildCommand {
ProcessExecutorParams . builder ( )
. addAllCommand ( command )
. addAllCommand ( withDashArguments )
+ . setEnvironment ( params . getEnvironment ( ) )
. addCommand ( STRING0 , infoFile . toString ( ) )
. setDirectory ( params . getCell ( ) . getFilesystem ( ) . getRootPath ( ) . toFile ( ) )
. build ( ) ;
|
pass client env to external test runner
|
<nb> public class ExcelImporter implements StreamImporter {
protected Serializable extractCell ( org . apache . poi . ss . usermodel . Cell cell ) {
int cellType = cell . getCellType ( ) ;
+ if ( cellType == org . apache . poi . ss . usermodel . Cell . CELL_TYPE_FORMULA ) {
+ cellType = cell . getCachedFormulaResultType ( ) ;
+ }
if ( cellType == org . apache . poi . ss . usermodel . Cell . CELL_TYPE_ERROR ||
cellType == org . apache . poi . ss . usermodel . Cell . CELL_TYPE_BLANK ) {
return null ;
}
- if ( cellType == org . apache . poi . ss . usermodel . Cell . CELL_TYPE_FORMULA ) {
- cellType = cell . getCachedFormulaResultType ( ) ;
- }
Serializable value = null ;
if ( cellType == org . apache . poi . ss . usermodel . Cell . CELL_TYPE_BOOLEAN ) {
|
Handle the case where an excel cell has a formula but the cached result of that formula is an error
|
<nb> public class Base64 {
if ( dialect == null ) {
throw new NullPointerException ( STRING0 ) ;
}
- return breakLines ( dialect ) ;
+ return dialect . breakLinesByDefault ;
}
public static ChannelBuffer encode ( ChannelBuffer src ) {
|
Fixed an infinite recursion in Base64
|
<nb> class SpanishLexer {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
flexeverything a spelling mistake
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed unused import
|
<nb> public final class RingBuffer < T > extends Sequencer
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
public RingBuffer ( final EventFactory < T > eventFactory ,
- final int size ,
+ final int bufferSize ,
final ClaimStrategy . Option claimStrategyOption ,
final WaitStrategy . Option waitStrategyOption )
{
- super ( size , claimStrategyOption , waitStrategyOption ) ;
+ super ( bufferSize , claimStrategyOption , waitStrategyOption ) ;
- if ( Integer . bitCount ( size ) != NUMBER0 )
+ if ( Integer . bitCount ( bufferSize ) != NUMBER0 )
{
throw new IllegalArgumentException ( STRING0 ) ;
}
|
Rename size to bufferSize
|
<nb> public class TestServlet extends HttpServlet {
for ( String j : jo . getJobNames ( ) ) {
out . println ( STRING0 + j + STRING1 ) ;
}
+ out . println ( STRING2 ) ;
out . println ( STRING3 ) ;
out . println ( STRING4 ) ;
} catch ( JobStartException | JobSecurityException ex ) {
|
Adding prompts to check server log
|
<nb> public class JavaFxTagNameReference extends TagNameReference {
if ( object instanceof JavaFxClassBackedElementDescriptor ) {
final XmlFile xmlFile = ( XmlFile ) context . getFile ( ) ;
final String shortName = ( ( JavaFxClassBackedElementDescriptor ) object ) . getName ( ) ;
- JavaFxPsiUtil . insertImportWhenNeeded ( xmlFile , shortName , ( ( JavaFxClassBackedElementDescriptor ) object ) . getQualifiedName ( ) ) ;
context . commitDocument ( ) ;
+ JavaFxPsiUtil . insertImportWhenNeeded ( xmlFile , shortName , ( ( JavaFxClassBackedElementDescriptor ) object ) . getQualifiedName ( ) ) ;
}
}
}
|
commit document before import insertion
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix javadoc example
|
<nb> public class LzoProtobufB64LinePigletGenerator extends ProtoCodeGenerator {
ProtogenHelper . getProtoClass ( packageName_ , protoFilename_ , descriptorProto_ . getName ( ) ) ) ;
sb . append ( protoToPig_ . toPigScript ( msgDescriptor , LzoProtobufB64LinePigLoader . class . getCanonicalName ( ) ,
- String . format ( STRING0 , packageName_ , descriptorProto_ . getName ( ) )
+ String . format ( STRING1 , packageName_ , protoFilename_ , descriptorProto_ . getName ( ) )
) ) . endl ( ) ;
sb . endl ( ) ;
<nb> public class LzoProtobufBlockPigletGenerator extends ProtoCodeGenerator {
ProtogenHelper . getProtoClass ( packageName_ , protoFilename_ , descriptorProto_ . getName ( ) ) ) ;
sb . append ( protoToPig_ . toPigScript ( msgDescriptor , LzoProtobufBlockPigLoader . class . getCanonicalName ( ) ,
- String . format ( STRING0 , packageName_ , descriptorProto_ . getName ( ) )
+ String . format ( STRING1 , packageName_ , protoFilename_ , descriptorProto_ . getName ( ) )
) ) . endl ( ) ;
sb . endl ( ) ;
|
Fix class name in rotobuf piglet generator
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
remove duplicate import
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class IntersectionVertex extends StreetVertex {
private static final Logger LOG = LoggerFactory . getLogger ( IntersectionVertex . class ) ;
<nb> public class IntersectionVertex extends StreetVertex {
LOG . debug ( STRING0 , getIndex ( ) ) ;
return NUMBER0 ;
}
-
- SINGLE
- SINGLE
- if ( fromSpeed > NUMBER1 && toSpeed > NUMBER1 && Math . abs ( fromSpeed - toSpeed ) < NUMBER2 ) {
- return NUMBER0 ;
- }
-
+
if ( ! mode . isDriving ( ) ) {
int turnCost = Math . abs ( outAngle - inAngle ) ;
if ( turnCost > NUMBER3 ) {
|
remove the old free flowing inference logic
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Fixing a build failure
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PyCharmInitialConfigurator {
}
} ) ;
}
+
+ Registry . get ( STRING0 ) . setValue ( false ) ; SINGLE
}
private static void showInitialConfigurationDialog ( ) {
|
Disable scratch in PyCharm
|
<nb> public class MediaPlayerPerformance extends ActivityInstrumentationTestCase < Medi
Thread . sleep ( NUMBER0 ) ;
mEndPid = getMediaserverPid ( ) ;
int memDiff = mEndMemory - startMemory ;
- if ( memDiff < NUMBER1 )
+ if ( memDiff < NUMBER1 ) {
memDiff = NUMBER1 ;
- else
- output . write ( STRING0 + memDiff ) ;
+ }
+ output . write ( STRING0 + memDiff ) ;
output . write ( STRING1 ) ;
SINGLE
if ( startPid != mEndPid ) {
|
Fix the bug that it should write the zero diff to the output file when the actual diff is negative
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ORecordSerializerSchemaAware2CSV extends ORecordSerializerCSVAbstra
Object firstValue = coll != null ? coll . iterator ( ) . next ( ) : Array . get ( fieldValue , NUMBER0 ) ;
if ( database != null
- && ( firstValue instanceof ORecordSchemaAware < ? > || ( database . getDatabaseOwner ( ) instanceof ODatabaseObject && ( ( ODatabaseObject ) database
+ && ( firstValue instanceof ORID || firstValue instanceof ORecordSchemaAware < ? > || ( database . getDatabaseOwner ( ) instanceof ODatabaseObject && ( ( ODatabaseObject ) database
. getDatabaseOwner ( ) ) . getEntityManager ( ) . getEntityClass ( getClassName ( firstValue ) ) != null ) ) ) {
linkedClass = getLinkInfo ( database , getClassName ( firstValue ) ) ;
if ( type == null ) {
|
Fixed a lot of bugs on embedded fields
|
<nb> public class SessionListenerBridge implements SessionListener {
if ( reason == SessionDestroyedReason . TIMEOUT ) {
handle = threadSetup . setup ( exchange ) ;
}
+ for ( String attribute : session . getAttributeNames ( ) ) {
+ session . removeAttribute ( attribute ) ;
+ }
applicationListeners . sessionDestroyed ( httpSession ) ;
} finally {
if ( handle != null ) {
|
Remove all attributes before destroying the session to make sure
|
<nb> public class Raptor implements PathService {
SINGLE
double distance = distanceLibrary . distance ( options . rctx . origin . getCoordinate ( ) , options . rctx . target . getCoordinate ( ) ) ;
if ( distance < shortPathCutoff ) {
+ log . debug ( STRING0 ) ;
return shortPathService . getPaths ( options ) ;
}
|
log fall back to avoid confusion
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
|
Removing bad org omg CORBA Environment import
|
<nb> public class ControlFrameHandler implements FrameHandler , AutoCloseable
public ControlFrameHandler ( final UdpDestination destination ,
final MediaDriverAdminThread mediaDriverAdminThread ) throws Exception
{
- this . transport = new UdpTransport ( this , destination . localData ( ) , mediaDriverAdminThread . nioSelector ( ) ) ;
+ this . transport = new UdpTransport ( this , destination . localControl ( ) , mediaDriverAdminThread . nioSelector ( ) ) ;
this . destination = destination ;
this . mediaDriverAdminThread = mediaDriverAdminThread ;
this . sessionMap = new Long2ObjectHashMap < > ( ) ;
|
actually read control data on the control address
|
<nb> public class Inspect extends Request {
Response r = Response . done ( result ) ;
r . addHeader ( STRING0 SINGLE
- + Parse . link ( v . _key , STRING1 ) + STRING2 SINGLE
+ + Parse . link ( v . _key , STRING1 ) + STRING3 SINGLE
+ RReader . link ( v . _key , STRING4 ) + STRING5 ) ;
return r ;
}
|
Remove an extraneous comma
|
<nb> public class NoiseTest {
FastRandom sfr = new FastRandom ( seed ) ;
PerlinNoise pn = new PerlinNoise ( seed ) ;
- SimplexNoise sn = new SimplexNoise ( ) ;
+ SimplexNoise sn = new SimplexNoise ( seed ) ;
for ( int i = NUMBER0 ; i < warmUp ; i ++ ) {
double posX = pfr . nextDouble ( ) * NUMBER1 d ;
|
Tiny fix feed a seed value to SimplexNoise
|
<nb> 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 StandardRuleXmlFormat {
} else if ( StringUtils . equalsIgnoreCase ( STRING0 , propNodeName ) ) {
param . setType ( propText ) ;
+
+ } else if ( StringUtils . equalsIgnoreCase ( STRING1 , propNodeName ) ) {
+ param . setDefaultValue ( propText ) ;
}
}
if ( StringUtils . isEmpty ( param . getKey ( ) ) ) {
|
add the property defaultValue to param nodes
|
<nb> public class CookieDecoder {
private final static String COMMA = STRING0 ;
- private boolean lenient ;
+ private final boolean lenient ;
COMMENT
COMMENT
|
Declare field final
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix Spelling in ReflectorLoader
|
<nb> public class SuggestionAutoCompleteText extends MultiAutoCompleteTextView {
return ;
}
String text = getAutoSaveTextHelper ( ) . loadString ( this ) ;
- setText ( text ) ;
- setSelection ( text . length ( ) ) ;
+ if ( ! text . isEmpty ( ) ) {
+ setText ( text ) ;
+ setSelection ( text . length ( ) ) ;
+ }
}
@ override
|
never auto fill the empty string
|
<nb> import NAMESPACE ;
COMMENT
public class RESTClientFactory implements StoreClientFactory {
+ public static final int SHUTDOWN_TIMEOUT = NUMBER0 ;
private RESTClientConfig config = null ;
private final StoreStats stats ;
private Logger logger = Logger . getLogger ( RESTClientFactory . class ) ;
<nb> public class RESTClientFactory implements StoreClientFactory {
}
final FutureCallback < None > factoryShutdownCallback = new FutureCallback < None > ( ) ;
- SINGLE
- this . _clientFactory . shutdown ( factoryShutdownCallback , NUMBER1 , TimeUnit . SECONDS ) ;
+ this . _clientFactory . shutdown ( factoryShutdownCallback , SHUTDOWN_TIMEOUT , TimeUnit . SECONDS ) ;
try {
factoryShutdownCallback . get ( ) ;
} catch ( InterruptedException e ) {
|
Incorporating review comments
|
<nb>
package NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class Status {
}
}
- private static final Charset US_ASCII = Charset . forName ( STRING0 ) ;
- private static final Charset UTF_8 = Charset . forName ( STRING1 ) ;
-
SINGLE
private static final List < Status > STATUS_LIST = buildStatusList ( ) ;
|
Fix an NPE in Status
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
|
added javadoc headers
|
<nb> public abstract class Repository extends RepositoryInfo {
return ;
}
if ( this . getTagList ( ) == null ) {
- throw new HistoryException ( STRING0 + this ) ;
+ throw new HistoryException ( STRING0 ) ;
}
Iterator < TagEntry > it = this . getTagList ( ) . descendingIterator ( ) ;
TagEntry lastTagEntry = null ;
|
remove debugging leftover
|
<nb> public abstract class PsiFileImpl extends ElementBase implements PsiFileEx , PsiF
synchronized ( myStubLock ) {
StubTree fileStub = derefStub ( ) ;
StubElement childStub = child . getStub ( ) ;
- if ( fileStub == null || childStub != null && fileStub . getRoot ( ) != childStub . getParentStub ( ) ) {
+ if ( childStub != null && ( fileStub == null || fileStub . getRoot ( ) != childStub . getParentStub ( ) ) ) {
return false ;
}
}
|
avoid race condition when calling isValid during stub ast switching
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PsiMethodReferenceExpressionImpl extends PsiReferenceExpressionBase
@ nullable
@ override
public PsiType getFunctionalInterfaceType ( ) {
- return LambdaUtil . getFunctionalInterfaceType ( this , true ) ;
+ return FunctionalInterfaceParameterizationUtil . getGroundTargetType ( LambdaUtil . getFunctionalInterfaceType ( this , true ) ) ;
}
@ override
|
apply non wildcard parameterization for method refs
|
<nb> static String errorMsg ( String source , int line , String s ) {
public static Object eval ( Object form ) throws Exception {
boolean createdLoader = false ;
- if ( ! LOADER . isBound ( ) )
+ if ( true ) SINGLE
{
Var . pushThreadBindings ( RT . map ( LOADER , RT . makeClassLoader ( ) ) ) ;
createdLoader = true ;
|
made eval use ephemeral classloader in all cases
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public abstract class ZenCodingGenerator {
}
protected boolean isAllowedChar ( char c ) {
- return ( Character . isDigit ( c ) || Character . isLetter ( c ) || StringUtil . containsChar ( STRING0 , c ) ) ;
+ return Character . isDigit ( c ) || Character . isLetter ( c ) || StringUtil . containsChar ( STRING0 , c ) ;
}
@ notnull
|
Remove redundant brackets
|
<nb> public class OFieldTransformer extends OAbstractTransformer {
if ( db == null )
throw new OTransformException ( STRING0 ) ;
+ log ( OETLProcessor . LOG_LEVELS . DEBUG , STRING1 , doc ) ;
db . save ( doc ) ;
}
}
|
Added log on save
|
<nb> public abstract class AbstractNCSARequestLog extends AbstractLifeCycle implement
if ( authentication instanceof Authentication . User )
buf . append ( ( ( Authentication . User ) authentication ) . getUserIdentity ( ) . getUserPrincipal ( ) . getName ( ) ) ;
else
- buf . append ( STRING0 ) ;
+ buf . append ( STRING1 ) ;
buf . append ( STRING2 ) ;
if ( _logDateCache != null )
|
Removed extra space in NCSA log
|
<nb> public class SipUser {
}
private void setupUserProfile ( String username , String password , String realm , String phone ) {
- String fromURL = STRING0 + phone + STRING1 + phone + STRING2 + proxy + STRING3 ;
+ String fromURL = STRING0 + username + STRING1 + phone + STRING2 + proxy + STRING3 ;
userProfile . username = username ;
userProfile . passwd = password ;
userProfile . realm = realm ;
|
display the username instead of the userid on the voice participant s window
|
<nb> public class JavaVersionRule implements MethodRule {
AT_MOST {
@ override
protected boolean check ( ClassFileVersion current , ClassFileVersion enforced ) {
- return current . isAtLeast ( enforced ) ;
+ return current . isLessThan ( enforced ) || current . equals ( enforced ) ;
}
} ;
|
Fixed version rule
|
<nb> public class SerializingCache < K , V > implements ICache < K , V >
FreeableMemory mem = serialize ( value ) ;
if ( mem == null )
return false ; SINGLE
- V oldValue = deserialize ( old ) ;
+
+ V oldValue ;
+ SINGLE
+ if ( ! old . reference ( ) )
+ return false ; SINGLE
+ try
+ {
+ oldValue = deserialize ( old ) ;
+ }
+ finally
+ {
+ old . unreference ( ) ;
+ }
boolean success = oldValue . equals ( oldToReplace ) && map . replace ( key , old , mem ) ;
if ( success )
- old . unreference ( ) ;
+ old . unreference ( ) ; SINGLE
else
mem . unreference ( ) ;
return success ;
|
avoid seg faults during compaction
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ApplicationImpl extends ComponentManagerImpl implements Application
loadComponentRoamingTypes ( ) ;
+ HeavyProcessLatch . INSTANCE . processStarted ( ) ;
try {
getStateStore ( ) . load ( ) ;
}
catch ( StateStorage . StateStorageException e ) {
throw new IOException ( e . getMessage ( ) ) ;
}
-
+ finally {
+ HeavyProcessLatch . INSTANCE . processFinished ( ) ;
+ }
}
@ override
|
r peter prevent index vfs flushes while the app is initializing
|
<nb> public class PoiUIFilter implements SearchPoiTypeFilter , Comparable < PoiUIFilter >
public static void combineStandardPoiFilters ( Set < PoiUIFilter > filters , OsmandApplication app ) {
Set < PoiUIFilter > standardFilters = new TreeSet < > ( ) ;
for ( PoiUIFilter filter : filters ) {
- if ( filter . isStandardFilter ( ) && filter . filterId . startsWith ( PoiUIFilter . STD_PREFIX ) ) {
+ if ( ( filter . isStandardFilter ( ) && filter . filterId . startsWith ( PoiUIFilter . STD_PREFIX ) )
+ || filter . filterId . startsWith ( PoiUIFilter . CUSTOM_FILTER_ID ) ) {
standardFilters . add ( filter ) ;
}
}
|
combine with custom filter
|
<nb> public final class StringUtil {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static CharSequence escapeCsv ( CharSequence value ) {
int length = checkNotNull ( value , STRING0 ) . length ( ) ;
<nb> public final class StringUtil {
} else {
boolean isNextCharDoubleQuote = isDoubleQuote ( value . charAt ( i + NUMBER0 ) ) ;
if ( ! isDoubleQuote ( value . charAt ( i - NUMBER0 ) ) &&
- ( ! isNextCharDoubleQuote || isNextCharDoubleQuote && i + NUMBER0 == last ) ) {
+ ( ! isNextCharDoubleQuote || i + NUMBER0 == last ) ) {
escaped . append ( DOUBLE_QUOTE ) ;
escapedDoubleQuote = true ;
}
|
Remove the condition which is always true when reached
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> import NAMESPACE ;
public class DataSetTest extends ContextTestSupport {
protected SimpleDataSet dataSet = new SimpleDataSet ( NUMBER0 ) ;
- public void test ( ) throws Exception {
- MockEndpoint endpoint = getMockEndpoint ( STRING0 ) ;
- endpoint . expectedMessageCount ( ( int ) dataSet . getSize ( ) ) ;
-
+ public void testDataSet ( ) throws Exception {
+ SINGLE
+ SINGLE
assertMockEndpointsSatisfied ( ) ;
}
<nb> public class DataSetTest extends ContextTestSupport {
protected RouteBuilder createRouteBuilder ( ) throws Exception {
return new RouteBuilder ( ) {
public void configure ( ) throws Exception {
- from ( STRING1 ) . multicast ( ) .
- to ( STRING0 ) .
- to ( STRING2 ) ;
+ from ( STRING1 ) . to ( STRING2 ) ;
from ( STRING2 ) . to ( STRING1 ) ;
}
|
fixed unit test repoted by TC
|
<nb> public class CommentUtils {
COMMENT
COMMENT
public static void displayHtmlComment ( TextView textView , String content , int maxImageSize ) {
- if ( textView == null )
+ if ( textView == null ) {
return ;
+ }
if ( content == null ) {
textView . setText ( null ) ;
<nb> public class CommentUtils {
end -- ;
}
- textView . setText ( source ) ;
+ textView . setText ( source . subSequence ( start , end ) ) ;
}
SINGLE
|
Fixed bug that caused blank lines after reader comments
|
<nb> public class SwitchDrawerItem extends BaseDrawerItem < SwitchDrawerItem > {
private CompoundButton . OnCheckedChangeListener checkedChangeListener = new CompoundButton . OnCheckedChangeListener ( ) {
@ override
public void onCheckedChanged ( CompoundButton buttonView , boolean isChecked ) {
+ checked = isChecked ;
+
if ( getOnCheckedChangeListener ( ) != null ) {
getOnCheckedChangeListener ( ) . onCheckedChanged ( SwitchDrawerItem . this , buttonView , isChecked ) ;
}
<nb> public class ToggleDrawerItem extends BaseDrawerItem < ToggleDrawerItem > {
private CompoundButton . OnCheckedChangeListener checkedChangeListener = new CompoundButton . OnCheckedChangeListener ( ) {
@ override
public void onCheckedChanged ( CompoundButton buttonView , boolean isChecked ) {
+ checked = isChecked ;
+
if ( getOnCheckedChangeListener ( ) != null ) {
getOnCheckedChangeListener ( ) . onCheckedChanged ( ToggleDrawerItem . this , buttonView , isChecked ) ;
}
|
remember state of toggle and switch
|
<nb> public class ZygoteInit {
private static void preloadClasses ( ) {
final VMRuntime runtime = VMRuntime . getRuntime ( ) ;
- InputStream is = ZygoteInit . class . getClassLoader ( ) . getResourceAsStream (
+ InputStream is = ClassLoader . getSystemClassLoader ( ) . getResourceAsStream (
PRELOADED_CLASSES ) ;
if ( is == null ) {
Log . e ( TAG , STRING0 + PRELOADED_CLASSES + STRING1 ) ;
|
Don t use bootstrap loader directly
|
<nb> public class MapActivity extends AccessibleActivity implements IMapLocationListe
final GeoidAltitudeCorrection geo = app . getResourceManager ( ) . getGeoidAltitudeCorrection ( ) ;
if ( geo != null ) {
alt -= geo . getGeoidHeight ( l . getLatitude ( ) , l . getLongitude ( ) ) ;
- l . setAltitude ( alt ) ;
+ r . setAltitude ( alt ) ;
}
}
return r ;
|
Fix altitude correction
|
<nb> public class InformationSchemaServiceTest extends SQLTransportIntegrationTest {
STRING0 +
STRING1 +
STRING2 +
- STRING3 ) ;
- ensureYellow ( ) ;
+ STRING4 ) ;
+ ensureGreen ( ) ;
execUsingClient ( STRING5 ) ;
assertEquals ( NUMBER0 , response . rowCount ( ) ) ;
assertEquals ( STRING6 , response . rows ( ) [ NUMBER1 ] [ NUMBER1 ] ) ;
<nb> public class InformationSchemaServiceTest extends SQLTransportIntegrationTest {
put ( STRING7 , STRING8 ) ;
} }
} ) ;
+ refresh ( ) ;
execUsingClient ( STRING5 ) ;
assertEquals ( NUMBER2 , response . rowCount ( ) ) ;
|
fix test flakyness in another one of many cases
|
<nb> public class OTPServiceImpl implements OTPService . Iface {
LocationObservation . Builder builder = new LocationObservation . Builder ( ) . setCoordinate ( c ) ;
if ( req . isSetHeading ( ) ) builder . setHeading ( req . getHeading ( ) ) ;
- SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
StreetVertexIndexService streetVertexIndex = getStreetIndex ( ) ;
CandidateEdgeBundle edges = streetVertexIndex . getClosestEdges ( builder . build ( ) , requirements ) ;
|
Add a comment
|
<nb> public class BasicBSONObject extends LinkedHashMap < String , Object > implements BSO
return ( ( Number ) foo ) . longValue ( ) ;
}
-
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public double getDouble ( String key ) {
+ Object foo = get ( key ) ;
+ return ( ( Number ) foo ) . doubleValue ( ) ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Added a method getDouble to BasicBSONObject java for easily fetching a double
|
<nb> public class NewConnectionNavigationPage
ImageResource icon ,
NewConnectionContext input )
{
- super ( title , subTitle , STRING0 ,
+ super ( title , subTitle , STRING1 ,
icon , null , createPages ( input ) ) ;
}
<nb> public class NewConnectionNavigationPage
new ArrayList < WizardPage < NewConnectionContext ,
ConnectionOptions > > ( ) ;
- pages . add ( new NewConnectionSelectionPage ( ) ) ;
+ pages . add ( new NewConnectionSelectionPage ( STRING2 ) ) ;
return pages ;
}
<nb> import NAMESPACE ;
public class NewConnectionSelectionPage
extends WizardPage < NewConnectionContext , ConnectionOptions >
{
- public NewConnectionSelectionPage ( )
+ public NewConnectionSelectionPage ( String connectionName )
{
- super ( STRING0 , STRING3 , STRING4 , null , null ) ;
+ super ( connectionName , STRING5 , connectionName + STRING6 , null , null ) ;
}
@ override
|
tweak connection wizard names
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> public class BootstrapAuthenticatorActivity extends SherlockAccountAuthenticator
setContentView ( layout . login_activity ) ;
+ Views . inject ( this ) ;
+
emailText . setAdapter ( new ArrayAdapter < String > ( this ,
simple_dropdown_item_1line , userEmailAccounts ( ) ) ) ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CarouselActivity extends BootstrapFragmentActivity {
setContentView ( R . layout . carousel_view ) ;
Views . inject ( this ) ;
+ BootstrapApplication . getInstance ( ) . inject ( this ) ;
pager . setAdapter ( new BootstrapPagerAdapter ( getResources ( ) , getSupportFragmentManager ( ) ) ) ;
|
Adding injection to activities for some reason the injection doesnt work on base classes
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed typo in javadoc
|
<nb> public class StreetLayer implements Serializable {
for ( int e = NUMBER0 ; e < edgeStore . nEdges ; e += NUMBER1 ) {
edge . seek ( e ) ;
SINGLE
- if ( edge . getLengthMm ( ) < NUMBER2 * NUMBER3 * NUMBER3 ) {
- spatialIndex . insert ( edge . getEnvelope ( ) , e ) ;
- }
+ SINGLE
+ spatialIndex . insert ( edge . getEnvelope ( ) , e ) ;
+ SINGLE
}
LOG . info ( STRING0 ) ;
}
|
insert all edges into spatial index
|
<nb> public abstract class AbstractInitCommand extends Command implements UserInterac
if ( oAuthSettings != null ) {
Constructor < ? extends OAuthGenerator > optionCallbackClassConstructor = oAuthSettings . value ( ) . getDeclaredConstructor ( settings . getClass ( ) ) ;
- OAuthGenerator oAuthGenerator = optionCallbackClassConstructor . newInstance ( ) ;
+ OAuthGenerator oAuthGenerator = optionCallbackClassConstructor . newInstance ( settings ) ;
if ( isHeadless ) {
if ( oAuthGenerator instanceof OAuthGenerator . WithNoRedirectMode ) {
|
Fixed missing variable
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class AbstractQueryTestCase < QB extends AbstractQueryBuilder < QB > >
b . bind ( Environment . class ) . toInstance ( new Environment ( settings ) ) ;
b . bind ( ThreadPool . class ) . toInstance ( threadPool ) ;
} ,
- settingsModule , new IndicesModule ( namedWriteableRegistry , Collections . emptyList ( ) ) {
+ settingsModule , new IndicesModule ( namedWriteableRegistry , pluginsService . filterPlugins ( MapperPlugin . class ) ) {
@ override
public void configure ( ) {
SINGLE
|
Fix percolator tests
|
<nb> package NAMESPACE ;
COMMENT
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class VimToolWindow extends JPanel
COMMENT
private VimToolWindow ( )
{
+ add ( new JLabel ( STRING0 ) ) ;
+
setSize ( NUMBER0 , NUMBER0 ) ;
}
|
Added message to resize tool window
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class EditContent extends Activity {
<nb> public class EditContent extends Activity {
EditContent . this ) ;
if ( mediaData == null ) {
+ SINGLE
+ Toast . makeText ( EditContent . this , getResources ( ) . getText ( R . string . gallery_error ) , Toast . LENGTH_SHORT ) . show ( ) ;
return ;
}
<nb> public class ImageHelper {
. getColumnIndex ( Images . Media . ORIENTATION ) ;
orientation = cur . getString ( orientationColumn ) ;
}
-
+
+ if ( thumbData == null ) {
+ return null ;
+ }
+
jpeg = new File ( thumbData ) ;
path = thumbData ;
} else {
|
Fix crash when adding image from Picasa
|
<nb> public class LockBasedStorageManager implements StorageManager {
value = cache . get ( input ) ;
if ( value != null ) return WrappedValues . unescapeExceptionOrNull ( value ) ;
+ AssertionError error = null ;
try {
V typedValue = compute . invoke ( input ) ;
Object oldValue = cache . put ( input , WrappedValues . escapeNull ( typedValue ) ) ;
- assert oldValue == null : STRING0 + oldValue ;
+
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ if ( oldValue != null ) {
+ error = new AssertionError ( STRING0 + oldValue ) ;
+ throw error ;
+ }
return typedValue ;
}
catch ( Throwable throwable ) {
+ if ( throwable == error ) throw error ;
+
Object oldValue = cache . put ( input , WrappedValues . escapeThrowable ( throwable ) ) ;
assert oldValue == null : STRING0 + oldValue ;
|
Preserve exception cause in LockBasedStorageManager
|
<nb> package NAMESPACE ;
COMMENT
COMMENT
public class Polygon {
- private final float [ ] localVertices ;
+ private float [ ] localVertices ;
private float [ ] worldVertices ;
private float x , y ;
private float originX , originY ;
<nb> public class Polygon {
this . y = y ;
dirty = true ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setVertices ( float [ ] vertices ) {
+ localVertices = vertices ;
+ dirty = true ;
+ }
COMMENT
COMMENT
|
Adding setter for polygon s localVertices which are no longer final
|
<nb> public final class MasterWorkerInfo {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public synchronized void setLastUpdatedTimeMs ( long lastUpdatedTimeMs ) {
mLastUpdatedTimeMs = lastUpdatedTimeMs ;
|
Fix javadoc format to compile
|
<nb> public class VoiceInteractionService extends Service {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- @ deprecated
- public final AlwaysOnHotwordDetector createAlwaysOnHotwordDetector (
- String keyphrase , String locale , AlwaysOnHotwordDetector . Callback callback ) {
- return createAlwaysOnHotwordDetector ( keyphrase , Locale . forLanguageTag ( locale ) , callback ) ;
- }
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
Remove the old API for creating hotword detector
|
<nb> package NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> import NAMESPACE ;
explanation = STRING0 +
STRING1 +
STRING2 ,
- category = JDK , maturity = EXPERIMENTAL , severity = WARNING )
+ category = JDK , maturity = EXPERIMENTAL , severity = ERROR )
public class NonStaticInnerClass extends DescribingMatcher < ClassTree > {
COMMENT
|
Changed severity type on NonStaticInnerClass so that it activates in unit tests
|
<nb> class CheckRequiresForConstructors implements HotSwapCompilerPass {
String name = root . getString ( ) ;
Scope . Var var = t . getScope ( ) . getVar ( name ) ;
- if ( var == null || var . isLocal ( ) || var . isExtern ( ) ) {
+ if ( var != null && ( var . isLocal ( ) || var . isExtern ( ) ) ) {
return ;
}
newAndImplementsNodes . add ( n ) ;
|
Make the check for missing goog requires stricter
|
<nb> public abstract class ToolWindowHeader extends JPanel implements Disposable , UIS
toolWindow . getContentUI ( ) . showContextMenu ( comp , x , y , toolWindow . getPopupGroup ( ) , toolWindow . getContentManager ( ) . getSelectedContent ( ) ) ;
}
} ) ;
+ westPanel . addMouseListener ( new MouseAdapter ( ) {
+ @ override
+ public void mouseClicked ( MouseEvent e ) {
+ toolWindow . fireActivated ( ) ;
+ }
+ } ) ;
addMouseListener ( new MouseAdapter ( ) {
public void mouseReleased ( final MouseEvent e ) {
|
toolwindow should focus content when clicking on its header
|
<nb> public class XsltBreakpointHandler extends XBreakpointHandler < XLineBreakpoint < XB
int offset = - NUMBER0 ;
final Document document = PsiDocumentManager . getInstance ( project ) . getDocument ( file ) ;
- if ( document != null && document . getLineCount ( ) > position . getLine ( ) ) {
+ if ( document != null && document . getLineCount ( ) > position . getLine ( ) && position . getLine ( ) >= NUMBER1 ) {
offset = document . getLineStartOffset ( position . getLine ( ) ) ;
}
if ( offset < NUMBER1 ) {
|
Run to Cursor causes IOOBE at SegmentArray getSegmentStart
|
<nb> public class MoviesCursorAdapter extends CursorAdapter {
String poster = cursor . getString ( MoviesQuery . POSTER ) ;
if ( ! TextUtils . isEmpty ( poster ) ) {
String posterPath = poster . substring ( NUMBER0 , poster . length ( ) - NUMBER1 ) + mSizeSpec ;
- mImageDownloader . downloadAndStore ( posterPath , holder . poster ) ;
+ mImageDownloader . download ( posterPath , holder . poster , false ) ;
+ } else {
+ SINGLE
+ holder . poster . setImageDrawable ( null ) ;
}
SINGLE
|
Do not cache movie posters for now reset if no poster
|
<nb> public abstract class CodeInsightTestCase extends PsiTestCase {
final String extension = _extension == null ? fileType . getDefaultExtension ( ) : _extension ;
File dir = createTempDirectory ( ) ;
- final File tempFile = FileUtil . createTempFile ( dir , STRING0 , STRING1 + extension , true ) ;
+ final File tempFile = FileUtil . createTempFile ( dir , STRING2 , STRING1 + extension , true ) ;
final FileTypeManager fileTypeManager = FileTypeManager . getInstance ( ) ;
if ( fileTypeManager . getFileTypeByExtension ( extension ) != fileType ) {
new WriteCommandAction ( getProject ( ) ) {
|
avoid coincidental confusion CreateASVariableIntentionTest uses aaa field
|
<nb> public abstract class BlockMetaBase {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static String tempPath ( StorageDir dir , long userId , long blockId ) {
return PathUtils . concatPath ( dir . getDirPath ( ) , userId , blockId ) ;
|
Fix comments in tachyon worker block meta BlockMetaBase tempPath
|
<nb> public interface ContextBind {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface ContextBind {
COMMENT
COMMENT
COMMENT
- public ClassLoader bind ( boolean usePrivilegedAction , ClassLoader originalClassLoader ) ;
+ ClassLoader bind ( boolean usePrivilegedAction , ClassLoader originalClassLoader ) ;
COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface ContextBind {
COMMENT
COMMENT
COMMENT
- public void unbind ( boolean usePrivilegedAction , ClassLoader originalClassLoader ) ;
-
+ void unbind ( boolean usePrivilegedAction , ClassLoader originalClassLoader ) ;
}
|
Fix Javadoc errors
|
<nb> public class DiscoveryClient implements LookupService {
@ inject ( optional = true )
private EventBus eventBus ;
- DiscoveryClient ( InstanceInfo myInfo , EurekaClientConfig config , EventBus eventBus ) {
+ public DiscoveryClient ( InstanceInfo myInfo , EurekaClientConfig config , EventBus eventBus ) {
this ( myInfo , config ) ;
this . eventBus = eventBus ;
}
|
Make DiscoveryClient constructor public so it can be created by a provider
|
<nb> public class NotificationUsageStats {
SINGLE
SINGLE
private static final boolean ENABLE_AGGREGATED_IN_MEMORY_STATS = false ;
- private static final boolean ENABLE_SQLITE_LOG = true ;
+ private static final boolean ENABLE_SQLITE_LOG = false ;
private static final AggregatedStats [ ] EMPTY_AGGREGATED_STATS = new AggregatedStats [ NUMBER0 ] ;
|
Disable SQLite stats DO NOT MERGE
|
<nb>
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IndyDemo {
public static void timeReflection ( IndyDemo indyDemo ) throws Throwable {
long start = System . currentTimeMillis ( ) ;
Object [ ] scopes = { indyDemo } ;
- for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) {
+ int REFLECTION_TIMES = NUMBER1 ;
+ for ( int i = NUMBER0 ; i < REFLECTION_TIMES ; i ++ ) {
IndyDemo . class . getDeclaredMethod ( STRING0 ) . invoke ( scopes [ NUMBER0 ] ) ;
}
- System . out . println ( STRING1 + NUMBER2 * ( System . currentTimeMillis ( ) - start ) ) ;
+ System . out . println ( STRING1 + ( TIMES / REFLECTION_TIMES ) * ( System . currentTimeMillis ( ) - start ) ) ;
}
public static void timeReflectionCached ( IndyDemo indyDemo ) throws Throwable {
|
tidy up the benchmark to avoid errors
|
<nb> public class RecyclerView extends ViewGroup {
final int parentBottom = getHeight ( ) - getPaddingBottom ( ) ;
final int childLeft = child . getLeft ( ) + rect . left ;
final int childTop = child . getTop ( ) + rect . top ;
- final int childRight = childLeft + rect . right ;
- final int childBottom = childTop + rect . bottom ;
+ final int childRight = childLeft + rect . width ( ) ;
+ final int childBottom = childTop + rect . height ( ) ;
final int offScreenLeft = Math . min ( NUMBER0 , childLeft - parentLeft ) ;
final int offScreenTop = Math . min ( NUMBER0 , childTop - parentTop ) ;
<nb> public class RecyclerView extends ViewGroup {
COMMENT
@ deprecated
public boolean onRequestChildFocus ( RecyclerView parent , View child , View focused ) {
- return false ;
+ SINGLE
+ return isSmoothScrolling ( ) || parent . mRunningLayoutOrScroll ;
}
COMMENT
|
DO NOT MERGE Fix RecyclerView s child focus rect calculations
|
<nb> public abstract class DeclarativeScope < VALUE_LOADER extends ValueManager > extend
}
protected final void loadScopeObjectProperties ( @ notnull ObjectValue value , @ notnull final AsyncResult < List < ? extends Variable > > result ) {
+ if ( valueManager . rejectIfObsolete ( result ) ) {
+ return ;
+ }
+
value . getProperties ( ) . doWhenDone ( new Consumer < List < Variable > > ( ) {
@ override
public void consume ( List < Variable > variables ) {
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class ValueManager {
public final void markObsolete ( ) {
obsolete = true ;
}
+
+ public final boolean rejectIfObsolete ( @ notnull ActionCallback result ) {
+ if ( isObsolete ( ) ) {
+ result . reject ( STRING0 ) ;
+ return true ;
+ }
+ return false ;
+ }
}
|
don t load data for obsolete suspend context
|
<nb> public class HumanoidRagdollPreset extends RagdollPreset {
entry = new LexiconEntry ( ) ;
entry . addSynonym ( STRING0 , NUMBER0 ) ;
entry . addSynonym ( STRING1 , NUMBER0 ) ;
+ entry . addSynonym ( STRING2 , NUMBER0 ) ;
entry . addSynonym ( STRING3 , NUMBER1 ) ;
entry . addSynonym ( STRING4 , NUMBER2 ) ;
entry . addSynonym ( STRING5 , NUMBER3 ) ;
|
Added shin to HumanoidRagdollPreset so that Jaime works better with the KinematicRagdollControl
|
<nb> public class SSTableReader extends SSTable implements Comparable < SSTableReader >
assert openedFiles . get ( dataFileName ) == null ;
long start = System . currentTimeMillis ( ) ;
- SSTableReader sstable = new SSTableReader ( dataFileName , partitioner )
+ SSTableReader sstable = new SSTableReader ( dataFileName , partitioner ) ;
sstable . loadIndexFile ( ) ;
sstable . loadBloomFilter ( ) ;
if ( cacheFraction > NUMBER0 )
|
re add missing semicolon to test fixing build
|
<nb> public class TcpIpJoiner extends AbstractJoiner {
long joinStartTime = Clock . currentTimeMillis ( ) ;
Connection connection = null ;
- node . getFailedConnections ( ) . clear ( ) ;
while ( node . isActive ( ) && ! joined . get ( ) && ( Clock . currentTimeMillis ( ) - joinStartTime < maxJoinMillis ) ) {
connection = node . connectionManager . getOrConnect ( targetAddress ) ;
if ( connection == null ) {
- if ( node . getFailedConnections ( ) . contains ( targetAddress ) ) {
- break ;
- }
SINGLE
Thread . sleep ( NUMBER0 ) ;
continue ;
|
Cleanup for split brain merge handling
|
<nb> public class JNITableTest {
String TABLENAME = STRING0 ;
new File ( FILENAME ) . delete ( ) ;
- new File ( FILENAME + STRING1 ) . delete ( ) ;
SharedGroup group = new SharedGroup ( FILENAME ) ;
|
removed deletion of
|
<nb> public class TextInputLayout extends LinearLayout {
mCollapsingTextHelper . onLayout ( changed , left , top , right , bottom ) ;
if ( mEditText != null ) {
- final int l = mEditText . getLeft ( ) + mEditText . getPaddingLeft ( ) ;
- final int r = mEditText . getRight ( ) - mEditText . getPaddingRight ( ) ;
+ final int l = mEditText . getLeft ( ) + mEditText . getCompoundPaddingLeft ( ) ;
+ final int r = mEditText . getRight ( ) - mEditText . getCompoundPaddingRight ( ) ;
mCollapsingTextHelper . setExpandedBounds ( l ,
- mEditText . getTop ( ) + mEditText . getPaddingTop ( ) ,
- r , mEditText . getBottom ( ) - mEditText . getPaddingBottom ( ) ) ;
+ mEditText . getTop ( ) + mEditText . getCompoundPaddingTop ( ) ,
+ r , mEditText . getBottom ( ) - mEditText . getCompoundPaddingBottom ( ) ) ;
SINGLE
SINGLE
|
Take compound drawables into account for TextInputLayout
|
<nb> abstract class StaticTypeCheckingSupport {
for ( int i = NUMBER0 ; i < o1ps . length && allEqual ; i ++ ) {
allEqual = o1ps [ i ] . getType ( ) . equals ( o2ps [ i ] . getType ( ) ) ;
}
- if ( allEqual ) return NUMBER0 ;
+ if ( allEqual ) {
+ if ( o1 instanceof ExtensionMethodNode && o2 instanceof ExtensionMethodNode ) {
+ return compare ( ( ( ExtensionMethodNode ) o1 ) . getExtensionMethodNode ( ) , ( ( ExtensionMethodNode ) o2 ) . getExtensionMethodNode ( ) ) ;
+ }
+ return NUMBER0 ;
+ }
} else {
return o1ps . length - o2ps . length ;
}
|
Fixed method sorting when methods are of type ExtensionMethodNode
|
<nb> public interface Chart {
public void setDataAnimationListener ( ChartAnimationListener animationListener ) ;
+ public void setViewportAnimationListener ( ChartAnimationListener animationListener ) ;
+
public void callTouchListener ( SelectedValue selectedValue ) ;
public boolean isInteractive ( ) ;
<nb> public abstract class AbstractChartView extends View implements Chart {
dataAnimator . setChartAnimationListener ( animationListener ) ;
}
+ @ override
+ public void setViewportAnimationListener ( ChartAnimationListener animationListener ) {
+ viewportAnimator . setChartAnimationListener ( animationListener ) ;
+ }
+
public ChartRenderer getChartRenderer ( ) {
return chartRenderer ;
}
|
Added method for setting viewportAnimationListener listener called when viewport is setting with animation
|
<nb> public class ChatRoomMemberJabberImpl
@ override
public PresenceStatus getPresenceStatus ( )
{
- SINGLE
+ SINGLE
return ( ( ProtocolProviderServiceJabberImpl ) getProtocolProvider ( ) )
. getJabberStatusEnum ( ) . getStatus ( JabberStatusEnum . AVAILABLE ) ;
}
|
Added TODO for implementing accurate Jabber chat room member presence
|
<nb> import NAMESPACE ;
COMMENT
public class PackageIconLoader extends SimpleLoader {
@ override
- public Future < BitmapInfo > loadBitmap ( final Ion ion , final String key , final String uri , int resizeWidth , int resizeHeight ) {
+ public Future < BitmapInfo > loadBitmap ( final Ion ion , final String key , final String uri , int resizeWidth , int resizeHeight , boolean animateGif ) {
if ( uri == null || ! uri . startsWith ( STRING0 ) )
return null ;
<nb> public class VideoLoader extends SimpleLoader {
}
@ override
- public Future < BitmapInfo > loadBitmap ( Ion ion , final String key , final String uri , int resizeWidth , int resizeHeight ) {
+ public Future < BitmapInfo > loadBitmap ( Ion ion , final String key , final String uri , int resizeWidth , int resizeHeight , boolean animateGif ) {
if ( ! uri . startsWith ( ContentResolver . SCHEME_FILE ) )
return null ;
|
fix up broken overrides
|
<nb> public final class Mp4Util {
}
}
- int limit = endOffset - NUMBER0 ;
+ int limit = endOffset - NUMBER1 ;
SINGLE
SINGLE
SINGLE
|
Fix off by one bug preventing NAL unit detection at the limit
|
<nb> public class AjpProcessor < S > extends AbstractProcessor < S > {
}
case NB_READ_INTEREST : {
if ( ! endOfStream ) {
- registerForEvent ( true , false ) ;
+ socketWrapper . regsiterForEvent ( true , false ) ;
}
break ;
}
<nb> public class AjpProcessor < S > extends AbstractProcessor < S > {
request . setAttribute ( RequestDispatcher . ERROR_EXCEPTION , x ) ;
}
} catch ( IllegalStateException x ) {
- registerForEvent ( false , true ) ;
+ socketWrapper . regsiterForEvent ( false , true ) ;
}
} else if ( status == SocketStatus . OPEN_READ &&
request . getReadListener ( ) != null ) {
<nb> public class AjpProcessor < S > extends AbstractProcessor < S > {
asyncStateMachine . asyncOperation ( ) ;
}
} catch ( IllegalStateException x ) {
- registerForEvent ( true , false ) ;
+ socketWrapper . regsiterForEvent ( true , false ) ;
}
}
|
Replace registerForEvent with equivalent call that makes registerForEvent unused for AJP
|
<nb> public class HttpObjectAggregatorTest {
assertEquals ( HttpResponseStatus . REQUEST_ENTITY_TOO_LARGE , response . getStatus ( ) ) ;
assertEquals ( STRING0 , response . headers ( ) . get ( Names . CONTENT_LENGTH ) ) ;
assertFalse ( embedder . isOpen ( ) ) ;
-
- HttpContent chunk1 = new DefaultHttpContent ( Unpooled . copiedBuffer ( STRING1 , CharsetUtil . US_ASCII ) ) ;
-
- try {
- embedder . writeInbound ( chunk1 ) ;
- fail ( ) ;
- } catch ( Exception e ) {
- assertTrue ( e instanceof ClosedChannelException ) ;
- }
assertFalse ( embedder . finish ( ) ) ;
}
|
Fix another leak in HttpObjectAggregatorTest by removing redundant code
|
<nb> public class Timing {
return elapsed ;
}
+ COMMENT
public String toSecondsString ( ) {
return toSecondsString ( report ( ) ) ;
}
<nb> public class Timing {
return elapsed ;
}
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add javadoc for method
|
<nb> public class TextServicesManagerService extends ITextServicesManager . Stub {
Slog . d ( TAG , STRING0 ) ;
}
synchronized ( mSpellCheckerMap ) {
+ final ArrayList < SpellCheckerBindGroup > removeList =
+ new ArrayList < SpellCheckerBindGroup > ( ) ;
for ( SpellCheckerBindGroup group : mSpellCheckerBindGroups . values ( ) ) {
if ( group == null ) continue ;
- group . removeListener ( listener ) ;
+ SINGLE
+ removeList . add ( group ) ;
+ }
+ final int removeSize = removeList . size ( ) ;
+ for ( int i = NUMBER0 ; i < removeSize ; ++ i ) {
+ removeList . get ( i ) . removeListener ( listener ) ;
}
}
}
<nb> public class TextServicesManagerService extends ITextServicesManager . Stub {
}
}
+ SINGLE
private void cleanLocked ( ) {
if ( DBG ) {
Slog . d ( TAG , STRING1 ) ;
|
Fix ConcurrentModificationException in TextServicesManagerService
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public interface OneWireBindingProvider {
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class OneWireConfiguration implements ManagedService {
public static String ip = null ;
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public final class OneWireActivator implements BundleActivator {
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public class OneWireBinding implements OneWireBindingProvider , BindingConfigReader {
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class OneWireRefreshService extends Thread {
|
added author tag
|
<nb> abstract class PoolBase
return lastConnectionFailure . getAndSet ( null ) ;
}
- boolean isAutoCommit ( )
- {
- return isAutoCommit ;
- }
-
public DataSource getUnwrappedDataSource ( )
{
return dataSource ;
|
removed unused method
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RestClusterStateAction extends BaseRestHandler {
try {
XContentBuilder builder = RestXContentBuilder . restContentBuilder ( request ) ;
builder . startObject ( ) ;
+ builder . field ( Fields . CLUSTER_NAME , response . clusterName ( ) . value ( ) ) ;
response . state ( ) . settingsFilter ( settingsFilter ) . toXContent ( builder , request ) ;
builder . endObject ( ) ;
channel . sendResponse ( new XContentRestResponse ( request , RestStatus . OK , builder ) ) ;
<nb> public class RestClusterStateAction extends BaseRestHandler {
}
} ) ;
}
+
+ static final class Fields {
+ static final XContentBuilderString CLUSTER_NAME = new XContentBuilderString ( STRING0 ) ;
+ }
}
|
add cluster name back to cluster state API
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class H2QueryRunner
public H2QueryRunner ( )
{
- Logging . initialize ( ) ;
-
handle = DBI . open ( STRING0 + System . nanoTime ( ) ) ;
TpchMetadata tpchMetadata = new TpchMetadata ( STRING1 ) ;
|
Remove logging initialization from H2QueryRunner
|
<nb> public final class PhoneCapabilities {
COMMENT
public static final int DISCONNECT_FROM_CONFERENCE = NUMBER0 ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final int GENERIC_CONFERENCE = NUMBER1 ;
+
public static final int ALL = HOLD | SUPPORT_HOLD | MERGE_CONFERENCE | SWAP_CONFERENCE
| RESPOND_VIA_TEXT | MUTE | MANAGE_CONFERENCE | SEPARATE_FROM_CONFERENCE
| DISCONNECT_FROM_CONFERENCE ;
<nb> public final class PhoneCapabilities {
if ( can ( capabilities , VoWIFI ) ) {
builder . append ( STRING0 ) ;
}
+ if ( can ( capabilities , GENERIC_CONFERENCE ) ) {
+ builder . append ( STRING1 ) ;
+ }
+
builder . append ( STRING2 ) ;
return builder . toString ( ) ;
}
|
Add GENERIC_CONFERENCE to phone capabilities
|
<nb> public class ProducteevInvoker {
throws IOException , ApiServiceException {
try {
String request = createFetchUrl ( method , getParameters ) ;
+ System . err . println ( STRING0 + request ) ;
String response = null ;
try {
response = restClient . get ( request ) ;
<nb> public class ProducteevInvoker {
System . err . println ( response ) ;
return new JSONObject ( ) ;
}
- return new JSONObject ( response ) ;
- } catch ( JSONException e ) {
- throw new ApiResponseParseException ( e ) ;
+ try {
+ return new JSONObject ( response ) ;
+ } catch ( JSONException e ) {
+ System . err . println ( response ) ;
+ throw new ApiResponseParseException ( e ) ;
+ }
} catch ( NoSuchAlgorithmException e ) {
throw new RuntimeException ( e ) ;
}
|
debug added some debugging to PDV logic
|
<nb> public class SourceFormatter {
if ( ( includeFileName . endsWith ( STRING0 ) ||
includeFileName . endsWith ( STRING1 ) ) &&
- ! includeFileNames . contains ( includeFileName ) &&
- ! includeFileName . contains ( STRING2 ) ) {
+ ! includeFileName . endsWith ( STRING2 ) &&
+ ! includeFileName . endsWith ( STRING3 ) &&
+ ! includeFileNames . contains ( includeFileName ) ) {
includeFileNames . add ( includeFileName ) ;
}
|
SourceFormatter improve logic for finding unused imports in jsp jspf
|
<nb> public class AntFileImpl extends LightPsiFileBase implements AntFile {
myEpilogueElement = new AntOuterProjectElement ( this , projectEnd , fileText . substring ( projectEnd ) ) ;
}
final AntProjectImpl project = new AntProjectImpl ( this , tag , createProjectDefinition ( ) ) ;
- project . loadPredefinedProperties ( myProjectProperties , myExternalProperties ) ;
myProject = project ;
+ project . loadPredefinedProperties ( myProjectProperties , myExternalProperties ) ;
}
return myProject ;
}
|
crash proofing the case when project name contains property reference
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MyApplication extends Application {
private AtomicInteger counter ;
@ override
+ public Map < String , Object > getProperties ( ) {
+ return new HashMap < String , Object > ( ) { {
+ put ( STRING0 , true ) ;
+ } } ;
+ }
+
+ @ override
public Set < Class < ? > > getClasses ( ) {
this . counter = new AtomicInteger ( ) ;
<nb> public class MyApplication extends Application {
public int incrementAndGetCount ( ) {
return counter . incrementAndGet ( ) ;
}
- }
+ }
|
Fix unmapped exceptions from Jersey in WLS
|
<nb> public class TaskListActivity extends AstridActivity implements MainMenuListener
if ( ( requestCode == FilterListFragment . REQUEST_NEW_LIST || requestCode == FilterListFragment . REQUEST_NEW_FILTER ) && resultCode == Activity . RESULT_OK ) {
Filter newList = data . getParcelableExtra ( TagSettingsActivity . TOKEN_NEW_FILTER ) ;
if ( newList != null ) {
- getIntent ( ) . putExtra ( TaskListFragment . TOKEN_FILTER , newList ) ;
+ onFilterItemClicked ( newList ) ; SINGLE
FilterListFragment fla = getFilterListFragment ( ) ;
if ( fla != null )
fla . clear ( ) ;
|
Fixed bug where the displayed list wouldn t fully switch when creating a new list
|
<nb> public class BeanArchiveProcessor implements DeploymentUnitProcessor {
final boolean isRootBda = resourceRoot . equals ( deploymentResourceRoot ) ;
+ ResourceRoot indexResourceRoot = resourceRoot ;
if ( resourceRoot == deploymentResourceRoot && classesResourceRoot != null ) {
SINGLE
- resourceRoot = classesResourceRoot ;
+ indexResourceRoot = classesResourceRoot ;
}
- final Index index = indexes . get ( resourceRoot ) ;
+ final Index index = indexes . get ( indexResourceRoot ) ;
if ( index == null ) {
return null ; SINGLE
}
|
Fix issue with implicit bean archives
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.