diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class MavenPluginConfigurationDomExtender extends DomExtender < Configurati
}
private void registerPluginParameter ( DomExtensionsRegistrar r , Parameter each ) {
- DomExtension e ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- e = r . registerFixedNumberChildExtension ( new XmlName ( each . getName ( ) . getStringValue ( ) ) , Parameter . class ) ;
-
- SINGLE
-
+ DomExtension e = r . registerFixedNumberChildExtension ( new XmlName ( each . getName ( ) . getStringValue ( ) ) , Parameter . class ) ;
e . putUserData ( DomExtension . KEY_DECLARATION , each ) ;
each . getXmlElement ( ) . putUserData ( PLUGIN_PARAMETER_KEY , each ) ;
}
|
catching all errors on importing
|
<nb> public abstract class ConstraintDefinition {
}
}
this . blenderContext = blenderContext ;
- constraintHelper = blenderContext . getHelper ( ConstraintHelper . class ) ;
+ constraintHelper = ( ConstraintHelper ) ( blenderContext == null ? null : blenderContext . getHelper ( ConstraintHelper . class ) ) ;
this . ownerOMA = ownerOMA ;
}
|
fixed an issue that caused NPE to be raised when UnsupportedConstraint was allocated
|
<nb> public class HomegearClient extends BaseHomematicClient {
HmVariable var = new HmVariable ( ) ;
var . setName ( name ) ;
var . setWriteable ( true ) ;
- var . setValue ( guessType ( value ) ) ;
+ var . setValueType ( guessType ( value ) ) ;
var . setValue ( value ) ;
return var ;
}
|
Fixed Homegear variable bug
|
<nb> public class PatternDwell extends TablePatternEdge implements OnboardEdge , Dwell
}
public String getDirection ( ) {
- return getPattern ( ) . getExemplar ( ) . getTripHeadsign ( ) ;
+ return getPattern ( ) . getDirection ( ) ;
}
public double getDistance ( ) {
<nb> public class TripPattern implements Serializable {
scheduledTimetable . setServiceCodes ( serviceCodes ) ;
}
+ public String getDirection ( ) {
+ return trips . get ( NUMBER0 ) . getTripHeadsign ( ) ;
+ }
}
|
remove use of Exemplar
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class FileColorsModel implements Cloneable {
static {
globalScopes = new HashMap < String , String > ( ) ;
globalScopes . put ( NonProjectFilesScope . NAME , STRING0 ) ;
- globalScopes . put ( TestsScope . NAME , STRING1 ) ;
+ if ( PlatformUtils . isJavaIDE ( ) ) {
+ globalScopes . put ( TestsScope . NAME , STRING1 ) ;
+ }
globalScopesColors = new HashMap < String , String > ( ) ;
}
<nb> public class PlatformUtils {
public static boolean isFlexIde ( ) {
return FLEX_PREFIX . equals ( getPlatformPrefix ( ) ) ;
}
+
+ public static boolean isJavaIDE ( ) {
+ return isIdea ( ) || isCommunity ( ) ;
+ }
}
|
can t open any file in non java IDE
|
<nb> public class CUBRIDTemplates extends SQLTemplates {
setNullsFirst ( null ) ;
setNullsLast ( null ) ;
setDefaultValues ( STRING0 ) ;
+ setArraysSupported ( false ) ;
add ( Ops . DateTimeOps . DAY_OF_YEAR , STRING1 ) ;
add ( Ops . DateTimeOps . DAY_OF_WEEK , STRING2 ) ;
|
Disable getArray for CUBRID
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class GoImportOptimizerTest extends GoCodeInsightFixtureTestCase {
<nb> public class GoImportOptimizerTest extends GoCodeInsightFixtureTestCase {
private void doTest ( ) {
myFixture . configureByFile ( getTestName ( true ) + STRING0 ) ;
myFixture . doHighlighting ( ) ;
- OptimizeImportsAction . actionPerformedImpl ( DataManager . getInstance ( ) . getDataContext ( myFixture . getEditor ( ) . getContentComponent ( ) ) ) ;
+ ApplicationManager . getApplication ( ) . runWriteAction ( new Runnable ( ) {
+ @ override
+ public void run ( ) {
+ OptimizeImportsAction . actionPerformedImpl ( DataManager . getInstance ( ) . getDataContext ( myFixture . getEditor ( ) . getContentComponent ( ) ) ) ;
+ }
+ } ) ;
myFixture . checkResultByFile ( getTestName ( true ) + STRING1 ) ;
}
|
Optimize imports in write action
|
<nb> public class Watcher implements Runnable {
return _downloadedFilePathNames ;
}
+ public void registerFilePath ( Path filePath , boolean recursive )
+ throws IOException {
+
+ if ( Files . notExists ( filePath ) ) {
+ processMissingFilePath ( filePath ) ;
+
+ return ;
+ }
+
+ doRegister ( filePath , recursive ) ;
+ }
+
@ override
public void run ( ) {
while ( true ) {
<nb> public class Watcher implements Runnable {
}
}
- protected void registerFilePath ( Path filePath , boolean recursive )
- throws IOException {
-
- if ( Files . notExists ( filePath ) ) {
- processMissingFilePath ( filePath ) ;
-
- return ;
- }
-
- doRegister ( filePath , recursive ) ;
- }
-
protected boolean skipWatchEvent (
Path childFilePath , int index , Path parentFilePath ,
List < WatchEvent < ? > > watchEvents ) {
|
sync engine Make public
|
<nb> public class VideoView extends SurfaceView implements MediaPlayerControl {
}
return true ;
} else if ( keyCode == KeyEvent . KEYCODE_MEDIA_PLAY ) {
- if ( mMediaPlayer . isPlaying ( ) ) {
+ if ( ! mMediaPlayer . isPlaying ( ) ) {
start ( ) ;
mMediaController . hide ( ) ;
}
return true ;
} else if ( keyCode == KeyEvent . KEYCODE_MEDIA_STOP
|| keyCode == KeyEvent . KEYCODE_MEDIA_PAUSE ) {
- if ( ! mMediaPlayer . isPlaying ( ) ) {
+ if ( mMediaPlayer . isPlaying ( ) ) {
pause ( ) ;
mMediaController . show ( ) ;
}
|
Fix a bug that the condition for play pause was reversed
|
<nb> public class ShadowImageView extends ShadowView {
private Drawable imageDrawable ;
private Bitmap imageBitmap ;
private ImageView . ScaleType scaleType ;
- private Matrix matrix ;
+ private Matrix matrix = new Matrix ( ) ;
private int imageLevel ;
@ implementation
<nb> public class ImageViewTest {
@ test
public void shouldCopyMatrixSetup ( ) throws Exception {
- Matrix matrix = new Matrix ( ) ;
+ Matrix matrix = imageView . getImageMatrix ( ) ;
matrix . setTranslate ( NUMBER0 , NUMBER1 ) ;
imageView . setImageMatrix ( matrix ) ;
ShadowMatrix m1 = shadowOf ( imageView . getImageMatrix ( ) ) ;
|
Initialize ShadowImageView matrix field to prevent NPE
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PerformanceDatabase {
public String getUrl ( ) {
String defaultUrl = STRING0 + System . getProperty ( STRING1 ) + STRING2 ;
String baseUrl = System . getProperty ( STRING3 , defaultUrl ) ;
- return baseUrl + STRING4 + databaseName ;
+ StringBuilder url = new StringBuilder ( baseUrl ) ;
+ if ( ! baseUrl . endsWith ( STRING4 ) ) {
+ url . append ( STRING5 ) ;
+ }
+ url . append ( databaseName ) ;
+ return url . toString ( ) ;
}
public String getUserName ( ) {
|
Make database URL handling more robust
|
<nb> public final class ClusterServiceImpl implements ClusterService , ConnectionListe
if ( node . getThisAddress ( ) . equals ( masterAddress ) ) {
logger . finest ( STRING0 + masterAddress + STRING1 + callerAddress
+ STRING2 ) ;
+ return ;
}
lock . lock ( ) ;
|
added missing return to prevent node tries to connect itself when network partition happens
|
<nb> public class LocalStore extends Store implements Serializable {
text = text . substring ( NUMBER0 , NUMBER1 ) ;
}
-
+ SINGLE
text = text . replaceAll ( STRING0 , STRING1 ) ;
+ SINGLE
text = text . replaceAll ( STRING2 , STRING1 ) ;
+ SINGLE
text = text . replaceAll ( STRING3 , STRING1 ) ;
+ SINGLE
text = text . replaceAll ( STRING4 , STRING1 ) ;
+
+ SINGLE
+ SINGLE
text = text . replaceAll ( STRING5 , STRING6 ) ;
+ SINGLE
text = text . replaceAll ( STRING7 , STRING8 ) ;
+ SINGLE
text = text . replaceAll ( STRING9 , STRING8 ) ;
if ( text . length ( ) <= NUMBER2 ) {
return text ;
|
comment some preview regexes
|
<nb> public class FlexibleAdapter < T extends IFlexible >
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ @ nonnull
+ public List < Integer > getSectionItemPositions ( @ nonnull IHeader header ) {
+ List < Integer > sectionItemPositions = new ArrayList < Integer > ( ) ;
+ int startPosition = getGlobalPositionOf ( header ) ;
+ T item = getItem ( ++ startPosition ) ;
+ while ( hasSameHeader ( item , header ) ) {
+ sectionItemPositions . add ( ++ startPosition ) ;
+ }
+ return sectionItemPositions ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added new method getSectionItemPositions
|
<nb> public class SgSyncAdapter extends AbstractThreadedSyncAdapter {
try {
TheTVDB . updateShow ( getContext ( ) , id ) ;
- SINGLE
+ SINGLE
resolver . notifyChange ( Episodes . CONTENT_URI_WITHSHOW , null ) ;
} catch ( TvdbException e ) {
SINGLE
<nb> public class ShowTools {
return Result . ERROR ;
}
+ SINGLE
+ mContext . getContentResolver ( ) . notifyChange (
+ SeriesGuideContract . Episodes . CONTENT_URI_WITHSHOW , null ) ;
+
return Result . SUCCESS ;
}
|
Notify more loaders after deleting a show
|
<nb> public class AsmClassGenerator extends ClassGenerator {
if ( setResult ) {
SINGLE
- if ( expression instanceof VariableExpression ) mv . visitInsn ( DUP ) ;
+ if ( expression instanceof VariableExpression ||
+ expression instanceof PropertyExpression )
+ {
+ mv . visitInsn ( DUP ) ;
+ }
leftHandExpression = true ;
expression . visit ( this ) ;
leftHandExpression = false ;
|
fixes a bytecode but for println x y
|
<nb> public class PhysicsSpace {
COMMENT
COMMENT
public void create ( ) {
- SINGLE
- physicsSpaceId = createPhysicsSpace ( worldMin . x , worldMin . y , worldMin . z , worldMax . x , worldMax . y , worldMax . z , NUMBER0 , false ) ;
+ physicsSpaceId = createPhysicsSpace ( worldMin . x , worldMin . y , worldMin . z , worldMax . x , worldMax . y , worldMax . z , broadphaseType . ordinal ( ) , false ) ;
pQueueTL . set ( pQueue ) ;
physicsSpaceTL . set ( this ) ;
|
Native bullet will no longer ignore changes to the broadphase type
|
<nb> public class PluginManager
private static List < Artifact > sortedArtifacts ( List < Artifact > artifacts )
{
List < Artifact > list = Lists . newArrayList ( artifacts ) ;
- Collections . sort ( list , Ordering . natural ( ) . onResultOf ( artifactFileGetter ( ) ) ) ;
+ Collections . sort ( list , Ordering . natural ( ) . nullsLast ( ) . onResultOf ( artifactFileGetter ( ) ) ) ;
return list ;
}
|
Fix handling of unresolvable artifacts
|
<nb> public class Q extends Z {
private List < URI > resources = new LinkedList < URI > ( ) ;
private boolean cache ;
transient static final String ARG_VAR_NAME = STRING0 ;
- transient static final String PREV_VAR_NAME = STRING1 ;
+ transient static final String PREV_VAR_NAME = STRING2 ;
transient static final String NAME_PREFIX = STRING3 ;
- transient static final Pattern templatePattern = Pattern . compile ( STRING4 + ARG_VAR_NAME + STRING5 ) ;
public Q ( String query ) {
this . query = query ;
|
remove previous query table variable name from prev table
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class BlurLayout extends RelativeLayout {
}
@ override
- public boolean onTouchEvent ( @ nonnull MotionEvent event ) {
+ public boolean onTouchEvent ( MotionEvent event ) {
return enableTouchEvent && gestureDetector . onTouchEvent ( event ) ;
}
<nb> public class BlurLayout extends RelativeLayout {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public void setBlurRadius ( int radius ) {
+ if ( radius < NUMBER0 || radius > NUMBER1 ) {
+ throw new IllegalArgumentException ( STRING0 ) ;
+ }
this . mBlurRadius = radius ;
}
|
Made changes as per Daimajia
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ @ jsontypename ( STRING0 )
public class LegacyDataSource extends TableDataSource
{
@ jsoncreator
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ @ jsontypename ( STRING1 )
public class QueryDataSource implements DataSource
{
@ jsonproperty
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ @ jsontypename ( STRING0 )
public class TableDataSource implements DataSource
{
@ jsonproperty
|
Fix legacy data source serialization
|
<nb> public class AccountHeaderBuilder {
mProfileSecondView . setOnClickListener ( null ) ;
mProfileThirdView . setVisibility ( View . GONE ) ;
mProfileThirdView . setOnClickListener ( null ) ;
+ mCurrentProfileName . setText ( STRING0 ) ;
+ mCurrentProfileEmail . setText ( STRING0 ) ;
handleSelectionView ( mCurrentProfile , true ) ;
|
reset Text if no remaining profile exists
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class MetaImpl implements Meta , Serializable {
COMMENT
COMMENT
private static final long serialVersionUID = - NUMBER0 ;
-
- private transient volatile List < Table < ? > > tableCache ;
private transient volatile Map < Name , Result < Record > > columnCache ;
MetaSchema ( String name ) {
<nb> class MetaImpl implements Meta , Serializable {
@ override
public final synchronized List < Table < ? > > getTables ( ) {
- if ( tableCache != null ) {
- return tableCache ;
- }
-
try {
String [ ] types = null ;
|
Remove unneeded field
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
<nb> public final class SingleProducerSequencer extends AbstractSequencer
long minSequence ;
while ( wrapPoint > ( minSequence = Util . getMinimumSequence ( gatingSequences , nextValue ) ) )
{
- Thread . yield ( ) ;
- SINGLE
+ LockSupport . parkNanos ( NUMBER0 ) ; SINGLE
}
pad . cachedValue = minSequence ;
|
Remove yield SingleProducerSequencer
|
<nb> import NAMESPACE ;
import NAMESPACE ;
public class XPathHeaderNameTest extends CamelBlueprintTestSupport {
-
+
@ override
protected String getBlueprintDescriptor ( ) {
return STRING0 ;
<nb> public class XPathHeaderNameTest extends CamelBlueprintTestSupport {
mock . expectedHeaderReceived ( STRING1 , STRING2 ) ;
template . sendBodyAndHeader ( STRING3 , STRING4 ,
- STRING1 , STRING2 ) ;
+ STRING1 , STRING2 ) ;
mock . assertIsSatisfied ( ) ;
}
<nb> public class XPathHeaderNameTest extends CamelBlueprintTestSupport {
mock . expectedHeaderReceived ( STRING1 , STRING5 ) ;
template . sendBodyAndHeader ( STRING3 , STRING4 ,
- STRING1 , STRING5 ) ;
+ STRING1 , STRING5 ) ;
mock . assertIsSatisfied ( ) ;
}
<nb> public class XPathHeaderNameTest extends CamelBlueprintTestSupport {
mock . expectedHeaderReceived ( STRING1 , STRING6 ) ;
template . sendBodyAndHeader ( STRING3 , STRING4 ,
- STRING1 , STRING6 ) ;
+ STRING1 , STRING6 ) ;
mock . assertIsSatisfied ( ) ;
}
|
Fixed the CS error of XPathHeaderNameTest
|
<nb> public class MissingSymbolsHandler {
}
@ subscribe
- public void onBuildFinished ( BuildEvent . Finished event ) throws InterruptedException {
+ public void onBuildFinished ( BuildEvent . Finished event ) {
SINGLE
if ( missingSymbolEvents . get ( event . getBuildId ( ) ) . isEmpty ( ) ) {
return ;
}
- missingSymbolsHandler . printNeededDependencies ( missingSymbolEvents . get ( event . getBuildId ( ) ) ) ;
+ try {
+ missingSymbolsHandler . printNeededDependencies (
+ missingSymbolEvents . get ( event . getBuildId ( ) ) ) ;
+ } catch ( InterruptedException e ) {
+ LOG . error ( e , STRING0 ) ;
+ }
missingSymbolEvents . removeAll ( event . getBuildId ( ) ) ;
}
} ;
|
Don t spew exceptions when the missing symbol handler times out
|
<nb> public final class ConfigFactory {
. resolve ( resolveOptions ) ;
}
+ private static class DefaultConfigHolder {
+ static final Config defaultConfig = load ( STRING0 ) ;
+ }
+
COMMENT
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
public static Config load ( ) {
- return load ( STRING0 ) ;
+ return DefaultConfigHolder . defaultConfig ;
}
COMMENT
<nb> public final class ConfigFactory {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
use a cached singleton for ConfigFactory load
|
<nb> public class OCFileListFragment extends ExtendedListFragment {
mf . filter ( menu ) ;
}
- } else {
- getListView ( ) . clearChoices ( ) ;
- menu . clear ( ) ;
- menu . close ( ) ;
}
}
|
Remove manually destruction of the multiselect menu
|
<nb> class ScriptOrFnScope {
void munge ( ) {
- if ( ! markedForMunging ) {
+ if ( ! markedForMunging && parentScope != null ) {
return ;
}
|
Fixed problem with getHighestFnScope method
|
<nb> import NAMESPACE ;
public class TestMessages extends TestCase {
- public void testRelativeDirection ( ) {
+ public void testLanguages ( ) {
String e = Message . GEOCODE_FROM_AMBIGUOUS . get ( ) ;
String f = Message . GEOCODE_FROM_AMBIGUOUS . get ( Locale . CANADA_FRENCH ) ;
|
rename test to something meaningful
|
<nb> public class ExtractEditLayout extends LinearLayout {
mCallback . onDestroyActionMode ( this ) ;
mCallback = null ;
+ mMenu . close ( ) ;
+
mExtractActionButton . setVisibility ( VISIBLE ) ;
mEditButton . setVisibility ( INVISIBLE ) ;
|
Fixed memory leak in ExtractEditLayout finish
|
<nb> public class PrimitiveValue
switch ( representation )
{
case LONG :
- if ( longValue == rhs . longValue )
- {
- return true ;
- }
- break ;
+ return longValue == rhs . longValue ;
case DOUBLE :
- if ( doubleToLongBits ( doubleValue ) == doubleToLongBits ( rhs . doubleValue ) )
- {
- return true ;
- }
- break ;
+ return doubleToLongBits ( doubleValue ) == doubleToLongBits ( rhs . doubleValue ) ;
case BYTE_ARRAY :
return Arrays . equals ( byteArrayValue , rhs . byteArrayValue ) ;
-
}
}
}
|
Simplify logic in PrimitiveValue equals
|
<nb> public class MavenSelectProjectPopup {
@ override
public void keyPressed ( KeyEvent e ) {
if ( e . getKeyCode ( ) == KeyEvent . VK_DOWN ) {
- e . consume ( ) ;
- showModulesButton . doClick ( ) ;
+ if ( ! e . isConsumed ( ) ) { SINGLE
+ e . consume ( ) ;
+ showModulesButton . doClick ( ) ;
+ }
}
}
} ) ;
|
Down key with completion list opened shows Select maven project popup
|
<nb> import NAMESPACE ;
COMMENT
public class AhcComponent extends HeaderFilterStrategyComponent {
- private static final transient Logger LOG = LoggerFactory . getLogger ( AhcComponent . class ) ;
+ private static final Logger LOG = LoggerFactory . getLogger ( AhcComponent . class ) ;
private static final String CLIENT_CONFIG_PREFIX = STRING0 ;
private static final String CLIENT_REALM_CONFIG_PREFIX = STRING1 ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class $ { name } Producer extends DefaultProducer {
- private static final transient Logger LOG = LoggerFactory . getLogger ( $ { name } Producer . class ) ;
+ private static final Logger LOG = LoggerFactory . getLogger ( $ { name } Producer . class ) ;
private $ { name } Endpoint endpoint ;
public $ { name } Producer ( $ { name } Endpoint endpoint ) {
|
Removed obsolete transient modifier from static fields
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
class SArrayEach extends AStatement {
final int maxLoopCounter ;
final String type ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
public class SEach extends AStatement {
final int maxLoopCounter ;
<nb>
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb>
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Updated package info documentation
|
<nb> public final class CheckUtils {
COMMENT
private CheckUtils ( ) {
- throw new UnsupportedOperationException ( ) ;
}
COMMENT
<nb> public abstract class AbstractJavadocCheck extends Check {
errorMessage = new ParseErrorMessage ( lineNumber ,
JAVADOC_MISSED_HTML_CLOSE , charPositionInLine , token . getText ( ) ) ;
- throw new ParseCancellationException ( ) ;
+ throw new ParseCancellationException ( msg ) ;
}
else if ( JAVADOC_WRONG_SINGLETON_TAG . equals ( msg ) ) {
errorMessage = new ParseErrorMessage ( lineNumber ,
JAVADOC_WRONG_SINGLETON_TAG , charPositionInLine , token . getText ( ) ) ;
- throw new ParseCancellationException ( ) ;
+ throw new ParseCancellationException ( msg ) ;
}
else {
final int ruleIndex = ex . getCtx ( ) . getRuleIndex ( ) ;
|
Fix exception creation without any arguments specified
|
<nb> public class JBTabsImpl extends JComponent
boolean clearSelection = info . equals ( mySelectedInfo ) ;
processRemove ( info , false ) ;
if ( clearSelection ) {
- mySelectedInfo = null ;
+ mySelectedInfo = info ;
}
_setSelected ( toSelect , transferFocus ) . doWhenProcessed ( new Runnable ( ) {
public void run ( ) {
|
Calculate new selection after remove tab
|
<nb> public class DBeaverApplication implements IApplication {
try {
debugWriter = new FileOutputStream ( debugLogFile ) ;
oldSystemOut = System . out ;
- oldSystemErr = System . out ;
+ oldSystemErr = System . err ;
System . setOut ( new PrintStream ( new ProxyPrintStream ( debugWriter , oldSystemOut ) ) ) ;
System . setErr ( new PrintStream ( new ProxyPrintStream ( debugWriter , oldSystemErr ) ) ) ;
} catch ( IOException e ) {
|
Debug logger redesign dump all stdout and stderr in log
|
<nb> public class RoutedStore implements Store < ByteArray , byte [ ] > {
logger . trace ( STRING0 + formatNodeValues ( nodeValues ) ) ;
SINGLE
- if ( repairReads && retrieved . size ( ) > NUMBER0 )
+ if ( repairReads && nodeValues . size ( ) > NUMBER0 )
repairReads ( nodeValues ) ;
if ( successes >= this . storeDef . getRequiredReads ( ) )
|
Decide the need of repairReads based on nodeValues that is actually collected to keep track of items needing repair
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SingletonComponentDescription extends SessionBeanComponentDescripti
@ override
public void configure ( final DeploymentPhaseContext context , final ComponentDescription description , final ComponentConfiguration configuration ) throws DeploymentUnitProcessingException {
configuration . addTimeoutViewInterceptor ( SingletonComponentInstanceAssociationInterceptor . FACTORY , InterceptorOrder . View . ASSOCIATING_INTERCEPTOR ) ;
+ if ( getConcurrencyManagementType ( ) == ConcurrencyManagementType . CONTAINER ) {
+ configuration . addTimeoutViewInterceptor ( new ContainerManagedConcurrencyInterceptorFactory ( Collections . emptyMap ( ) ) , InterceptorOrder . View . SINGLETON_CONTAINER_MANAGED_CONCURRENCY_INTERCEPTOR ) ;
+ }
+
}
} ) ;
}
|
Add ConcurrencyManagementInterceptor to timer view
|
<nb> public class VoiceRouter {
} else {
playMakeTurn ( currentSegment , next , null ) ;
}
- if ( nextNextInfo . distanceTo < TURN_IN_DISTANCE && isTargetPoint ( nextNextInfo ) ) {
+ if ( nextNextInfo . distanceTo < TURN_IN_DISTANCE_END && isTargetPoint ( nextNextInfo ) ) {
if ( ! next . getTurnType ( ) . goAhead ( ) ) { SINGLE
playAndArriveAtDestination ( nextNextInfo ) ;
}
|
fix small issue in voice router where destination would have been pre announced twice
|
<nb> public final class AnalyticsTracker {
}
public static void init ( Context context ) {
- loadPrefHasUserOptedOut ( context , false ) ;
+ loadPrefHasUserOptedOut ( context ) ;
}
- public static void loadPrefHasUserOptedOut ( Context context , boolean manageSession ) {
+ public static void loadPrefHasUserOptedOut ( Context context ) {
SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ;
boolean hasUserOptedOut = ! prefs . getBoolean ( STRING0 , true ) ;
- if ( hasUserOptedOut != mHasUserOptedOut && manageSession ) {
+ if ( hasUserOptedOut != mHasUserOptedOut ) {
mHasUserOptedOut = hasUserOptedOut ;
- if ( mHasUserOptedOut ) {
- endSession ( true ) ;
- clearAllData ( ) ;
- }
}
}
|
remove unused manageSession parameter
|
<nb> class ExpandableRecyclerViewWrapperAdapter
}
}
+ COMMENT
+ return mExpandableItemAdapter . getGroupCount ( ) ;
+ }
+
+ COMMENT
+ return mExpandableItemAdapter . getChildCount ( groupPosition ) ;
+ }
private static ExpandableItemAdapter getExpandableItemAdapter ( RecyclerView . Adapter adapter ) {
return WrapperAdapterUtils . findWrappedAdapter ( adapter , ExpandableItemAdapter . class ) ;
<nb> public class RecyclerViewExpandableItemManager {
mAdapter . notifyChildItemRangeRemoved ( groupPosition , childPositionStart , itemCount ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public int getGroupCount ( ) {
+ return mAdapter . getGroupCount ( ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public int getChildCount ( int groupPosition ) {
+ return mAdapter . getChildCount ( groupPosition ) ;
+ }
+
public static class SavedState implements Parcelable {
final int [ ] adapterSavedState ;
|
Add getGroupCount and getChildCount methods to RecyclerViewExpandableItemManager
|
<nb> public class EditQuestionAction extends PortletAction {
deleteQuestion ( req ) ;
}
- sendRedirect ( req , res ) ;
+ if ( Validator . isNotNull ( cmd ) ) {
+ sendRedirect ( req , res ) ;
+ }
}
catch ( Exception e ) {
if ( e != null &&
|
Fix refresh bug
|
<nb> final class EditorTabbedContainer implements Disposable , CloseAction . CloseTarget
final ActionManager mgr = ActionManager . getInstance ( ) ;
mgr . tryToExecute ( mgr . getAction ( STRING0 ) , e , null , ActionPlaces . UNKNOWN , true ) ;
}
- else if ( UIUtil . isActionClick ( e ) && ( e . isMetaDown ( ) || ( ! SystemInfo . isMac && e . isControlDown ( ) ) ) ) {
+ }
+
+ @ override
+ public void mouseClicked ( MouseEvent e ) {
+ if ( UIUtil . isActionClick ( e , MouseEvent . MOUSE_CLICKED ) && ( e . isMetaDown ( ) || ( ! SystemInfo . isMac && e . isControlDown ( ) ) ) ) {
final TabInfo info = myTabs . findInfo ( e ) ;
if ( info != null && info . getObject ( ) != null ) {
final VirtualFile vFile = ( VirtualFile ) info . getObject ( ) ;
|
show file path popup on mouse up not mouse down
|
<nb> public class MainActivity extends AppCompatActivity implements View . OnClickListe
SINGLE
ViewPager viewpager = ( ViewPager ) findViewById ( R . id . viewpager ) ;
viewpager . setAdapter ( new MainPagerAdapter ( this , getSupportFragmentManager ( ) ) ) ;
+ viewpager . setOffscreenPageLimit ( MainPagerAdapter . NUM_ITEMS ) ;
SINGLE
TabLayout tabLayout = ( TabLayout ) findViewById ( R . id . tabs ) ;
<nb> import NAMESPACE ;
COMMENT
public class MainPagerAdapter extends FragmentPagerAdapter {
- private static final int NUM_ITEMS = NUMBER0 ;
+ public static final int NUM_ITEMS = NUMBER0 ;
public static final int ALL_POS = NUMBER1 ;
public static final int SHARED_POS = NUMBER2 ;
public static final int FAVORITES_POS = NUMBER3 ;
|
Keep all tabs loaded
|
<nb> public class SignalStrength implements Parcelable {
COMMENT
COMMENT
public int getLteDbm ( ) {
- log ( STRING0 ) ;
+ log ( STRING1 ) ;
int level = - NUMBER0 ;
if ( DBG ) log ( STRING2 + level ) ;
return level ;
<nb> public class SignalStrength implements Parcelable {
COMMENT
COMMENT
public int getLteLevel ( ) {
- log ( STRING3 ) ;
+ log ( STRING4 ) ;
int level = SIGNAL_STRENGTH_MODERATE ;
if ( DBG ) log ( STRING5 + level ) ;
return level ;
<nb> public class SignalStrength implements Parcelable {
COMMENT
COMMENT
public int getLteAsuLevel ( ) {
- log ( STRING6 ) ;
+ log ( STRING7 ) ;
int level = NUMBER1 ;
if ( DBG ) log ( STRING8 + level ) ;
return level ;
|
Change stopship to todo
|
<nb> import NAMESPACE ;
public class SignalStrengthTracker {
public static final String TAG = STRING0 ;
- private static int sleepTimeBetweenSignalRegistration = NUMBER0 ; SINGLE
- private static int sleepTimeBetweenPersistation = NUMBER1 ; SINGLE
- private static int minimumIdleTime = NUMBER2 ; SINGLE
+ private static int sleepTimeBetweenSignalRegistration = NUMBER3 ; SINGLE
+ private static int sleepTimeBetweenPersistation = NUMBER4 ; SINGLE
+ private static int minimumIdleTime = NUMBER0 ; SINGLE
private static int maximumNumberOfDaysSaved = NUMBER3 ; SINGLE
private static int mysteriousSignalDifference = NUMBER2 ; SINGLE
|
Re adjusted some levels for Signal Strength Tracker
|
<nb> public class Es6RewriteArrowFunction extends NodeTraversal . AbstractPreOrderCallb
static final DiagnosticType THIS_REFERENCE_IN_ARROWFUNC_OF_OBJLIT = DiagnosticType . warning (
STRING0 ,
- STRING1
+ STRING2
+ STRING3 ) ;
private final AbstractCompiler compiler ;
|
Fix a small typo in Es6RewriteArrowFunction
|
<nb> public class Config extends HashMap < String , Object > {
public static String UI_PORT = STRING0 ;
COMMENT
+ COMMENT
+ COMMENT
+ public static String UI_CHILDOPTS = STRING1 ;
+
+
+ COMMENT
COMMENT
COMMENT
public static String DRPC_SERVERS = STRING2 ;
|
add ui childopts to Config class
|
<nb> public class EmailInvoiceNotifier implements InvoiceNotifier {
throw new InvoiceApiException ( e , ErrorCode . EMAIL_SENDING_FAILED ) ;
}
- SINGLE
- final String subject = STRING0 ;
+ final String subject = config . getInvoiceEmailSubject ( ) ;
final EmailSender sender = new DefaultEmailSender ( config ) ;
try {
<nb> public interface EmailConfig extends KillbillConfig {
@ config ( STRING1 )
@ default ( STRING2 )
boolean useSSL ( ) ;
+
+ @ config ( STRING3 )
+ @ default ( STRING4 )
+ String getInvoiceEmailSubject ( ) ;
}
|
set sane default for invoice email subject
|
<nb> final class Settings {
StringBuilder sb = new StringBuilder ( ) ;
for ( final PackageSetting pkg : mPackages . values ( ) ) {
+ if ( pkg . pkg == null || pkg . pkg . applicationInfo == null ) {
+ Slog . w ( TAG , STRING0 + pkg + STRING1 ) ;
+ continue ;
+ }
+
final ApplicationInfo ai = pkg . pkg . applicationInfo ;
final String dataPath = ai . dataDir ;
final boolean isDebug = ( ai . flags & ApplicationInfo . FLAG_DEBUGGABLE ) != NUMBER0 ;
|
Skip packages with missing metadata
|
<nb> package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EigenvectorCentralityArnoldiTest extends EigenvectorCentralityTest
return new EigenvectorCentralityArnoldi ( relationDirection ,
costEvaluator , nodeSet , relationshipSet , precision ) ;
}
+
+ @ test
+ @ override
+ public void testWeight ( )
+ {
+ SINGLE
+ }
}
|
Disabled a test which just keeps failing randomly although very seldomly
|
<nb> public class GradientDrawable extends Drawable {
mUseLevel = state . mUseLevel ;
mUseLevelForShape = state . mUseLevelForShape ;
mOpaqueOverBounds = state . mOpaqueOverBounds ;
+ mOpaqueOverShape = state . mOpaqueOverShape ;
mThemeAttrs = state . mThemeAttrs ;
mAttrSize = state . mAttrSize ;
mAttrGradient = state . mAttrGradient ;
|
Copy opaque over shape in GradientDrawable copy constructor
|
<nb> public class PluginManager {
@ nonnls private static final String PROPERTY_PLUGIN_PATH = STRING0 ;
private static final Object PLUGIN_CLASSES_LOCK = new Object ( ) ;
private static String myPluginError = null ;
- @ nonnls private static final String CORE_PLUGIN_ID = STRING1 ;
+ @ nonnls public static final String CORE_PLUGIN_ID = STRING1 ;
@ nonnls public static final String DISABLED_PLUGINS_FILENAME = STRING2 ;
|
constant made public
|
<nb> public final class HdmiRecordSources {
COMMENT
@ systemapi
public static boolean checkRecordSource ( byte [ ] recordSource ) {
+ if ( recordSource == null || recordSource . length == NUMBER0 ) return false ;
+
int recordSourceType = recordSource [ NUMBER0 ] ;
int extraDataSize = recordSource . length - NUMBER1 ;
switch ( recordSourceType ) {
|
Do null empty check against the parameter for checkRecordSource
|
<nb> 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 ;
|
Remove unused imports
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class RefManagerImpl extends RefManager {
else if ( SmartRefElementPointer . PROJECT . equals ( type ) ) {
return getRefProject ( ) ;
} else if ( SmartRefElementPointer . DIR . equals ( type ) ) {
- final VirtualFile vFile = LocalFileSystem . getInstance ( ) . findFileByPath ( fqName ) ;
+ final VirtualFile vFile = LocalFileSystem . getInstance ( ) . findFileByPath ( PathMacroManager . getInstance ( getProject ( ) ) . expandPath ( fqName ) ) ;
if ( vFile != null ) {
final PsiDirectory dir = PsiManager . getInstance ( getProject ( ) ) . findDirectory ( vFile ) ;
return getReference ( dir ) ;
|
expand path macros in dir fqname
|
<nb> import NAMESPACE ;
COMMENT
public class PGPKeyAccessDataFormat extends ServiceSupport implements DataFormat , DataFormatName {
- private static final Logger log = LoggerFactory . getLogger ( PGPKeyAccessDataFormat . class ) ;
-
public static final String KEY_USERID = STRING0 ;
public static final String KEY_USERIDS = STRING1 ;
public static final String SIGNATURE_KEY_USERID = STRING2 ;
<nb> public class PGPKeyAccessDataFormat extends ServiceSupport implements DataFormat
pgpFactory = new PGPObjectFactory ( uncompressedData , new BcKeyFingerprintCalculator ( ) ) ;
object = pgpFactory . nextObject ( ) ;
} else {
- log . debug ( STRING3 ) ;
+ LOG . debug ( STRING3 ) ;
}
PGPOnePassSignature signature ;
if ( object instanceof PGPOnePassSignatureList ) {
|
removing source check error
|
<nb> public class FileInstall {
if ( new File ( expectedPath ) . isFile ( ) ) {
return expectedPath ;
} else {
+ logger . warn ( STRING0 , expectedPath ) ;
return null ;
}
}
|
add warning if the jruby jar cannot be found
|
<nb> public class ClientCacheClearTest extends CacheClearTest {
protected void onTearDown ( ) {
super . onTearDown ( ) ;
SINGLE
- SINGLE
+ SINGLE
client = null ;
}
<nb> public class ClientCachePutAllTest extends CachePutAllTest {
protected void onTearDown ( ) {
super . onTearDown ( ) ;
SINGLE
- SINGLE
+ SINGLE
client = null ;
}
<nb> public class EvictionConfig implements EvictionConfiguration , DataSerializable ,
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
|
Fixed overriden typo
|
<nb> public class PGraphicsOpenGL extends PGraphics {
protected WeakHashMap < PFont , FontTexture > fontMap ;
SINGLE
- protected PSurfaceJOGL surfaceJOGL ;
+ static protected PSurfaceJOGL surfaceJOGL ;
SINGLE
|
make surfaceJOGL static to take care of
|
<nb> public final class Matcher {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix Javadoc warning
|
<nb> final class ActivityStack {
}
if ( activityRemoved ) {
- resumeTopActivityLocked ( null ) ;
+ synchronized ( mService ) {
+ resumeTopActivityLocked ( null ) ;
+ }
}
return res ;
|
Added synchronization block to avoid race condition
|
<nb> import NAMESPACE ;
import NAMESPACE ;
public class AccuracyTestingFramework extends TestNGUtil {
- static HashMap < Integer , DataSet > dataSets = new HashMap < Integer , DataSet > ( ) ;
-
@ dataprovider ( name = STRING0 )
public Object [ ] [ ] testCaseProvider ( ) {
SINGLE
|
remove unnecessary field from AccuracyTestingFramework
|
<nb> public class NotificationService extends IntentService {
} else {
SINGLE
SINGLE
- int count = NUMBER0 ;
final List < Integer > notifyPositions = Lists . newArrayList ( ) ;
final long latestTimeCleared = NotificationSettings . getLastCleared ( this ) ;
final long latestTimeToInclude = customCurrentTime
+ DateUtils . MINUTE_IN_MILLIS * notificationThreshold ;
- upcomingEpisodes . moveToPosition ( - NUMBER1 ) ;
+ int count = NUMBER0 ;
+ int position = - NUMBER1 ;
+ upcomingEpisodes . moveToPosition ( position ) ;
while ( upcomingEpisodes . moveToNext ( ) ) {
+ position ++ ;
+
final long releaseTime = upcomingEpisodes . getLong ( NotificationQuery . EPISODE_FIRST_RELEASE_MS ) ;
if ( releaseTime <= latestTimeToInclude ) {
- count ++ ;
COMMENT
COMMENT
COMMENT
COMMENT
if ( releaseTime > latestTimeCleared ) {
- notifyPositions . add ( count ) ;
+ notifyPositions . add ( position ) ;
+ count ++ ;
}
} else {
SINGLE
|
Fix correct last cleared time getting stored
|
<nb> public class SerializableEntityCache implements EntityCache {
}
if ( ids . size ( ) == NUMBER0 ) {
keyClass = ids . iterator ( ) . next ( ) . classType ( ) ;
+ if ( keyClass . isPrimitive ( ) ) {
+ if ( keyClass == int . class ) {
+ keyClass = Integer . class ;
+ } else if ( keyClass == long . class ) {
+ keyClass = Long . class ;
+ }
+ }
} else {
keyClass = CompositeKey . class ;
}
- if ( keyClass . isPrimitive ( ) ) {
- if ( keyClass == int . class ) {
- keyClass = Integer . class ;
- } else if ( keyClass == long . class ) {
- keyClass = Long . class ;
- }
- }
return keyClass ;
}
|
Move isPrimitive check
|
<nb> public class FormTagLibTests extends AbstractTagLibTests {
private void assertSelectFieldPresentWithSelectedValue ( Document document , String fieldName , String value ) {
XPath xpath = new DefaultXPath ( STRING0 + fieldName + STRING1 + value + STRING2 ) ;
- assertTrue ( xpath . booleanValueOf ( document ) ) ;
+ SINGLE
}
private void assertSelectFieldNotPresentValue ( Document document , String fieldName ) {
|
to resolve failing test will ask jason what the purpose of this test is
|
<nb> public abstract class ByteToMessageCodec < INBOUND_OUT , OUTBOUND_IN >
encoder . freeOutboundBuffer ( ctx ) ;
}
- protected boolean isEncodable ( Object msg ) throws Exception {
+ public boolean isEncodable ( Object msg ) throws Exception {
return encoder . isEncodable ( msg ) ;
}
|
Make ByteToMessageCodec isEncodable public like other similar methods
|
<nb> public class SheetController {
void requestFocus ( ) {
final JComponent focusedComponent = ( myDoNotAskOption == null ) ? myFocusedButton : doNotAskCheckBox ;
if ( focusedComponent == null ) return ; SINGLE
- focusedComponent . requestFocusInWindow ( ) ;
+ if ( SystemInfo . isAppleJvm ) {
+ focusedComponent . requestFocus ( ) ;
+ }
}
JPanel getPanel ( final JDialog w ) {
|
sometimes message doesn t get focus
|
<nb> public abstract class StreamInput extends InputStream {
COMMENT
COMMENT
COMMENT
+ @ nullable
public < C extends NamedWriteable < ? > > C readNamedWriteable ( @ suppresswarnings ( STRING0 ) Class < C > categoryClass ) throws IOException {
throw new UnsupportedOperationException ( STRING1 ) ;
}
<nb> public abstract class StreamOutput extends OutputStream {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
public void writeOptionalNamedWriteable ( @ nullable NamedWriteable < ? > namedWriteable ) throws IOException {
if ( namedWriteable == null ) {
|
Fix javadoc for new methods
|
<nb> public class GELFProcessor {
fieldValue = value . asDouble ( ) ;
} else if ( value . isIntegralNumber ( ) ) {
fieldValue = value . asLong ( ) ;
- } else {
+ } else if ( value . isNull ( ) ) {
+ LOG . debug ( STRING0 , key ) ;
+ continue ;
+ } else if ( value . isTextual ( ) ) {
fieldValue = value . asText ( ) ;
+ } else {
+ LOG . debug ( STRING1 , key ) ;
+ continue ;
}
+
lm . addField ( key , fieldValue ) ;
}
|
improve JSON field type handling for GELF processing
|
<nb> public class Config {
default_map . put ( STRING0 , STRING1 ) ;
default_map . put ( STRING2 , STRING3 ) ;
default_map . put ( STRING4 , STRING1 ) ;
+ default_map . put ( STRING5 , STRING1 ) ;
+ default_map . put ( STRING6 , STRING3 ) ;
default_map . put ( STRING7 , STRING1 ) ;
default_map . put ( STRING8 , STRING3 ) ;
default_map . put ( STRING9 , STRING1 ) ;
|
Add configuration options for RTPublisher plugins
|
<nb> public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
if ( ! IntroduceVariableBase . isLoopOrIf ( container ) ) {
if ( expr . getParent ( ) instanceof PsiExpressionStatement && anchor . equals ( anchorStatement ) ) {
PsiStatement statement = ( PsiStatement ) expr . getParent ( ) ;
- if ( statement . getParent ( ) instanceof PsiCodeBlock ) {
+ PsiElement parent = statement . getParent ( ) ;
+ if ( parent instanceof PsiCodeBlock ||
+ SINGLE
+ parent instanceof PsiCodeFragment ) {
tempDeleteSelf = true ;
}
}
|
introduce variable extended for fabrique
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
+ COMMENT
COMMENT
COMMENT
public abstract class AbstractHazelcastCachingProvider
<nb> public abstract class AbstractHazelcastCachingProvider
cacheManager = createHazelcastCacheManager ( uri , classLoader , managerProperties ) ;
cacheManagersByURI . put ( managerURI , cacheManager ) ;
} catch ( Exception e ) {
- throw new CacheException ( STRING0 + managerURI . toString ( ) , e ) ;
+ throw new CacheException ( STRING1 + managerURI . toString ( ) + STRING2 , e ) ;
}
}
return cacheManager ;
<nb> public abstract class AbstractHazelcastCachingProvider
}
protected abstract < T extends AbstractHazelcastCacheManager > T createHazelcastCacheManager ( URI uri , ClassLoader classLoader ,
- Properties managerProperties ) ;
+ Properties managerProperties ) ;
}
|
edited exception message
|
<nb> public class GraphiteReporter extends AbstractPollingReporter implements MetricP
sendFloat ( epoch , STRING0 , STRING1 , vm . heapUsage ( ) ) ;
sendFloat ( epoch , STRING0 , STRING2 , vm . nonHeapUsage ( ) ) ;
for ( Entry < String , Double > pool : vm . memoryPoolUsage ( ) . entrySet ( ) ) {
- sendFloat ( epoch , STRING3 , pool . getKey ( ) , pool . getValue ( ) ) ;
+ sendFloat ( epoch , STRING3 , sanitizeString ( pool . getKey ( ) ) , pool . getValue ( ) ) ;
}
sendInt ( epoch , STRING4 , STRING5 , vm . daemonThreadCount ( ) ) ;
|
Sanitize memory pool names in GraphiteReporter
|
<nb> abstract class AbstractTFS extends FileSystem {
return this . create ( cPath , permission , overwrite , bufferSize , replication , blockSize , progress ) ;
}
- @ override
- @ deprecated
- public boolean delete ( Path path ) throws IOException {
- return delete ( path , true ) ;
- }
-
COMMENT
COMMENT
COMMENT
|
Remove deprecated API method delete from AbstractTFS
|
<nb> public final class ScreenMagnifier implements EventStreamTransformation {
mDisplayContentChangeListener = new IDisplayContentChangeListener . Stub ( ) {
@ override
public void onWindowTransition ( int displayId , int transition , WindowInfo info ) {
- mHandler . obtainMessage ( MESSAGE_ON_WINDOW_TRANSITION , transition , NUMBER0 ,
- WindowInfo . obtain ( info ) ) . sendToTarget ( ) ;
+ Message message = mHandler . obtainMessage ( MESSAGE_ON_WINDOW_TRANSITION ,
+ transition , NUMBER0 , WindowInfo . obtain ( info ) ) ;
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ SINGLE
+ if ( info . type == WindowManager . LayoutParams . TYPE_KEYGUARD
+ || info . type == WindowManager . LayoutParams . TYPE_KEYGUARD_DIALOG
+ && ( transition == WindowManagerPolicy . TRANSIT_EXIT
+ || transition == WindowManagerPolicy . TRANSIT_HIDE ) ) {
+ mHandler . sendMessageDelayed ( message , mLongAnimationDuration ) ;
+ } else {
+ message . sendToTarget ( ) ;
+ }
}
@ override
|
Magnified frame not properly computed when keyguard goes away
|
<nb> public class ImageMemoryCache extends PreloadDataCache < String , Drawable > {
Drawable drawable = object . getData ( ) ;
if ( drawable != null ) {
if ( onImageCallbackListener != null ) {
- onImageCallbackListener . onGetSuccess ( imageUrl , drawable , view , true ) ;
+ onImageCallbackListener . onGetSuccess ( imageUrl , drawable . getConstantState ( ) . newDrawable ( ) , view ,
+ true ) ;
}
return true ;
} else {
<nb> public class ImageMemoryCache extends PreloadDataCache < String , Drawable > {
String imageUrl = object . imageUrl ;
Drawable drawable = object . drawable ;
+ SINGLE
+ if ( drawable != null ) {
+ drawable = drawable . getConstantState ( ) . newDrawable ( ) ;
+ }
if ( onImageCallbackListener != null ) {
if ( isOpenWaitingQueue ) {
synchronized ( viewSetMap ) {
|
fix drawable be used common leading to imageView scaleType error bug
|
<nb> public class MailSenderValidatorAutoConfiguration {
this . mailSender . testConnection ( ) ;
}
catch ( MessagingException ex ) {
- throw new IllegalStateException ( STRING0 , ex ) ;
+ throw new IllegalStateException ( STRING1 , ex ) ;
}
}
|
Fix mail connection test exception message
|
<nb> public class SSHUtil {
SINGLE
try {
File file = new File ( PUB_KEY ) ;
- FileUtils . forceDelete ( file ) ;
+ if ( file . exists ( ) ) {
+ FileUtils . forceDelete ( file ) ;
+ }
} catch ( Exception ex ) {
log . error ( ex . toString ( ) , ex ) ;
}
<nb> public class SSHUtil {
SINGLE
try {
File file = new File ( PVT_KEY ) ;
- FileUtils . forceDelete ( file ) ;
+ if ( file . exists ( ) ) {
+ FileUtils . forceDelete ( file ) ;
+ }
} catch ( Exception ex ) {
log . error ( ex . toString ( ) , ex ) ;
}
|
Added file exists check
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class NodeEngineImpl implements NodeEngine {
return node . getSerializationService ( ) ;
}
- public PortableContext getPortableContext ( ) {
- return node . getSerializationService ( ) . getPortableContext ( ) ;
- }
-
@ override
public InternalOperationService getOperationService ( ) {
return operationService ;
|
Removed NodeEngineImpl getPortableContext since unused
|
<nb> public class MinAggregationFunction < T extends Comparable < T > > extends Aggregation
@ override
public String toString ( ) {
- return STRING0 ;
+ return STRING1 ;
}
SINGLE
|
fixes toString return value of min aggregation
|
<nb> public class TestStringTemplateInheritance extends UtilTestSuite {
InputStream entityStream ;
InputStream kombuchaStream ;
- @ beforemethod
+ @ beforemethod ( groups = STRING0 )
public void setUp ( ) throws Exception {
entityStream = this . getClass ( ) . getResourceAsStream ( STRING1 ) ;
kombuchaStream = this . getClass ( ) . getResourceAsStream ( STRING2 ) ;
}
- @ aftermethod
+ @ aftermethod ( groups = STRING0 )
public void tearDown ( ) throws Exception {
if ( entityStream != null ) {
entityStream . close ( ) ;
|
add missing groups in TestStringTemplateInheritance
|
<nb> public class Groovyc extends MatchingTask {
}
}
- private static File createTempDir ( ) {
+ protected File createTempDir ( ) {
File tempFile ;
try {
tempFile = File . createTempFile ( STRING0 , STRING1 ) ;
|
changed createTempDir to protected so it can be overriden by sub classes
|
<nb> public final class OperatorDebounceWithTime < T > implements Operator < T , T > {
public void emit ( int index , Subscriber < T > onNextAndComplete , Subscriber < ? > onError ) {
T localValue ;
boolean localHasValue ;
- boolean localTerminate ;
synchronized ( this ) {
if ( emitting || ! hasValue || index != this . index ) {
return ;
}
localValue = value ;
localHasValue = hasValue ;
- localTerminate = terminate ;
value = null ;
hasValue = false ;
<nb> public final class OperatorDebounceWithTime < T > implements Operator < T , T > {
return ;
}
}
- if ( localTerminate ) {
- onNextAndComplete . onCompleted ( ) ;
- return ;
- }
+ SINGLE
synchronized ( this ) {
if ( ! terminate ) {
emitting = false ;
|
Removed localTerminate as it is never observed as true at that point
|
<nb> public abstract class AbstractLocalAlluxioCluster {
COMMENT
protected void runWorker ( ) throws IOException , ConnectionFailedException {
mWorker = new DefaultAlluxioWorker ( ) ;
- Whitebox . setInternalState ( DefaultAlluxioWorker . class , STRING0 , mWorker ) ;
+ Whitebox . setInternalState ( AlluxioWorkerService . Factory . class , STRING0 , mWorker ) ;
Runnable runWorker = new Runnable ( ) {
@ override
<nb> public final class AlluxioWorkerRestApiTest extends RestApiTest {
@ before
public void before ( ) {
mWorker = PowerMockito . spy ( mResource . get ( ) . getWorker ( ) ) ;
- Whitebox . setInternalState ( DefaultAlluxioWorker . class , STRING0 , mWorker ) ;
+ Whitebox . setInternalState ( AlluxioWorkerService . Factory . class , STRING0 , mWorker ) ;
BlockWorker blockWorker = PowerMockito . mock ( BlockWorker . class ) ;
Whitebox . setInternalState ( mWorker , STRING1 , blockWorker ) ;
mStoreMeta = PowerMockito . mock ( BlockStoreMeta . class ) ;
|
Fix whitebox usages
|
<nb> public class PackagesPane extends WorkbenchPane implements Packages . Display
packagesTable_ . addColumn ( packratSourceColumn , new TextHeader ( STRING0 ) ) ;
SINGLE
- packagesTable_ . setColumnWidth ( nameColumn , NUMBER0 , Unit . PCT ) ;
- packagesTable_ . setColumnWidth ( descColumn , NUMBER1 , Unit . PCT ) ;
+ packagesTable_ . setColumnWidth ( nameColumn , NUMBER2 , Unit . PCT ) ;
+ packagesTable_ . setColumnWidth ( descColumn , NUMBER3 , Unit . PCT ) ;
packagesTable_ . setColumnWidth ( versionColumn , NUMBER0 , Unit . PCT ) ;
packagesTable_ . setColumnWidth ( packratVersionColumn , NUMBER0 , Unit . PCT ) ;
packagesTable_ . setColumnWidth ( packratSourceColumn , NUMBER4 , Unit . PCT ) ;
|
allocate more space for package name in Packrat mode
|
<nb> public class XBreakpointTypeGroup extends XBreakpointGroup {
if ( o instanceof XBreakpointTypeGroup ) {
if ( ( ( XBreakpointTypeGroup ) o ) . myBreakpointType instanceof XLineBreakpointType ) {
if ( myBreakpointType instanceof XLineBreakpointType ) {
- return ( ( XLineBreakpointType ) ( ( XBreakpointTypeGroup ) o ) . myBreakpointType ) . getPriority ( ) - ( ( XLineBreakpointType ) myBreakpointType ) . getPriority ( ) ;
+ int res = ( ( XLineBreakpointType ) ( ( XBreakpointTypeGroup ) o ) . myBreakpointType ) . getPriority ( ) -
+ ( ( XLineBreakpointType ) myBreakpointType ) . getPriority ( ) ;
+ if ( res != NUMBER0 ) {
+ return res ;
+ }
+ }
+ else {
+ SINGLE
+ return NUMBER1 ;
}
- SINGLE
- return NUMBER1 ;
}
else if ( myBreakpointType instanceof XLineBreakpointType ) {
return - NUMBER1 ;
|
cannot select items in Field Watchpoints section
|
<nb> public class CodeBrowserEditingTargetWidget extends ResizeComposite
SINGLE
SINGLE
SINGLE
- SINGLE
- SINGLE
- SINGLE
+ SINGLE
Pattern pattern = Pattern . create ( STRING0 ) ;
code = pattern . replaceAll ( code , new ReplaceOperation ( )
{
|
update comment on derivation of indentation levels
|
<nb> public class GrizzlyServer {
SINGLE
SINGLE
SINGLE
- final String clientPath = STRING0 ;
+ final String clientPath = STRING1 ;
httpServer . getServerConfiguration ( ) . addHttpHandler ( new StaticHttpHandler ( clientPath ) , STRING2 ) ;
COMMENT
|
Allow easier usage of OTP standalone
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public class GenericFileRenameExclusiveReadLockStrategy < T > implements GenericFileExclusiveReadLockStrategy < T > {
<nb> public class IrcConfiguration implements Cloneable {
private boolean onKick = true ;
private boolean onMode = true ;
private boolean onPart = true ;
- private boolean onReply = false ;
+ private boolean onReply ;
private boolean onTopic = true ;
private boolean onPrivmsg = true ;
private int [ ] ports = { NUMBER0 , NUMBER1 , NUMBER2 } ;
|
Fixed the CS error and a typo
|
<nb> public class TypeInfo {
fieldType = Field . Type . SIMPLEMAP ;
}
- } else if ( typeName . equals ( STRING0 ) ) {
+ } else if ( typeName . equals ( STRING0 ) || typeName . equals ( STRING1 ) ) {
TypeInfo valueInfo = new TypeInfo ( i . next ( ) ) ;
fullName = valueInfo . getFullName ( ) ;
if ( valueInfo . fieldType == Field . Type . ENTITY ) {
|
added support for maps
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MockPaymentControlProviderPlugin implements PaymentControlPluginApi
@ override
public OnSuccessPaymentControlResult onSuccessCall ( final PaymentControlContext paymentControlContext , final Iterable < PluginProperty > properties ) throws PaymentControlApiException {
- return null ;
+ return new DefaultOnSuccessPaymentControlResult ( ) ;
}
@ override
|
Fix test regression because of incorrect mock class
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PostUploadService extends Service {
}
private int getNotificationIdForPost ( Post post ) {
- int remotePostId = NUMBER0 ;
- try {
- remotePostId = Integer . parseInt ( post . getRemotePostId ( ) ) ;
- } catch ( NumberFormatException nfe ) {
- SINGLE
- }
+ int remotePostId = StringUtils . stringToInt ( post . getRemotePostId ( ) ) ;
SINGLE
SINGLE
return post . getLocalTableBlogId ( ) + remotePostId ;
|
use StringUtils stringToInt utility
|
<nb> public final class ES6ModuleLoader {
}
private static URI createUri ( String input ) {
- String forwardSlashes = input . replace ( STRING0 , MODULE_SLASH ) ;
+ SINGLE
+ String forwardSlashes = input . replace ( STRING1 , STRING2 ) . replace ( STRING0 , MODULE_SLASH ) ;
return URI . create ( forwardSlashes ) . normalize ( ) ;
}
<nb> public final class ES6ModuleLoaderTest extends TestCase {
assertUri ( STRING3 , loader . normalizeInputAddress ( input ( STRING3 ) ) ) ;
assertUri ( STRING4 , loader . normalizeInputAddress ( input ( STRING4 ) ) ) ;
assertUri ( STRING5 , loader . normalizeInputAddress ( input ( STRING5 ) ) ) ;
+ assertUri ( STRING6 , loader . normalizeInputAddress ( input ( STRING7 ) ) ) ;
}
public void testDuplicateUris ( ) throws Exception {
|
with before calling URI create in ES6ModuleLoader
|
<nb> public class BatteryController extends StateController {
SINGLE
BatteryService batteryService = ( BatteryService ) ServiceManager . getService ( STRING0 ) ;
if ( batteryService != null ) {
- mBatteryHealthy = ! batteryService . isBatteryLow ( ) ;
+ mBatteryHealthy = ! batteryService . getBatteryLevelLow ( ) ;
mCharging = batteryService . isPowered ( BatteryManager . BATTERY_PLUGGED_ANY ) ;
} else {
SINGLE
|
Fix build breakage in BatteryController
|
<nb> public class NewsListFragment extends Fragment
}
private boolean shouldSubscribeToZhihu ( ) {
- return isToday || shouldUseAccelerateServer ( ) ;
+ return isToday || ! shouldUseAccelerateServer ( ) ;
}
private boolean shouldUseAccelerateServer ( ) {
|
Fix shouldSubscribeToZhihu logic
|
<nb> public class LagartoDOMBuilderTagVisitor implements TagVisitor {
SINGLE
while ( thisNode != matchingParent ) {
String thisNodeName = thisNode . getNodeName ( ) . toLowerCase ( ) ;
+
if ( thisNodeName . equals ( STRING0 ) || thisNodeName . equals ( STRING1 ) || thisNodeName . equals ( STRING2 ) ) {
String positionString = tag . getPosition ( ) ;
<nb> public class LagartoDOMBuilderTagVisitor implements TagVisitor {
return ;
}
- Integer ieVersion = domBuilder . config . getCondCommentIEVersion ( ) ;
+ int ieVersion = domBuilder . config . getCondCommentIEVersion ( ) ;
if ( htmlCCommentExpressionMatcher == null ) {
htmlCCommentExpressionMatcher = new HtmlCCommentExpressionMatcher ( ) ;
}
- enabled = htmlCCommentExpressionMatcher . match ( ieVersion . intValue ( ) , expressionString ) ;
+ enabled = htmlCCommentExpressionMatcher . match ( ieVersion , expressionString ) ;
}
protected HtmlCCommentExpressionMatcher htmlCCommentExpressionMatcher ;
|
Using int instead of Integer for ie version
|
<nb> public class Message {
return getFieldAs ( String . class , FIELD_SOURCE ) ;
}
+ public void setSource ( final String source ) {
+ fields . put ( FIELD_SOURCE , source ) ;
+ }
+
public void addField ( final String key , final Object value ) {
SINGLE
if ( RESERVED_FIELDS . contains ( key ) && ! RESERVED_SETTABLE_FIELDS . contains ( key ) || ! validKey ( key ) ) {
<nb> public class DecodingProcessor implements EventHandler < MessageEvent > {
}
}
+ if ( codec . getConfiguration ( ) . stringIsSet ( Codec . Config . CK_OVERRIDE_SOURCE ) ) {
+ message . setSource ( codec . getConfiguration ( ) . getString ( Codec . Config . CK_OVERRIDE_SOURCE ) ) ;
+ }
+
metricRegistry . meter ( name ( baseMetricName , STRING0 ) ) . mark ( ) ;
return message ;
}
|
Override source if config option is set
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.