diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class TightDB {
private static final String JAVA_LIBRARY_PATH = STRING0 ;
private static final String BINARIES_PATH = STRING1 ;
-
+
private static boolean loadedLibrary ;
public static byte [ ] serialize ( Serializable value ) {
<nb> public class TightDB {
public static void addNativeLibraryPath ( String path ) {
try {
- System . setProperty ( JAVA_LIBRARY_PATH , System . getProperty ( JAVA_LIBRARY_PATH ) + path ) ;
+ System . setProperty ( JAVA_LIBRARY_PATH , System . getProperty ( JAVA_LIBRARY_PATH ) + STRING2 + path + STRING2 ) ;
} catch ( Exception e ) {
throw new RuntimeException ( STRING3 , e ) ;
}
<nb> public class TightDB {
throw new RuntimeException ( STRING4 , e ) ;
}
}
-
+
}
|
Fixed native library path addition
|
<nb>
COMMENT
COMMENT
COMMENT
-
package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Remove star imports in VCardProvider
|
<nb> public class TabLayout extends HorizontalScrollView {
} else {
animateToTab ( newPosition ) ;
}
- }
- if ( newPosition != Tab . INVALID_POSITION ) {
- setSelectedTabView ( newPosition ) ;
+ if ( newPosition != Tab . INVALID_POSITION ) {
+ setSelectedTabView ( newPosition ) ;
+ }
}
dispatchTabUnselected ( currentTab ) ;
mSelectedTab = tab ;
|
Fix TabLayout flickering
|
<nb> public class BitmapFontTest
{
public static void main ( String [ ] argv )
{
- JoglApplication app = new JoglApplication ( STRING0 , NUMBER0 , NUMBER1 , false ) ;
+ JoglApplication app = new JoglApplication ( STRING1 , NUMBER0 , NUMBER1 , false ) ;
app . getGraphics ( ) . setRenderListener ( new com . badlogic . gdx . tests . BitmapFontTest ( ) ) ;
}
}
|
changed title of bitmap font test window
|
<nb> public interface ApplicationServerOperations extends PrefsServerOperations
SINGLE
void updateCredentials ( ) ;
+ SINGLE
+ void stopEventListener ( ) ;
+ void ensureEventListener ( ) ;
+
SINGLE
String getApplicationURL ( String pathName ) ;
<nb> public class RemoteServer implements Server
registerSatelliteCallback ( ) ;
}
+ public void stopEventListener ( )
+ {
+ serverEventListener_ . stop ( ) ;
+ }
+
+ public void ensureEventListener ( )
+ {
+ ensureListeningForEvents ( ) ;
+ }
+
public void disconnect ( )
{
disconnected_ = true ;
|
add event listener methods
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class KnownElementWeigher extends ProximityWeigher {
if ( element instanceof PsiClass ) {
@ nonnls final String qname = ( ( PsiClass ) element ) . getQualifiedName ( ) ;
if ( qname != null ) {
+ String pkg = StringUtil . getPackageName ( qname ) ;
+ if ( pkg . equals ( STRING0 ) ) return NUMBER0 ;
+ if ( pkg . equals ( STRING1 ) ) return NUMBER1 ;
+
if ( qname . startsWith ( STRING0 ) ) return NUMBER2 ;
if ( qname . startsWith ( STRING1 ) ) return NUMBER3 ;
if ( qname . startsWith ( STRING2 ) ) return NUMBER4 ;
|
java util has more priority than java util something
|
<nb> public class ChangeBrowserSettings implements JDOMExternalizable {
@ nullable
private static Date parseDate ( @ nullable String dateStr ) {
- if ( dateStr == null ) return null ;
+ if ( dateStr == null || dateStr . isEmpty ( ) ) return null ;
try {
return DATE_FORMAT . parse ( dateStr ) ;
}
|
handle empty string in ChangeBrowserSettings date parsing
|
<nb> public interface JedisCommands {
Long hincrBy ( String key , String field , long value ) ;
+ Double hincrByFloat ( final String key , final String field , final double value ) ;
+
Boolean hexists ( String key , String field ) ;
Long hdel ( String key , String . . . field ) ;
|
Add hincrByFloat to JedisCommands interface
|
<nb> public class ExpectedHighlightingData {
int byEnds = i2 . endOffset - i1 . endOffset ;
if ( byEnds != NUMBER0 ) return byEnds ;
- int byStarts = i2 . startOffset - i1 . startOffset ;
+ int byStarts = i1 . startOffset - i2 . startOffset ;
if ( byStarts != NUMBER0 ) return byStarts ;
int bySeverity = i2 . severity . compareTo ( i1 . severity ) ;
|
revert change to ExpectedHighlightingData for some reason Python tests no longer fail without the change
|
<nb> import NAMESPACE ;
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 ContentProvider extends Iterable < ByteBuffer >
{
|
Improved documentation regarding the effects of ContentProvider getLength
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public final class ProxyTarget {
COMMENT
COMMENT
COMMENT
- public static Object targetMethodAnnotation ( Class annotationClass , String element ) {
+ public static Object targetMethodAnnotation ( Class < ? extends Annotation > annotationClass , String element ) {
throw new ProxettaException ( ) ;
}
COMMENT
COMMENT
COMMENT
COMMENT
- public static Object targetClassAnnotation ( Class annotationClass , String element ) {
+ public static Object targetClassAnnotation ( Class < ? extends Annotation > annotationClass , String element ) {
throw new ProxettaException ( ) ;
}
|
Using better signature for ProxyTarget annotation related methods
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ComposeFragment extends QKFragment implements ActivityLauncher , Rec
return addresses ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ @ override
+ public void onActivityResult ( int requestCode , int resultCode , final Intent data ) {
+ if ( ! mComposeView . onActivityResult ( requestCode , resultCode , data ) ) {
+ SINGLE
+ }
+ }
+
@ override
public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) {
mRecipients . onItemClick ( parent , view , position , id ) ;
|
Fix Can not attach MMS from Compose
|
<nb> public class SmartNullReturnValuesTest extends TestBase {
Foo smartNull = ( Foo ) returnValues . valueFor ( invocationOf ( Foo . class , STRING0 ) ) ;
SINGLE
- assertEquals ( STRING1 , smartNull + STRING2 ) ;
+ assertEquals ( STRING3 , smartNull + STRING2 ) ;
}
}
|
fixed the test
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
public class ServletContextFactory {
|
Deprecate that class
|
<nb> public final class Environment implements Freezable {
COMMENT
public static class NoSuchVariableException extends Exception {
NoSuchVariableException ( String variable ) {
- super ( STRING0 + variable ) ;
+ super ( STRING0 + variable , null , false , false COMMENT ) ;
}
}
|
Optimize Environment lookup to avoid Throwable fillInStackTrace
|
<nb> public class AstridActivity extends FragmentActivity
setIntent ( intent ) ;
+ if ( fragmentLayout == LAYOUT_TRIPLE && getTaskEditFragment ( ) != null ) {
+ onBackPressed ( ) ; SINGLE
+ }
+
setupTasklistFragmentWithFilter ( filter ) ;
SINGLE
|
Fixed a bug where task edit fragment would remain attached when switching between lists on tablets
|
<nb> public class SmallIntType extends LiquibaseDataType {
@ override
public DatabaseDataType toDatabaseDataType ( Database database ) {
- if ( database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof FirebirdDatabase ) {
+ if ( database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof FirebirdDatabase || database instanceof MSSQLDatabase ) {
return new DatabaseDataType ( STRING0 ) ; SINGLE
}
return super . toDatabaseDataType ( database ) ;
|
Sqlserver doesn t support parameters on smallint
|
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
String [ ] testTrees = {
STRING0 ,
STRING1 ,
- STRING2 ,
+ STRING3 ,
STRING4 ,
STRING5 ,
STRING6 ,
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
STRING7 +
STRING8 +
STRING9 ,
- STRING10 +
- STRING11 ,
+ STRING12 +
+ STRING13 ,
STRING14 +
STRING15 +
|
Make a test a little more clear
|
<nb> public class HgRepositoryImpl extends RepositoryImpl implements HgRepository {
return myHgDir ;
}
+
+ @ notnull
+ @ override
+ public State getState ( ) {
+ return myInfo . getState ( ) ;
+ }
+
@ override
@ notnull
public String getCurrentBranch ( ) {
|
Override getState method for HgRepository
|
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , UU , I , IPK , T7
Object [ ] array = { NUMBER0 , STRING0 , STRING1 } ;
author = create ( ) . newRecord ( TAuthor ( ) ) ;
- author . fromArray ( array , TAuthor_FIRST_NAME ( ) , TAuthor_LAST_NAME ( ) ) ;
+ author . fromArray ( array , new Field [ ] { TAuthor_FIRST_NAME ( ) , TAuthor_LAST_NAME ( ) } ) ;
testRecordFromAssertions ( object , author ) ;
author = create ( ) . newRecord ( TAuthor ( ) ) ;
- author . fromArray ( array , TAuthor_FIRST_NAME ( ) . getName ( ) , TAuthor_LAST_NAME ( ) . getName ( ) ) ;
+ author . fromArray ( array , new String [ ] { TAuthor_FIRST_NAME ( ) . getName ( ) , TAuthor_LAST_NAME ( ) . getName ( ) } ) ;
testRecordFromAssertions ( object , author ) ;
}
|
Resolved compile time ambiguity
|
<nb> public class TieredBlockStore implements BlockStore {
@ override
public void moveBlock ( long userId , long blockId , BlockStoreLocation newLocation )
throws IOException {
- mEvictionLock . readLock ( ) . lock ( ) ;
+ mEvictionLock . writeLock ( ) . lock ( ) ;
try {
long lockId = mLockManager . lockBlock ( userId , blockId , BlockLockType . WRITE ) ;
try {
BlockMeta blockMeta = mMetaManager . getBlockMeta ( blockId ) ;
BlockStoreLocation oldLocation = blockMeta . getBlockLocation ( ) ;
+ freeSpaceInternal ( userId , blockMeta . getBlockSize ( ) , newLocation ) ;
moveBlockNoLock ( blockId , newLocation ) ;
blockMeta = mMetaManager . getBlockMeta ( blockId ) ;
BlockStoreLocation actualNewLocation = blockMeta . getBlockLocation ( ) ;
<nb> public class TieredBlockStore implements BlockStore {
}
} finally {
SINGLE
- mEvictionLock . readLock ( ) . unlock ( ) ;
+ mEvictionLock . writeLock ( ) . unlock ( ) ;
}
}
|
Fix moveBlock where space is not allocated freed before hand
|
<nb> public class CallPanel
boolean videoTelephonyIsLocalVideoStreaming = false ;
boolean desktopSharing = false ;
boolean desktopSharingIsStreamed = false ;
-
+ boolean allCallsConnected = true ;
+
for ( Call call : calls )
{
ProtocolProviderService pps = call . getProtocolProvider ( ) ;
<nb> public class CallPanel
}
}
}
+
+ if ( CallState . CALL_IN_PROGRESS != call . getCallState ( ) )
+ {
+ allCallsConnected = false ;
+ }
}
conferenceButton . setEnabled ( telephonyConferencing ) ;
<nb> public class CallPanel
COMMENT
COMMENT
COMMENT
- videoButton . setEnabled ( videoTelephony ) ;
+ videoButton . setEnabled ( allCallsConnected && videoTelephony ) ;
videoButton . setSelected ( videoTelephonyIsLocalVideoAllowed ) ;
+
COMMENT
COMMENT
COMMENT
|
Fix bug where calls fail if video is toggled while the remote end is ringing
|
<nb> public class EnumByOrdinalType < T extends Enum < T > > extends AbstractType < T > {
@ override
public T getValue ( ResultSet rs , int startIndex ) throws SQLException {
- Integer ordinal = ( Integer ) rs . getObject ( startIndex ) ;
- return ordinal != null ? type . getEnumConstants ( ) [ ordinal ] : null ;
+ int ordinal = rs . getInt ( startIndex ) ;
+ return rs . wasNull ( ) ? null : type . getEnumConstants ( ) [ ordinal ] ;
}
@ override
|
Fix EnumByOrdinalType null handling
|
<nb> public class ExclusiveTaskTest extends PluggableActivitiTestCase {
assertNotNull ( job ) ;
assertFalse ( ( ( JobEntity ) job ) . isExclusive ( ) ) ;
- waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER1 ) ;
+ waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER2 ) ;
SINGLE
assertEquals ( NUMBER3 , managementService . createJobQuery ( ) . count ( ) ) ;
<nb> public class ExclusiveTaskTest extends PluggableActivitiTestCase {
assertNotNull ( job ) ;
assertTrue ( ( ( JobEntity ) job ) . isExclusive ( ) ) ;
- waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER1 ) ;
+ waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER2 ) ;
SINGLE
assertEquals ( NUMBER3 , managementService . createJobQuery ( ) . count ( ) ) ;
<nb> public class ExclusiveTaskTest extends PluggableActivitiTestCase {
SINGLE
assertEquals ( NUMBER4 , managementService . createJobQuery ( ) . count ( ) ) ;
- waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER1 ) ;
+ waitForJobExecutorToProcessAllJobs ( NUMBER0 , NUMBER2 ) ;
SINGLE
assertEquals ( NUMBER3 , managementService . createJobQuery ( ) . count ( ) ) ;
|
Increasing wait for jobs timeout to prevent MSSQL QA Deadlock
|
<nb> public class SonosBinding extends AbstractEventSubscriberBinding < SonosBindingPro
COMMENT
COMMENT
public void bindingChanged ( BindingProvider provider , String itemName ) {
- if ( bindingStarted = false ) {
+ if ( bindingStarted == false ) {
start ( ) ;
bindingStarted = true ;
}
|
Fixed assignment operator in validateBinding
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
<nb> public class SimpleModificationTracker implements ModificationTracker {
SINGLE
assert Patches . JDK_BUG_ID_7103570 ;
}
+
+ @ transient
public volatile int myCounter ;
@ override
|
UISettings extends SimpleModificationTracker but UISettings is persistence component so field must be transient
|
<nb> public class FileOutStream extends OutStream {
int tLen = len ;
int tOff = off ;
while ( tLen > NUMBER0 ) {
- if ( mCurrentBlockLeftByte == NUMBER0 ) {
+ if ( mCurrentBlockLeftByte <= NUMBER0 || mCurrentBlockOutStream == null ) {
getNextBlock ( ) ;
}
- if ( mCurrentBlockLeftByte > tLen ) {
+ if ( mCurrentBlockLeftByte >= tLen ) {
mCurrentBlockOutStream . write ( b , tOff , tLen ) ;
mCurrentBlockLeftByte -= tLen ;
mCachedBytes += tLen ;
|
Fix for a null pointer exception
|
<nb> public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
}
}
catch ( IOException ex ) {
- throw new ResourceAccessException ( STRING0 + ex . getMessage ( ) , ex ) ;
+ throw new ResourceAccessException ( STRING1 + method . name ( ) +
+ STRING2 + url + STRING3 + ex . getMessage ( ) , ex ) ;
}
finally {
if ( response != null ) {
|
Add URI and method name on ResourceAccess
|
<nb> public class CommonCodeStyleSettings {
COMMENT
COMMENT
COMMENT
- public boolean ALIGN_GROUP_FIELD_DECLARATIONS = false ;
+ public boolean ALIGN_GROUP_FIELD_DECLARATIONS = true ;
SINGLE
|
Set align multiline similar statements to true
|
<nb> public class StreamTest extends AbstractSeqTest {
assertThat ( Stream . gen ( ( ) - > NUMBER0 ) . take ( NUMBER1 ) . reduce ( ( i , j ) - > i + j ) ) . isEqualTo ( NUMBER1 ) ;
}
- SINGLE
+ SINGLE
@ test
public void shouldGenerateInfiniteStreamBasedOnSupplierWithAccessToPreviousValue ( ) {
assertThat ( Stream . gen ( NUMBER2 , ( i ) - > i + NUMBER2 ) . take ( NUMBER3 ) . reduce ( ( i , j ) - > i + j ) ) . isEqualTo ( NUMBER4 ) ;
}
+ SINGLE
+ @ test
+ public void shouldBuildStreamBasedOnHeadAndTailSupplierWithAccessToHead ( ) {
+ assertThat ( Stream . build ( NUMBER0 , ( head1 ) - > Stream . build ( head1 + NUMBER0 , ( head2 ) - > Stream . nil ( ) ) ) ) . isEqualTo ( Stream . of ( NUMBER0 , NUMBER2 ) ) ;
+ }
+
SINGLE
@ test
|
Added unit test for new Stream build method
|
<nb> public class AvsAnRule extends EnglishRule {
boolean doesRequireAn = false ;
SINGLE
boolean isException = false ;
+ if ( token . indexOf ( STRING0 ) != - NUMBER0 ) { SINGLE
+ token = token . split ( STRING0 ) [ NUMBER1 ] ;
+ }
if ( requiresA . contains ( token . toLowerCase ( ) ) ) {
isException = true ;
doesRequireA = true ;
<nb> public class AvsAnRuleTest extends TestCase {
assertEquals ( NUMBER1 , matches . length ) ;
matches = rule . match ( langTool . getAnalyzedSentence ( STRING1 ) ) ;
assertEquals ( NUMBER1 , matches . length ) ;
+ matches = rule . match ( langTool . getAnalyzedSentence ( STRING2 ) ) ;
+ assertEquals ( NUMBER1 , matches . length ) ;
SINGLE
matches = rule . match ( langTool . getAnalyzedSentence ( STRING3 ) ) ;
assertEquals ( NUMBER0 , matches . length ) ;
|
fix false alarm about a one way street
|
<nb> public abstract class AbstractInplaceIntroducer < V extends PsiNameIdentifierOwner
}
myOccurrenceMarkers = null ;
- if ( psiField . isValid ( ) ) {
- psiField . delete ( ) ;
- }
+ deleteTemplateField ( psiField ) ;
}
} ) ;
}
+ protected void deleteTemplateField ( V psiField ) {
+ if ( psiField . isValid ( ) ) {
+ psiField . delete ( ) ;
+ }
+ }
+
@ override
protected void moveOffsetAfter ( boolean success ) {
if ( success ) {
|
introduce parameter in objc
|
<nb> public class FactoryImpl implements HazelcastInstance {
public static HazelcastInstance restart ( HazelcastInstance hazelcastInstance ) {
synchronized ( factoryLock ) {
- FactoryImpl factory = ( FactoryImpl ) hazelcastInstance ;
+ HazelcastInstanceProxy hazelcastInstanceProxy = ( HazelcastInstanceProxy ) hazelcastInstance ;
+ FactoryImpl factory = ( FactoryImpl ) hazelcastInstanceProxy . getHazelcastInstance ( ) ;
factory . restarted = true ;
shutdown ( factory ) ;
HazelcastInstanceProxy newFactory = newHazelcastInstanceProxy ( factory . node . config ) ;
|
Fix for the Hazelcast restart classcastexception
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+
package NAMESPACE ;
import NAMESPACE ;
|
Remove unsued exports add APL header
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class StorageMeasurement {
Environment . DIRECTORY_DOWNLOADS , Environment . DIRECTORY_ANDROID ) ;
public static class MeasurementDetails {
+ public long totalSize ;
+ public long availSize ;
+
COMMENT
COMMENT
COMMENT
<nb> public class StorageMeasurement {
}
public interface MeasurementReceiver {
- public void onDetailsChanged ( MeasurementDetails details ) ;
+ void onDetailsChanged ( MeasurementDetails details ) ;
}
private WeakReference < MeasurementReceiver > mReceiver ;
<nb> public class StorageMeasurement {
}
}
+ final File file = mVolume . getPath ( ) ;
+ details . totalSize = file . getTotalSpace ( ) ;
+ details . availSize = file . getFreeSpace ( ) ;
+
SINGLE
if ( mVolume . getType ( ) == VolumeInfo . TYPE_PRIVATE ) {
final List < ApplicationInfo > apps = packageManager . getInstalledApplications (
|
Add totalSize and availSize queries to StorageMeasurement
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public final class BridgeContext extends Context {
}
public void sendBroadcastAsUser ( Intent intent , UserHandle user ,
- @ nullable String receiverPermission , int appOp ) {
+ String receiverPermission , int appOp ) {
SINGLE
}
|
Fix build for real
|
<nb> public class Main extends WeakBase implements XJobExecutor ,
}
static void showError ( final Throwable e ) {
- String msg = STRING0 + e . toString ( )
+ String metaInfo = STRING1 + System . getProperty ( STRING2 )
+ + STRING3 + System . getProperty ( STRING4 ) + STRING5
+ + System . getProperty ( STRING6 )
+ + STRING7 + System . getProperty ( STRING8 ) ;
+ String msg = STRING9 + JLanguageTool . VERSION + STRING10 + e . toString ( )
+ STRING11 ;
final StackTraceElement [ ] elem = e . getStackTrace ( ) ;
for ( final StackTraceElement element : elem ) {
msg += element . toString ( ) + STRING12 ;
}
+ msg += metaInfo ;
final DialogThread dt = new DialogThread ( msg ) ;
dt . start ( ) ;
SINGLE
|
add more information to the crash dialog
|
<nb> public class CreateSequenceChange extends AbstractChange {
protected Change [ ] createInverses ( ) {
DropSequenceChange inverse = new DropSequenceChange ( ) ;
inverse . setSequenceName ( getSequenceName ( ) ) ;
+ inverse . setSchemaName ( getSchemaName ( ) ) ;
return new Change [ ] {
inverse
|
include schema in createsequence rollback
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class JBTabbedTerminalWidget extends TabbedTerminalWidget implements Disp
return new Dimension ( minimalWidth + NUMBER0 , size . height ) ;
}
} ;
+ if ( myTabs . useSmallLabels ( ) ) {
+ textField . setFont ( com . intellij . util . ui . UIUtil . getFont ( UIUtil . FontSize . SMALL , textField . getFont ( ) ) ) ;
+ }
textField . setOpaque ( true ) ;
return textField ;
}
|
use small font for editor when tabs font is small
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ReassignAssigneeListener implements ClickListener {
protected void submitted ( SubmitEvent event ) {
SINGLE
String selectedUser = involvePeoplePopupWindow . getSelectedUserId ( ) ;
+ String originAssignee = task . getAssignee ( ) ;
task . setAssignee ( selectedUser ) ;
- ProcessEngines . getDefaultProcessEngine ( ) . getTaskService ( ) . setAssignee ( task . getId ( ) , selectedUser ) ;
+ if ( selectedUser != null ) {
+ ProcessEngines . getDefaultProcessEngine ( ) . getTaskService ( ) . setAssignee ( task . getId ( ) , selectedUser ) ;
+ } else if ( originAssignee != null ) {
+ ProcessEngines . getDefaultProcessEngine ( ) . getTaskService ( ) . deleteUserIdentityLink ( task . getId ( ) , originAssignee , IdentityLinkType . ASSIGNEE ) ;
+ } else {
+ return ;
+ }
SINGLE
taskDetailPanel . notifyAssigneeChanged ( ) ;
|
Check the selectedUser before calling TaskService
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
@ runwith ( Suite . class )
@ suite.suiteclasses ( {
CoreResourceManagementTestCase . class ,
- ManagementReadsTestCase . class ,
+ DatasourceTestCase . class ,
DeploymentManagementTestCase . class ,
DeploymentOverlayTestCase . class ,
- ServerManagementTestCase . class ,
- ServerRestartRequiredTestCase . class ,
+ DirectoryGroupingByTypeTestCase . class ,
+ ExtensionManagementTestCase . class ,
+ IgnoredResourcesTestCase . class ,
ManagementAccessTestCase . class ,
ManagementClientContentTestCase . class ,
- ValidateOperationOperationTestCase . class ,
+ ManagementReadsTestCase . class ,
+ ManagementVersionTestCase . class ,
+ ModelPersistenceTestCase . class ,
+ OperationTransformationTestCase . class ,
ReadEnvironmentVariablesTestCase . class ,
- ExtensionManagementTestCase . class ,
- OperationTransformationTestCase . class
+ ServerManagementTestCase . class ,
+ ServerRestartRequiredTestCase . class ,
+ ValidateAddressOperationTestCase . class ,
+ ValidateOperationOperationTestCase . class
} )
public class DomainTestSuite {
|
Add tests to DomainTestSuite so they always run
|
<nb> public class PollingStoptimeUpdater extends PollingGraphUpdater {
COMMENT
COMMENT
@ override
- public void runPolling ( ) throws Exception {
+ public void runPolling ( ) {
SINGLE
List < TripUpdate > updates = updateSource . getUpdates ( ) ;
- SINGLE
- TripUpdateGraphWriterRunnable runnable =
- new TripUpdateGraphWriterRunnable ( updates , agencyId ) ;
- updaterManager . execute ( runnable ) ;
+ if ( updates != null && updates . size ( ) > NUMBER0 ) {
+ SINGLE
+ TripUpdateGraphWriterRunnable runnable =
+ new TripUpdateGraphWriterRunnable ( updates , agencyId ) ;
+ updaterManager . execute ( runnable ) ;
+ }
}
@ override
|
Add null updates check to polling stoptime updater
|
<nb> public class GitProducer extends DefaultProducer {
break ;
default:
- throw new IllegalArgumentException ( STRING0 + operation ) ;
+ throw new IllegalArgumentException ( STRING1 + operation ) ;
}
}
|
Fixed error message on producer operations
|
<nb> public class FieldExpression extends Expression {
public boolean isUseReferenceDirectly ( ) {
return useRef ;
}
+
+ public String toString ( ) {
+ return STRING0 + getType ( ) + STRING1 + getFieldName ( ) + STRING2 ;
+ }
}
|
add a toString method for FieldExpression for easier debugging
|
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
prevent eclipse warning
|
<nb> public class AndroidManifestTest {
SINGLE
List < String > resourcePaths = stringify ( appManifest . getIncludedResourcePaths ( ) ) ;
+ String separator = System . getProperty ( STRING0 ) ;
assertEquals ( asList (
- STRING1 ,
- STRING2 ,
- STRING3 ,
- STRING4 ) ,
+ STRING5 + separator + STRING6 + separator + STRING7 + separator + STRING8 + separator + STRING9 ,
+ STRING5 + separator + STRING6 + separator + STRING7 + separator + STRING8 + separator + STRING10 + separator + STRING9 ,
+ STRING5 + separator + STRING6 + separator + STRING7 + separator + STRING8 + separator + STRING10 + separator + STRING11 + separator + STRING12 + separator + STRING9 ,
+ STRING5 + separator + STRING6 + separator + STRING7 + separator + STRING8 + separator + STRING13 + separator + STRING9 ) ,
resourcePaths ) ;
}
|
Replaced slashes with file separator in order to pass the test also on Windows
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- public class PullToRefreshHelper implements OnRefreshListener {
+ public class SwipeToRefreshHelper implements OnRefreshListener {
public static final String BROADCAST_ACTION_REFRESH_MENU_PRESSED = STRING0 ;
private static final String REFRESH_BUTTON_HIT_COUNT = STRING1 ;
private static final Set < Integer > TOAST_FREQUENCY = new HashSet < Integer > ( Arrays . asList ( NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , NUMBER5 , NUMBER6 ,
<nb> public class PullToRefreshHelper implements OnRefreshListener {
public void onRefreshStarted ( ) ;
}
- public PullToRefreshHelper ( Activity activity , SwipeRefreshLayout swipeRefreshLayout , RefreshListener listener ) {
+ public SwipeToRefreshHelper ( Activity activity , SwipeRefreshLayout swipeRefreshLayout , RefreshListener listener ) {
init ( activity , swipeRefreshLayout , listener ) ;
}
|
rename PullToRefresh to SwipeToRefresh
|
<nb> public class TransactionalTopologyBuilder {
_id = id ;
_spoutId = spoutId ;
_spout = spout ;
- _spoutParallelism = spoutParallelism . intValue ( ) ;
+ _spoutParallelism = ( spoutParallelism == null ) ? null : spoutParallelism . intValue ( ) ;
}
public TransactionalTopologyBuilder ( String id , String spoutId , ITransactionalSpout spout ) {
|
Fix TransactionalTopologyBuilder NPE
|
<nb> public class JsMessenger extends Messenger {
jsIdleModule = new JsIdleModule ( this , modules ) ;
if ( isElectron ( ) ) {
+ Log . d ( TAG , STRING0 ) ;
JsElectronApp . subscribe ( STRING1 , new JsElectronListener ( ) {
@ override
public void onEvent ( String content ) {
+ Log . d ( TAG , STRING2 + content ) ;
if ( STRING3 . equals ( content ) ) {
jsIdleModule . onVisible ( ) ;
} else if ( STRING4 . equals ( content ) ) {
|
Adding electron logging
|
<nb> public class FileContentMerger {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
- @ deprecated
public void beforeMerged ( Closure closure ) {
beforeMerged . add ( ConfigureUtil . configureUsing ( closure ) ) ;
}
<nb> public class FileContentMerger {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
- @ deprecated
public void whenMerged ( Closure closure ) {
whenMerged . add ( ConfigureUtil . configureUsing ( closure ) ) ;
}
|
Remove Deprecated from FileContentMerger beforeMerged Closure
|
<nb> public abstract class XmlZenCodingGenerator extends ZenCodingGenerator {
prevVisibleLeaf = PsiTreeUtil . prevVisibleLeaf ( prevVisibleLeaf ) ;
}
- if ( startOffset < NUMBER0 || currentOffset >= documentText . length ( ) ) {
+ if ( startOffset < NUMBER0 || currentOffset > documentText . length ( ) ) {
Logger . getInstance ( getClass ( ) ) . error ( STRING0 + currentOffset + STRING1 + startOffset ,
AttachmentFactory . createAttachment ( editor . getDocument ( ) ) ) ;
return null ;
|
Fix emmet tests
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
public class ColumnFamilyOutputFormat extends OutputFormat < byte [ ] , List < IColumn > >
{
|
r m one more reference to no longer existing OutputFormat slicePredicate
|
<nb> public class RealtimeManager implements QuerySegmentWalker
}
chiefs . add ( chief ) ;
- chief . setName ( String . format ( STRING0 , schema . getDataSource ( ) ) ) ;
+ chief . setName (
+ String . format (
+ STRING1 ,
+ schema . getDataSource ( ) ,
+ fireDepartment . getTuningConfig ( ) . getShardSpec ( ) . getPartitionNum ( )
+ )
+ ) ;
chief . setDaemon ( true ) ;
chief . init ( ) ;
chief . start ( ) ;
|
Include partitionNum in chief thread name
|
<nb> public class PanicResponderActivity extends Activity {
@ override
protected void onCreate ( Bundle savedInstanceState ) {
super . onCreate ( savedInstanceState ) ;
- setVolumeControlStream ( AudioManager . STREAM_MUSIC ) ;
Intent intent = getIntent ( ) ;
if ( intent != null && PANIC_TRIGGER_ACTION . equals ( intent . getAction ( ) ) ) {
SINGLE
<nb> public class SettingsActivity extends PreferenceActivity {
getDelegate ( ) . installViewFactory ( ) ;
getDelegate ( ) . onCreate ( savedInstanceBundle ) ;
super . onCreate ( savedInstanceBundle ) ;
- setVolumeControlStream ( AudioManager . STREAM_MUSIC ) ;
getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ;
|
removed unnececeary call of setVolumeControlStream
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Include missing import statement
|
<nb> public class RuleSearchMediumTest {
}
@ test
+ @ ignore
public void search_rules_by_any_of_statuses ( ) throws InterruptedException {
dao . insert ( newRuleDto ( RuleKey . of ( STRING0 , STRING1 ) ) . setStatus ( RuleStatus . BETA . name ( ) ) ) ;
dao . insert ( newRuleDto ( RuleKey . of ( STRING0 , STRING2 ) ) . setStatus ( RuleStatus . READY . name ( ) ) ) ;
|
Ignore status test
|
<nb> public abstract class ViewGroup extends View implements ViewParent , ViewManager
} else if ( childDimension == LayoutParams . MATCH_PARENT ) {
SINGLE
SINGLE
- resultSize = NUMBER0 ;
+ resultSize = size ;
resultMode = MeasureSpec . UNSPECIFIED ;
} else if ( childDimension == LayoutParams . WRAP_CONTENT ) {
SINGLE
SINGLE
- resultSize = NUMBER0 ;
+ resultSize = size ;
resultMode = MeasureSpec . UNSPECIFIED ;
}
break ;
|
Provide size hint inside UNSPECIFIED measure spec
|
<nb> public final class Settings {
public static final String DEVELOPMENT_SETTINGS_ENABLED = STRING0 ;
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public static final String DEVICE_PROVISIONED = STRING1 ;
<nb> public class KeyguardViewMediator extends SystemUI {
@ override
public void onDeviceProvisioned ( ) {
sendUserPresentBroadcast ( ) ;
+ synchronized ( KeyguardViewMediator . this ) {
+ SINGLE
+ if ( UserManager . isSplitSystemUser ( )
+ && KeyguardUpdateMonitor . getCurrentUser ( ) == UserHandle . USER_SYSTEM ) {
+ doKeyguardLocked ( null ) ;
+ }
+ }
}
@ override
|
Once system is provisioned lock the screen on system user
|
<nb> public class InternalClusterService extends AbstractLifecycleComponent < ClusterSe
if ( timeout . isCancelled ( ) ) {
return ;
}
- listener . onTimeout ( this . timeout ) ;
+ if ( lifecycle . stoppedOrClosed ( ) ) {
+ listener . onClose ( ) ;
+ } else {
+ listener . onTimeout ( this . timeout ) ;
+ }
SINGLE
}
}
|
when timeouting and closed raise onClose and not onTimeout
|
<nb> abstract public class ResourceStateChangeListener {
public void registerItems ( ) {
StartCacheExecutor ( ) ;
- final UUIDBroadcasterCache uuidCache = new UUIDBroadcasterCache ( ) ;
- broadcaster . getBroadcasterConfig ( ) . setBroadcasterCache ( uuidCache ) ;
+ broadcaster . getBroadcasterConfig ( ) . setBroadcasterCache ( new UUIDBroadcasterCache ( ) ) ;
broadcaster . getBroadcasterConfig ( ) . getBroadcasterCache ( ) . configure ( broadcaster . getBroadcasterConfig ( ) ) ;
broadcaster . getBroadcasterConfig ( ) . getBroadcasterCache ( ) . start ( ) ;
|
Reverted some chnages that are no longer needed
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public abstract class OAbstractPaginatedStorage extends OStorageAbstract impleme
private OStorageOperationResult < ORecordVersion > doUpdateRecord ( ORecordId rid , boolean updateContent , byte [ ] content ,
ORecordVersion version , byte recordType , ORecordCallback < ORecordVersion > callback , OCluster cluster ) {
- if ( rid . toString ( ) . equals ( STRING0 ) )
- System . out . println ( String . format ( STRING1 , rid , version , Arrays . toString ( content ) ) ) ;
-
try {
final OPhysicalPosition ppos = cluster . getPhysicalPosition ( new OPhysicalPosition ( rid . clusterPosition ) ) ;
if ( ! checkForRecordValidity ( ppos ) ) {
|
Removed debug code
|
<nb> public final class SimpleCommandMap implements CommandMap {
return false ;
}
+ String lowerPrefix = fallbackPrefix . trim ( ) . toLowerCase ( ) ;
boolean registerdPassedLabel = true ;
SINGLE
while ( knownCommands . containsKey ( lowerLabel ) && ! aliases . contains ( lowerLabel ) ) {
- lowerLabel = fallbackPrefix + STRING0 + lowerLabel ;
+ lowerLabel = lowerPrefix + STRING0 + lowerLabel ;
registerdPassedLabel = false ;
}
|
Fixed fallbackPrefix not being lowercased which would break prefixes for plugins with an uppercase char in the name
|
<nb> public enum EdgeFilteringMode {
COMMENT
PCF4 ( NUMBER0 ) ,
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
PCFPOISSON ( NUMBER1 ) ,
COMMENT
|
Explained PCFPOISSON filtering in EdgeFilterinMode enum javadoc
|
<nb> class LanguageToolHttpHandler implements HttpHandler {
@ override
public void handle ( HttpExchange httpExchange ) throws IOException {
- handleCount ++ ;
+ synchronized ( this ) {
+ handleCount ++ ;
+ }
String text = null ;
try {
final URI requestedUri = httpExchange . getRequestURI ( ) ;
<nb> class LanguageToolHttpHandler implements HttpHandler {
final String response = STRING0 + StringTools . escapeXML ( Tools . getFullStackTrace ( e ) ) ;
sendError ( httpExchange , HttpURLConnection . HTTP_INTERNAL_ERROR , response ) ;
} finally {
- handleCount -- ;
+ synchronized ( this ) {
+ handleCount -- ;
+ }
httpExchange . close ( ) ;
}
}
|
fix the handle count which could become invalid
|
<nb> public class NarrowingCompoundAssignment extends BugChecker
case LEFT_SHIFT_ASSIGNMENT :
return STRING0 ;
case RIGHT_SHIFT_ASSIGNMENT :
- return STRING1 ;
case UNSIGNED_RIGHT_SHIFT_ASSIGNMENT :
- return STRING2 ;
+ SINGLE
+ return null ;
+ default :
+ throw new IllegalArgumentException ( ) ;
}
- throw new IllegalArgumentException ( ) ;
}
@ override
<nb> public class NarrowingCompoundAssignment extends BugChecker
return Description . NO_MATCH ;
}
String op = op2string ( tree . getKind ( ) ) ;
+ if ( op == null ) {
+ return Description . NO_MATCH ;
+ }
SINGLE
String replacement = String . format ( STRING3 , var , deficient , var , op , expr ) ;
return describeMatch ( tree , SuggestedFix . replace ( tree , replacement ) ) ;
<nb> public class NarrowingCompoundAssignmentTest {
STRING4 ,
STRING5 ,
STRING6 ,
- STRING7 ,
+ STRING8 ,
STRING9 ,
- STRING10 ,
STRING11 ,
STRING12 ,
STRING13 )
|
Allow right shifts
|
<nb> public abstract class XLineBreakpointType < P extends XBreakpointProperties > exten
@ nullable
public abstract P createBreakpointProperties ( @ notnull VirtualFile file , int line ) ;
+ @ override
public String getDisplayText ( final XLineBreakpoint < P > breakpoint ) {
return fileLineDisplayText ( breakpoint . getPresentableFilePath ( ) , breakpoint . getLine ( ) ) ;
}
|
add missing Overrides
|
<nb> public class CheckWikipediaDump {
languageTool . enableDefaultOffRule ( rule . getId ( ) ) ;
}
}
+ for ( String ruleId : ruleIds ) {
+ boolean found = false ;
+ for ( Rule rule : languageTool . getAllRules ( ) ) {
+ if ( rule . getId ( ) . equals ( ruleId ) ) {
+ found = true ;
+ break ;
+ }
+ }
+ if ( ! found ) {
+ System . out . println ( STRING0 + ruleId + STRING1 ) ;
+ }
+ }
System . out . println ( STRING2 + Arrays . toString ( ruleIds ) ) ;
}
|
print a warning when a rule does not exist
|
<nb> public class MavenModuleImporter {
if ( defaultMavenProfile == null ) {
defaultMavenProfile = new ProcessorConfigProfileImpl ( MAVEN_DEFAULT_ANNOTATION_PROFILE ) ;
defaultMavenProfile . setEnabled ( true ) ;
- moduleProfile . setOutputRelativeToContentRoot ( true ) ;
+ defaultMavenProfile . setOutputRelativeToContentRoot ( true ) ;
defaultMavenProfile . setObtainProcessorsFromClasspath ( true ) ;
defaultMavenProfile . setGeneratedSourcesDirectoryName ( DEFAULT_ANNOTATION_PATH_OUTPUT , false ) ;
defaultMavenProfile . setGeneratedSourcesDirectoryName ( DEFAULT_TEST_ANNOTATION_OUTPUT , true ) ;
|
Fix maven tests
|
<nb> public class ServiceUtils
return serviceReferences ;
}
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- @ suppresswarnings ( STRING0 )
- private static ServiceReference < ? > [ ] getServiceReferences (
- BundleContext bundleContext ,
- String serviceClassName )
- {
- ServiceReference < ? > [ ] serviceReferences ;
-
- try
- {
- serviceReferences
- = bundleContext . getServiceReferences (
- serviceClassName ,
- null ) ;
- }
- catch ( InvalidSyntaxException ex )
- {
- serviceReferences = null ;
- }
- return serviceReferences ;
- }
-
COMMENT
private ServiceUtils ( )
{
|
Removes not accessible method from ServiceUtils
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import static NAMESPACE ;
<nb> public class ShardGetService extends AbstractIndexShardComponent {
}
public GetStats stats ( ) {
- return new GetStats ( existsMetric . count ( ) , existsMetric . sum ( ) , missingMetric . count ( ) , missingMetric . sum ( ) ) ;
+ return new GetStats ( existsMetric . count ( ) , TimeUnit . NANOSECONDS . toMillis ( existsMetric . sum ( ) ) , missingMetric . count ( ) , TimeUnit . NANOSECONDS . toMillis ( missingMetric . sum ( ) ) ) ;
}
SINGLE
|
get should report time in millis but return in nanoseconds
|
<nb> public class IndexedElementInvocationHandler extends DomInvocationHandler < FixedC
final DomParentStrategy strategy ,
final DomManagerImpl manager ,
@ nullable ElementStub stub ) {
- super ( description . getType ( ) , strategy , tagName , description , manager , strategy . getXmlElement ( ) != null , stub ) ;
+ super ( description . getType ( ) , strategy , tagName , description , manager , strategy . isPhysical ( ) , stub ) ;
myIndex = index ;
}
|
IndexedElementInvocationHandler triggers PSI building for Stubbed
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
@ configuration
@ enableconfigurationproperties ( ZipkinKafkaCollectorProperties . class )
@ conditional ( KafkaZooKeeperSetCondition . class )
- @ conditionalonproperty ( value = STRING0 , matchIfMissing = true )
public class ZipkinKafkaCollectorAutoConfiguration {
COMMENT
|
Removes redundant kafka enable property
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AlertController {
mScrollView . removeView ( mMessageView ) ;
if ( mListView != null ) {
- final int childIndex = mScrollView . indexOfChild ( mScrollView ) ;
- contentPanel . removeViewAt ( childIndex ) ;
- contentPanel . addView ( mListView , childIndex ,
+ final ViewGroup scrollParent = ( ViewGroup ) mScrollView . getParent ( ) ;
+ final int childIndex = scrollParent . indexOfChild ( mScrollView ) ;
+ scrollParent . removeViewAt ( childIndex ) ;
+ scrollParent . addView ( mListView , childIndex ,
new LayoutParams ( MATCH_PARENT , MATCH_PARENT ) ) ;
} else {
contentPanel . setVisibility ( View . GONE ) ;
|
Remove scroll view from correct parent in AlertController
|
<nb> public class Base {
storeSketchPath ( editor , i ) ;
}
}
+ SINGLE
+ for ( int i = NUMBER0 ; i < editorCount ; i ++ ) {
+ editors [ i ] . closeRunner ( ) ;
+ }
if ( ! canceled ) {
SINGLE
SINGLE
|
shut down runner when quitting the app
|
<nb> public class Resources
new String [ ] { STRING0 } , STRING1 ) ) ;
defaultSmileyList . add ( new SmileyImpl ( STRING2 ,
- new String [ ] { STRING3 } , STRING4 ) ) ;
+ new String [ ] { STRING3 } , STRING5 ) ) ;
defaultSmileyList . add ( new SmileyImpl ( STRING6 ,
new String [ ] { STRING7 } , STRING8 ) ) ;
|
Fixes a typo
|
<nb> public class ActivityMain extends Activity implements OnItemSelectedListener , Co
}
}
+ SINGLE
+ if ( ! checkField ( getSystemService ( Context . CLIPBOARD_SERVICE ) , STRING0 , Context . class ) )
+ reportClass ( getSystemService ( Context . CLIPBOARD_SERVICE ) . getClass ( ) ) ;
+
SINGLE
if ( ! checkField ( getContentResolver ( ) , STRING0 , Context . class ) )
reportClass ( getContentResolver ( ) . getClass ( ) ) ;
|
Check context clipboard manager
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix a javadoc import error in ViewTarget
|
<nb> abstract class HeadlessBootstrap extends ZapBootstrap {
public HeadlessBootstrap ( CommandLine args ) {
super ( args ) ;
+
+ System . setProperty ( STRING0 , STRING1 ) ;
}
COMMENT
|
Set AWT as headless when ZAP is in a headless mode
|
<nb> public class CommentDetailFragment extends Fragment implements NotificationFragm
+ STRING0 ;
txtTitle . setText ( Html . fromHtml ( html ) ) ;
} else {
- txtTitle . setText ( getString ( R . string . on ) + STRING1 + postTitle . trim ( ) ) ;
+ String text = getString ( R . string . on ) + STRING1 + postTitle . trim ( ) ;
+ txtTitle . setText ( text ) ;
}
}
|
Move string concatenation outside of setText
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AsyncIntegrationTests {
@ override
public Mono < Void > handle ( ServerHttpRequest request , ServerHttpResponse response ) {
return response . setBody ( Stream . just ( STRING0 , STRING1 , STRING2 , STRING2 , STRING3 )
- . timer ( Timers . global ( ) )
+ . timer ( Timer . global ( ) )
. throttleRequest ( NUMBER0 )
. dispatchOn ( asyncGroup )
. collect ( allocator : : allocateBuffer ,
|
fix compile test issue
|
<nb> public class MetaClass {
invokeMethod ( object , method , new Object [ ] { newValue } ) ;
}
catch ( MissingMethodException e1 ) {
+ Field field = null ;
try {
- Field field = object . getClass ( ) . getDeclaredField ( property ) ;
- field . setAccessible ( true ) ;
+ field = object . getClass ( ) . getDeclaredField ( property ) ;
+ SINGLE
field . set ( object , newValue ) ;
- }
- catch ( Exception e2 ) {
+ } catch ( IllegalAccessException iae ) {
+ throw new IllegalPropertyAccessException ( field , object . getClass ( ) ) ;
+ } catch ( Exception e2 ) {
throw new MissingPropertyException ( property , theClass , e2 ) ;
}
}
<nb> public class MetaClass {
throw new MissingPropertyException ( property , theClass , e ) ;
}
- SINGLE
- throw new MissingPropertyException ( property , theClass ) ;
}
|
corrected a little bug when setting fields and added an exception if someone wants to set a private field
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TestingConnectorFactoryContext
private final NodeManager nodeManager = new InMemoryNodeManager ( ) ;
private final PageSorter pageSorter = new PagesIndexPageSorter ( ) ;
private final PageIndexerFactory pageIndexerFactory = new GroupByHashPageIndexerFactory ( ) ;
+ private final ServerInfo serverInfo = new ServerInfo ( STRING0 , STRING1 , STRING2 ) ;
@ override
public TypeManager getTypeManager ( )
<nb> public class TestingConnectorFactoryContext
{
return pageIndexerFactory ;
}
+
+ @ override
+ public ServerInfo getServerInfo ( )
+ {
+ return serverInfo ;
+ }
}
|
Add ServerInfo to TestingConnectorFactoryContext
|
<nb> public class ViewDebug {
private static void writeValue ( BufferedWriter out , Object value ) throws IOException {
if ( value != null ) {
- String output = value . toString ( ) . replace ( STRING0 , STRING1 ) ;
- out . write ( String . valueOf ( output . length ( ) ) ) ;
- out . write ( STRING2 ) ;
- out . write ( output ) ;
+ String output = STRING3 ;
+ try {
+ output = value . toString ( ) . replace ( STRING0 , STRING1 ) ;
+ } finally {
+ out . write ( String . valueOf ( output . length ( ) ) ) ;
+ out . write ( STRING2 ) ;
+ out . write ( output ) ;
+ }
} else {
out . write ( STRING4 ) ;
}
|
Fix HierarchyViewer so it can load Contacts
|
<nb> public abstract class TemplatesService {
public abstract void generateTemplates ( @ notnull final TemplateSettingsHolder settings , VirtualFile baseDir ) ;
public abstract void installTemplateEngine ( @ notnull final TemplateSettingsHolder settings , @ notnull final PyPackageManager packageManager ,
- @ notnull final Project project ) ;
+ @ notnull final Project project , boolean isDjango ) ;
}
|
generate proper project settings when selecting non django templating engine
|
<nb> public class Inspect extends Request {
sb . append ( STRING0
+ STRING1 ) . append ( PrettyPrint . msecs ( job . runTimeMs ( ) , true ) ) . append ( STRING2 ) ;
}
- sb . append ( STRING3 ) . append ( Inspect4UX . link ( key , STRING4 ) ) . append ( STRING5 ) ;
+ sb . append ( STRING3 ) . append ( Inspect4UX . link ( key , STRING6 ) ) . append ( STRING5 ) ;
sb . append ( STRING7 + SetColumnNames . link ( key , STRING8 ) + STRING9 + SummaryPage . link ( key , STRING10 ) + STRING11
+ PCA . link ( key , STRING12 ) + STRING13
+ RF . link ( key , STRING14 ) + STRING13
|
Change a name of link to new inspect page
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ScanProgressDialog extends AbstractDialog {
SINGLE
result . setOpaque ( true ) ;
- result . setBackground ( sun . swing . DefaultLookup . getColor ( table , table . getUI ( ) , STRING0 ) ) ;
+ SINGLE
+ result . setBackground ( new Color ( NUMBER0 , NUMBER0 , NUMBER0 ) ) ;
return result ;
}
<nb> public class ScanProgressDialog extends AbstractDialog {
SINGLE
result . setOpaque ( true ) ;
- result . setBackground ( sun . swing . DefaultLookup . getColor ( table , table . getUI ( ) , STRING0 ) ) ;
+ SINGLE
+ result . setBackground ( new Color ( NUMBER0 , NUMBER0 , NUMBER0 ) ) ;
return result ;
}
|
Solved the trouble of DefaultLookup internal class access
|
<nb> public class MapReduceIndexManagement {
readCF = Backend . EDGESTORE_NAME ;
} else {
TitanGraphIndex gindex = ( TitanGraphIndex ) index ;
- if ( gindex . isMixedIndex ( ) )
+ if ( gindex . isMixedIndex ( ) && ! updateAction . equals ( SchemaAction . REINDEX ) )
throw new UnsupportedOperationException ( STRING0 ) ;
Preconditions . checkState ( TitanGraphIndex . class . isAssignableFrom ( index . getClass ( ) ) ) ;
|
Fix mixed index check in MR index job utility
|
<nb> public class TestOldDetachedVolumeRule {
SINGLE
OldDetachedVolumeRule rule = new OldDetachedVolumeRule ( spyCalendar , ageThreshold , retentionDays ) ;
Assert . assertFalse ( rule . isValid ( resource ) ) ; SINGLE
+
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+
+
+ SINGLE
+ SINGLE
+ SINGLE
+
SINGLE
SINGLE
- verifyDSTCutoverHappened ( resource , retentionDays , closeToSpringAheadDst ) ;
+ SINGLE
+ SINGLE
SINGLE
TestUtils . verifyTerminationTimeRough ( resource , retentionDays , closeToSpringAheadDst ) ;
}
|
commenting out part of test that verifies DST cutover
|
<nb> public class DocumentsActivity extends Activity {
private final DisplayState mDisplayState = new DisplayState ( ) ;
COMMENT
- private DocumentStack mStack ;
+ private DocumentStack mStack = new DocumentStack ( ) ;
COMMENT
private String mCurrentSearch ;
|
Always include a default DocumentStack
|
<nb> public class UrlMappingsHolderFactoryBean implements FactoryBean < UrlMappingsHold
this . applicationContext = applicationContext ;
setGrailsApplication ( applicationContext . getBean ( GrailsApplication . APPLICATION_ID , GrailsApplication . class ) ) ;
setServletContext ( applicationContext instanceof WebApplicationContext ? ( ( WebApplicationContext ) applicationContext ) . getServletContext ( ) : null ) ;
- setPluginManager ( applicationContext . getBean ( GrailsPluginManager . BEAN_NAME , GrailsPluginManager . class ) ) ;
+ setPluginManager ( applicationContext . containsBean ( GrailsPluginManager . BEAN_NAME ) ? applicationContext . getBean ( GrailsPluginManager . BEAN_NAME , GrailsPluginManager . class ) : null ) ;
}
}
|
fixes failing tests
|
<nb> public class MultiShortestPathTree extends AbstractShortestPathTree {
return false ;
if ( thisState . isCarParked ( ) != other . isCarParked ( ) )
return false ;
+ if ( thisState . isBikeParked ( ) != other . isBikeParked ( ) )
+ return false ;
if ( thisState . backEdge != other . getBackEdge ( ) && ( ( thisState . backEdge instanceof StreetEdge )
&& ( ! ( ( StreetEdge ) thisState . backEdge ) . getTurnRestrictions ( ) . isEmpty ( ) ) ) )
|
Add bike P R check to state dominates checking
|
<nb> public class RunCukesByFeatureAndCompositionTest extends RunCukesByCompositionBa
return testNGCucumberRunner . provideFeatures ( ) ;
}
- @ afterclass
+ @ afterclass ( alwaysRun = true )
public void tearDownClass ( ) throws Exception {
testNGCucumberRunner . finish ( ) ;
}
|
Add alwaysRun true to the TestNG example s AfterClass method
|
<nb> public class AsyncEditorLoader {
@ override
public void onCanceled ( @ notnull ProgressIndicator indicator ) {
- scheduleBackgroundLoading ( false ) ;
+ if ( ! Disposer . isDisposed ( myTextEditor ) || myProject . isDisposed ( ) ) {
+ scheduleBackgroundLoading ( false ) ;
+ }
}
} ;
|
don t reschedule async editor loading when the file editor or project is disposed
|
<nb> public class TwitterTestBase extends TestCase {
id2 = new TestUserInfo ( STRING0 , p ) ;
id3 = new TestUserInfo ( STRING1 , p ) ;
id4 = new TestUserInfo ( STRING2 , p ) ;
- id4 = new TestUserInfo ( STRING3 , p ) ;
- id4 = new TestUserInfo ( STRING4 , p ) ;
+ bestFriend1 = new TestUserInfo ( STRING3 , p ) ;
+ bestFriend2 = new TestUserInfo ( STRING4 , p ) ;
numberId = p . getProperty ( STRING5 ) ;
numberPass = p . getProperty ( STRING6 ) ;
|
refactored test cases
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
<nb> public abstract class Z {
private void executeResource ( List < URI > resources ) {
for ( URI res : resources ) {
connection . addResource ( res ) ;
- }
+ }
}
private Result executeQuery ( String query ) throws ZException {
|
Fix indent and remove unused import
|
<nb> public class PackageManagerService extends IPackageManager . Stub {
mArgs = args ;
if ( ret == PackageManager . INSTALL_SUCCEEDED ) {
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ int userIdentifier = getUser ( ) . getIdentifier ( ) ;
+ if ( userIdentifier == UserHandle . USER_ALL
+ && ( ( flags & PackageManager . INSTALL_FROM_ADB ) != NUMBER0 ) ) {
+ userIdentifier = UserHandle . USER_OWNER ;
+ }
+
COMMENT
COMMENT
COMMENT
COMMENT
final int requiredUid = mRequiredVerifierPackage == null ? - NUMBER1
- : getPackageUid ( mRequiredVerifierPackage , getUser ( ) . getIdentifier ( ) ) ;
+ : getPackageUid ( mRequiredVerifierPackage , userIdentifier ) ;
if ( requiredUid != - NUMBER1 && isVerificationEnabled ( flags ) ) {
final Intent verification = new Intent (
Intent . ACTION_PACKAGE_NEEDS_VERIFICATION ) ;
|
Fix verfication bypassed for adb installs
|
<nb> class IncompleteHierarchyException extends Exception {
@ suppresswarnings ( STRING0 )
public static final IncompleteHierarchyException INSTANCE = new IncompleteHierarchyException ( ) ;
+ private IncompleteHierarchyException ( ) {
+ }
+
@ override
public synchronized Throwable fillInStackTrace ( ) {
return this ;
<nb> abstract class QualifiedName {
}
static class Interned extends QualifiedName {
- @ qnameid final int id ;
+ @ qnamehash final int id ;
Interned ( int id ) {
this . id = id ;
<nb> abstract class QualifiedName {
throws IncompleteHierarchyException {
Symbol . ClassSymbol [ ] candidates = resolver . findGlobalType ( id ) ;
if ( candidates . length == NUMBER0 ) {
- throw new IncompleteHierarchyException ( ) ;
+ throw IncompleteHierarchyException . INSTANCE ;
}
Collections . addAll ( result , candidates ) ;
|
avoid IncompleteHierarchyException instantiation
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import static NAMESPACE
COMMENT
COMMENT
COMMENT
- public class QueryDSLDocumentationTests {
+ public class QueryDSLDocumentationTests extends ESTestCase {
@ test
public void testBool ( ) {
boolQuery ( )
|
Fix the naming check
|
<nb> final class SpellDictionaryBuilder extends DictionaryBuilder {
protected static void checkUsageOrExit ( String className , String [ ] args ) throws IOException {
if ( args . length < NUMBER0 || args . length > NUMBER1 ) {
- System . out . println ( STRING0 + className + STRING1 ) ;
+ System . out . println ( STRING0 + className + STRING2 ) ;
System . out . println ( STRING3 ) ;
System . out . println ( STRING4 ) ;
System . out . println ( STRING5 ) ;
|
add missing field in help
|
<nb> public class ItemFragment extends Fragment {
}
private void openPodcast ( ) {
- ( ( MainActivity ) getActivity ( ) ) . loadFeedFragmentById ( item . getFeedId ( ) , null ) ;
+ Fragment fragment = ItemlistFragment . newInstance ( item . getFeedId ( ) ) ;
+ ( ( MainActivity ) getActivity ( ) ) . loadChildFragment ( fragment ) ;
}
public void onEventMainThread ( QueueEvent event ) {
|
Open podcast fragment as child
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.