diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class AndroidCompiledStatement implements CompiledStatement {
}
}
- public void setNull ( int parameterIndex , SqlType sqlType ) throws SQLException {
- isInPrep ( ) ;
- args . add ( parameterIndex , null ) ;
- }
-
public void setObject ( int parameterIndex , Object obj , SqlType sqlType ) throws SQLException {
isInPrep ( ) ;
- args . add ( parameterIndex , obj . toString ( ) ) ;
+ if ( obj == null ) {
+ args . add ( parameterIndex , null ) ;
+ } else {
+ args . add ( parameterIndex , obj . toString ( ) ) ;
+ }
}
public void setMaxRows ( int max ) throws SQLException {
|
Simplified the CompiledStatement a tad
|
<nb> public class SpecialFiles {
excludedFiles . add ( STRING0 ) ; SINGLE
excludedFiles . add ( STRING1 ) ; SINGLE
excludedFiles . add ( STRING2 ) ; SINGLE
+ excludedFiles . add ( STRING3 ) ; SINGLE
+ excludedFiles . add ( STRING4 ) ; SINGLE
excludedFiles . add ( STRING5 ) ; SINGLE
excludedFiles . add ( STRING6 ) ; SINGLE
excludedFiles . add ( STRING7 ) ; SINGLE
excludedFiles . add ( STRING8 ) ; SINGLE
excludedFiles . add ( STRING9 ) ; SINGLE
excludedFiles . add ( STRING10 ) ; SINGLE
+
+ excludedFiles . add ( STRING11 ) ; SINGLE
excludedFiles . add ( STRING12 ) ; SINGLE
excludedFiles . add ( STRING13 ) ; SINGLE
|
add new special files temporary commented in tests
|
<nb> public class PluginManager {
STRING0 ,
STRING1 ,
STRING2 ,
- STRING3
+ STRING3 ,
+ STRING4
) . build ( ) ;
private final Environment environment ;
|
Add mapper size to plugin list
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ReaderPostListActivity extends AppCompatActivity {
}
} else if ( getPostListType ( ) == ReaderPostListType . SEARCH_RESULTS ) {
String query = getIntent ( ) . getStringExtra ( ReaderConstants . ARG_SEARCH_QUERY ) ;
- if ( ! TextUtils . isEmpty ( query ) && savedInstanceState == null ) {
- setTitle ( String . format ( getString ( R . string . reader_title_search_results ) , query ) ) ;
+ setTitle ( String . format ( getString ( R . string . reader_title_search_results ) , query ) ) ;
+ if ( savedInstanceState == null ) {
showListFragmentForSearch ( query ) ;
}
}
|
Retain search activity title upon rotation
|
<nb> public class ProtocolContactSourceServiceImpl
if ( queryString == null
|| queryString . length ( ) <= NUMBER0
- || metaContact . getDisplayName ( ) . startsWith ( queryString )
- || contactAddress . startsWith ( queryString )
- || contactDisplayName . startsWith ( queryString ) )
+ || metaContact . getDisplayName ( ) . contains ( queryString )
+ || contactAddress . contains ( queryString )
+ || contactDisplayName . contains ( queryString ) )
{
ContactDetail contactDetail
= new ContactDetail ( contactAddress ) ;
|
Fixes the search in invite and transfer dialogs to search for substrings too
|
<nb> public final class Configuration implements PersistentStateComponent < Element > {
private volatile long myModificationCount ;
public Configuration ( ) {
+ setResolveReferences ( true ) ;
setLanguageAnnotation ( STRING0 ) ;
setPatternAnnotation ( STRING1 ) ;
setSubstAnnotation ( STRING2 ) ;
|
set resolve references true by default
|
<nb> public class CodeInsightUtils {
Document document = PsiDocumentManager . getInstance ( file . getProject ( ) ) . getDocument ( file ) ;
if ( document == null ) return null ;
+ if ( line >= document . getLineCount ( ) ) {
+ return null ;
+ }
+
int lineStartOffset = document . getLineStartOffset ( line ) ;
return CharArrayUtil . shiftForward ( document . getCharsSequence ( ) , lineStartOffset , STRING0 ) ;
}
<nb> public class CodeInsightUtils {
Document document = PsiDocumentManager . getInstance ( file . getProject ( ) ) . getDocument ( file ) ;
if ( document == null ) return null ;
+ if ( line >= document . getLineCount ( ) ) {
+ return null ;
+ }
+
int lineStartOffset = document . getLineEndOffset ( line ) ;
return CharArrayUtil . shiftBackward ( document . getCharsSequence ( ) , lineStartOffset , STRING0 ) ;
}
|
Skip line offset on out of range line numbers
|
<nb> public final class CompilationSupport {
ImmutableList . < PathFragment > of ( ) ,
COMMENT
COMMENT
- COMMENT
+ COMMENT
}
private void registerLinkAction ( ObjcProvider objcProvider , ExtraLinkArgs extraLinkArgs ,
|
Disable generateSubModules since it causes issues with private headers
|
<nb> public abstract class Strand {
public static void printStackTrace ( StackTraceElement [ ] trace , java . io . PrintStream out ) {
if ( trace == null )
out . println ( STRING0 ) ;
- for ( StackTraceElement traceElement : trace )
+ else for ( StackTraceElement traceElement : trace )
out . println ( STRING1 + traceElement ) ;
}
<nb> public abstract class Strand {
public static void printStackTrace ( StackTraceElement [ ] trace , java . io . PrintWriter out ) {
if ( trace == null )
out . println ( STRING0 ) ;
- for ( StackTraceElement traceElement : trace )
+ else for ( StackTraceElement traceElement : trace )
out . println ( STRING1 + traceElement ) ;
}
|
Added else statements to Strand printStackTrace
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public final class ProxyInvocationHandler implements InvocationHandler {
context . putPrivateData ( ComponentViewInstance . class , componentViewInstance ) ;
context . setParameters ( args ) ;
context . setMethod ( method ) ;
+ SINGLE
+ context . setContextData ( new HashMap ( ) ) ;
return interceptor . processInvocation ( context ) ;
}
}
|
Set the context data map in the InterceptorContext before triggering an invocation
|
<nb> public class ResourceAwareExampleTopology {
COMMENT
COMMENT
COMMENT
- conf . setTopologyWorkerMaxHeapSize ( FLOAT0 ) ;
+ conf . setTopologyWorkerMaxHeapSize ( FLOAT1 ) ;
if ( args != null && args . length > NUMBER0 ) {
conf . setNumWorkers ( NUMBER1 ) ;
|
modifying config for RAS example topology
|
<nb> public class ZMsg implements Iterable < ZFrame > , Deque < ZFrame >
while ( i . hasNext ( ) ) {
ZFrame f = i . next ( ) ;
ret = f . sendAndKeep ( socket , ( i . hasNext ( ) ) ? ZFrame . MORE : NUMBER0 ) ;
+ if ( ! ret ) {
+ break ;
+ }
}
if ( destroy ) {
destroy ( ) ;
|
Do not proceeed next frame at send failure of previous frame
|
<nb> public class UnusedLibrariesInspection extends GlobalInspectionTool {
if ( refEntity instanceof RefModule ) {
final RefModule refModule = ( RefModule ) refEntity ;
final Module module = refModule . getModule ( ) ;
- if ( module . isDisposed ( ) ) return CommonProblemDescriptor . EMPTY_ARRAY ;
+ if ( module . isDisposed ( ) || ! scope . containsModule ( module ) ) return CommonProblemDescriptor . EMPTY_ARRAY ;
final ModuleRootManager moduleRootManager = ModuleRootManager . getInstance ( module ) ;
final Set < VirtualFile > usedRoots = refModule . getUserData ( UnusedLibraryGraphAnnotator . USED_LIBRARY_ROOTS ) ;
|
ignore module dependencies if scope is not big enough
|
<nb> public class TestDiscoveryInstrumentator {
public MethodVisitor visitMethod ( int access , String name , String desc , String signature , String [ ] exceptions ) {
if ( methodsFilter . shouldVisitMethod ( access , name , desc , signature , exceptions ) ) {
if ( STRING0 . equals ( name ) ) {
- final int slashPos = className . lastIndexOf ( STRING1 ) ;
+ final int slashPos = className . lastIndexOf ( STRING2 ) ;
final int $Pos = className . lastIndexOf ( STRING3 ) ;
name = className . substring ( Math . max ( slashPos , $Pos ) + NUMBER0 ) ;
}
|
use proper delimiter for constructor name identification
|
<nb> public class Alarm implements Disposable {
myTask = null ;
}
}
+
+ @ override
+ public String toString ( ) {
+ return super . toString ( ) + ( myTask != null ? myTask . toString ( ) : null ) ;
+ }
}
public Alarm setActivationComponent ( @ notnull final JComponent component ) {
|
toString for Alarm request also prints Runnable toString for debugging purposes
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PsiChangeHandler extends PsiTreeChangeAdapter implements Disposable
}
public void childRemoved ( PsiTreeChangeEvent event ) {
- PsiElement element = event . getParent ( ) ;
- queueElement ( element , true , event ) ;
+ queueElement ( event . getParent ( ) , true , event ) ;
}
public void childReplaced ( PsiTreeChangeEvent event ) {
<nb> public class PsiChangeHandler extends PsiTreeChangeAdapter implements Disposable
}
if ( ! child . isValid ( ) ) return ;
+ if ( file . getViewProvider ( ) . getVirtualFile ( ) instanceof LightVirtualFile ) { SINGLE
+ return ;
+ }
Document document = PsiDocumentManager . getInstance ( myProject ) . getCachedDocument ( file ) ;
if ( document != null ) {
List < Pair < PsiElement , Boolean > > toUpdate = changedElements . get ( document ) ;
|
do not queue nonphysical elements
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
+ import static NAMESPACE ;
COMMENT
COMMENT
<nb> public class SimpleDeleteMappingTests extends ElasticsearchIntegrationTest {
@ test
public void simpleDeleteMapping ( ) throws Exception {
+ assertAcked ( prepareCreate ( STRING0 ) . addMapping ( STRING1 , STRING2 , STRING3 ) . execute ( ) . actionGet ( ) ) ;
for ( int i = NUMBER0 ; i < NUMBER1 ; i ++ ) {
client ( ) . prepareIndex ( STRING0 , STRING1 , Integer . toString ( i ) ) . setSource ( jsonBuilder ( ) . startObject ( )
. field ( STRING2 , STRING0 + i )
|
TEST Fix SimpleDeleteMappingTests
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
public class Windows {
COMMENT
COMMENT
<nb> public class Windows {
list . add ( tokenizer . nextToken ( ) ) ;
return windows ( list , NUMBER0 ) ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static List < Window > windows ( String words , TokenizerFactory tokenizerFactory ) {
+ Tokenizer tokenizer = tokenizerFactory . create ( words ) ;
+ List < String > list = new ArrayList < String > ( ) ;
+ while ( tokenizer . hasMoreTokens ( ) )
+ list . add ( tokenizer . nextToken ( ) ) ;
+ return windows ( list , NUMBER0 ) ;
+ }
+
COMMENT
COMMENT
|
allow customization of tokenizer factory in Windows windows
|
<nb> public class XmlNamespace extends RubyObject {
}
public void saveContent ( ThreadContext context , SaveContext ctx ) {
- ctx . append ( prefix + STRING0 + href + STRING1 ) ;
+ ctx . append ( STRING2 + prefix + STRING0 + href + STRING1 ) ;
}
}
|
Fix XmlNamespace saveContext to print one space before prefix
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
|
remove permission note security annotation
|
<nb> public class DependencyGraphBuilder {
SINGLE
for ( ConfigurationNode resolvedConfiguration : resolveState . getConfigurationNodes ( ) ) {
if ( resolvedConfiguration . isSelected ( ) ) {
- resolvedConfiguration . validate ( ) ;
listener . visitNode ( resolvedConfiguration ) ;
}
}
<nb> public class DependencyGraphBuilder {
}
}
- public void validate ( ) {
- for ( DependencyEdge incomingEdge : incomingEdges ) {
- ConfigurationNode fromNode = incomingEdge . from ;
- if ( ! fromNode . isSelected ( ) ) {
- throw new IllegalStateException ( String . format ( STRING0 , fromNode . moduleRevision . state , fromNode , this ) ) ;
- }
- }
- }
-
public void deselect ( ) {
removeOutgoingEdges ( ) ;
}
|
Removed some validation from dependency graph traversal
|
<nb> public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
StartupManager . getInstance ( project ) . registerPostStartupActivity ( new Runnable ( ) {
public void run ( ) {
- new Task . Modal ( project , CompilerBundle . message ( STRING0 ) , false ) {
+ new Task . Modal ( project , CompilerBundle . message ( STRING1 ) , false ) {
public void run ( @ notnull final ProgressIndicator indicator ) {
- indicator . setText ( CompilerBundle . message ( STRING1 ) ) ;
final IntermediateOutputCompiler [ ] compilers =
CompilerManager . getInstance ( project ) . getCompilers ( IntermediateOutputCompiler . class ) ;
|
corrected progress title
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
public class DistributedQueue < T > implements Closeable
|
Fixed incorrect doc
|
<nb> public class ExceptionDeobfuscator {
}
if ( ! setEntries . isEmpty ( ) ) {
- if ( setEntries . size ( ) > NUMBER0 || ent . getValue ( ) . contains ( first ) ) {
+ if ( setEntries . size ( ) > NUMBER0 COMMENT ) {
return true ;
}
}
|
removed spurious warning about Heavily obfuscated exception ranges in
|
<nb> public class TimelineRefreshService extends IntentService {
sendBroadcast ( new Intent ( STRING0 ) . putExtra ( STRING1 , NUMBER0 ) ) ;
TimelineRefreshService . isRunning = false ;
+ context . getContentResolver ( ) . notifyChange ( HomeContentProvider . CONTENT_URI , null ) ;
return ;
} else {
sharedPrefs . edit ( ) . putLong ( STRING2 , currentTime ) . commit ( ) ;
|
Fix refresh animation getting stuck on the blur launcher page
|
<nb> public class PhysicsSpace {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Corrected JavaDoc comment
|
<nb> package NAMESPACE ;
import static NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed unused import
|
<nb> public class SourceManager {
} else {
mContentResolver . insert ( MuzeiContract . Sources . CONTENT_URI , values ) ;
}
- SINGLE
- WearableController . updateSource ( mApplicationContext ) ;
if ( existingSource != null ) {
existingSource . close ( ) ;
}
-
- Artwork artwork = state . getCurrentArtwork ( ) ;
- mContentResolver . insert ( MuzeiContract . Artwork . CONTENT_URI , artwork . toContentValues ( ) ) ;
}
+ SINGLE
+ WearableController . updateSource ( mApplicationContext ) ;
+
+ Artwork artwork = state . getCurrentArtwork ( ) ;
+ mContentResolver . insert ( MuzeiContract . Artwork . CONTENT_URI , artwork . toContentValues ( ) ) ;
+
SINGLE
mApplicationContext . startService ( TaskQueueService . getDownloadCurrentArtworkIntent ( mApplicationContext ) ) ;
}
|
Reduce SourceManager contention when updating sources
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class ChannelFactoryExecutorResource implements
ChannelFactoryResource {
|
Excluded ChannelFactoryExecutorResource from the diagram
|
<nb> public class TextField extends Widget {
delete ( ) ;
}
}
- return true ;
}
if ( character != ENTER_DESKTOP && character != ENTER_ANDROID ) {
if ( filter != null && ! filter . acceptChar ( TextField . this , character ) ) return true ;
|
DELETE char not notifying listener
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class AndroidTestCase extends UsefulTestCase {
public AndroidTestCase ( boolean createManifest ) {
this . myCreateManifest = createManifest ;
+ IdeaTestCase . initPlatformPrefix ( ) ;
}
public AndroidTestCase ( ) {
|
running tests on their own classpath
|
<nb> public class LocalIndexesActivity extends OsmandExpandableListActivity {
descr . setText ( info [ NUMBER0 ] . getFileName ( ) . substring ( NUMBER0 , dt ) ) ;
}
final EditText tags = ( EditText ) view . findViewById ( R . id . TagsText ) ;
- final Spinner visibility = ( ( Spinner ) findViewById ( R . id . Visibility ) ) ;
+ final Spinner visibility = ( ( Spinner ) view . findViewById ( R . id . Visibility ) ) ;
ArrayAdapter < String > adapter = new ArrayAdapter < String > ( this , R . layout . my_spinner_text , new String [ ] {
STRING0 ,
STRING1 ,
|
Fix send to OSM
|
<nb> public class ShadowActivity extends ShadowContextThemeWrapper {
Robolectric . getUiThreadScheduler ( ) . post ( action ) ;
}
- @ implementation
- public void onCreate ( Bundle savedInstanceState ) {
- }
-
COMMENT
COMMENT
COMMENT
<nb> public class ActivityTest {
@ test
public void recreateGoesThroughFullLifeCycle ( ) throws Exception {
- TestActivity activity = new TestActivity ( ) ;
-
- ShadowActivity shadow = shadowOf ( activity ) ;
- shadow . recreate ( ) ;
+ TestActivity activity = buildActivity ( TestActivity . class ) . attach ( ) . get ( ) ;
+ activity . recreate ( ) ;
activity . transcript . assertEventsSoFar (
STRING0 ,
|
Remove ShadowActivity onCreate so the FragmentManager is correctly initialized
|
<nb> public class PatternRuleHandler extends XMLRuleHandler {
rule . addSuggestionMatchOutMsg ( m ) ;
}
suggestionMatchesOutMsg . clear ( ) ;
- if ( defaultOff ) {
- rule . setDefaultOff ( ) ;
- }
if ( category == null ) {
throw new RuntimeException ( STRING0 + id + STRING1 ) ;
}
|
remove duplicated code
|
<nb> public class DiscoveryClient implements LookupService {
clientConfig . getInitialInstanceInfoReplicationIntervalSeconds ( ) ,
clientConfig . getInstanceInfoReplicationIntervalSeconds ( ) , TimeUnit . SECONDS ) ;
+ } else {
+ logger . info ( STRING0 ) ;
}
}
|
Adding log line for when client is configured to not register with the server
|
<nb> class DiagramCreateWizardPage extends WizardPage {
contentTree = new DatabaseNavigatorTree ( configGroup , rootNode . getDatabases ( ) , SWT . SINGLE | SWT . CHECK ) ;
gd = new GridData ( GridData . FILL_BOTH ) ;
gd . horizontalSpan = NUMBER0 ;
+ gd . heightHint = NUMBER1 ;
contentTree . setLayoutData ( gd ) ;
CheckboxTreeViewer viewer = ( CheckboxTreeViewer ) contentTree . getViewer ( ) ;
|
ERD wizard redesign
|
<nb> final class TelResultParser extends ResultParser {
if ( rawText == null || ( ! rawText . startsWith ( STRING0 ) && ! rawText . startsWith ( STRING1 ) ) ) {
return null ;
}
- String telURI = rawText ;
+ SINGLE
+ String telURI = rawText . startsWith ( STRING1 ) ? STRING0 + rawText . substring ( NUMBER0 ) : rawText ;
SINGLE
int queryStart = rawText . indexOf ( STRING2 , NUMBER0 ) ;
- if ( queryStart < NUMBER1 ) {
- rawText = rawText . substring ( NUMBER0 ) ;
- } else {
- rawText = rawText . substring ( NUMBER0 , queryStart ) ;
- }
- return new TelParsedResult ( rawText , telURI , null ) ;
+ String number = queryStart < NUMBER1 ? rawText . substring ( NUMBER0 ) : rawText . substring ( NUMBER0 , queryStart ) ;
+ return new TelParsedResult ( number , telURI , null ) ;
}
}
|
to make sure it works with Android
|
<nb> public class AuthorizationManager {
}
}
+ SINGLE
+ private AuthorizationManager ( ) { }
+
COMMENT
COMMENT
COMMENT
|
Restore private constructor
|
<nb> public class UrlUtils {
private static CustomTabsIntent makeCustomTabsIntent ( Context context ) {
return new CustomTabsIntent . Builder ( )
+ . addDefaultShareMenuItem ( )
. enableUrlBarHiding ( )
. setToolbarColor ( ViewUtils . getColorFromAttrRes ( R . attr . colorPrimary , NUMBER0 , context ) )
. setShowTitle ( true )
- SINGLE
- SINGLE
. build ( ) ;
}
}
|
Add share item for custom tabs
|
<nb> public class DevicePolicyManagerService extends IDevicePolicyManager . Stub {
saveSettingsLocked ( userHandle ) ;
updatePasswordExpirationsLocked ( userHandle ) ;
setExpirationAlarmCheckLocked ( mContext , policy ) ;
- sendAdminCommandToSelfAndProfilesLocked (
- DeviceAdminReceiver . ACTION_PASSWORD_CHANGED ,
- DeviceAdminInfo . USES_POLICY_LIMIT_PASSWORD , userHandle ) ;
+
+ SINGLE
+ if ( LockPatternUtils . isSeparateWorkChallengeEnabled ( ) ) {
+ sendAdminCommandLocked (
+ DeviceAdminReceiver . ACTION_PASSWORD_CHANGED ,
+ DeviceAdminInfo . USES_POLICY_LIMIT_PASSWORD , userHandle ) ;
+ } else {
+ sendAdminCommandToSelfAndProfilesLocked (
+ DeviceAdminReceiver . ACTION_PASSWORD_CHANGED ,
+ DeviceAdminInfo . USES_POLICY_LIMIT_PASSWORD , userHandle ) ;
+ }
}
} finally {
mInjector . binderRestoreCallingIdentity ( ident ) ;
|
Send pwchange broadcast to caller only in FBE case
|
<nb> class StatementAnalyzer
private void addCoercionForJoinCriteria ( Join node , Expression leftExpression , Expression rightExpression )
{
- Type leftType = analysis . getType ( leftExpression ) ;
- Type rightType = analysis . getType ( rightExpression ) ;
+ Type leftType = analysis . getTypeWithCoercions ( leftExpression ) ;
+ Type rightType = analysis . getTypeWithCoercions ( rightExpression ) ;
Optional < Type > superType = metadata . getTypeManager ( ) . getCommonSuperType ( leftType , rightType ) ;
if ( ! superType . isPresent ( ) ) {
throw new SemanticException ( TYPE_MISMATCH , node , STRING0 , leftType . getDisplayName ( ) , rightType . getDisplayName ( ) ) ;
<nb> public abstract class AbstractTestQueries
STRING1
) ;
assertQuery (
+ STRING2 ,
+ STRING3
+ ) ;
+ assertQuery (
STRING4 ,
STRING1
) ;
+ assertQuery (
+ STRING5 ,
+ STRING3
+ ) ;
}
@ test
|
Fix join re analysis to consider coercions
|
<nb> public class TermSettings {
private String mShell ;
private String mInitialCommand ;
private boolean mUTF8ByDefault = false ;
- private int mBackKeyAction = BACK_KEY_SENDS_ESC ;
+ private int mBackKeyAction = BACK_KEY_STOPS_SERVICE ;
private String mTermType ;
private boolean mCloseOnExit = true ;
|
Revert default behavior of Back Key to exiting application
|
<nb> public class EditorFragment extends EditorFragmentAbstract {
mWebView . loadDataWithBaseURL ( STRING0 , htmlEditor , STRING1 , STRING2 , STRING3 ) ;
- if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . KITKAT ) {
- WebView . setWebContentsDebuggingEnabled ( true ) ;
- }
+ enableWebDebugging ( true ) ;
}
private String getStringFromAsset ( String filename ) throws IOException {
<nb> public class EditorFragment extends EditorFragmentAbstract {
}
}
+ @ suppresslint ( STRING4 )
+ private void enableWebDebugging ( boolean enable ) {
+ if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . KITKAT ) {
+ AppLog . i ( T . EDITOR , STRING5 ) ;
+ WebView . setWebContentsDebuggingEnabled ( enable ) ;
+ }
+ }
+
@ override
public void setTitle ( CharSequence text ) {
SINGLE
|
Added SuppressLint for web debugging
|
<nb> public class JavaBridgeCoercionTest extends JavaBridgeTestBase {
private long mLongValue ;
private float mFloatValue ;
private double mDoubleValue ;
- SINGLE
private String mStringValue ;
private Object mObjectValue ;
private CustomType mCustomTypeValue ;
<nb> public class JavaBridgeCoercionTest extends JavaBridgeTestBase {
mDoubleValue = x ;
notifyResultIsReady ( ) ;
}
- SINGLE
public synchronized void setStringValue ( String x ) {
mStringValue = x ;
notifyResultIsReady ( ) ;
<nb> public class JavaBridgeCoercionTest extends JavaBridgeTestBase {
waitForResult ( ) ;
return mDoubleValue ;
}
- SINGLE
public synchronized String waitForStringValue ( ) {
waitForResult ( ) ;
return mStringValue ;
<nb> public class JavaBridgeCoercionTest extends JavaBridgeTestBase {
assertNull ( mTestObject . waitForCustomTypeValue ( ) ) ;
}
- SINGLE
-
SINGLE
public void testPassJavaScriptObject ( ) throws Throwable {
SINGLE
|
Remove some stale TODOs from the Java Bridge tests
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Remove class from pre class code
|
<nb>
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
public abstract class BaseStubbing < T > implements OngoingStubbing < T > , DeprecatedOngoingStubbing < T > {
+
+ SINGLE
public OngoingStubbing < T > thenReturn ( T value ) {
return thenAnswer ( new Returns ( value ) ) ;
}
|
Added a TODO
|
<nb> public class OSQLFunctionRuntime extends OSQLFilterItemAbstract {
SINGLE
final String text = ( ( OCommandSQL ) configuredParameters [ i ] ) . getText ( ) ;
final OSQLPredicate pred = new OSQLPredicate ( text ) ;
- runtimeParameters [ i ] = pred . evaluate ( iCurrentRecord instanceof ORecord < ? > ? ( ORecord < ? > ) iCurrentResult : null ,
+ runtimeParameters [ i ] = pred . evaluate ( iCurrentRecord instanceof ORecord < ? > ? ( ORecord < ? > ) iCurrentRecord : null ,
( ODocument ) iCurrentResult , iContext ) ;
SINGLE
configuredParameters [ i ] = pred ;
|
fixed bug on execution of functions inside other predicates
|
<nb> public abstract class TileMachine extends TileBuildCraft implements IMachine , IP
@ override
public int powerRequest ( ) {
if ( isActive ( ) ) {
- return getPowerProvider ( ) . getActivationEnergy ( ) ;
+ return getPowerProvider ( ) . getMaxEnergyReceived ( ) ;
} else {
return NUMBER0 ;
}
|
Revert Changed power request to activation energy
|
<nb> public class DefaultUrlMappingEvaluator implements UrlMappingEvaluator , ClassLoa
if ( namedArguments . containsKey ( RESOURCE ) || namedArguments . containsKey ( SINGLE ) ) {
Object controller ;
if ( namedArguments . containsKey ( RESOURCE ) ) {
- GrailsUtil . deprecated ( STRING0 ) ;
+ GrailsUtil . deprecated ( STRING1 + RESOURCE + STRING2 + SINGLE + STRING3 ) ;
controller = namedArguments . get ( RESOURCE ) ;
} else {
controller = namedArguments . get ( SINGLE ) ;
|
Remove groovy string syntax
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ServletInputStreamTestCase {
}
@ test
+ @ ignore ( STRING0 )
public void testAsyncServletInputStream ( ) {
StringBuilder builder = new StringBuilder ( NUMBER0 * HELLO_WORLD . length ( ) ) ;
for ( int i = NUMBER1 ; i < NUMBER2 ; ++ i ) {
|
Ignore test that hangs
|
<nb> public class HttpSession extends LocalClientSession {
failDelivery ( delivered . getPackets ( ) ) ;
}
else {
- Log . warn ( STRING0 + getStreamID ( ) + STRING1 +
+ Log . warn ( STRING0 + getStreamID ( ) + STRING2 +
STRING3 ) ;
}
}
|
add trivial whitespace to error message
|
<nb> public class PackageManagerService extends IPackageManager . Stub {
SINGLE
SINGLE
if ( isSystemApp ( p . owner ) ) {
- Slog . i ( TAG , STRING0 + p . owner + STRING1
- + p . info . name + STRING2 ) ;
+ String msg = STRING0 + p . owner + STRING1
+ + p . info . name + STRING2 ;
+ reportSettingsProblem ( Log . WARN , msg ) ;
bp . sourcePackage = null ;
}
}
|
Don t just log this warning record the situation for posterity
|
<nb> public class AsyncContextImpl implements AsyncContext {
threadName = threadName . substring ( len - NUMBER0 , len ) ;
}
String msg = String . format (
- STRING0 +
- STRING1 +
- STRING2 ,
- rHashCode , crHashCode ,
- rpHashCode , stage , Thread . currentThread ( ) . getName ( ) ,
- state , method , uri ) ;
+ STRING3 +
+ STRING4 ,
+ rHashCode , crHashCode , rpHashCode , stage ,
+ Thread . currentThread ( ) . getName ( ) , state , method , uri ) ;
if ( log . isTraceEnabled ( ) ) {
log . trace ( msg , new DebugException ( ) ) ;
} else {
|
Shorten the debug output
|
<nb> public class MaxStarterTest {
private MalformedJUnit38Test ( ) {
}
- @ suppresswarnings ( STRING0 )
public void testSucceeds ( ) {
}
}
|
Removed unnecessary SuppressWarnings
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi
STRING0 +
STRING1 ) ;
- assertCompletionVariants ( myProjectPom , STRING2 , STRING3 , STRING4 , STRING5 , STRING6 , STRING7 , STRING8 , STRING9 , STRING10 , STRING11 ) ;
+ assertCompletionVariants ( myProjectPom , STRING2 , STRING3 , STRING4 , STRING5 , STRING6 , STRING7 , STRING8 , STRING9 , STRING10 , STRING11 , STRING12 ) ;
}
public void testDoNotHighlightUnknownType ( ) throws Throwable {
|
Fix broken maven test
|
<nb> public class OProfiler implements OProfilerMBean {
chronos . clear ( ) ;
if ( stats != null )
stats . clear ( ) ;
- if ( hooks != null )
- hooks . clear ( ) ;
}
public synchronized long startChrono ( ) {
|
Fixed profiler hook reset
|
<nb> public class OnboardDepartVertex extends AbstractVertex {
public OnboardDepartVertex ( String label , double lon , double lat ) {
SINGLE
- super ( null , label , lon , lat ) ;
+ super ( null , label , lon , lat , label ) ;
}
@ override
|
Improve OnboardDepartVertex constructor
|
<nb> public abstract class Editor extends JFrame implements RunnerListener {
COMMENT
COMMENT
class FileDropHandler extends TransferHandler {
- public boolean canImport ( JComponent dest , DataFlavor [ ] flavors ) {
- return true ;
+ public boolean canImport ( TransferHandler . TransferSupport support ) {
+ return ! sketch . isReadOnly ( ) ;
}
@ suppresswarnings ( STRING0 )
- public boolean importData ( JComponent src , Transferable transferable ) {
+ public boolean importData ( TransferHandler . TransferSupport support ) {
int successful = NUMBER0 ;
+ if ( ! canImport ( support ) ) {
+ return false ;
+ }
+
try {
+ Transferable transferable = support . getTransferable ( ) ;
DataFlavor uriListFlavor =
new DataFlavor ( STRING1 ) ;
<nb> public abstract class Editor extends JFrame implements RunnerListener {
super . show ( component , x , y ) ;
}
}
- }
+ }
|
Disable file drag drop for read only sketches
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
+ import static NAMESPACE ;
COMMENT
COMMENT
<nb> public class RestFlushAction extends BaseRestHandler {
builder . startObject ( ) ;
builder . field ( STRING0 , true ) ;
- builder . startObject ( STRING1 ) ;
- builder . field ( STRING2 , response . totalShards ( ) ) ;
- builder . field ( STRING3 , response . successfulShards ( ) ) ;
- builder . field ( STRING4 , response . failedShards ( ) ) ;
- builder . endObject ( ) ;
+ buildBroadcastShardsHeader ( builder , response ) ;
builder . endObject ( ) ;
channel . sendResponse ( new JsonRestResponse ( request , OK , builder ) ) ;
|
add shard header with failures to flush operation
|
<nb> public class TFSTest {
SINGLE
PowerMockito . mockStatic ( UserGroupInformation . class ) ;
final UserGroupInformation ugi = Mockito . mock ( UserGroupInformation . class ) ;
- Mockito . when ( ugi . getCurrentUser ( ) ) . thenReturn ( ugi ) ;
+ Mockito . when ( UserGroupInformation . getCurrentUser ( ) ) . thenReturn ( ugi ) ;
}
@ before
|
SMALLFIX Call static methods on classes not instances
|
<nb> public class ObjectiveCImplementationGenerator extends ObjectiveCSourceFileGener
printf ( STRING0 ) ;
printf ( STRING1 ) ;
printf ( STRING2 ) ;
- printf ( STRING3 ) ;
+ if ( Options . useReferenceCounting ( ) ) {
+ printf ( STRING4
+ + STRING5 ) ;
+ }
+ else {
+ printf ( STRING3 ) ;
+ }
printf ( STRING6 ) ;
println ( STRING7 ) ;
|
Fixed some issues reported by Clang Static Analyzer
|
<nb> public class XlsExporter implements Exporter {
} else if ( v instanceof Calendar ) {
c . setCellValue ( ( Calendar ) v ) ;
} else if ( v instanceof String ) {
- c . setCellValue ( ( String ) v ) ;
+ String s = ( String ) v ;
+ if ( s . length ( ) > NUMBER0 ) {
+ SINGLE
+ s = s . substring ( NUMBER1 , NUMBER0 ) ;
+ }
+ c . setCellValue ( s ) ;
}
}
}
|
Exporting to Excel on attached project raises server exception
|
<nb> public abstract class AbstractEmulatorMojo extends AbstractAndroidMojo {
private void stopEmulatorWindows ( CommandExecutor executor , String pid ) throws ExecutionException {
String stopCommand = STRING0 ; SINGLE
List < String > commands = new ArrayList < String > ( ) ;
- commands . add ( STRING1 ) ;
- commands . add ( pid ) ;
+ commands . add ( STRING2 + pid ) ; SINGLE
getLog ( ) . info ( STOP_EMULATOR_MSG + pid ) ;
executor . executeCommand ( stopCommand , commands ) ;
}
|
hopefully fixed apostrophe setting for emulator stop on windows as well
|
<nb> public abstract class Uri implements Parcelable , Comparable < Uri > {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix incorrect javadoc for Uri getQueryParameter
|
<nb>
COMMENT
COMMENT
- package NAMESPACE ;
+ package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Corrected package and some imports in CppTarget java
|
<nb> public abstract class FrameTask < T extends FrameTask < T > > extends MRTask < T > {
final float fraction = ( float ) ( _useFraction * relative_chunk_weight ) / repeats ;
assert ( fraction <= FLOAT0 ) ;
- if ( fraction < FLOAT1 || nontrivial_weights ) {
+ if ( fraction < FLOAT1 || nontrivial_weights || _shuffle ) {
skip_rng = RandomUtils . getRNG ( _seed + offset ) ;
}
|
Fix NPE in previous commit
|
<nb> public class FileInStream extends InputStream implements BoundedStream , Seekable
}
seekBlockInStream ( pos ) ;
+ SINGLE
mCurrentBlockInStream . seek ( mPos % mBlockSize ) ;
} else {
seekBlockInStream ( pos / mBlockSize * mBlockSize ) ;
|
add a comment
|
<nb> public class ThymeleafAutoConfiguration {
@ value ( STRING0 )
private String suffix = STRING1 ;
+ @ value ( STRING2 )
+ private boolean cacheable ;
+
@ value ( STRING3 )
private String templateMode = STRING4 ;
<nb> public class ThymeleafAutoConfiguration {
resolver . setPrefix ( this . prefix ) ;
resolver . setSuffix ( this . suffix ) ;
resolver . setTemplateMode ( this . templateMode ) ;
+ resolver . setCacheable ( this . cacheable ) ;
return resolver ;
}
|
Add cacheable switch to Thymeleaf template resolver
|
<nb> public class ImageView extends View {
COMMENT
view ' s drawable when it is drawn . If there is not matrix ,
- this method will return null .
- Do not change this matrix in place . If you want a different matrix
- applied to the drawable , be sure to call setImageMatrix ( ) .
+ this method will return an identity matrix .
+ Do not change this matrix in place but make a copy .
+ If you want a different matrix applied to the drawable ,
+ be sure to call setImageMatrix ( ) .
COMMENT
public Matrix getImageMatrix ( ) {
if ( mDrawMatrix == null ) {
- return Matrix . IDENTITY_MATRIX ;
+ return new Matrix ( Matrix . IDENTITY_MATRIX ) ;
}
return mDrawMatrix ;
}
|
Return a copy of the read only identity Matrix
|
<nb> public class InterceptorsAnnotationParsingProcessor implements DeploymentUnitPro
private Collection < ComponentDescription > getApplicableComponents ( final CompositeIndex index , final ClassInfo klass , final EEModuleDescription eeModuleDescription ) {
Set < ComponentDescription > componentDescriptions = new HashSet < ComponentDescription > ( ) ;
final List < ComponentDescription > descriptions = eeModuleDescription . getComponentsByClassName ( klass . name ( ) . toString ( ) ) ;
- if ( componentDescriptions . isEmpty ( ) ) {
+ if ( ! descriptions . isEmpty ( ) ) {
componentDescriptions . addAll ( descriptions ) ;
} else {
componentDescriptions . addAll ( this . getKnownSubClassComponents ( index , klass , eeModuleDescription ) ) ;
|
Fix interceptor regression
|
<nb> public class PaymentChannelServerState {
SINGLE
SINGLE
Transaction walletContract = wallet . getTransaction ( multisigContract . getHash ( ) ) ;
- checkState ( walletContract != null , STRING0 ) ;
+ checkState ( walletContract != null , STRING1 , multisigContract . getHash ( ) ) ;
SINGLE
SINGLE
|
Add detail to an error log message
|
<nb> public class RpcConnection {
if ( log . isLoggable ( Level . FINEST ) ) {
log . log ( Level . FINEST , STRING0 , new Object [ ] { msg , channel } ) ;
- }
- if ( channel >= NUMBER0 ) {
+ }
+
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ if ( channel >= NUMBER0 ) {
connection . send ( channel , msg ) ;
} else {
connection . send ( msg ) ;
|
Added a better comment as to why we have to check
|
<nb> public class SedaComponent extends UriEndpointComponent {
if ( ref != null ) {
SINGLE
- if ( size != null && ref . getSize ( ) != size ) {
+ if ( size != null && ! size . equals ( ref . getSize ( ) ) ) {
SINGLE
throw new IllegalArgumentException ( STRING0 + key + STRING1
+ ( ref . getSize ( ) != null ? ref . getSize ( ) : Integer . MAX_VALUE ) + STRING2 + size ) ;
|
Fixed seda when using queueSize not comparing correctly
|
<nb> public class State implements Cloneable {
SINGLE
newState . stateData . usingRentedBike = stateData . usingRentedBike ;
newState . stateData . carParked = stateData . carParked ;
+ newState . stateData . bikeParked = stateData . bikeParked ;
return newState ;
}
<nb> public class State implements Cloneable {
ret = ( ( TransitBoardAlight ) edge ) . traverse ( ret , orig . getBackState ( ) . getTimeSeconds ( ) ) ;
newInitialWaitTime = ret . stateData . initialWaitTime ;
- }
- else
+ } else {
ret = edge . traverse ( ret ) ;
+ }
if ( ret != null && ret . getBackMode ( ) != null && orig . getBackMode ( ) != null &&
ret . getBackMode ( ) != orig . getBackMode ( ) ) {
|
Initialize non transit mode in reverse optimization
|
<nb> public class Bookmark {
}
public int getLine ( ) {
+ if ( myHighlighter != null && myHighlighter . isValid ( ) ) {
+ return myHighlighter . getDocument ( ) . getLineNumber ( myHighlighter . getStartOffset ( ) ) ;
+ }
return myTarget . getLine ( ) ;
}
|
Bookmarks choose wrong line after some edits
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class AlarmManagerService extends IAlarmManager . Stub {
SINGLE
SINGLE
- int gmtOffset = ( zone . getRawOffset ( ) + zone . getDSTSavings ( ) ) / NUMBER0 ;
- setKernelTimezone ( mDescriptor , - ( gmtOffset ) ) ;
+ int gmtOffset = zone . getRawOffset ( ) ;
+ if ( zone . inDaylightTime ( new Date ( System . currentTimeMillis ( ) ) ) ) {
+ gmtOffset += zone . getDSTSavings ( ) ;
+ }
+ setKernelTimezone ( mDescriptor , - ( gmtOffset / NUMBER0 ) ) ;
}
TimeZone . setDefault ( null ) ;
|
Fix daylight savings time offset computation
|
<nb> public class AsmUtil {
return ACC_PUBLIC ;
}
Visibility memberVisibility = memberDescriptor . getVisibility ( ) ;
+ if ( memberVisibility == Visibilities . LOCAL && memberDescriptor instanceof CallableMemberDescriptor ) {
+ return ACC_PUBLIC ;
+ }
if ( memberVisibility != Visibilities . PRIVATE ) {
return null ;
}
+ SINGLE
if ( isClassObject ( containingDeclaration ) ) {
return NO_FLAG_PACKAGE_PRIVATE ;
}
|
Generating public flag for local functions properties
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public interface ComponentManager extends UserDataHolder , Disposable {
COMMENT
COMMENT
COMMENT
- @ nullable
< T > T getComponent ( @ notnull Class < T > interfaceClass ) ;
COMMENT
<nb> public abstract class ComponentManagerImpl extends UserDataHolderBase implements
myComponentConfigCount = - NUMBER0 ;
}
- @ nullable
@ suppresswarnings ( STRING0 )
@ override
public final < T > T getComponent ( @ notnull Class < T > interfaceClass ) {
|
removed useless nullable
|
<nb> public interface ClaimStrategy
void setSequence ( final long sequence , final Sequence [ ] dependentSequences ) ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface ClaimStrategy
Thread . yield ( ) ;
}
}
+
+ cursor . set ( sequence ) ;
}
private void waitForCapacity ( final Sequence [ ] dependentSequences , final MutableLong minGatingSequence )
<nb> public interface ClaimStrategy
@ override
public void serialisePublishing ( final long sequence , final Sequence cursor , final int batchSize )
{
+ cursor . set ( sequence ) ;
}
private void waitForFreeSlotAt ( final long sequence , final Sequence [ ] dependentSequences )
<nb> public class Sequencer
private void publish ( final long sequence , final int batchSize )
{
claimStrategy . serialisePublishing ( sequence , cursor , batchSize ) ;
- cursor . set ( sequence ) ;
waitStrategy . signalAllWhenBlocking ( ) ;
}
}
|
Push setting of cursor on publication down into ClaimStrategy
|
<nb> public class TraitTypeCheckingExtension extends AbstractTypeCheckingExtension {
result = candidates . get ( NUMBER0 ) . getReturnType ( ) ;
}
}
- System . out . println ( STRING0 + result . toString ( false ) ) ;
return result ;
}
|
Remove System out debug code
|
<nb> import static NAMESPACE ;
import static NAMESPACE ;
public class ConvertersTest {
- private ClassLoader classLoader ;
private LocalizedXStreams transformers ;
private ConverterLookup en ;
@ before
public void setUp ( ) throws Exception {
- classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
+ ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
transformers = new LocalizedXStreams ( classLoader ) ;
en = transformers . get ( Locale . US ) . getConverterLookup ( ) ;
}
|
Removed some extra fields
|
<nb> public class MessageView extends K9Activity implements OnClickListener {
public void fetchingAttachment ( ) {
showToast ( getString ( R . string . message_view_fetching_attachment_toast ) , Toast . LENGTH_SHORT ) ;
}
-
-
- public void setHeaders ( final Message message , final Account account ) {
- runOnUiThread ( new Runnable ( ) {
- public void run ( ) {
- mMessageView . setHeaders ( message , account ) ;
- }
- } ) ;
- }
-
}
public static void actionView ( Context context , MessageReference messRef ,
|
Removed unused code
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
public class ApiUtils {
<nb> public class ApiUtils {
return isCompatWith ( Build . VERSION_CODES . HONEYCOMB ) ;
}
- @ targetapi ( NUMBER0 )
- public void setFitsSystemWindowsCompat ( View view ) {
- if ( isCompatWith ( Build . VERSION_CODES . ICE_CREAM_SANDWICH ) ) {
- view . setFitsSystemWindows ( false ) ;
- }
- }
}
|
Remove unused method in ApiUtils
|
<nb> class NamespaceComparator {
} else {
sb . append ( STRING0 ) ;
}
+ if ( ! prop . getTypeParameters ( ) . isEmpty ( ) ) {
+ sb . append ( STRING1 ) ;
+ new Serializer ( sb ) . serializeCommaSeparated ( prop . getTypeParameters ( ) ) ;
+ sb . append ( STRING2 ) ;
+ }
if ( prop . getReceiverParameter ( ) . exists ( ) ) {
+ SINGLE
new Serializer ( sb ) . serialize ( prop . getReceiverParameter ( ) . getType ( ) ) ;
sb . append ( STRING3 ) ;
}
|
fix ext prop type param output of ReadKotlinClassDataTest
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class UserHandle implements Parcelable {
return getUserId ( Process . myUid ( ) ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ systemapi
+ public final boolean isOwner ( ) {
+ return this . equals ( OWNER ) ;
+ }
+
COMMENT
public UserHandle ( int h ) {
mHandle = h ;
|
Introduce system API for distinguishing the owner user
|
<nb> public class FilePathReferenceProvider extends PsiReferenceProvider {
@ notnull
public static Collection < PsiFileSystemItem > getRoots ( final Module thisModule , boolean includingClasses ) {
if ( thisModule == null ) return Collections . emptyList ( ) ;
- Set < Module > modules = new com . intellij . util . containers . HashSet < Module > ( ) ;
ModuleRootManager moduleRootManager = ModuleRootManager . getInstance ( thisModule ) ;
- ModuleUtilCore . getDependencies ( thisModule , modules ) ;
List < PsiFileSystemItem > result = new ArrayList < PsiFileSystemItem > ( ) ;
final PsiManager psiManager = PsiManager . getInstance ( thisModule . getProject ( ) ) ;
if ( includingClasses ) {
|
remove unnecessary ModuleUtilCore getDependencies call
|
<nb> class ViewFetcher {
COMMENT
public ArrayList < View > getViews ( View parent , boolean onlySufficientlyVisible ) {
- activityUtils . getCurrentActivity ( false ) ;
final ArrayList < View > views = new ArrayList < View > ( ) ;
final View parentToUse ;
|
Removed getCurrentActivity from getViews
|
<nb> public abstract class BaseTransport implements Component , RosterEventListener {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void sendMessage ( JID to , JID from , String msg , Message . Type type ) {
+ Message m = new Message ( ) ;
+ m . setType ( type ) ;
+ m . setFrom ( from ) ;
+ m . setTo ( to ) ;
+ m . setBody ( msg ) ;
+ sendPacket ( m ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void sendMessage ( JID to , JID from , String msg ) {
+ sendMessage ( to , from , msg , Message . Type . chat ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Adding some helper functions
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IosPostprocessResources extends Genrule {
IosPostprocessResources (
BuildRuleParams params ,
- BuildRuleResolver resolver ,
+ SourcePathResolver resolver ,
List < SourcePath > srcs ,
Optional < String > cmd ,
Optional < String > bash ,
<nb> public class IosPostprocessResources extends Genrule {
final Function < Path , Path > relativeToAbsolutePathFunction ) {
super (
params ,
- new SourcePathResolver ( resolver ) ,
+ resolver ,
srcs ,
cmd ,
bash ,
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class IosPostprocessResourcesDescription
A args ) {
return new IosPostprocessResources (
params ,
- resolver ,
+ new SourcePathResolver ( resolver ) ,
COMMENT
args . cmd ,
COMMENT
|
Pass only SourcePathResolver in IosPostProcessResources
|
<nb> public class SpecifyTypeInDocstringIntention implements IntentionAction {
public boolean isAvailable ( @ notnull Project project , Editor editor , PsiFile file ) {
myText = PyBundle . message ( STRING0 ) ;
PsiElement elementAt = PyUtil . findNonWhitespaceAtOffset ( file , editor . getCaretModel ( ) . getOffset ( ) ) ;
-
+ if ( elementAt == null ) return false ;
PyCallExpression callExpression = PsiTreeUtil . getParentOfType ( elementAt , PyCallExpression . class ) ;
if ( callExpression != null && callExpression . resolveCalleeFunction ( PyResolveContext . defaultContext ( ) ) != null ) {
PyAssignmentStatement assignmentStatement = PsiTreeUtil . getParentOfType ( elementAt , PyAssignmentStatement . class ) ;
|
fixed forgotten nullable in docstring intention
|
<nb> public class FileChooserDescriptorFactory {
}
} ) ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ @ suppresswarnings ( STRING0 )
+ public static FileChooserDescriptor getDirectoryChooserDescriptor ( String objectName ) {
+ return createSingleFolderDescriptor ( ) . withTitle ( STRING1 + objectName ) ;
+ }
}
|
temporary restored API method to fix compatibility with Kotlin plugin
|
<nb> public class InternalNio2OutputBuffer extends AbstractOutputBuffer < Nio2Channel >
}
}
if ( notify ) {
- endpoint . processSocket ( socket , SocketStatus . OPEN_WRITE , true ) ;
+ endpoint . processSocket ( socket , SocketStatus . OPEN_WRITE , false ) ;
}
}
<nb> public class InternalNio2OutputBuffer extends AbstractOutputBuffer < Nio2Channel >
}
}
if ( notify ) {
- endpoint . processSocket ( socket , SocketStatus . OPEN_WRITE , true ) ;
+ endpoint . processSocket ( socket , SocketStatus . OPEN_WRITE , false ) ;
}
}
<nb> public class Nio2ServletOutputStream extends AbstractServletOutputStream < Nio2Cha
} catch ( IOException e ) {
socketWrapper . setError ( true ) ;
onError ( e ) ;
- endpoint . processSocket ( socketWrapper , SocketStatus . ERROR , true ) ;
+ endpoint . processSocket ( socketWrapper , SocketStatus . ERROR , false ) ;
}
}
}
|
When not inline do not use a new thread since the completion handler is already run in a new thread
|
<nb> public class ReaderSubsActivity extends AppCompatActivity
private static final String KEY_LAST_ADDED_TAG_NAME = STRING0 ;
+ private static final int NUM_TABS = NUMBER0 ;
+
private static final int TAB_IDX_FOLLOWED_TAGS = NUMBER1 ;
private static final int TAB_IDX_FOLLOWED_BLOGS = NUMBER2 ;
private static final int TAB_IDX_RECOMMENDED_BLOGS = NUMBER3 ;
<nb> public class ReaderSubsActivity extends AppCompatActivity
restoreState ( savedInstanceState ) ;
mViewPager = ( WPViewPager ) findViewById ( R . id . viewpager ) ;
- mViewPager . setOffscreenPageLimit ( NUMBER3 ) ;
+ mViewPager . setOffscreenPageLimit ( NUM_TABS - NUMBER2 ) ;
mViewPager . setAdapter ( getPageAdapter ( ) ) ;
TabLayout tabLayout = ( TabLayout ) findViewById ( R . id . tab_layout ) ;
|
Added NUM_TABS constant
|
<nb> public class NetworkDispatcher extends SimpleChannelInboundHandler < Packet < ? > > im
public void serverToClientHandshake ( EntityPlayerMP player )
{
this . player = player ;
- insertIntoChannel ( ) ;
Boolean fml = this . manager . channel ( ) . attr ( NetworkRegistry . FML_MARKER ) . get ( ) ;
if ( fml != null && fml )
{
SINGLE
SINGLE
+ insertIntoChannel ( ) ;
}
else
{
|
Compleetly skip FML handshake for Vanilla connections
|
<nb> public class NotificationsListFragment extends ListFragment {
}
}
+ private boolean hasActivity ( ) {
+ return ( getActivity ( ) != null && ! isRemoving ( ) ) ;
+ }
+
public NotesAdapter getNotesAdapter ( ) {
return mNotesAdapter ;
}
<nb> public class NotificationsListFragment extends ListFragment {
}
private void requestMoreNotifications ( ) {
- if ( mNoteProvider != null && mNoteProvider . canRequestMore ( ) ) {
+ if ( mNoteProvider != null && mNoteProvider . canRequestMore ( ) && hasActivity ( ) ) {
showProgressFooter ( ) ;
mNoteProvider . onRequestMoreNotifications ( getListView ( ) , getListAdapter ( ) ) ;
}
|
Added hasActivity check before requesting more notifications just to be safe
|
<nb> public class Compiler extends AbstractCompiler {
return typeRegistry ;
}
+ final void setTypeRegistry ( JSTypeRegistry typeRegistry ) {
+ this . typeRegistry = typeRegistry ;
+ }
+
@ override
public MemoizedScopeCreator getTypedScopeCreator ( ) {
return getPassConfig ( ) . getTypedScopeCreator ( ) ;
|
Add a package private setTypeRegistry function to Compiler
|
<nb> public class SgSyncAdapter extends AbstractThreadedSyncAdapter {
COMMENT
COMMENT
public static void requestSync ( Context context , int showTvdbId ) {
- if ( AndroidUtils . isNetworkConnected ( context ) ) {
+ if ( Utils . isAllowedConnection ( context ) ) {
Bundle args = new Bundle ( ) ;
args . putInt ( SHOW_TVDB_ID , showTvdbId ) ;
|
Requesting syncs respects the Wi Fi only user setting
|
<nb> import NAMESPACE ;
public class AdvancedLSystemTreeDefinition implements TreeDefinition {
private static final Logger logger = LoggerFactory . getLogger ( AdvancedLSystemTreeDefinition . class ) ;
- private static final int GROWTH_SAFE_DISTANCE = NUMBER0 ;
+ private static final int GROWTH_SAFE_DISTANCE = NUMBER1 ;
private static final float MAX_ANGLE_OFFSET = ( float ) Math . PI / NUMBER2 f ;
private static final int GROWTH_INTERVAL = NUMBER3 * NUMBER4 ;
|
Increased the growth safety distance to avoid trying to set block in an unloaded chunk
|
<nb> public final class JUnitRunner extends BaseRunner {
@ override
public void run ( ) throws Throwable {
- Level stdOutLogLevel = Level . FINE ;
+ Level stdOutLogLevel = Level . INFO ;
Level stdErrLogLevel = Level . WARNING ;
String unparsedStdOutLogLevel = System . getProperty ( STD_OUT_LOG_LEVEL_PROPERTY ) ;
<nb> public class LoggingIntegrationTest {
String debugLogs = testOutputBeforeAndAfterErrorLogs [ NUMBER0 ] ;
String errorLogs = testOutputBeforeAndAfterErrorLogs [ NUMBER1 ] ;
- SINGLE
+ SINGLE
assertThat ( debugLogs , containsString ( STRING0 ) ) ;
assertThat ( debugLogs , containsString ( STRING1 ) ) ;
assertThat ( debugLogs , containsString ( STRING2 ) ) ;
- assertThat ( debugLogs , containsString ( STRING3 ) ) ;
+ assertThat ( debugLogs , not ( containsString ( STRING3 ) ) ) ;
assertThat ( debugLogs , not ( containsString ( STRING4 ) ) ) ;
SINGLE
|
Change default JUnit java util logging log level from FINE to INFO
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
|
Remove invalid import
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.