diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class WanReplicationTest extends HazelcastTestSupport {
private HazelcastInstance [ ] clusterB = new HazelcastInstance [ NUMBER0 ] ;
private HazelcastInstance [ ] clusterC = new HazelcastInstance [ NUMBER0 ] ;
- private Config configA ;
- private Config configB ;
- private Config configC ;
+ public Config configA ;
+ public Config configB ;
+ public Config configC ;
private Random random = new Random ( ) ;
|
Change config access modifiers
|
<nb> public class ShowcaseView extends RelativeLayout
}
public void hide ( ) {
+ clearBitmap ( ) ;
mEventListener . onShowcaseViewHide ( this ) ;
fadeOutShowcase ( ) ;
}
+ private void clearBitmap ( ) {
+ if ( bitmapBuffer != null && ! bitmapBuffer . isRecycled ( ) ) {
+ bitmapBuffer . recycle ( ) ;
+ bitmapBuffer = null ;
+ }
+ }
+
private void fadeOutShowcase ( ) {
animationFactory . fadeOutView ( this , fadeOutMillis , new AnimationEndListener ( ) {
@ override
|
When hiding a ShowcaseView release the bitmap to prevent out of memory issues
|
<nb> public class OrderedMemoryAwareThreadPoolExecutor extends
Thread thread = Thread . currentThread ( ) ;
for ( ; ; ) {
final Runnable task = tasks . poll ( ) ;
- SINGLE
- SINGLE
+ SINGLE
if ( task == null ) {
break ;
}
<nb> public class OrderedMemoryAwareThreadPoolExecutor extends
onAfterExecute ( task , e ) ;
}
throw e ;
- } finally {
- if ( tasks . isEmpty ( ) ) {
- break ;
- }
}
}
} finally {
|
Remove isEmpty check as this may be really expensive need to
|
<nb> public class TextEditingTarget implements
SINGLE
SINGLE
if ( selection . endsWith ( STRING0 + c + STRING1 ) )
- selection = selection . substring ( NUMBER0 , selection . length ( ) - NUMBER1 ) ;
+ selection = selection . substring ( NUMBER0 , selection . length ( ) - NUMBER2 - c . length ( ) ) ;
}
docDisplay_ . replaceSelection ( selection ) ;
|
Fix doCommentUncomment handle multi char comment symbols
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Context {
}
public void restructureSiteTree ( ) {
- if ( EventQueue . isDispatchThread ( ) ) {
+ if ( ! View . isInitialised ( ) || EventQueue . isDispatchThread ( ) ) {
restructureSiteTreeEventHandler ( ) ;
} else {
try {
|
Do not access EDT in daemon mode in Context class
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class GoFoldingBuilder extends FoldingBuilderEx implements DumbAware {
@ override
public boolean isCollapsedByDefault ( @ notnull ASTNode node ) {
- return node . getElementType ( ) == GoTypes . IMPORT_LIST ;
+ IElementType type = node . getElementType ( ) ;
+ if ( type == GoParserDefinition . LINE_COMMENT || type == GoParserDefinition . MULTILINE_COMMENT ) {
+ return CodeFoldingSettings . getInstance ( ) . COLLAPSE_DOC_COMMENTS ;
+ }
+ if ( type == GoTypes . BLOCK && CodeFoldingSettings . getInstance ( ) . COLLAPSE_METHODS ) {
+ ASTNode parent = node . getTreeParent ( ) ;
+ return parent != null && parent . getPsi ( ) instanceof GoFunctionOrMethodDeclaration ;
+ }
+ return CodeFoldingSettings . getInstance ( ) . COLLAPSE_IMPORTS && node . getElementType ( ) == GoTypes . IMPORT_LIST ;
+
}
}
|
Use folding settings while defining default collapsed blocks
|
<nb> public final class ExpressionUtils
return conjuncts . isEmpty ( ) ? emptyDefault : and ( conjuncts ) ;
}
- public static Expression combineDisjuncts ( Expression . . . expressions )
- {
- return combineDisjuncts ( Arrays . asList ( expressions ) ) ;
- }
-
public static Expression combineDisjuncts ( Collection < Expression > expressions )
{
return combineDisjunctsWithDefault ( expressions , FALSE_LITERAL ) ;
|
Remove unused method
|
<nb> final class Utils {
public void run ( ) {
BufferedReader reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ;
- String result = STRING0 ;
String line ;
try {
while ( ( line = reader . readLine ( ) ) != null ) {
- result += line + STRING1 ;
- log . info ( result ) ;
+ log . info ( line ) ;
}
} catch ( IOException e ) {
|
Fix bug too much logging
|
<nb> public class EsSettings implements EsSettingsMBean {
LOGGER . warn ( STRING0 , httpPort ) ;
SINGLE
builder . put ( STRING1 , true ) ;
+ builder . put ( STRING2 , STRING3 ) ;
builder . put ( STRING4 , true ) ;
builder . put ( STRING5 , host . getHostAddress ( ) ) ;
builder . put ( STRING6 , httpPort ) ;
<nb> public class EsSettings implements EsSettingsMBean {
builder . put ( IndexMetaData . SETTING_NUMBER_OF_REPLICAS , replicationFactor ) ;
builder . put ( STRING7 , getClusterName ( ) ) ;
builder . put ( STRING8 , STRING9 ) ;
- String nodeName = getNodeName ( ) ;
builder . put ( STRING10 , nodeName ) ;
builder . put ( STRING11 , nodeName ) ;
builder . put ( STRING12 , true ) ;
|
Fix compatibility of ES with KOPF
|
<nb> public class WriteConcern implements Serializable {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
+ @ deprecated
public BasicDBObject getCommand ( ) {
BasicDBObject command = new BasicDBObject ( STRING0 , NUMBER0 ) ;
|
Deprecate WriteConcern getCommand
|
<nb> public interface LinkGenerator {
ATTRIBUTE_CONTROLLER ,
ATTRIBUTE_ACTION ,
ATTRIBUTE_URI ,
+ ATTRIBUTE_CONTEXT_PATH ,
ATTRIBUTE_URL ,
ATTRIBUTE_BASE ,
ATTRIBUTE_ABSOLUTE ,
|
bug fix added missing ATTRIBUTE_CONTEXT_PATH attribute
|
<nb> public final class Calendar {
public interface CalendarsColumns
{
COMMENT
- COMMENT
- COMMENT
- public static final String SOURCE_ID = STRING0 ;
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
Remove unused SOURCE_ID constant
|
<nb> public final class FileSystemMasterTest {
long fileId = mFileSystemMaster . create ( NESTED_FILE_URI , Constants . KB , true , NUMBER0 ) ;
FileInfo fileInfo = mFileSystemMaster . getFileInfo ( fileId ) ;
Assert . assertEquals ( fileInfo . fileId , fileId ) ;
+ SINGLE
Assert . assertTrue ( HeartbeatScheduler . await ( HeartbeatContext . MASTER_TTL_CHECK , NUMBER1 ,
TimeUnit . SECONDS ) ) ;
+ SINGLE
HeartbeatScheduler . schedule ( HeartbeatContext . MASTER_TTL_CHECK ) ;
+ SINGLE
+ SINGLE
Assert . assertTrue ( HeartbeatScheduler . await ( HeartbeatContext . MASTER_TTL_CHECK , NUMBER1 ,
TimeUnit . SECONDS ) ) ;
mThrown . expect ( FileDoesNotExistException . class ) ;
|
Adding comments for the TTL checker thread test
|
<nb> public class StartupBean {
int threads = settings . getBackgroundThreads ( ) ;
log . info ( STRING0 , threads ) ;
- executor = Executors . newFixedThreadPool ( threads ) ;
+ executor = Executors . newFixedThreadPool ( Math . max ( threads , NUMBER0 ) ) ;
for ( int i = NUMBER1 ; i < threads ; i ++ ) {
final int threadId = i ;
executor . execute ( new Runnable ( ) {
|
set a minimum for threadpool size
|
<nb> public abstract class BaseRecyclerViewEventDistributor < T > {
if ( mListeners != null ) {
return mListeners . size ( ) ;
} else {
- return mListeners . size ( ) ;
+ return NUMBER0 ;
}
}
|
Lint Fix NPE possibility
|
<nb> class ScreenshotTaker {
String name = message . getData ( ) . getString ( STRING0 ) ;
int quality = message . arg1 ;
Bitmap b = ( Bitmap ) message . obj ;
- if ( b != null )
+ if ( b != null ) {
saveFile ( name , b , quality ) ;
- else
+ b . recycle ( ) ;
+ }
+ else {
Log . d ( LOG_TAG , STRING1 ) ;
+ }
}
COMMENT
|
Recycle bitmap after saving it
|
<nb> public class TestRecovery
System . getProperty ( STRING0 ) ,
AddRelToIndex . class . getName ( ) , getDbPath ( ) . getPath ( )
} ) ;
- assertEquals ( NUMBER0 , new ProcessStreamHandler ( process , true ) . waitForResult ( ) ) ;
+ assertEquals ( NUMBER0 , new ProcessStreamHandler ( process , false ) . waitForResult ( ) ) ;
SINGLE
SINGLE
<nb> public class TestRecovery
STRING1 , STRING2 , System . getProperty ( STRING0 ) ,
AddThenDeleteInAnotherTxAndQuit . class . getName ( ) , getDbPath ( ) . getPath ( )
} ) ;
- assertEquals ( NUMBER0 , new ProcessStreamHandler ( process , true ) . waitForResult ( ) ) ;
+ assertEquals ( NUMBER0 , new ProcessStreamHandler ( process , false ) . waitForResult ( ) ) ;
db = new GraphDatabaseFactory ( ) . newEmbeddedDatabase ( getDbPath ( ) . getPath ( ) ) ;
assertFalse ( db . index ( ) . existsForNodes ( STRING3 ) ) ;
|
Don t swallow output in problematic test
|
<nb> public class ViewContentAction
RenderResponse renderResponse )
throws Exception {
+ renderResponse . setProperty (
+ STRING0 , String . valueOf ( Boolean . TRUE ) ) ;
+
return super . render (
actionMapping , actionForm , portletConfig , renderRequest ,
renderResponse ) ;
|
related assets shouldn t remember the request parameters
|
<nb> public class Shell implements ConsoleInputHandler ,
public void onKeyPress ( KeyPressEvent event )
{
+ if ( event . getCharCode ( ) == NUMBER0 )
+ {
+ SINGLE
+ SINGLE
+ SINGLE
+
+ event . preventDefault ( ) ;
+ event . stopPropagation ( ) ;
+ restoreFocus_ = true ;
+ processCommandEntry ( ) ;
+ }
+
for ( KeyPressPreviewHandler handler : keyPressPreviewHandlers_ )
{
if ( handler . previewKeyPress ( event . getCharCode ( ) ) )
|
Fix bug where numpad Enter doesn t commit command from console
|
<nb> public class ContentView extends FrameLayout {
@ override
public void onPageFinished ( String urlAsString ) {
- CrashTracking . log ( STRING0 + MainController . get ( ) . getTabIndex ( mOwnerTabView ) ) ;
if ( mLifeState != LifeState . Alive ) {
return ;
}
+ Integer debugIndex = MainController . get ( ) != null ? MainController . get ( ) . getTabIndex ( mOwnerTabView ) : null ;
+ CrashTracking . log ( STRING1 + ( debugIndex != null ? STRING2 + debugIndex : STRING3 ) ) ;
+
SINGLE
SINGLE
if ( mCurrentProgress != NUMBER0 ) {
|
Fix NPE with crash logging
|
<nb> public class SwipeRefreshLayout extends ViewGroup {
setAnimationProgress ( NUMBER0 COMMENT ) ;
} else {
setAnimationProgress ( NUMBER1 COMMENT ) ;
- setTargetOffsetTopAndBottom ( - mCircleHeight - mCurrentTargetOffsetTop ,
+ setTargetOffsetTopAndBottom ( mOriginalOffsetTop - mCurrentTargetOffsetTop ,
true COMMENT ) ;
mCircleView . setVisibility ( View . VISIBLE ) ;
}
|
Make sure to use the measured circle height in all places when computing original offset
|
<nb> public class OPDSBookItem extends NetworkBookItem implements OPDSConstants {
ZLNetworkManager . Instance ( ) . perform ( new ZLNetworkRequest ( url ) {
@ override
public void handleStream ( InputStream inputStream , int length ) throws IOException , ZLNetworkException {
- FLAG = true ;
new OPDSXMLReader (
new SingleEntryFeedHandler ( url ) , true
) . read ( inputStream ) ;
- FLAG = false ;
myInformationIsFull = true ;
}
} ) ;
|
fixed compilatio issue
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
public class FileResourceConnector implements ExternalResourceLister , ExternalResourceAccessor , ExternalResourceUploader {
-
- private static final Logger LOGGER = LoggerFactory . getLogger ( FileResourceConnector . class ) ;
-
public List < String > list ( String parent ) throws IOException {
File dir = getFile ( parent ) ;
if ( dir . exists ( ) && dir . isDirectory ( ) ) {
|
Removed unused field
|
<nb> public abstract class ImmutableSortedSet < E > extends ImmutableSortedSetFauxveride
COMMENT
COMMENT
COMMENT
-
COMMENT
COMMENT
COMMENT
|
Remove stray line
|
<nb> public class Server {
}
public final void serve ( Request request ) {
- System . out . println ( STRING0 + id + STRING1 + request . value ) ;
+ System . out . println ( STRING0 + id + STRING2 + getHost ( ) + STRING3 + getPort ( ) + STRING4 + request . value ) ;
}
}
|
Printing Server variables
|
<nb> public abstract class TokenSets implements GroovyTokenTypes {
kSWITCH ,
kTRY ,
kCATCH ,
- kFINALLY
+ kFINALLY ,
+ kSTATIC ,
+ kDEFAULT
) , BUILT_IN_TYPE ) ;
public static TokenSet PROPERTY_NAMES = TokenSet . orSet ( KEYWORD_PROPERTY_NAMES , TokenSet . create ( mIDENT , mSTRING_LITERAL ) ) ;
|
reflect groovy grammar changes
|
<nb> public final class Realm extends BaseRealm {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class Realm extends BaseRealm {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class Realm extends BaseRealm {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public static void migrateRealm ( RealmConfiguration configuration ) {
migrateRealm ( configuration , null ) ;
|
Add missing param of Realm java
|
<nb> public class TestHttp2Section_3_2_1 extends Http2TestBase {
validateHttp2InitialResponse ( ) ;
}
-
- SINGLE
-
- SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
}
|
Add a note
|
<nb> public class BuildWorkTest {
artifactManipulator . printConsoleOut ( ) ;
File basedir = new File ( STRING0 ) ;
- assertThat ( actual , containsString ( STRING1 + new File ( basedir , STRING2 ) . getCanonicalPath ( ) ) ) ;
+ assertThat ( actual . toLowerCase ( ) , containsString ( STRING1 + new File ( basedir , STRING2 ) . getCanonicalPath ( ) . toLowerCase ( ) ) ) ;
Map < String , File > uploadedFiles = httpService . getUploadedFiles ( ) ;
|
Fixing flaky test
|
<nb> public class FileFilter {
SINGLE
SINGLE
SINGLE
- ignoreResultList . add ( STRING0 ) ; SINGLE
ignoreResultList . add ( STRING1 ) ; SINGLE
ignoreResultList . add ( STRING2 ) ; SINGLE
ignoreResultList . add ( STRING3 ) ; SINGLE
|
Remove the failing expectation for fast encoding char encoding
|
<nb> public class NaiveDurableRaftLog extends LifecycleAdapter implements RaftLog
COMMENT
COMMENT
COMMENT
- long index = Math . max ( NUMBER0 , commitIndex ) ; SINGLE
+ SINGLE
+ long index = NUMBER0 ;
for ( ; index <= appendIndex ; index ++ )
{
ReplicatedContent content = readEntryContent ( index ) ;
|
Replay the whole log on recovery
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
removed unused import statements
|
<nb> public class View implements Drawable . Callback , KeyEvent . Callback ,
COMMENT
@ remotableviewmethod
public void setContentDescription ( CharSequence contentDescription ) {
+ if ( mContentDescription == null ) {
+ if ( contentDescription == null ) {
+ return ;
+ }
+ } else if ( mContentDescription . equals ( contentDescription ) ) {
+ return ;
+ }
mContentDescription = contentDescription ;
final boolean nonEmptyDesc = contentDescription != null && contentDescription . length ( ) > NUMBER0 ;
if ( nonEmptyDesc && getImportantForAccessibility ( ) == IMPORTANT_FOR_ACCESSIBILITY_AUTO ) {
setImportantForAccessibility ( IMPORTANT_FOR_ACCESSIBILITY_YES ) ;
}
+ notifyAccessibilityStateChanged ( ) ;
}
COMMENT
|
Send accessibility event for content change upon setting content description
|
<nb> public class PyArgumentListInspection extends LocalInspectionTool {
if ( ! deco . hasArgumentList ( ) ) {
SINGLE
PyCallExpression . PyMarkedCallee mkfunc = deco . resolveCallee ( ) ;
- if ( mkfunc != null ) {
+ if ( mkfunc != null && ! mkfunc . isImplicitlyResolved ( ) ) {
Callable callable = mkfunc . getCallable ( ) ;
int first_param_offset = mkfunc . getImplicitOffset ( ) ;
PyParameter [ ] params = callable . getParameterList ( ) . getParameters ( ) ;
|
don t validate arguments of decorator list in case of implicit resolve
|
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
- import static NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
abstract class BitmapHunter implements Runnable {
<nb> abstract class BitmapHunter implements Runnable {
Uri uri = request . getUri ( ) ;
String scheme = uri . getScheme ( ) ;
if ( SCHEME_CONTENT . equals ( scheme ) ) {
- if ( CONTENT_URI . getHost ( ) . equals ( uri . getHost ( ) ) SINGLE
- && ! uri . getPathSegments ( ) . contains ( CONTENT_DIRECTORY ) ) {
+ if ( Contacts . CONTENT_URI . getHost ( ) . equals ( uri . getHost ( ) ) SINGLE
+ && ! uri . getPathSegments ( ) . contains ( Contacts . Photo . CONTENT_DIRECTORY ) ) {
return new ContactsPhotoBitmapHunter ( context , picasso , dispatcher , request ) ;
} else {
return new ContentProviderBitmapHunter ( context , picasso , dispatcher , request ) ;
|
Make the imports sense
|
<nb> public class ConsolePane extends WorkbenchPane
@ override
public void setDebugMode ( boolean debugMode )
{
- if ( debugMode == debugMode_ )
- {
- return ;
- }
-
debugMode_ = debugMode ;
loadDebugToolsIntoSecondaryToolbar ( ) ;
}
<nb> public class ConsolePane extends WorkbenchPane
@ override
public void setProfilerMode ( boolean profilerMode )
{
- if ( profilerMode == profilerMode_ )
- {
- return ;
- }
-
profilerMode_ = profilerMode ;
loadDebugToolsIntoSecondaryToolbar ( ) ;
}
|
reset toolbar visibity proactevely to avoid empty toolbar
|
<nb> public class GoReference extends GoReferenceBase {
@ notnull
@ override
public PsiElement handleElementRename ( @ notnull String newElementName ) throws IncorrectOperationException {
- myRefExpression . replace ( GoElementFactory . createReferenceFromText ( myElement . getProject ( ) , newElementName ) ) ;
+ myIdentifier . replace ( GoElementFactory . createIdentifierFromText ( myElement . getProject ( ) , newElementName ) ) ;
return myRefExpression ;
}
}
<nb> public class GoTypeReference extends GoReferenceBase {
@ override
public PsiElement handleElementRename ( String newElementName ) throws IncorrectOperationException {
- myRefExpression . replace ( GoElementFactory . createTypeReferenceFromText ( myElement . getProject ( ) , newElementName ) ) ;
+ myIdentifier . replace ( GoElementFactory . createIdentifierFromText ( myElement . getProject ( ) , newElementName ) ) ;
return myRefExpression ;
}
|
better handle rename
|
<nb> public class PeopleActivity extends AppCompatActivity {
private final Random random = new Random ( ) ;
private final int [ ] colors = { Color . RED , Color . BLUE , Color . GREEN , Color . MAGENTA } ;
- protected PersonAdapter ( ) {
+ PersonAdapter ( ) {
super ( PersonEntity . $TYPE ) ;
}
|
Fix visibility warning
|
<nb> public class SimpleChannelHandler implements ChannelUpstreamHandler , ChannelDown
channelInterestChanged ( ctx , evt ) ;
break ;
default :
- ctx . sendDownstream ( e ) ;
+ ctx . sendUpstream ( e ) ;
}
} else if ( e instanceof ExceptionEvent ) {
exceptionCaught ( ctx , ( ExceptionEvent ) e ) ;
<nb> public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
channelInterestChanged ( ctx , evt ) ;
break ;
default :
- ctx . sendDownstream ( e ) ;
+ ctx . sendUpstream ( e ) ;
}
} else if ( e instanceof ExceptionEvent ) {
exceptionCaught ( ctx , ( ExceptionEvent ) e ) ;
|
Fixed a bug where an invalid upstream channel state event goes downstream
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class TinkerGraph implements Graph {
}
public void removeVertex ( final Vertex vertex ) {
+ Set < Edge > toRemove = new HashSet < Edge > ( ) ;
for ( Edge edge : vertex . getInEdges ( ) ) {
- this . removeEdge ( edge ) ;
+ toRemove . add ( edge ) ;
}
for ( Edge edge : vertex . getOutEdges ( ) ) {
+ toRemove . add ( edge ) ;
+ }
+ for ( Edge edge : toRemove ) {
this . removeEdge ( edge ) ;
}
+
for ( String key : vertex . getPropertyKeys ( ) ) {
this . index . remove ( key , vertex . getProperty ( key ) , vertex ) ;
}
|
found an piece of code in the TinkerGraph implementation that was causin a concurrent modification error
|
<nb> public class GroupProperties {
public static final String PROP_ICMP_TTL = STRING0 ;
public static final String PROP_INITIAL_MIN_CLUSTER_SIZE = STRING1 ;
public static final String PROP_INITIAL_WAIT_SECONDS = STRING2 ;
- public static final String PROP_REPLICA_WAIT_SECONDS_FOR_SCHEDULED_OPERATIONS = STRING3 ;
+ public static final String PROP_REPLICA_WAIT_SECONDS_FOR_SCHEDULED_OPERATIONS = STRING4 ;
public static final String PROP_PARTITION_COUNT = STRING5 ;
public static final String PROP_LOGGING_TYPE = STRING6 ;
public static final String PROP_ENABLE_JMX = STRING7 ;
|
changed name of property
|
<nb> import NAMESPACE ;
public class JetCoreEnvironment extends JavaCoreEnvironment {
private final List < JetFile > sourceFiles = new ArrayList < JetFile > ( ) ;
private final CoreAnnotationsProvider annotationsProvider ;
+ private final CompilerConfiguration configuration ;
@ notnull
public static JetCoreEnvironment createCoreEnvironmentForJS ( Disposable disposable , @ notnull CompilerConfiguration configuration ) {
<nb> public class JetCoreEnvironment extends JavaCoreEnvironment {
public JetCoreEnvironment ( Disposable parentDisposable , @ notnull CompilerConfiguration configuration ) {
super ( parentDisposable ) ;
+ this . configuration = configuration ;
registerFileType ( JetFileType . INSTANCE , STRING0 ) ;
registerFileType ( JetFileType . INSTANCE , STRING1 ) ;
<nb> public class JetCoreEnvironment extends JavaCoreEnvironment {
JetStandardLibrary . initialize ( getProject ( ) ) ;
}
+ public CompilerConfiguration getConfiguration ( ) {
+ return configuration ;
+ }
+
public void addExternalAnnotationsRoot ( VirtualFile root ) {
annotationsProvider . addExternalAnnotationsRoot ( root ) ;
}
|
Storing CompilerConfiguration in JetCoreEnvironment
|
<nb> public class RSConnectDeployDialog
setText ( STRING0 ) ;
setWidth ( STRING1 ) ;
deployButton_ = new ThemedButton ( STRING2 ) ;
- addCancelButton ( ) ;
addOkButton ( deployButton_ ) ;
+ addCancelButton ( ) ;
connect_ = connect ;
if ( source . isDocument ( ) )
|
make publish cancel button consistent between dialog and wizard
|
<nb> public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
private Bitmap locationIcon ;
private OsmAndLocationProvider locationProvider ;
private MapViewTrackingUtilities mapViewTrackingUtilities ;
- private boolean nm = false ;
+ private boolean nm ;
public PointLocationLayer ( MapViewTrackingUtilities mv ) {
this . mapViewTrackingUtilities = mv ;
|
Removed unnecessary initialization
|
<nb> public class ValidationMetrics {
makeGauge ( fullGaugeNameHours , makeMetricName ( fullGaugeNameHours ) , _currentTimeMillisDeltaGaugeHoursFactory , lastPushTimeMillis ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void updateTotalDocumentsGauge ( final String resource , final long documentCount )
{
final String fullGaugeName = makeGaugeName ( resource , STRING0 ) ;
makeGauge ( fullGaugeName , makeMetricName ( fullGaugeName ) , _storedValueGaugeFactory , documentCount ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void updateSegmentCountGauge ( final String resource , final long segmentCount )
{
final String fullGaugeName = makeGaugeName ( resource , STRING1 ) ;
|
Adding comments to new public functions in validation metrics
|
<nb> public class SELinuxPolicyInstallReceiver extends ConfigUpdateInstallReceiver {
}
private void setEnforcingMode ( Context context ) {
- boolean mode = Settings . Global . getInt ( context . getContentResolver ( ) ,
- Settings . Global . SELINUX_STATUS , NUMBER0 ) == NUMBER1 ;
- SELinux . setSELinuxEnforce ( mode ) ;
+ String mode = Settings . Global . getString ( context . getContentResolver ( ) ,
+ Settings . Global . SELINUX_STATUS ) ;
+ if ( mode . equals ( STRING0 ) ) {
+ Slog . i ( TAG , STRING1 ) ;
+ SystemProperties . set ( STRING2 , mode ) ;
+ } else if ( mode . equals ( STRING3 ) ) {
+ Slog . i ( TAG , STRING4 ) ;
+ } else {
+ Slog . e ( TAG , STRING5 + mode ) ;
+ }
}
@ override
|
Set persistent property for SELinux enforcement on update
|
<nb> public class JavaStubGenerator
protected void addTimeStamp ( ClassNode node ) { }
protected void addInitialization ( ClassNode node ) { }
protected void addPropertyMethod ( MethodNode method ) {
- propertyMethods . add ( method ) ;
+ propertyMethods . add ( method ) ;
}
protected void addReturnIfNeeded ( MethodNode node ) { }
} ;
<nb> public class JavaStubGenerator
out . println ( STRING0 ) ;
} finally {
- propertyMethods . clear ( ) ;
+ propertyMethods . clear ( ) ;
try {
out . close ( ) ;
} catch ( Exception e ) {
|
Fix formatting dude tabs be evil
|
<nb> public class Cluster implements Serializable {
return true ;
}
+
+ @ override
+ public int hashCode ( ) {
+ int hc = getNodes ( ) . size ( ) ;
+ for ( Node node : getNodes ( ) ) {
+ hc ^= node . getHost ( ) . hashCode ( ) ;
+ }
+
+ return hc ;
+ }
}
<nb> public class Zone implements Serializable {
return true ;
}
+ @ override
+ public int hashCode ( ) {
+ return getId ( ) ^ getProximityList ( ) . size ( ) ;
+ }
+
public int getId ( ) {
return this . zoneId ;
}
|
equals objects should have equal hashCodes
|
<nb> public class NutFilePool implements FilePool {
subs = last . list ( new FilenameFilter ( ) {
@ override
public boolean accept ( File dir , String name ) {
- return name . matches ( STRING0 ) ;
+ return name . matches ( STRING1 ) ;
}
} ) ;
if ( null != subs && subs . length > NUMBER0 ) {
|
change the file name regular expression
|
<nb> public class MessageList extends K9ListActivity implements
}
private void toggleAllSelected ( ) {
- boolean newState = true ;
+ boolean newState = true ;
synchronized ( mAdapter . messages ) {
if ( mSelectedCount > NUMBER0 ) {
<nb> public class MessageList extends K9ListActivity implements
break ;
}
case R . id . same_sender : {
- MessageList . actionHandle ( MessageList . this , STRING0 + selection . get ( NUMBER0 ) . sender ,
- selection . get ( NUMBER0 ) . senderAddress , false , null , null ) ;
- mSelectedCount = NUMBER0 ;
+ MessageList . actionHandle ( MessageList . this , STRING0 + selection . get ( NUMBER0 ) . sender ,
+ selection . get ( NUMBER0 ) . senderAddress , false , null , null ) ;
+ mSelectedCount = NUMBER0 ;
break ;
}
}
|
Removed trailing spaces no functional changes
|
<nb> public class GoSdkUtil {
executableName = GoEnvironmentUtil . getBinaryFileNameForPath ( executableName ) ;
Collection < VirtualFile > roots = getGoPathRoots ( project , module ) ;
for ( VirtualFile file : roots ) {
- VirtualFile child = file . findChild ( STRING0 + executableName ) ;
+ VirtualFile child = VfsUtil . findRelativeFile ( file , STRING1 , executableName ) ;
if ( child != null ) return child ;
}
File fromPath = PathEnvironmentVariableUtil . findInPath ( executableName ) ;
|
Fix looking for executable in gopath bin roots
|
<nb> public class ExecDriver extends Task < mapredWork > implements Serializable {
String uri = elems . next ( ) ;
try {
System . err . println ( STRING0 + uri ) ;
- int retCode = ( ( java . net . HttpURLConnection ) new java . net . URL ( uri )
- . openConnection ( ) ) . getResponseCode ( ) ;
+ java . net . HttpURLConnection conn = ( java . net . HttpURLConnection )
+ new java . net . URL ( uri ) . openConnection ( ) ;
+ conn . setRequestMethod ( STRING1 ) ;
+ int retCode = conn . getResponseCode ( ) ;
if ( retCode != NUMBER0 ) {
System . err . println ( STRING2
+ uri + STRING3 + retCode ) ;
|
use the Http POST method to submit the kill command to Hadoop JT
|
<nb> public interface User extends Comparable < User > , TwitterResponse , java . io . Seriali
boolean isShowAllInlineMedia ( ) ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
int getFriendsCount ( ) ;
Date getCreatedAt ( ) ;
|
Added JavaDoc comment for getFriendsCount which really means how many people the user follows
|
<nb> public class GroupByHash
public long getEstimatedSize ( )
{
- return completedPagesMemorySize + pages . get ( pages . size ( ) - NUMBER0 ) . getMemorySize ( ) + sizeOf ( key ) + sizeOf ( value ) ;
+ return completedPagesMemorySize + pages . get ( pages . size ( ) - NUMBER0 ) . getMemorySize ( ) + sizeOf ( key ) + sizeOf ( value ) + groupAddress . sizeOf ( ) ;
}
public List < Type > getTypes ( )
|
Include groupAddress in GroupByHash memory usage
|
<nb> public class CassandraServer implements Cassandra . Iface
CFMetaData oldCfm = DatabaseDescriptor . getCFMetaData ( CFMetaData . getId ( cf_def . keyspace , cf_def . name ) ) ;
if ( oldCfm == null )
throw new InvalidRequestException ( STRING0 ) ;
+ ThriftValidation . validateCfDef ( cf_def , oldCfm ) ;
validateSchemaAgreement ( ) ;
try
|
cli validates CFMetaData on update
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public class PythonUnitTestRunConfiguration extends
@ override
public void checkConfiguration ( ) throws RuntimeConfigurationException {
super . checkConfiguration ( ) ;
- if ( myIsPureUnittest && ! myScriptName . startsWith ( STRING0 ) ) {
+ if ( myIsPureUnittest && ! new File ( myScriptName ) . getName ( ) . startsWith ( STRING0 ) ) {
throw new RuntimeConfigurationError ( PyBundle . message ( STRING1 ) ) ;
}
}
|
fixed folder name checking in python unittests
|
<nb> public final class ContactsContract {
}
- private interface ContactsColumns {
+ private interface RawContactsColumns {
COMMENT
COMMENT
COMMENT
<nb> public final class ContactsContract {
public static final String AGGREGATE_ID = STRING0 ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class ContactsContract {
}
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
- public static final class Contacts implements BaseColumns , ContactsColumns , SyncColumns ,
- ContactOptionsColumns {
+ SINGLE
+ public static COMMENT class RawContacts implements BaseColumns , RawContactsColumns ,
+ SyncColumns , ContactOptionsColumns {
COMMENT
COMMENT
COMMENT
- private Contacts ( ) {
+ private RawContacts ( ) {
}
COMMENT
<nb> public final class ContactsContract {
}
}
+ COMMENT
+ COMMENT
+ COMMENT
+ @ deprecated
+ public static final class Contacts extends RawContacts {
+ }
+
private interface DataColumns {
COMMENT
COMMENT
|
Renaming ContactsContract Contacts to ContactsContract RawContacts
|
<nb> public abstract class BaseHadoopTest {
private static final Logger LOG = LoggerFactory . getLogger ( BaseHadoopTest . class ) ;
public static final String HADOOP_HOME ;
- public static final String PROJECT_VERSION = loadProperty ( STRING0 , STRING1 ) ;
+ public static final String PROJECT_VERSION = loadProperty ( STRING0 , STRING2 ) ;
public static final String HADOOP_VERSION = loadProperty ( STRING3 , STRING4 ) ;
SINGLE
|
bump version down to match gradle
|
<nb> public class ChatRoomIrcImpl
public void setUserNickname ( final String nickName )
throws OperationFailedException
{
- throw new OperationFailedException (
- STRING0
- + STRING1 ,
- OperationFailedException . NOT_SUPPORTED_OPERATION ) ;
+ SINGLE
+ SINGLE
+ LOGGER . info ( STRING2
+ + STRING3 ) ;
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
}
COMMENT
|
Revert Disallow nick changes for individual chat rooms
|
<nb> public class ZLAndroidWidget extends View implements View . OnLongClickListener {
}
final AnimationProvider animator = getAnimationProvider ( ) ;
final int w = getWidth ( ) ;
- final int h = getHeight ( ) ;
+ final int h = getMainAreaHeight ( ) ;
switch ( pageIndex ) {
case current :
switch ( myPageToScrollTo ) {
|
fixed vertical scrolling animation
|
<nb> public class ActivityApp extends Activity {
: android . R . drawable . arrow_down_float ) ;
SINGLE
- if ( ! mExpert || getChildrenCount ( groupPosition ) == NUMBER0 )
- imgIndicator . setVisibility ( View . INVISIBLE ) ;
+ if ( mExpert ) {
+ if ( getChildrenCount ( groupPosition ) == NUMBER0 )
+ imgIndicator . setVisibility ( View . INVISIBLE ) ;
+ } else
+ imgIndicator . setVisibility ( View . GONE ) ;
SINGLE
final String restrictionName = ( String ) getGroup ( groupPosition ) ;
|
Hide indicator when no expert mode
|
<nb> public class MainActivity extends MapActivity
private volatile boolean prepareInProgress = false ;
private volatile boolean shortestPathRunning = false ;
private String currentArea = STRING0 ;
- private String fileListURL = STRING1 ;
+ private String fileListURL = STRING2 + Constants . VERSION + STRING3 ;
private String prefixURL = fileListURL ;
private String downloadURL ;
private String mapsFolder ;
<nb> public class MainActivity extends MapActivity
paintStroke . setStrokeWidth ( NUMBER0 ) ;
paintStroke
. setPathEffect ( new DashPathEffect ( new float [ ]
- {
- NUMBER1 , NUMBER2
+ {
+ NUMBER1 , NUMBER2
} , NUMBER3 ) ) ;
return new Polyline ( polygonalChain , paintStroke ) ;
|
update download folder
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public interface Chunk {
COMMENT
COMMENT
World getWorld ( ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ Block getBlock ( int x , int y , int z ) ;
}
<nb> public interface World {
COMMENT
COMMENT
public void loadChunk ( Chunk chunk ) ;
-
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public boolean isChunkLoaded ( int x , int z ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void loadChunk ( int x , int z ) ;
+
COMMENT
COMMENT
COMMENT
|
Add Chunk getBlock x y z World loadChunk x z World isChunkLoaded x z
|
<nb>
package NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class App
{
public static void main ( String [ ] args )
<nb>
package NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public interface Blacksmith {
Weapon manufactureWeapon ( WeaponType weaponType ) ;
<nb>
package NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class ElfBlacksmith implements Blacksmith {
public Weapon manufactureWeapon ( WeaponType weaponType ) {
<nb>
package NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public class OrcBlacksmith implements Blacksmith {
public Weapon manufactureWeapon ( WeaponType weaponType ) {
|
Commented factory method example
|
<nb> public class ProjectTaskContainer extends Container {
private void registerCoreComponentsRequiringProject ( ) {
container . addSingleton ( ProjectTree . class ) ;
- container . addSingleton ( DefaultIndex . class ) ;
container . addSingleton ( DefaultFileLinesContextFactory . class ) ;
container . addSingleton ( ProjectLock . class ) ;
|
Remove duplicate DefaultIndex
|
<nb> public abstract class UnderFileSystemCluster {
&& sUnderFSClass . equals ( STRING0 ) ;
}
- protected String mBaseDir ;
+ protected final String mBaseDir ;
protected final TachyonConf mTachyonConf ;
|
Addressing review comments
|
<nb> public final class HgCommandExecutor {
@ nullable
public HgCommandResult executeInCurrentThread ( @ nullable final VirtualFile repo , final String operation , final List < String > arguments ) {
- LOG . assertTrue ( ! ApplicationManager . getApplication ( ) . isDispatchThread ( ) ) ;
+ SINGLE
if ( myProject == null || myProject . isDisposed ( ) || myVcs == null ) {
return null ;
}
|
disable assertion checking that hg command is called not from AWT it is called from ShowDiffAction
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
public class ListenerContainer < T > implements Listenable < T >
{
+ private final Logger log = LoggerFactory . getLogger ( getClass ( ) ) ;
private final Map < T , ListenerEntry < T > > listeners = Maps . newConcurrentMap ( ) ;
@ override
<nb> public class ListenerContainer < T > implements Listenable < T >
{
for ( final ListenerEntry < T > entry : listeners . values ( ) )
{
- function . apply ( entry . listener ) ;
+ try
+ {
+ function . apply ( entry . listener ) ;
+ }
+ catch ( Throwable e )
+ {
+ log . error ( String . format ( STRING0 , entry . listener ) , e ) ;
+ }
}
}
}
|
Catch any errors thrown by listeners
|
<nb> public class AttributeTableImpl implements AttributeTable {
columns . add ( column ) ;
columnsMap . put ( id , column ) ;
if ( title != null && ! title . equals ( id ) ) {
- columnsMap . put ( title . toLowerCase ( ) , column ) ;
+ columnsMap . put ( title , column ) ;
}
columnsSet . put ( column , column ) ;
|
Fix Attributes API bug where columns were not correctly removed from columnsMap
|
<nb> public class CirclePageIndicator extends View implements PageIndicator {
mListener = listener ;
}
+ @ override
+ public void notifyDataSetChanged ( ) {
+ invalidate ( ) ;
+ }
+
COMMENT
COMMENT
COMMENT
<nb> public interface PageIndicator extends ViewPager . OnPageChangeListener {
COMMENT
COMMENT
public void setOnPageChangeListener ( ViewPager . OnPageChangeListener listener ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void notifyDataSetChanged ( ) ;
}
<nb> public class TitlePageIndicator extends View implements PageIndicator {
mListener = listener ;
}
+ @ override
+ public void notifyDataSetChanged ( ) {
+ invalidate ( ) ;
+ }
+
COMMENT
COMMENT
COMMENT
|
Add methods to trigger invalidation when the data set changes
|
<nb>
COMMENT
package NAMESPACE ;
- import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> public class MasterDomainControllerOperationHandlerService extends AbstractModel
private final HostControllerRegistrationHandler . OperationExecutor operationExecutor ;
private final TransactionalOperationExecutor txOperationExecutor ;
private final ManagementPongRequestHandler pongRequestHandler = new ManagementPongRequestHandler ( ) ;
- private final ThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( STRING0 ) , Boolean . FALSE , null , STRING1 , null , null , doPrivileged ( GetAccessControlContextAction . getInstance ( ) ) ) ;
private final DomainControllerRuntimeIgnoreTransformationRegistry runtimeIgnoreTransformationRegistry ;
private final File tempDir ;
|
Remove unused var
|
<nb> import NAMESPACE ;
COMMENT
public class ObserverManager < T extends IActorObserver > implements Serializable
{
- private static final long serialVersionUID = NUMBER0 ;
+ private static final long serialVersionUID = NUMBER0 ;
- private static final org . slf4j . Logger logger = org . slf4j . LoggerFactory . getLogger ( ObserverManager . class ) ;
+ private static final org . slf4j . Logger logger = org . slf4j . LoggerFactory . getLogger ( ObserverManager . class ) ;
private final ConcurrentHashSet < T > observers = new ConcurrentHashSet < > ( ) ;
<nb> public class ObserverManager < T extends IActorObserver > implements Serializable
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
public Task < ? > cleanup ( )
{
|
Reinforcing the recommendation on ObserverManager cleanup
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
@ path ( STRING0 )
- @ xmlrootelement SINGLE
+ @ xmlrootelement
public class ServerInfo {
private static final ServerInfo SERVER_INFO = new ServerInfo ( ) ;
<nb> public class ServerInfo {
public static ServerInfo getServerInfo ( ) throws JSONException {
return SERVER_INFO ;
}
+
+ COMMENT
+ COMMENT
- @ getter private MavenVersion serverVersion = MavenVersion . VERSION ;
+ @ xmlelement @ getter
+ private MavenVersion serverVersion = MavenVersion . VERSION ;
- @ getter private String cpuName = STRING1 ;
+ @ xmlelement @ getter
+ private String cpuName = STRING1 ;
- @ getter private int nCores = NUMBER0 ;
+ @ xmlelement @ getter
+ private int nCores = NUMBER0 ;
COMMENT
COMMENT
|
add XmlElement annotations
|
<nb> public final class DefaultPassConfig extends PassConfig {
SINGLE
SINGLE
if ( options . removeUnusedVars || options . removeUnusedLocalVars ) {
- passes . add ( getRemoveUnusedVars ( STRING0 , false ) ) ;
+ passes . add ( lastRemoveUnusedVars ( ) ) ;
}
}
<nb> public final class DefaultPassConfig extends PassConfig {
}
} ;
+ private PassFactory getRemoveUnusedVars ( String name , final boolean modifyCallSites ) {
+ return getRemoveUnusedVars ( name , modifyCallSites , false COMMENT ) ;
+ }
+
+ private PassFactory lastRemoveUnusedVars ( ) {
+ return getRemoveUnusedVars ( STRING0 , false , true COMMENT ) ;
+ }
+
private PassFactory getRemoveUnusedVars (
- String name , final boolean modifyCallSites ) {
+ String name , final boolean modifyCallSites , boolean isOneTimePass ) {
COMMENT
- return new PassFactory ( name , false ) {
+ return new PassFactory ( name , isOneTimePass ) {
@ override
protected CompilerPass create ( AbstractCompiler compiler ) {
boolean removeOnlyLocals = options . removeUnusedLocalVars
|
Change the pass configuration so that when RemoveUnusedVars runs after FlowSensitiveInlineVariables it only runs once
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
- public final class ExcludeTreeNodeAction < T extends MutableTreeNode > extends TreeNodeExclusionAction < T > {
+ public final class ExcludeTreeNodeAction extends TreeNodeExclusionAction {
public ExcludeTreeNodeAction ( ) {
super ( true ) ;
}
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
-
COMMENT
COMMENT
COMMENT
- public final class IncludeTreeNodeAction < T extends MutableTreeNode > extends TreeNodeExclusionAction < T > {
+ public final class IncludeTreeNodeAction extends TreeNodeExclusionAction {
public IncludeTreeNodeAction ( ) {
super ( false ) ;
}
|
tree node include exclude action remove type parameters
|
<nb> public class TypedArrayUtils {
public static CharSequence [ ] getTextArray ( TypedArray a , @ styleableres int index ,
@ styleableres int fallbackIndex ) {
- CharSequence [ ] val = a . getTextArray ( fallbackIndex ) ;
+ CharSequence [ ] val = a . getTextArray ( index ) ;
if ( val == null ) {
val = a . getTextArray ( fallbackIndex ) ;
}
|
Fix typo in TypedArrayUtils
|
<nb> public class ContextImplTest {
when ( httpServletRequest . getHeader ( Context . X_FORWARD_HEADER ) ) . thenReturn ( STRING0 ) ;
SINGLE
- context . init ( httpServletRequest , httpServletResponse ) ;
+ context . init ( servletContext , httpServletRequest , httpServletResponse ) ;
SINGLE
assertEquals ( STRING1 , context . getRemoteAddr ( ) ) ;
<nb> public class ContextImplTest {
. thenReturn ( Boolean . TRUE ) ;
SINGLE
- context . init ( httpServletRequest , httpServletResponse ) ;
+ context . init ( servletContext , httpServletRequest , httpServletResponse ) ;
SINGLE
assertEquals ( STRING2 , context . getRemoteAddr ( ) ) ;
<nb> public class ContextImplTest {
. thenReturn ( Boolean . TRUE ) ;
SINGLE
- context . init ( httpServletRequest , httpServletResponse ) ;
+ context . init ( servletContext , httpServletRequest , httpServletResponse ) ;
SINGLE
assertEquals ( STRING3 , context . getRemoteAddr ( ) ) ;
|
Added a tiny fix to make the testcase work again
|
<nb> public class MacColorPipette extends ColorPipetteBase {
int left = PIXELS / NUMBER0 + NUMBER1 ;
Rectangle captureRectangle = new Rectangle ( mouseLoc . x - left , mouseLoc . y - left , PIXELS , PIXELS ) ;
BufferedImage captureScreen = captureScreen ( pickerDialog , captureRectangle ) ;
- if ( captureScreen == null ) return ;
+ if ( captureScreen == null || captureScreen . getWidth ( ) < PIXELS || captureRectangle . getHeight ( ) < PIXELS ) {
+ cancelPipette ( ) ;
+ return ;
+ }
SINGLE
Color newColor = new Color ( captureScreen . getRGB ( captureRectangle . width / NUMBER0 , captureRectangle . height / NUMBER0 ) ) ;
|
cancel pipette when screen capture failed
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Relax version checking in themes to just use check for major and minor version and not fix pack version
|
<nb> public class UsbDebuggingManager implements Runnable {
private final int BUFFER_SIZE = NUMBER0 ;
private final Context mContext ;
- private final Thread mThread ;
private final Handler mHandler ;
private final HandlerThread mHandlerThread ;
+ private Thread mThread ;
private boolean mAdbEnabled = false ;
private String mFingerprints ;
private LocalSocket mSocket = null ;
private OutputStream mOutputStream = null ;
public UsbDebuggingManager ( Context context ) {
- mThread = new Thread ( this ) ;
mHandlerThread = new HandlerThread ( STRING0 ) ;
mHandlerThread . start ( ) ;
mHandler = new UsbDebuggingHandler ( mHandlerThread . getLooper ( ) ) ;
<nb> public class UsbDebuggingManager implements Runnable {
mAdbEnabled = true ;
+ mThread = new Thread ( UsbDebuggingManager . this ) ;
mThread . start ( ) ;
break ;
<nb> public class UsbDebuggingManager implements Runnable {
} catch ( Exception ex ) {
}
+ mThread = null ;
mOutputStream = null ;
mSocket = null ;
break ;
|
Fix restart when toggling USB debugging
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PageBufferInfo
private final long bufferedBytes ;
private final long pagesAdded ;
+ @ jsoncreator
public PageBufferInfo (
@ jsonproperty ( STRING0 ) int partition ,
@ jsonproperty ( STRING1 ) long bufferedPages ,
|
Add missing JsonCreator annotation at PageBufferInfo
|
<nb> public final class WebViewClassic implements WebViewProvider , WebViewProvider . Sc
if ( action == MotionEvent . ACTION_POINTER_DOWN ) {
cancelTouch ( ) ;
action = MotionEvent . ACTION_DOWN ;
- } else if ( action == MotionEvent . ACTION_POINTER_UP && ev . getPointerCount ( ) >= NUMBER0 ) {
+ } else if ( action == MotionEvent . ACTION_POINTER_UP ) {
SINGLE
mLastTouchX = Math . round ( x ) ;
mLastTouchY = Math . round ( y ) ;
|
DO NOT MERGE Remove dead code
|
<nb> public interface Player extends HumanEntity , Conversable , CommandSender , Offline
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- public boolean isScaledHealth ( ) ;
+ public boolean isHealthScaled ( ) ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
- public void setScaleHealth ( boolean scale ) ;
+ public void setHealthScaled ( boolean scale ) ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setHealthScale ( double scale ) throws IllegalArgumentException ;
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public double getHealthScale ( ) ;
}
|
Add API to control scaled health
|
<nb> public class CallActor extends EventBusActor {
callModels = context ( ) . getCallsModule ( ) . getCallModels ( ) ;
boolean isMobile = config ( ) . getDeviceCategory ( ) == DeviceCategory . MOBILE ||
config ( ) . getDeviceCategory ( ) == DeviceCategory . TABLET ;
- boolean isSupportsFastConnect = isMobile ;
+ boolean isSupportsFastConnect = true ;
peerSettings = new ApiPeerSettings ( true , isMobile , false , isSupportsFastConnect ) ;
}
|
Implemented Fast Connection everywhere
|
<nb> public class BitmapDrawable extends Drawable {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public Mode getTintMode ( ) {
+ return mBitmapState . mTintMode ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Restore getTintMode method on BitmapDrawable
|
<nb> public class CallActivityParseHandler extends AbstractActivityBpmnParseHandler < C
ActivityImpl activity = createActivityOnCurrentScope ( bpmnParse , callActivity , BpmnXMLConstants . ELEMENT_CALL_ACTIVITY ) ;
activity . setScope ( true ) ;
activity . setAsync ( callActivity . isAsynchronous ( ) ) ;
+ activity . setExclusive ( ! callActivity . isNotExclusive ( ) ) ;
activity . setActivityBehavior ( bpmnParse . getActivityBehaviorFactory ( ) . createCallActivityBehavior ( callActivity ) ) ;
}
|
Make CallActivityParseHandler by default exclusive if nothing is set
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TreePostScriptGenerator {
this . root = root ;
setTreeTextProvider ( new TreeViewer . DefaultTreeTextProvider ( parser ) ) ;
doc = new PostScriptDocument ( fontName , fontSize ) ;
+ boolean compareNodeIdentities = true ;
this . treeLayout =
new TreeLayout < Tree > ( new TreeLayoutAdaptor ( root ) ,
new VariableExtentProvide ( ) ,
new DefaultConfiguration < Tree > ( gapBetweenLevels ,
gapBetweenNodes ,
- Configuration . Location . Bottom ) ) ;
+ Configuration . Location . Bottom ) ,
+ compareNodeIdentities ) ;
}
public String getPS ( ) {
|
Wasn t using Udo s lib correctly
|
<nb> public class PersistentEphemeralNode implements Closeable
}
catch ( Exception e )
{
- log . error ( STRING0 , e ) ;
+ log . error ( STRING1 + localNodePath , e ) ;
}
}
}
|
fixed log message
|
<nb> public class PdfToSwfSlidesGenerationService {
log . debug ( STRING0 + pres . getNumberOfPages ( ) ) ;
if ( pres . getNumberOfPages ( ) > NUMBER0 ) {
convertPdfToSwf ( pres ) ;
- createPngImages ( pres ) ;
+ SINGLE
createTextFiles ( pres ) ;
createThumbnails ( pres ) ;
notifier . sendConversionCompletedMessage ( pres ) ;
|
remove PNG generation step in doc conversion as it takes a long time
|
<nb> final public class Utils {
COMMENT
static public void packLong ( DataOutput out , long value ) throws IOException {
- if ( value < NUMBER0 ) {
- throw new IllegalArgumentException ( STRING0 + value ) ;
- }
+ assert ( value >= NUMBER0 ) : STRING1 + value ;
while ( ( value & ~ NUMBER1 ) != NUMBER0 ) {
out . write ( ( ( ( int ) value & NUMBER2 ) | NUMBER3 ) ) ;
<nb> final public class Utils {
COMMENT
static public void packInt ( DataOutput in , int value ) throws IOException {
- if ( value < NUMBER0 ) {
- throw new IllegalArgumentException ( STRING0 + value ) ;
- }
+ assert ( value >= NUMBER0 ) : STRING1 + value ;
while ( ( value & ~ NUMBER2 ) != NUMBER0 ) {
in . write ( ( ( value & NUMBER2 ) | NUMBER3 ) ) ;
|
replace IllegalArgumentException with assertion for better performance
|
<nb> public class addAccount extends Activity {
boolean success = false ;
if ( blogName == STRING0 ) {
- blogName = STRING1 ;
+ blogNames [ blogCtr ] = STRING1 ;
}
boolean wpcomFlag = false ;
|
Fixed blog display to show No Blog Title if the blog has an empty title
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
|
remove StoragePool synchronized
|
<nb> public class Runner implements MessageConsumer {
SINGLE
SINGLE
e . printStackTrace ( sketchErr ) ;
+ } catch ( Exception e ) {
+ SINGLE
+ SINGLE
+ if ( STRING0 . equals ( message ) == false ) {
+ e . printStackTrace ( sketchErr ) ;
+ }
}
SINGLE
SINGLE
<nb> public class Runner implements MessageConsumer {
or . invokeMethod ( thread , method , new ArrayList < Value > ( ) , ObjectReference . INVOKE_SINGLE_THREADED ) ;
} catch ( Exception e ) {
- e . printStackTrace ( sketchErr ) ;
+ SINGLE
+ SINGLE
+ if ( STRING0 . equals ( message ) == false ) {
+ e . printStackTrace ( sketchErr ) ;
+ }
}
SINGLE
SketchException rex = new SketchException ( message ) ;
|
Make the error message for stack overflows clearer
|
<nb> public class DialogPlus {
switch ( event . getAction ( ) ) {
case KeyEvent . ACTION_UP :
if ( keyCode == KeyEvent . KEYCODE_BACK && isCancelable ) {
- dismiss ( ) ;
if ( onCancelListener != null ) {
onCancelListener . onCancel ( DialogPlus . this ) ;
}
+ dismiss ( ) ;
return true ;
}
break ;
<nb> public class DialogPlus {
@ override
public boolean onTouch ( View v , MotionEvent event ) {
if ( event . getAction ( ) == MotionEvent . ACTION_DOWN ) {
- dismiss ( ) ;
if ( onCancelListener != null ) {
onCancelListener . onCancel ( DialogPlus . this ) ;
}
+ dismiss ( ) ;
}
return false ;
}
|
changed logic that OnDismissListener would be invoked after cacelation
|
<nb> public class ZMQ
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
public Poller poller ( )
{
<nb> public class ZMQ
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
public Poller poller ( int size )
{
<nb> public class ZMQ
SINGLE
private LinkedList < Integer > freeSlots ;
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public Poller ( int size )
{
this ( null , size ) ;
|
deprecate Poller constructors that create pollers not affiliated with a context
|
<nb> public class MoveJavaFileHandler extends MoveFileHandler {
public boolean canProcessElement ( PsiFile element ) {
return element instanceof PsiJavaFile &&
! JspPsiUtil . isInJspFile ( element ) &&
- ! CollectHighlightsUtil . isOutsideSourceRoot ( element ) ;
+ ! CollectHighlightsUtil . isOutsideSourceRoot ( element ) &&
+ ! ( element instanceof PsiCompiledElement ) ;
}
@ override
|
do not update moved inside directory
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Remove unused import
|
<nb> public abstract class TestObject implements JavaCommandLine {
}
}
} ;
+ Disposer . register ( consoleView , packetsReceiver ) ;
final DeferredActionsQueue queue = new DeferredActionsQueueImpl ( ) ;
handler . getOut ( ) . setPacketDispatcher ( packetsReceiver , queue ) ;
<nb> public class TestsPacketsReceiver implements OutputPacketProcessor , Disposable {
myUnboundOutput = unboundOutput ;
myObjectRegistry = new InputObjectRegistry ( ) ;
myConsoleProperties = ( JUnitConsoleProperties ) consoleView . getProperties ( ) ;
- Disposer . register ( consoleView , this ) ;
}
@ override
|
try disposable test fixed
|
<nb> public class ThreadPool extends AbstractComponent implements Closeable {
int defaultSize = defaultSettings . getAsInt ( STRING0 , EsExecutors . boundedNumberOfProcessors ( settings ) ) ;
final Integer queueSize = settings . getAsInt ( STRING1 , defaultSettings . getAsInt ( STRING1 , null ) ) ;
if ( queueSize != null ) {
- throw new IllegalArgumentException ( STRING2 + name + STRING3 + queueSize + STRING4 ) ;
+ throw new IllegalArgumentException ( STRING2 + name + STRING5 + queueSize + STRING4 ) ;
}
if ( previousExecutorHolder != null ) {
if ( ThreadPoolType . SCALING == previousInfo . getThreadPoolType ( ) ) {
<nb> public class ScalingThreadPoolTests extends ESThreadPoolTestCase {
IllegalArgumentException . class ,
( ) - > clusterSettings . applySettings ( settings ( STRING6 + threadPoolName + STRING7 , size ) ) ) ;
assertThat ( e , hasToString (
- STRING8 + threadPoolName + STRING3 +
+ STRING8 + threadPoolName +
+ STRING5 +
size + STRING4 ) ) ;
} ) ;
}
|
Clarify message on resize scaling executor queues
|
<nb> public final class OpenCameraInterface {
return camera ;
}
-
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public static Camera open ( ) {
- return open ( - NUMBER0 ) ;
- }
-
}
|
Remove unused open function from OpenCameraInterface
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.