diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class GeneralCommandLine {
private ParametersList myProgramParams = new ParametersList ( ) ;
private Charset myCharset = CharsetToolkit . getDefaultSystemCharset ( ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ notnull
+ public static String appendToPathEnvVar ( @ nullable String source , @ notnull String value ) {
+ if ( source != null ) source = value + File . pathSeparator + source ;
+ else source = value ;
+ return source ;
+ }
+
public void setExePath ( @ nonnls final String exePath ) {
myExePath = exePath . trim ( ) ;
}
|
Added a helper method for path like env variables
|
<nb> class FileDownloadTask extends BaseDownloadTask {
if ( transfer . getStatus ( ) == FileDownloadStatus . warn ) {
SINGLE
- final BaseDownloadTask task = taskList . get ( NUMBER0 ) ;
+ final BaseDownloadTask task = taskList . get ( taskList . size ( ) - NUMBER1 ) ;
task . update ( transfer ) ;
} else {
SINGLE
|
occur warn reserve first same task warn last task
|
<nb> public class ImporterGraphML implements FileImporter , LongTask {
public ImporterGraphML ( ) {
SINGLE
properties . addNodePropertyAssociation ( NodeProperties . LABEL , STRING0 ) ;
+ properties . addNodePropertyAssociation ( NodeProperties . LABEL , STRING1 ) ; SINGLE
properties . addNodePropertyAssociation ( NodeProperties . X , STRING2 ) ;
properties . addNodePropertyAssociation ( NodeProperties . Y , STRING3 ) ;
properties . addNodePropertyAssociation ( NodeProperties . Z , STRING4 ) ;
<nb> public class ImporterGraphML implements FileImporter , LongTask {
SINGLE
properties . addEdgePropertyAssociation ( EdgeProperties . LABEL , STRING0 ) ;
properties . addEdgePropertyAssociation ( EdgeProperties . LABEL , STRING5 ) ;
+ properties . addEdgePropertyAssociation ( EdgeProperties . LABEL , STRING6 ) ; SINGLE
properties . addEdgePropertyAssociation ( EdgeProperties . WEIGHT , STRING7 ) ;
properties . addEdgePropertyAssociation ( EdgeProperties . ID , STRING8 ) ;
properties . addEdgePropertyAssociation ( EdgeProperties . ID , STRING9 ) ;
|
Apply Raymond Borgan s fix for yEd label associtations in GraphML import
|
<nb> abstract public class AbstractProjectSettingsStep extends AbstractActionWithPane
c . gridy = NUMBER0 ;
c . weightx = FLOAT0 ;
panel . add ( mySdkCombo , c ) ;
-
+ final JPanel basePanelExtension = extendBasePanel ( ) ;
+ if ( basePanelExtension != null ) {
+ c . gridwidth = NUMBER1 ;
+ c . gridy = NUMBER1 ;
+ c . gridx = NUMBER2 ;
+ panel . add ( basePanelExtension , c ) ;
+ }
registerValidators ( ) ;
return panel ;
}
- protected void registerValidators ( ) {
+ @ nullable
+ protected JPanel extendBasePanel ( ) {
+ return null ;
+ }
+ protected void registerValidators ( ) {
myLocationField . getTextField ( ) . getDocument ( ) . addDocumentListener ( new DocumentAdapter ( ) {
@ override
protected void textChanged ( DocumentEvent e ) {
|
added API to extend base panel in new project dialog
|
<nb> public class MBeanDumper {
value = mbeanServer . getAttribute ( oname , attName ) ;
} catch ( Throwable t ) {
log . error ( STRING0 + oname +
- STRING1 + attName + STRING1 + t . toString ( ) ) ;
+ STRING1 + attName , t ) ;
continue ;
}
if ( value == null ) continue ;
|
Log full stack trace when there is an error may provide more clues as
|
<nb> public class Reporter {
return ;
try {
+ final File file = new File ( name ) ;
+ final String path = file . getParent ( ) ;
+
+ new File ( path ) . mkdirs ( ) ;
+
final FileWriter writer = new FileWriter ( name ) ;
writer . write ( contents ) ;
|
Create report files deeply mainy for testing purpises
|
<nb> public class Request implements RequestInf {
private double triangleSafetyFactor ;
private double triangleSlopeFactor ;
private double triangleTimeFactor ;
+ private Integer maxTransfers ;
public Request ( ) {
modes = new TraverseModeSet ( STRING0 ) ;
<nb> public class Request implements RequestInf {
return triangleTimeFactor ;
}
+ @ override
+ public void setMaxTransfers ( Integer maxTransfers ) {
+ this . maxTransfers = maxTransfers ;
+ }
+
+ @ override
+ public Integer getMaxTransfers ( ) {
+ return maxTransfers ;
+ }
+
}
<nb> public interface RequestInf {
COMMENT
COMMENT
public boolean getShowIntermediateStops ( ) ;
+
+ public void setMaxTransfers ( Integer maxTransfers ) ;
+
+ public Integer getMaxTransfers ( ) ;
}
|
add maxTransfers member to Request class
|
<nb> public interface DataConstants {
public static final int BYTES_PER_KILOBYTE = NUMBER0 ;
public static final int BYTES_PER_MEGABYTE = NUMBER0 * DataConstants . BYTES_PER_KILOBYTE ;
+ public static final short UNSIGNED_BYTE_MAX_VALUE = ( short ) Byte . MAX_VALUE - ( short ) Byte . MIN_VALUE ;
+ public static final int UNSIGNED_SHORT_MAX_VALUE = ( int ) Short . MAX_VALUE - ( int ) Short . MIN_VALUE ;
+ public static final long UNSIGNED_INT_MAX_VALUE = ( long ) Integer . MAX_VALUE - ( long ) Integer . MIN_VALUE ;
+
SINGLE
SINGLE
SINGLE
|
Added constants for unsigned max values
|
<nb> public class Features {
final Map < String , Map < String , Double > > floatFeatures = new HashMap < > ( ) ;
featureVector . setFloatFeatures ( floatFeatures ) ;
+ SINGLE
+ floatFeatures . put ( LABEL , new HashMap < > ( ) ) ;
final Set < String > bias = new HashSet < > ( ) ;
final Set < String > missing = new HashSet < > ( ) ;
|
Add default LABEL family in generating example
|
<nb> public class PShape implements PConstants {
public void normal ( float nx , float ny , float nz ) {
}
+
+ public void attrib ( String name , float . . . values ) {
+ }
+
+
+ public void attrib ( String name , int . . . values ) {
+ }
+
+
+ public void attrib ( String name , boolean . . . values ) {
+ }
+
+
COMMENT
COMMENT
COMMENT
|
added attrib to PShape
|
<nb> class DefaultStateSerializer {
if ( ! storageId . value ( ) . equals ( storage . id ( ) ) ) return false ;
}
}
+
+ return storage . isDefault ( ) ;
}
return true ;
<nb> class XmlSerializerImpl {
return new ArrayBinding ( this , aClass , accessor ) ;
}
if ( Number . class . isAssignableFrom ( aClass ) ) return new PrimitiveValueBinding ( aClass ) ;
+ if ( Boolean . class . isAssignableFrom ( aClass ) ) return new PrimitiveValueBinding ( aClass ) ;
if ( String . class . isAssignableFrom ( aClass ) ) return new PrimitiveValueBinding ( aClass ) ;
if ( Collection . class . isAssignableFrom ( aClass ) ) return new CollectionBinding ( ( ParameterizedType ) originalType , this , accessor ) ;
if ( Map . class . isAssignableFrom ( aClass ) ) return new MapBinding ( ( ParameterizedType ) originalType , this , accessor ) ;
|
added Boolean support
|
<nb> public final class IndexedRingBuffer < E > implements Subscription {
} ;
- static int defaultSize = NUMBER0 ;
-
COMMENT
SINGLE
<nb> public final class IndexedRingBuffer < E > implements Subscription {
COMMENT
COMMENT
static {
+ int defaultSize = NUMBER1 ;
+
SINGLE
if ( PlatformDependent . isAndroid ( ) ) {
defaultSize = NUMBER2 ;
|
Remove needless static field for initialization in IndexedRingBuffer
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public class GroovyConsoleAction extends GroovyShellActionBase {
+ public class GroovyConsoleAction extends GroovyShellActionBase implements DumbAware {
@ override
protected GroovyShellRunner getRunner ( Module module ) {
return GroovyShellRunner . getAppropriateRunner ( module ) ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public abstract class GroovyShellActionBase extends DumbAwareAction {
+ public abstract class GroovyShellActionBase extends AnAction {
private static final Logger LOG = Logger . getInstance ( GroovyShellActionBase . class ) ;
public static final String GROOVY_SHELL_EXECUTE = STRING0 ;
|
make Groovy Shell action non dumb aware as it requires findClass
|
<nb> public abstract class PyPackageManager {
public abstract List < PyRequirement > getRequirements ( @ notnull Module module ) ;
@ nullable
public abstract Set < PyPackage > getDependents ( @ notnull PyPackage pkg ) throws PyExternalProcessException ;
- @ deprecated
- public abstract boolean cacheIsNotNull ( ) ;
}
<nb> public class PyPackageManagerImpl extends PyPackageManager {
}
}
- public boolean cacheIsNotNull ( ) {
- return myPackagesCache != null ;
- }
-
@ nullable
public synchronized List < PyPackage > getPackages ( boolean cachedOnly ) throws PyExternalProcessException {
if ( cachedOnly ) {
|
Removed unused code
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> class StableInvocationHandler < T extends DomElement > implements InvocationHandler
}
private void doInvalidate ( ) {
- DomManagerImpl . getDomInvocationHandler ( myCachedValue ) . detach ( true ) ;
+ final DomInvocationHandler handler = DomManagerImpl . getDomInvocationHandler ( myCachedValue ) ;
+ if ( handler != null ) {
+ handler . detach ( true ) ;
+ }
}
public final void invalidate ( ) {
|
fixed some bugs
|
<nb> public class HttpConfiguration {
@ notnull
@ jsonproperty
- private Duration maxIdleTime = Duration . seconds ( NUMBER0 ) ;
+ private Duration maxIdleTime = Duration . seconds ( NUMBER1 ) ;
@ min ( NUMBER0 )
@ max ( NUMBER2 )
|
Fix maxIdleTime default to Jetty s
|
<nb> public class GCMRegistrationIntentService extends IntentService {
SINGLE
HelpshiftHelper . getInstance ( ) . registerDeviceToken ( this , gcmToken ) ;
AnalyticsTracker . registerPushNotificationToken ( gcmToken ) ;
+ } else {
+ AppLog . w ( T . NOTIFS , STRING0 ) ;
}
}
}
|
Log message if gcm Token is empty
|
<nb> public class SimpleHeaderDrawerActivity extends ActionBarActivity {
setSupportActionBar ( toolbar ) ;
SINGLE
+ SINGLE
final IProfile profile = new ProfileDrawerItem ( ) . withName ( STRING0 ) . withEmail ( STRING1 ) . withIcon ( STRING2 ) ;
final IProfile profile2 = new ProfileDrawerItem ( ) . withName ( STRING3 ) . withEmail ( STRING4 ) . withIcon ( Uri . parse ( STRING5 ) ) ;
final IProfile profile3 = new ProfileDrawerItem ( ) . withName ( STRING6 ) . withEmail ( STRING7 ) . withIcon ( getResources ( ) . getDrawable ( R . drawable . profile2 ) ) ;
|
improve Sample source
|
<nb> public class StatementGenerator extends ErrorReportingASTVisitor {
buffer . append ( buildStringFromChars ( ( ( StringLiteral ) arg ) . getLiteralValue ( ) ) ) ;
return ;
}
+ if ( arg instanceof NullLiteral ) {
+ buffer . append ( STRING0 ) ;
+ return ;
+ }
if ( stringConcatenationArgNeedsIntCast ( arg ) ) {
SINGLE
buffer . append ( STRING1 ) ;
<nb> public class StatementGeneratorTest extends GenerationTest {
assertTranslation ( translation , STRING2 ) ;
assertTranslation ( translation , STRING3 ) ;
}
+
+ SINGLE
+ public void testNullConcatenation ( ) throws IOException {
+ String translation = translateSourceFile (
+ STRING4 ,
+ STRING5 , STRING6 ) ;
+ assertTranslation ( translation ,
+ STRING7 ) ;
+ }
}
|
Fixed string concatenation with null literals
|
<nb> public final class StorageService implements IEndPointStateChangeSubscriber , Sto
Token token = getPartitioner ( ) . getTokenFactory ( ) . fromString ( state . getValue ( ) ) ;
if ( logger_ . isDebugEnabled ( ) )
logger_ . debug ( endpoint + STRING0 + token ) ;
- if ( isClientMode )
- {
- tokenMetadata_ . update ( token , endpoint ) ;
- SINGLE
- }
- else
- {
- tokenMetadata_ . update ( token , endpoint ) ;
+ tokenMetadata_ . update ( token , endpoint ) ;
+ if ( ! isClientMode )
SystemTable . updateToken ( endpoint , token ) ;
- }
replicationStrategy_ . removeObsoletePendingRanges ( ) ;
}
else if ( STATE_LEAVING . equals ( stateName ) )
|
simplify client mode gossip handling
|
<nb> public class RabbitMQComponent extends DefaultComponent {
if ( LOG . isDebugEnabled ( ) ) {
LOG . debug ( STRING0 ,
- endpoint . getHostname ( ) , endpoint . getPortNumber ( ) , endpoint . getExchangeName ( ) )
+ new Object [ ] { endpoint . getHostname ( ) , endpoint . getPortNumber ( ) , endpoint . getExchangeName ( ) } ) ;
}
return endpoint ;
|
Fixed NPE in rabbitmq and polished the component
|
<nb> public final class Palette {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix typo in Palette doc
|
<nb> public class Toaster {
private static final int SHORT_TOAST_DURATION = NUMBER0 ;
private static final long TOAST_DURATION_MILLS = NUMBER1 ; SINGLE
- private static final Toast toast ;
+ private static Toast toast ;
SINGLE
private Toaster ( ) { }
|
made toast property not final
|
<nb> public class JedisCluster implements JedisCommands , BasicCommands , Closeable {
}
@ override
+ public Double incrByFloat ( final String key , final double value ) {
+ return new JedisClusterCommand < Double > ( connectionHandler , timeout ,
+ maxRedirections ) {
+ @ override
+ public Double execute ( Jedis connection ) {
+ return connection . incrByFloat ( key , value ) ;
+ }
+ } . run ( key ) ;
+ }
+
+ @ override
public Long incr ( final String key ) {
return new JedisClusterCommand < Long > ( connectionHandler , timeout ,
maxRedirections ) {
<nb> public interface JedisCommands {
Long incrBy ( String key , long integer ) ;
+ Double incrByFloat ( String key , double value ) ;
+
Long incr ( String key ) ;
Long append ( String key , String value ) ;
|
Adds incrByFloat as cluster command
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TestingConnectorSession
this . timeZoneKey = requireNonNull ( timeZoneKey , STRING0 ) ;
this . locale = requireNonNull ( locale , STRING1 ) ;
this . startTime = startTime ;
-
- ImmutableMap . Builder < String , PropertyMetadata < ? > > builder = ImmutableMap . builder ( ) ;
- for ( PropertyMetadata < ? > propertyMetadata : propertyMetadatas ) {
- builder . put ( propertyMetadata . getName ( ) , propertyMetadata ) ;
- }
- this . properties = builder . build ( ) ;
+ this . properties = Maps . uniqueIndex ( propertyMetadatas , PropertyMetadata : : getName ) ;
this . propertyValues = ImmutableMap . copyOf ( propertyValues ) ;
}
|
Simplify map creation in TestingConnectorSession
|
<nb> public class TaskstJob extends AbstractJob
public TaskstJob ( String name , Collection < DBRRunnableWithProgress > tasks ) {
super ( name ) ;
+ setUser ( true ) ;
this . tasks = new ArrayList < DBRRunnableWithProgress > ( tasks ) ;
}
|
Object delete in job
|
<nb> public class Util {
STRING0 ,
STRING1 ,
STRING2 ,
+ STRING3 ,
STRING4 ,
STRING5 ,
STRING6 ,
<nb> public class Util {
STRING7 ,
STRING8 ,
STRING9 ,
+ STRING10 ,
+ STRING11 ,
+ STRING12 ,
+ STRING13 ,
+ STRING14 ,
+ STRING15 ,
+ STRING16 ,
+ STRING17 ,
+ STRING18 ,
+ STRING19 ,
STRING20
} ;
|
Add various more browsers
|
<nb> public class MongoDbClient extends DB {
}
@ override
+ @ suppresswarnings ( STRING0 )
COMMENT
COMMENT
COMMENT
|
Suppress unchecked warning for read method
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class BinaryMemcacheEncoder < M extends BinaryMemcacheMessage < H > ,
return ;
}
- ByteBuf keyBuf = Unpooled . copiedBuffer ( key , CharsetUtil . UTF_8 ) ;
- try {
- buf . writeBytes ( keyBuf ) ;
- } finally {
- keyBuf . release ( ) ;
- }
+ buf . writeBytes ( key . getBytes ( CharsetUtil . UTF_8 ) ) ;
}
COMMENT
|
codec memcache encode key directly no need to use unpooled
|
<nb> class Comment implements TextBlock
SINGLE
SINGLE
final long multiplier = Integer . MAX_VALUE ;
- final long thisStart = ( ( long ) mFirstLine ) * multiplier + mFirstCol ;
- final long thisEnd = ( ( long ) mLastLine ) * multiplier + mLastCol ;
- final long inStart = ( ( long ) aStartLineNo ) * multiplier + aStartColNo ;
- final long inEnd = ( ( long ) aEndLineNo ) * multiplier + aEndColNo ;
+ final long thisStart = mFirstLine * multiplier + mFirstCol ;
+ final long thisEnd = mLastLine * multiplier + mLastCol ;
+ final long inStart = aStartLineNo * multiplier + aStartColNo ;
+ final long inEnd = aEndLineNo * multiplier + aEndColNo ;
return ( ( thisStart < inStart ) && ( inStart < thisEnd ) )
|| ( ( thisStart < inEnd ) && ( inEnd < thisEnd ) ) ;
|
Remove silly casts
|
<nb> public class HelpshiftHelper {
mMetadata . put ( STRING0 , AppLog . toPlainText ( context ) ) ;
SINGLE
- StringBuilder blogList = new StringBuilder ( ) ;
+ int counter = NUMBER0 ;
for ( Map < String , Object > account : WordPress . wpDB . getAllAccounts ( ) ) {
- blogList . append ( MapUtils . getMapStr ( account , STRING1 ) ) ;
- blogList . append ( STRING2 ) ;
- blogList . append ( MapUtils . getMapStr ( account , STRING3 ) ) ;
- blogList . append ( STRING4 ) ;
+ mMetadata . put ( STRING5 + counter , MapUtils . getMapStr ( account , STRING1 ) ) ;
+ mMetadata . put ( STRING6 + counter , MapUtils . getMapStr ( account , STRING3 ) ) ;
+ counter += NUMBER0 ;
}
- mMetadata . put ( STRING7 , blogList . toString ( ) ) ;
SINGLE
SharedPreferences preferences = PreferenceManager . getDefaultSharedPreferences ( context ) ;
|
split the unreadable blog list strings into separate entries
|
<nb> public final class Checkin {
COMMENT
public enum Tag {
+ APANIC_CONSOLE ,
+ APANIC_THREADS ,
AUTOTEST_FAILURE ,
AUTOTEST_SEQUENCE_BEGIN ,
AUTOTEST_SUITE_BEGIN ,
<nb> public final class Settings {
public static final String BACKGROUND_DATA = STRING0 ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String CHECKIN_SEND_LAST_KMSG_TIME = STRING1 ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String CHECKIN_SEND_APANIC_CONSOLE_TIME =
+ STRING2 ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String CHECKIN_SEND_APANIC_THREAD_TIME =
+ STRING3 ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add APANIC kernel logging to CheckinService
|
<nb> public class ShellCommand extends AbstractCommand {
ConsoleReader reader = new ConsoleReader ( ) ;
reader . addCompleter ( new CommandCompleter ( reader , this . springCli ) ) ;
reader . setHistoryEnabled ( true ) ;
+ SINGLE
+ SINGLE
+ reader . setExpandEvents ( false ) ;
reader . setCompletionHandler ( new CandidateListCompletionHandler ( ) ) ;
return reader ;
}
|
Prevent JLine from expanding
|
<nb> import NAMESPACE ;
public class MockTraceContext implements TraceContext {
private Trace trace ;
+ private final ProfilerConfig config = new ProfilerConfig ( ) ;
public void setTrace ( Trace trace ) {
this . trace = trace ;
<nb> public class MockTraceContext implements TraceContext {
@ override
public ProfilerConfig getProfilerConfig ( ) {
- return null ;
+ return config ;
}
@ override
|
Fix failing test
|
<nb> public final class MediaType {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static MediaType create ( String type , String subtype ) {
return create ( type , subtype , ImmutableListMultimap . < String , String > of ( ) ) ;
<nb> public final class MediaType {
String normalizedType = normalizeToken ( type ) ;
String normalizedSubtype = normalizeToken ( subtype ) ;
checkArgument ( ! WILDCARD . equals ( normalizedType ) || WILDCARD . equals ( normalizedSubtype ) ,
- STRING0 ) ;
+ STRING1 ) ;
final MediaType mediaType ;
if ( parameters . isEmpty ( ) ) {
mediaType = new MediaType ( normalizedType , normalizedSubtype ) ;
|
Fix some typos in MediaType javadocs and error messages
|
<nb> public class MembershipResource {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MembershipResource {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MembershipResource {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MembershipResource {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
|
Remove useless javadoc tags
|
<nb> public final class EditorImpl extends UserDataHolderBase implements EditorEx , Hi
private MyScrollBar ( @ jdkconstants.adjustableorientation int orientation ) {
super ( orientation ) ;
+ setPersistentUI ( createEditorScrollbarUI ( EditorImpl . this ) ) ;
}
void setPersistentUI ( ScrollBarUI ui ) {
<nb> public class EditorMarkupModelImpl extends MarkupModelImpl implements EditorMark
myEditor . getHorizontalScrollBar ( ) . setPersistentUI ( EditorImpl . createEditorScrollbarUI ( myEditor ) ) ;
}
else {
- myEditor . getVerticalScrollBar ( ) . setPersistentUI ( ButtonlessScrollBarUI . createNormal ( ) ) ;
- myEditor . getHorizontalScrollBar ( ) . setPersistentUI ( ButtonlessScrollBarUI . createNormal ( ) ) ;
+ myEditor . getVerticalScrollBar ( ) . setPersistentUI ( EditorImpl . createEditorScrollbarUI ( myEditor ) ) ;
+ myEditor . getHorizontalScrollBar ( ) . setPersistentUI ( EditorImpl . createEditorScrollbarUI ( myEditor ) ) ;
}
}
|
use transparent scrollbars by default in simple editors without stripe markers too
|
<nb> public class DFAState {
public int hashCode ( ) {
int h = NUMBER0 ;
if ( configs != null ) {
- for ( ATNConfig c : configs ) {
- h = h * NUMBER1 ^ c . alt ;
- h = h * NUMBER1 ^ c . state . stateNumber ;
- }
+ h = h * NUMBER1 ^ configs . hashCode ( ) ;
}
return h ;
}
|
Use a better hash code for DFAState
|
<nb> public class MainActivity extends BaseActivity < MainPresenter > implements IMainVi
public void onClickClear ( View view ) {
MobclickAgent . onEvent ( getApplicationContext ( ) , STRING0 ) ;
resetView ( ) ;
+ InputMethodUtils . openSoftKeyboard ( this , mInput ) ;
}
private void resetView ( ) {
|
when clear input content now show keyboard auto
|
<nb> public class ConfigureUtil {
private static < T > void configureTarget ( Closure configureClosure , T target , ConfigureDelegate closureDelegate ) {
SINGLE
Closure withNewOwner = configureClosure . rehydrate ( target , closureDelegate , configureClosure . getThisObject ( ) ) ;
- ` new ClosureBackedAction < T > ( withNewOwner , Closure . OWNER_ONLY , false ) . execute ( target ) ;
+ new ClosureBackedAction < T > ( withNewOwner , Closure . OWNER_ONLY , false ) . execute ( target ) ;
}
}
|
Removed mystery single quote
|
<nb> public abstract class AbstractCheckedFuture < V , X extends Exception >
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
protected abstract X mapException ( Exception e ) ;
|
Add note that exception mappers can throw rather than return a
|
<nb> public class DenonConnector {
logger . debug ( STRING0 , url ) ;
Deviceinfo deviceinfo = getDocument ( url , Deviceinfo . class ) ;
- connection . setZoneCount ( deviceinfo . getDeviceZones ( ) ) ;
+ if ( deviceinfo != null ) {
+ connection . setZoneCount ( deviceinfo . getDeviceZones ( ) ) ;
+ }
COMMENT
COMMENT
<nb> public class DenonConnector {
COMMENT
connection . setMainVolumeMax ( DenonConnectionProperties . MAX_VOLUME ) ;
- logger . debug ( STRING1 , connection . getInstance ( ) , deviceinfo . getDeviceZones ( ) ) ;
+ logger . debug ( STRING1 , connection . getInstance ( ) , connection . getZoneCount ( ) ) ;
}
private void refreshHttpProperties ( ) {
|
Small tweak for the Denon binding some devices do not support the device info URL
|
<nb> public class MethodParameter {
if ( this == other ) {
return true ;
}
- if ( other == null || getClass ( ) != other . getClass ( ) ) {
+ if ( ! ( other instanceof MethodParameter ) ) {
return false ;
}
MethodParameter otherParam = ( MethodParameter ) other ;
<nb> import static NAMESPACE ;
COMMENT
COMMENT
+ COMMENT
COMMENT
public class SynthesizingMethodParameterTests {
<nb> public class SynthesizingMethodParameterTests {
assertNotEquals ( methodParameter , longParameter ) ;
methodParameter = new MethodParameter ( method , NUMBER0 ) ;
- assertNotEquals ( stringParameter , methodParameter ) ;
- assertNotEquals ( methodParameter , stringParameter ) ;
+ assertEquals ( stringParameter , methodParameter ) ;
+ assertEquals ( methodParameter , stringParameter ) ;
assertNotEquals ( longParameter , methodParameter ) ;
assertNotEquals ( methodParameter , longParameter ) ;
}
|
MethodParameter equals accepts subclasses pointing to same target declaration again
|
<nb> public class OneToManyProfileRequest extends AnalystClusterRequest implements Se
public ProfileRequest options ;
COMMENT
- public OneToManyProfileRequest ( String to , ProfileRequest options , String graphId ) {
- super ( to , graphId , true ) ;
+ public OneToManyProfileRequest ( String destPointsetId , ProfileRequest options , String graphId ) {
+ super ( destPointsetId , graphId , true ) ;
try {
this . options = options . clone ( ) ;
} catch ( CloneNotSupportedException e ) {
|
clarify variable name
|
<nb> public final class ReilInstruction implements IInstruction , Comparable < ReilInstr
Preconditions . checkNotNull ( mnemonic , STRING0 ) ;
this . mnemonic = ReilHelpers . MnemonicToMnemonicCode ( mnemonic ) ;
this . firstOperand =
- Preconditions . checkNotNull ( firstOperand , STRING1 ) ;
+ Preconditions . checkNotNull ( firstOperand ) ;
this . secondOperand =
- Preconditions . checkNotNull ( secondOperand , STRING2 ) ;
+ Preconditions . checkNotNull ( secondOperand ) ;
this . thirdOperand =
- Preconditions . checkNotNull ( thirdOperand , STRING3 ) ;
+ Preconditions . checkNotNull ( thirdOperand ) ;
this . address = address ;
}
|
Remove error messages
|
<nb> public class ProxyServlet extends HttpServlet
COMMENT
protected Logger createLogger ( )
{
- return Log . getLogger ( getServletConfig ( ) . getServletName ( ) ) ;
+ String name = getServletConfig ( ) . getServletName ( ) ;
+ name = name . replace ( STRING0 , STRING1 ) ;
+ return Log . getLogger ( name ) ;
}
public void destroy ( )
|
Mangling the logger name for better configurability
|
<nb> public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements
removeBean ( client ) ;
}
+ protected HttpClient getHttpClient ( )
+ {
+ return httpClient ;
+ }
+
@ override
public void setHttpClient ( HttpClient client )
{
|
Add protected HttpClientTransportOverHTTP2 getHttpClient accessor
|
<nb> public class PCA extends ModelBuilder < PCAModel , PCAModel . PCAParameters , PCAModel . P
error ( STRING0 , STRING1 + _parms . _k + STRING2 ) ;
}
- SINGLE
+ SINGLE
Vec [ ] vecs = _train . vecs ( ) ;
for ( int i = NUMBER0 ; i < vecs . length ; i ++ ) {
if ( ! vecs [ i ] . isNumeric ( ) ) {
|
Throw a validation error in flow if any training data cols are non numeric
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public abstract class IdeaTestFixtureFactory {
- private static final IdeaTestFixtureFactory ourInstance ;
-
- static {
- try {
- final Class < ? > aClass = Class . forName ( STRING0 ) ;
- ourInstance = ( IdeaTestFixtureFactory ) aClass . newInstance ( ) ;
- }
- catch ( Exception e ) {
- throw new RuntimeException ( STRING1 , e ) ;
- }
- }
+ private static final IdeaTestFixtureFactory ourInstance = new IdeaTestFixtureFactoryImpl ( ) ;
@ notnull
public static IdeaTestFixtureFactory getFixtureFactory ( ) {
|
remove unnecessary use of reflection
|
<nb> public class SchemaManager {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
public boolean checkPluginSchema ( final Plugin plugin ) {
final PluginManager pluginManager = XMPPServer . getInstance ( ) . getPluginManager ( ) ;
<nb> public class SchemaManager {
SINGLE
SINGLE
if ( schemaKey == null || schemaVersion == - NUMBER0 ) {
- return false ;
+ return true ;
}
Connection con = null ;
try {
<nb> public class SchemaManager {
}
SINGLE
if ( currentVersion == requiredVersion ) {
- return false ;
+ return true ;
}
SINGLE
else if ( currentVersion == - NUMBER0 ) {
|
Fix db upgrade warnings
|
<nb> public class RemoteBlockInStream extends BlockInStream {
COMMENT
private InputStream mCheckpointInputStream = null ;
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
private long mCheckpointPos = - NUMBER0 ;
COMMENT
<nb> public class RemoteBlockInStream extends BlockInStream {
}
UnderFileSystem underfsClient = UnderFileSystem . get ( checkpointPath , mUFSConf ) ;
mCheckpointInputStream = underfsClient . open ( checkpointPath ) ;
+ SINGLE
+ if ( mCheckpointInputStream . skip ( mBlockInfo . offset ) != mBlockInfo . offset ) {
+ throw new IOException ( STRING0 + mBlockInfo . offset
+ + STRING1 ) ;
+ }
mCheckpointPos = NUMBER1 ;
}
SINGLE
|
Fixed bug in RemoteBlockInStream
|
<nb> public class WPNumberPicker extends NumberPicker {
updateIntitialOffset ( ) ;
setVerticalFadingEdgeEnabled ( false ) ;
setHorizontalFadingEdgeEnabled ( false ) ;
+ WPPrefUtils . layoutAsNumberPickerSelected ( mInputView ) ;
mInputView . setVisibility ( View . INVISIBLE ) ;
}
<nb> public class WPNumberPicker extends NumberPicker {
if ( value < getMinValue ( ) ) value = getMinValue ( ) ;
if ( value > getMaxValue ( ) ) value = getMaxValue ( ) ;
super . setValue ( value ) ;
- EditText view = ( EditText ) getChildAt ( NUMBER0 ) ;
- WPPrefUtils . layoutAsNumberPickerSelected ( view ) ;
}
@ override
|
Formatting input view on layout changes so as not to rely on child order
|
<nb> public class CommonUtils {
} else if ( end . equals ( STRING0 ) ) {
return ret * Config . MB ;
} else if ( end . equals ( STRING1 ) ) {
- return ret * Config . TB ;
+ return ret * Config . GB ;
}
runtimeException ( STRING2 + ori + STRING3 ) ;
return - NUMBER0 ;
<nb> public class WorkerInfo {
private long mLastUpdatedTimeMs ;
private Set < Integer > mFiles ;
- public WorkerInfo ( long id , InetSocketAddress address , long totalBytes ) {
+ public WorkerInfo ( long id , InetSocketAddress address , long capacityBytes ) {
mId = id ;
ADDRESS = address ;
- CAPACITY_BYTES = totalBytes ;
+ CAPACITY_BYTES = capacityBytes ;
START_TIME_MS = System . currentTimeMillis ( ) ;
mUsedBytes = NUMBER1 ;
|
Fix a byte size computation bug
|
<nb> public class LdapResource extends RestResource {
@ path ( STRING0 )
public Response deleteLdapSettings ( ) {
LdapSettings . delete ( core ) ;
+ core . getLdapAuthenticator ( ) . applySettings ( null ) ;
return noContent ( ) . build ( ) ;
}
|
when removing LDAP settings also reset the LdapConnector
|
<nb> public class WebFilter implements Filter {
String hazelcastSessionId = originalSessions . get ( originalSession . getId ( ) ) ;
if ( hazelcastSessionId != null ) {
hazelcastSession = sessions . get ( hazelcastSessionId ) ;
-
- if ( ! hazelcastSession . isStickySession ( ) ) {
+ if ( hazelcastSession != null && ! hazelcastSession . isStickySession ( ) ) {
hazelcastSession . updateReloadFlag ( ) ;
}
return hazelcastSession ;
|
Added a minimal null check to
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class SamlIdPProperties {
public static class Metadata {
private boolean failFast = true ;
private boolean requireValidMetadata = true ;
- private long cacheExpirationMinutes = NUMBER0 ;
+ private long cacheExpirationMinutes = TimeUnit . DAYS . toMinutes ( NUMBER1 ) ;
private Resource location = new FileSystemResource ( STRING0 ) ;
private String privateKeyAlgName = STRING1 ;
private String basicAuthnUsername ;
|
Change metadata caching policy to be daily by default
|
<nb> public class ReplFromTerminal {
try {
consoleReader = new ConsoleReader ( STRING0 , System . in , System . out , null ) ;
consoleReader . setHistoryEnabled ( true ) ;
+ consoleReader . setExpandEvents ( false ) ;
consoleReader . setHistory ( new FileHistory ( new File ( new File ( System . getProperty ( STRING1 ) ) , STRING2 ) ) ) ;
}
catch ( Exception e ) {
|
disable event expansion
|
<nb> public class Module {
public String contact ;
public final List < ModuleVersion > versions = new ArrayList < ModuleVersion > ( ) ;
public final List < String > screenshots = new ArrayList < String > ( ) ;
- public long created ;
- public long updated ;
+ public long created = - NUMBER0 ;
+ public long updated = - NUMBER0 ;
COMMENT
this . repository = repository ;
<nb> public class RepoParser {
module . created = parseTimestamp ( STRING0 ) ;
module . updated = parseTimestamp ( STRING1 ) ;
- if ( module . created < NUMBER1 || module . updated < NUMBER1 ) {
- logError ( STRING2 ) ;
- leave ( startDepth ) ;
- return null ;
- }
while ( parser . nextTag ( ) == XmlPullParser . START_TAG ) {
String tagName = parser . getName ( ) ;
|
remove error if created updated timestamp are missing it s not critical for the downloader to work
|
<nb> public class BikeFlagEncoder extends AbstractFlagEncoder
}
SINGLE
- SINGLE
+ SINGLE
SINGLE
private int relationWeightCodeToSpeed ( int highwayspeed , int relationweightcode )
{
<nb> public class BikeFlagEncoder extends AbstractFlagEncoder
{
SINGLE
- SINGLE
+ SINGLE
SINGLE
int speed ;
SINGLE
|
Add issue number to the FIXME marks
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
fixed cs issue
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CatalanSynthesizer extends BaseSynthesizer {
final boolean posTagRegExp ) throws IOException {
if ( posTagRegExp ) {
initPossibleTags ( ) ;
- Pattern p = Pattern . compile ( posTag ) ;
+ Pattern p = null ;
+ try {
+ p = Pattern . compile ( posTag ) ;
+ } catch ( PatternSyntaxException e ) {
+ System . err . println ( STRING0
+ + posTag + STRING1 + token . getToken ( ) + STRING2 ) ;
+ return null ;
+ }
final List < String > results = new ArrayList < > ( ) ;
for ( final String tag : possibleTags ) {
final Matcher m = p . matcher ( tag ) ;
|
ca catch PatternSyntaxException
|
<nb> public class SummaryPage extends Request {
String cname = o . get ( STRING0 ) . getAsString ( ) ;
pageBldr . append ( STRING1 + cname + STRING2 + cname + STRING3 ) ;
long N = o . get ( STRING4 ) . getAsLong ( ) ;
- sb . append ( STRING5 + cname + STRING6 ) ;
+ sb . append ( STRING7 + cname + STRING8 + cname + STRING6 ) ;
if ( o . has ( STRING9 ) && o . has ( STRING10 ) ) {
StringBuilder minRow = new StringBuilder ( STRING11 + Utils . p2d ( o . get ( STRING12 ) . getAsDouble ( ) ) + STRING13 ) ;
StringBuilder maxRow = new StringBuilder ( STRING14 + Utils . p2d ( o . get ( STRING15 ) . getAsDouble ( ) ) + STRING16 ) ;
|
Fixed broken column links in summary page
|
<nb> public class MapInfoLayer extends OsmandMapLayer {
progressBar . setOnClickListener ( new View . OnClickListener ( ) {
@ override
public void onClick ( View v ) {
- map . backToLocationImpl ( ) ;
+ map . getMapLayers ( ) . selectMapLayer ( view ) ;
}
} ) ;
fl . addView ( progressBar , fparams ) ;
|
Fix bug with layer selection
|
<nb> public abstract class AbstractGenerator
finally
{
schemaStream . close ( ) ;
- getMessage ( ) . append ( parser . errorMessage ( ) ) ;
+ if ( parser . hasError ( ) )
+ {
+ getMessage ( ) . append ( schemaSourceFile . getPath ( ) + STRING0 ) ;
+ getMessage ( ) . append ( parser . errorMessage ( ) ) ;
+ }
}
}
<nb> public class TestBadSchemas
) ,
IllegalArgumentException . class ,
STRING1
+ } ,
+ {
+ asMap (
+ STRING2 ,
+ STRING3 +
+ STRING4 +
+ STRING5 +
+ STRING6 +
+ STRING7 +
+ STRING8 +
+ STRING9 +
+ STRING10 +
+ STRING11 +
+ STRING8 +
+ STRING9 +
+ STRING12 +
+ STRING13 +
+ STRING14 +
+ STRING15
+ ) ,
+ IOException . class ,
+ STRING16
}
} ;
|
Include file name for pdsc related error messages
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
COMMENT
- public interface RenamingMap {
+ public interface RenamingMap extends Serializable {
String get ( String value ) ;
}
|
Make RenamingMap serializable
|
<nb> public class PrivacyService {
String info = hook . getAnnotation ( ) ;
if ( info != null ) {
tvInfoMethod . setText ( Html . fromHtml ( info ) ) ;
+ tvInfoMethod . setMovementMethod ( new Touchy ( ) ) ;
if ( expert )
tvInfoMethod . setVisibility ( View . VISIBLE ) ;
}
|
I like Touchy
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AndroidUtils {
OkHttpClient client = createOkHttpClient ( ) ;
- HttpURLConnection conn = client . open ( url ) ;
+ HttpURLConnection conn = new OkUrlFactory ( client ) . open ( url ) ;
conn . setConnectTimeout ( NUMBER0 * NUMBER1 COMMENT ) ;
conn . setReadTimeout ( NUMBER2 * NUMBER1 COMMENT ) ;
return conn ;
|
Use new OkUrlFactory in AndroidUtils buildHttpUrlConnection
|
<nb> public abstract class PsiAnchor {
PsiAnchor stubRef = createStubReference ( element , file ) ;
if ( stubRef != null ) return stubRef ;
+ if ( ! element . isPhysical ( ) && element instanceof PsiCompiledElement || element instanceof LightElement ) {
+ return new HardReference ( element ) ;
+ }
+
TextRange textRange = element . getTextRange ( ) ;
- if ( textRange == null || element instanceof LightElement ) {
+ if ( textRange == null ) {
return new HardReference ( element ) ;
}
|
Don t create anchors for fake cls stub based psi
|
<nb> public class BpmnDeployer implements Deployer {
private static final Logger LOG = Logger . getLogger ( BpmnDeployer . class . getName ( ) ) ; ;
+ SINGLE
public static final String BPMN_RESOURCE_SUFFIX = STRING0 ;
public static final String [ ] DIAGRAM_SUFFIXES = new String [ ] { STRING1 , STRING2 , STRING3 , STRING4 } ;
|
added todo for missing suffixes JIRA follows
|
<nb> import NAMESPACE ;
COMMENT
public class WebHistoryItem implements Cloneable {
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public WebHistoryItem ( ) {
}
COMMENT
|
Make WebHistoryItem constructor public and hidden
|
<nb> public final class CameraCharacteristics extends CameraMetadata {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public static final Key < Rational > SENSOR_BASE_GAIN_FACTOR =
new Key < Rational > ( STRING0 , Rational . class ) ;
<nb> public final class CameraCharacteristics extends CameraMetadata {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public static final Key < Integer > SENSOR_MAX_ANALOG_SENSITIVITY =
new Key < Integer > ( STRING1 , int . class ) ;
<nb> public final class CaptureResult extends CameraMetadata {
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public static final Key < Float > SENSOR_TEMPERATURE =
new Key < Float > ( STRING2 , float . class ) ;
|
describe non full hw level optional tag entries
|
<nb> public class Inputs {
input . configure ( new Configuration ( io . getConfiguration ( ) ) , core ) ;
input . setTitle ( io . getTitle ( ) ) ;
input . setCreatorUserId ( io . getCreatorUserId ( ) ) ;
+ input . setPersistId ( io . getId ( ) . toStringMongod ( ) ) ;
input . setCreatedAt ( io . getCreatedAt ( ) ) ;
} catch ( NoSuchInputTypeException e ) {
LOG . warn ( STRING0 , io . getType ( ) ) ;
|
set persist id on persisted input launch
|
<nb> public class ChunkedStream implements ChunkedInput {
break ;
}
readBytes += localReadBytes ;
- offset += readBytes ;
+ offset += localReadBytes ;
}
return wrappedBuffer ( chunk , NUMBER0 , readBytes ) ;
|
Oops wrong variable
|
<nb> public class NotificationsDetailActivity extends AppCompatActivity implements
@ override
public boolean onOptionsItemSelected ( MenuItem item ) {
if ( item . getItemId ( ) == android . R . id . home ) {
- onBackPressed ( ) ;
+ finish ( ) ;
return true ;
}
|
Call finish instead of onBackPressed
|
<nb> public class TemplateDataElementType extends IFileElementType implements ITempla
while ( lexer . getTokenType ( ) != null ) {
if ( lexer . getTokenType ( ) == myTemplateElementType ) {
- result . append ( buf , lexer . getTokenStart ( ) , lexer . getTokenEnd ( ) ) ;
+ appendCurrentTemplateToken ( result , buf , lexer ) ;
}
lexer . advance ( ) ;
}
<nb> public class TemplateDataElementType extends IFileElementType implements ITempla
return result ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ protected StringBuilder appendCurrentTemplateToken ( StringBuilder result , CharSequence buf , Lexer lexer ) {
+ return result . append ( buf , lexer . getTokenStart ( ) , lexer . getTokenEnd ( ) ) ;
+ }
+
private void insertOuters ( TreeElement root , Lexer lexer , final CharTable table ) {
TreePatcher patcher = TREE_PATCHER . forLanguage ( root . getPsi ( ) . getLanguage ( ) ) ;
|
suppressed Expecting newline or semicolon error from JS parser
|
<nb> public final class Calendar {
public static final String DTEND = STRING0 ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String DTSTART2 = STRING1 ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String DTEND2 = STRING2 ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class Calendar {
public static final String EVENT_TIMEZONE = STRING3 ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final String EVENT_TIMEZONE2 = STRING4 ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added access fields for second timezone columns
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
+ import static NAMESPACE ;
public class CompilerContext
{
<nb> public class CompilerContext
public Variable getVariable ( String name )
{
Variable variable = variables . get ( name ) ;
- try {
- Preconditions . checkArgument ( variable != null , STRING0 , name ) ;
- }
- catch ( Exception e ) {
- System . out . println ( STRING1 ) ;
- }
+ checkArgument ( variable != null , STRING0 , name ) ;
return variable ;
}
|
Remove debug code from CompilerContext
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
public interface BuildEnvironment extends Model {
<nb> package NAMESPACE ;
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Adding some examples docs for the BuildEnvironment model
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RemoteControlHandler implements Handler {
Receiver receiver = new RatpackReceiver ( new ContextFactory ( ) {
@ override
- public Object getContext ( CommandChain chain ) {
+ public Object getContext ( CommandChain < ClosureCommand > chain ) {
return new DelegatingCommandDelegate ( registryBuilder , commandRegistry ) {
@ override
public void clearRegistry ( ) {
|
Add missing type param
|
<nb> public class ImageWallpaper extends WallpaperService {
Log . d ( TAG , STRING0 + visible ) ;
}
mVisible = visible ;
- drawFrame ( ) ;
+ if ( visible ) {
+ drawFrame ( ) ;
+ }
}
}
|
optimize wallpaper load avoid show black wallpaper
|
<nb> public class Imports {
static {
SINGLE
imports . add ( STRING0 ) ;
+ imports . add ( STRING1 ) ;
imports . add ( STRING2 ) ;
}
|
Updated gremlin to play nice with the new titan
|
<nb> public class CopyStep implements Step {
}
@ override
- public String getDescription ( ExecutionContext context ) {
+ public String getDescription ( ExecutionContext context ) {
ImmutableList . Builder < String > args = ImmutableList . builder ( ) ;
args . add ( STRING0 ) ;
if ( shouldRecurse ) {
<nb> public class CopyStep implements Step {
}
return NUMBER0 ;
} catch ( IOException e ) {
- e . printStackTrace ( context . getStdErr ( ) ) ;
+ context . logError ( e , STRING1 , getDescription ( context ) ) ;
return NUMBER1 ;
}
}
|
Improve CopyStep s error message
|
<nb> public class DefaultGroovyPageLocator implements GroovyPageLocator , ResourceLoad
} else {
searchPaths = CollectionUtils . newList (
GrailsResourceUtils . appendPiecesForUri ( SLASHED_VIEWS_DIR_PATH , uri ) ,
+ GrailsResourceUtils . appendPiecesForUri ( PATH_TO_WEB_INF_VIEWS , uri ) ,
uri ) ;
}
return searchPaths ;
|
fix failing test
|
<nb> final class PicassoDrawable extends BitmapDrawable {
@ override public void draw ( Canvas canvas ) {
if ( ! animating ) {
+ placeholder = null ;
super . draw ( canvas ) ;
} else {
float normalized = ( SystemClock . uptimeMillis ( ) - startTimeMillis ) / FADE_DURATION ;
|
Clear the reference to the placeholder when not needed anymore
|
<nb> public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
if ( closed ) return ;
super . close ( ) ;
+ ApplicationManager . getApplication ( ) . assertWriteAccessAllowed ( ) ;
+
VFileContentChangeEvent event = new VFileContentChangeEvent ( requestor , file , file . getModificationStamp ( ) , modStamp , false ) ;
List < VFileContentChangeEvent > events = Collections . singletonList ( event ) ;
BulkFileListener publisher = myEventBus . syncPublisher ( VirtualFileManager . VFS_CHANGES ) ;
|
write virtual files in a write action
|
<nb> public class SeriesGuideDatabase extends SQLiteOpenHelper {
db . beginTransaction ( ) ;
try {
db . execSQL (
- STRING0 + Tables . EPISODES_SEARCH
+ STRING1 + Tables . EPISODES_SEARCH
+ STRING2 + Episodes . TITLE + STRING3 + Episodes . OVERVIEW + STRING4
+ STRING5 + Episodes . _ID + STRING3 + Episodes . TITLE
+ STRING3 + Episodes . OVERVIEW
<nb> public class SeriesGuideDatabase extends SQLiteOpenHelper {
db . beginTransaction ( ) ;
try {
db . execSQL (
- STRING0 + Tables . EPISODES_SEARCH
+ STRING1 + Tables . EPISODES_SEARCH
+ STRING2 + Episodes . TITLE + STRING4
+ STRING5 + Episodes . _ID + STRING3 + Episodes . TITLE
+ STRING6 + Tables . EPISODES + STRING7 ) ;
|
Ignore constraint failures when populating search table
|
<nb> public class PyUnboundLocalVariableInspection extends LocalInspectionTool {
}
public boolean isEnabledByDefault ( ) {
- return true ;
+ return false ;
}
@ notnull
|
disable broken inspection by default
|
<nb> public class ObjectFileTest {
}
assertNotNull ( mainLineInfos ) ;
- SINGLE
+ SINGLE
Set < Integer > lineNumbers = new HashSet < > ( ) ;
for ( LineInfo lineInfo : mainLineInfos ) {
lineNumbers . add ( lineInfo . getLineNumber ( ) ) ;
}
- assertEquals ( NUMBER0 , lineNumbers . size ( ) ) ;
+ assertTrue ( lineNumbers . size ( ) >= NUMBER0 && lineNumbers . size ( ) <= NUMBER1 ) ;
assertTrue ( lineNumbers . contains ( NUMBER2 ) ) ;
assertTrue ( lineNumbers . contains ( NUMBER0 ) ) ;
+ if ( lineNumbers . size ( ) == NUMBER1 ) {
+ assertTrue ( lineNumbers . contains ( NUMBER1 ) ) ;
+ }
}
}
|
Fixed problem with ObjectFileTest on Linux
|
<nb> public class OTransactionOptimistic extends OTransactionRealAbstract {
status = TXSTATUS . ROLLBACKING ;
- SINGLE
- SINGLE
-
SINGLE
database . getLevel1Cache ( ) . clear ( ) ;
<nb> public class OTransactionOptimistic extends OTransactionRealAbstract {
invokeBeforeRecordListener ( iStatus , iRecord ) ;
if ( ( status == OTransaction . TXSTATUS . COMMITTING ) && database . getStorage ( ) instanceof OStorageEmbedded ) {
- SINGLE
+ SINGLE
switch ( iStatus ) {
case ORecordOperation . CREATED :
case ORecordOperation . UPDATED :
|
removed unused part of code
|
<nb> public class DefaultAccessLogReceiver implements AccessLogReceiver , Runnable , Cl
this . logBaseName = logBaseName ;
this . logNameSuffix = ( logNameSuffix != null ) ? logNameSuffix : DEFAULT_LOG_SUFFIX ;
this . pendingMessages = new ConcurrentLinkedDeque < String > ( ) ;
- this . defaultLogFile = new File ( outputDirectory , logBaseName + logNameSuffix ) ;
+ this . defaultLogFile = new File ( outputDirectory , logBaseName + this . logNameSuffix ) ;
calculateChangeOverPoint ( ) ;
}
|
Fix bug in suffix patch
|
<nb> public class ByteArrayInput
( ( data [ readAt ++ ] & NUMBER0 ) < < NUMBER1 ) |
( ( data [ readAt ++ ] & NUMBER0 ) < < NUMBER2 ) |
( ( data [ readAt ++ ] & NUMBER0 ) < < NUMBER3 ) |
- ( ( data [ readAt ++ ] & NUMBER0 ) < < NUMBER4 ) ;
+ ( ( data [ readAt ++ ] & NUMBER0 ) < < NUMBER5 ) ;
cursor = readAt ;
return result ;
}
|
Fix bug in ByteArrayInput readLong
|
<nb> package 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 ;
public class ApplicationPushBuilder implements PushBuilder {
<nb> public class ApplicationPushBuilder implements PushBuilder {
private final org . apache . coyote . Request coyoteRequest ;
private String path ;
- private Map < String , List < String > > headers = new HashMap < > ( ) ;
+ private Map < String , List < String > > headers = new CaseInsensitiveKeyMap < > ( ) ;
public ApplicationPushBuilder ( HttpServletRequest request ) {
baseRequest = request ;
|
Make PushBuilder s handling of HTTP headers case insensitive
|
<nb> public final class HttpServletRequestImpl implements HttpServletRequest {
public String getServerName ( ) {
String host = exchange . getRequestHeaders ( ) . getFirst ( Headers . HOST ) ;
if ( host != null ) {
+ if ( host . contains ( STRING0 ) ) {
+ String [ ] split = host . split ( STRING0 ) ;
+ return split [ NUMBER0 ] ;
+ }
return host ;
}
return exchange . getDestinationAddress ( ) . getHostName ( ) ;
|
Make getServerName not return the port part of the host header
|
<nb> public class MathUtils {
SINGLE
static public final float PI = FLOAT0 ;
- public static final float PI2 = PI * NUMBER0 ;
+ static public final float PI2 = PI * NUMBER0 ;
static private final int SIN_BITS = NUMBER1 ; SINGLE
static private final int SIN_MASK = ~ ( - NUMBER2 < < SIN_BITS ) ;
|
Make order of modifiers consistent
|
<nb> public class Node implements Closeable {
public static final Setting < Boolean > WRITE_PORTS_FIELD_SETTING =
Setting . boolSetting ( STRING0 , false , Property . NodeScope ) ;
- public static final Setting < Boolean > NODE_CLIENT_SETTING =
- Setting . boolSetting ( STRING1 , false , Property . NodeScope ) ;
public static final Setting < Boolean > NODE_DATA_SETTING = Setting . boolSetting ( STRING2 , true , Property . NodeScope ) ;
public static final Setting < Boolean > NODE_MASTER_SETTING =
Setting . boolSetting ( STRING3 , true , Property . NodeScope ) ;
|
Remove unused node client setting
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class NotificationsListFragment extends Fragment
mEmptyView = ( ViewGroup ) view . findViewById ( R . id . empty_view ) ;
mFilterView = view . findViewById ( R . id . notifications_filter ) ;
- RecyclerView . ItemAnimator animator = new DefaultItemAnimator ( ) ;
- animator . setSupportsChangeAnimations ( true ) ;
- mRecyclerView . setItemAnimator ( animator ) ;
mLinearLayoutManager = new LinearLayoutManager ( getActivity ( ) ) ;
mRecyclerView . setLayoutManager ( mLinearLayoutManager ) ;
|
support libs removed setSupportsChangeAnimations method
|
<nb> static public Class classForName ( String name ) throws ClassNotFoundException {
}
static public Class loadClassForName ( String name ) throws ClassNotFoundException {
- try {
- return Class . forName ( name , true , baseLoader ( ) ) ;
- }
- catch ( ClassNotFoundException e ) {
- if ( e . getCause ( ) == null )
- return null ;
- throw e ;
- }
+ try
+ {
+ Class . forName ( name , false , baseLoader ( ) ) ;
+ }
+ catch ( ClassNotFoundException e )
+ {
+ return null ;
+ }
+ return Class . forName ( name , true , baseLoader ( ) ) ;
}
static public float aget ( float [ ] xs , int i ) {
|
tweaked loadClassForName separation of not found vs init errors
|
<nb> public class ServerSystemTest {
new GetRequest ( STRING0 ) ) ;
assertThat ( response . code ( ) ) . isEqualTo ( NUMBER0 ) ;
- assertThat ( response . content ( ) ) . contains ( STRING1 , STRING2 , STRING3 ) ;
+ assertThat ( response . content ( ) ) . contains ( STRING4 , STRING2 , STRING3 ) ;
assertThat ( response . content ( ) ) . contains ( STRING5 , STRING6 , STRING7 ) ;
}
|
Fix SystemI Info integration test
|
<nb> public final class Maps {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class Maps {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix typo in Maps immutableEnumMap
|
<nb> public class IdeaTitledBorder extends TitledBorder {
int labelY = y + outsideInsets . top ;
TitledSeparator titledSeparator = getTitledSeparator ( c ) ;
+ titledSeparator . setText ( title ) ;
JLabel label = titledSeparator . getLabel ( ) ;
Dimension labelSize = label . getPreferredSize ( ) ;
label . setSize ( labelSize ) ;
|
titled border should use current title
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.