diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> public class State {
COMMENT
COMMENT
final boolean finished ;
+
+ @ override
+ public String toString ( ) {
+ StringBuilder result = new StringBuilder ( ) ;
+ result . append ( STRING0 ) ;
+ result . append ( STRING1 + sentence + STRING2 ) ;
+ result . append ( STRING3 + tokenPosition + STRING2 ) ;
+ result . append ( STRING4 + stack + STRING2 ) ;
+ return result . toString ( ) ;
+ }
}
|
Add a toString to State
|
<nb> public class CompletionUtil {
public static boolean shouldShowFeature ( final CompletionParameters parameters , @ nonnls final String id ) {
- return FeatureUsageTracker . getInstance ( ) . isToBeShown ( id , parameters . getPosition ( ) . getProject ( ) ) ;
+ if ( FeatureUsageTracker . getInstance ( ) . isToBeShown ( id , parameters . getPosition ( ) . getProject ( ) ) ) {
+ FeatureUsageTracker . getInstance ( ) . triggerFeatureShown ( id ) ;
+ return true ;
+ }
+ return false ;
}
public static String findJavaIdentifierPrefix ( final PsiElement insertedElement , final int offset ) {
|
if a feature is likely to be advertized in completion register this as a successful ad presentation
|
<nb> public class Circle implements Serializable {
y = circle . y ;
radius = circle . radius ;
}
-
+
+ COMMENT
+ COMMENT
+ public void setPosition ( Vector2 position ) {
+ this . x = position . x ;
+ this . y = position . y ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setPosition ( float x , float y ) {
+ this . x = x ;
+ this . y = y ;
+ }
+
+ COMMENT
+ COMMENT
+ public void setRadius ( float radius ) {
+ this . radius = radius ;
+ }
+
public boolean contains ( float x , float y ) {
x = this . x - x ;
y = this . y - y ;
|
Circle add setPosition and setRadius methods
|
<nb> class GlobalActions implements DialogInterface . OnDismissListener , DialogInterfac
filteredPos ++ ;
}
- throw new IllegalArgumentException ( STRING0 + position + STRING1
- + STRING2
- + STRING3 + getCount ( ) + STRING4 + mKeyguardShowing
+ throw new IllegalArgumentException ( STRING0 + position
+ + STRING5
+ + STRING6 + getCount ( )
+ + STRING4 + mKeyguardShowing
+ STRING7 + mDeviceProvisioned ) ;
}
|
Remove duplicate in exception message
|
<nb> public class AmenityMenuBuilder extends MenuBuilder {
}
if ( ! pType . isText ( ) ) {
if ( ! Algorithms . isEmpty ( pType . getPoiAdditionalCategory ( ) ) ) {
- vl = pType . getPoiAdditionalCategoryTranslation ( ) + STRING0 + pType . getTranslation ( ) . toLowerCase ( ) ;
+ vl = pType . getPoiAdditionalCategoryTranslation ( ) + STRING0 + pType . getTranslation ( ) ;
} else {
vl = pType . getTranslation ( ) ;
}
|
Do not force lower case after colon
|
<nb> public class AbstractMetricGroupTest {
public void testGetAllVariables ( ) {
MetricRegistry registry = new MetricRegistry ( new Configuration ( ) ) ;
- AbstractMetricGroup group = new AbstractMetricGroup < AbstractMetricGroup > ( registry , new String [ NUMBER0 ] , null ) {
+ AbstractMetricGroup group = new AbstractMetricGroup < AbstractMetricGroup < ? > > ( registry , new String [ NUMBER0 ] , null ) {
} ;
assertTrue ( group . getAllVariables ( ) . isEmpty ( ) ) ;
|
hotfix metrics Fix AbstractMetricGroupTest testGetAllVariables
|
<nb> public class FeedParser {
FeedEntry entry = new FeedEntry ( ) ;
entry . setGuid ( item . getUri ( ) ) ;
entry . setGuidHash ( DigestUtils . sha1Hex ( item . getUri ( ) ) ) ;
- entry . setUrl ( item . getLink ( ) ) ;
+ entry . setUrl ( FeedUtils . truncate ( item . getLink ( ) , NUMBER0 ) ) ;
entry . setUpdated ( validateDate ( getUpdateDate ( item ) ) ) ;
entry . setAuthor ( item . getAuthor ( ) ) ;
|
truncate url if too long
|
<nb> import NAMESPACE ;
COMMENT
public class ProtobufAnnotationSerializer extends AnnotationSerializer {
+ COMMENT
private static final Object globalLock = STRING0 ;
COMMENT
<nb> public class ProtobufAnnotationSerializer extends AnnotationSerializer {
COMMENT
public ProtobufAnnotationSerializer ( boolean enforceLosslessSerialization ) { this . enforceLosslessSerialization = enforceLosslessSerialization ; }
+ COMMENT
@ override
public OutputStream write ( Annotation corpus , OutputStream os ) throws IOException {
CoreNLPProtos . Document serialized = toProto ( corpus ) ;
<nb> public class ProtobufAnnotationSerializer extends AnnotationSerializer {
return os ;
}
+ COMMENT
@ override
public Pair < Annotation , InputStream > read ( InputStream is ) throws IOException , ClassNotFoundException , ClassCastException {
CoreNLPProtos . Document doc = CoreNLPProtos . Document . parseFrom ( is ) ;
|
Tweak documentation of Protobuf Serializer
|
<nb> public class RestAdapter {
if ( ! methodInfo . isSynchronous ) {
SINGLE
- Thread . currentThread ( ) . setName ( THREAD_PREFIX + url . substring ( serverUrl . length ( ) ) ) ;
+ int substrEnd = url . indexOf ( STRING0 , serverUrl . length ( ) ) ;
+ if ( substrEnd == - NUMBER0 ) {
+ substrEnd = url . length ( ) ;
+ }
+ Thread . currentThread ( ) . setName ( THREAD_PREFIX
+ + url . substring ( serverUrl . length ( ) , substrEnd ) ) ;
}
if ( logLevel . log ( ) ) {
|
Shorten Thread name by removing query string
|
<nb> public class OsgiManagementNameStrategy extends DefaultManagementNameStrategy {
@ override
protected String customResolveManagementName ( String pattern , String answer ) {
String bundleId = STRING0 + bundleContext . getBundle ( ) . getBundleId ( ) ;
- String symbolicName = Matcher . quoteReplacement ( bundleContext . getBundle ( ) . getSymbolicName ( ) ) ;
+ String symbolicName = bundleContext . getBundle ( ) . getSymbolicName ( ) ;
+ if ( symbolicName != null ) {
+ symbolicName = Matcher . quoteReplacement ( symbolicName ) ;
+ } else {
+ symbolicName = STRING0 ;
+ }
String version = Matcher . quoteReplacement ( bundleContext . getBundle ( ) . getVersion ( ) . toString ( ) ) ;
answer = answer . replaceFirst ( STRING1 , bundleId ) ;
|
Fixed potential NPE if symbolic name is null
|
<nb> abstract class JsonObject {
SerializationFeature . CLOSE_CLOSEABLE , false ) ;
}
- public Map < String , Object > parameters = Maps . newHashMap ( ) ;
+ private static final ObjectMapper OBJECT_MAPPER = createObjectMapper ( ) ;
- private final ObjectMapper objectMapper = createObjectMapper ( ) ;
+ public Map < String , Object > parameters = Maps . newHashMap ( ) ;
COMMENT
COMMENT
<nb> abstract class JsonObject {
public < T > T get ( String name , Class < T > clazz ) {
Object value = parameters . get ( name ) ;
try {
- String stringValue = objectMapper . writeValueAsString ( value ) ;
- return objectMapper . readValue ( stringValue . getBytes ( ) , clazz ) ;
+ String stringValue = OBJECT_MAPPER . writeValueAsString ( value ) ;
+ return OBJECT_MAPPER . readValue ( stringValue . getBytes ( ) , clazz ) ;
} catch ( Exception e ) {
SINGLE
return ( T ) value ;
|
Conver the ObjectMapper in JsonObject to static final per discussion
|
<nb> import static NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
public class MultipleParentClassLoader extends ClassLoader {
|
Added a description on package loading behavior for the multiple parent class loader
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AppEngineFacetEditor extends FacetEditorTab {
for ( VirtualFile file : rootModel . getSourceRoots ( ) ) {
descriptor . addRoot ( file ) ;
}
- final VirtualFile [ ] files =
- FileChooserFactory . getInstance ( ) . createFileChooser ( descriptor , myContext . getProject ( ) ) . choose ( null , myContext . getProject ( ) ) ;
+ final VirtualFile [ ] files = FileChooser . chooseFiles ( myContext . getProject ( ) , descriptor ) ;
for ( VirtualFile file : files ) {
myFilesListModel . addElement ( file . getPath ( ) ) ;
}
|
added method to choose single file in FileChooser
|
<nb> public class FacetsPhase implements SearchPhase {
Filter facetFilter = new QueryWrapperFilter ( queryFacet . query ( ) ) ;
facetFilter = context . filterCache ( ) . cache ( facetFilter ) ;
long count ;
- if ( contextFacets . queryType ( ) == SearchContextFacets . QueryExecutionType . COLLECT ) {
- count = executeQueryCollectorCount ( context , queryFacet , facetFilter ) ;
- } else if ( contextFacets . queryType ( ) == SearchContextFacets . QueryExecutionType . IDSET ) {
+ SINGLE
+ if ( context . searcher ( ) . docIdSet ( ) != null || contextFacets . queryType ( ) == SearchContextFacets . QueryExecutionType . IDSET ) {
count = executeQueryIdSetCount ( context , queryFacet , facetFilter ) ;
+ } else if ( contextFacets . queryType ( ) == SearchContextFacets . QueryExecutionType . COLLECT ) {
+ count = executeQueryCollectorCount ( context , queryFacet , facetFilter ) ;
} else {
throw new ElasticSearchIllegalStateException ( STRING0 + contextFacets . queryType ( ) + STRING1 ) ;
}
|
if we already have an idset use it
|
<nb> public class XDebugSessionTab extends DebuggerSessionTabBase {
debugProcess . registerAdditionalContent ( myUi ) ;
RunContentBuilder . addAdditionalConsoleEditorActions ( myConsole , consoleContent ) ;
- myUi . addContent ( consoleContent , NUMBER0 , PlaceInGrid . bottom , false ) ;
if ( ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
return myRunContentDescriptor ;
|
remove double adding of console
|
<nb> public final class ConfigurationBean extends Neo4jMBean
for ( String key : config . keySet ( ) )
{
keys . add ( new MBeanAttributeInfo ( key , String . class . getName ( ) ,
- describeConfigParameter ( key ) , true , true , false ) ) ;
+ describeConfigParameter ( key ) , true , false , false ) ) ;
}
return keys . toArray ( new MBeanAttributeInfo [ keys . size ( ) ] ) ;
}
|
Make configuration props read only
|
<nb> public class WifiManager {
} else if ( rssi >= MAX_RSSI ) {
return numLevels - NUMBER0 ;
} else {
- int partitionSize = ( MAX_RSSI - MIN_RSSI ) / ( numLevels - NUMBER0 ) ;
- return ( rssi - MIN_RSSI ) / partitionSize ;
+ float inputRange = ( MAX_RSSI - MIN_RSSI ) ;
+ float outputRange = ( numLevels - NUMBER0 ) ;
+ return ( int ) ( ( float ) ( rssi - MIN_RSSI ) * outputRange / inputRange ) ;
}
}
|
Fix divide by zero when calculating signal level over a large output range
|
<nb> public class Criteria {
} else if ( CriteriaType . EXISTS . equals ( key ) ) {
boolean exp = ( Boolean ) expectedVal ;
- boolean act = map . containsKey ( this . key ) ;
+ boolean act = true ;
+ try {
+ this . key . read ( map ) ;
+ } catch ( InvalidPathException e ) {
+ act = false ;
+ }
return act == exp ;
|
fix EXISTS filter
|
<nb> final class PlaceJSONImpl extends TwitterResponseImpl implements Place , java . io .
JSONArray array = geometryJSON . getJSONArray ( STRING0 ) ;
if ( geometryType . equals ( STRING1 ) ) {
geometryCoordinates = new GeoLocation [ NUMBER0 ] [ NUMBER0 ] ;
- geometryCoordinates [ NUMBER1 ] [ NUMBER1 ] = new GeoLocation ( array . getDouble ( NUMBER1 ) , array . getDouble ( NUMBER0 ) ) ;
+ geometryCoordinates [ NUMBER1 ] [ NUMBER1 ] = new GeoLocation ( array . getDouble ( NUMBER0 ) , array . getDouble ( NUMBER1 ) ) ;
} else if ( geometryType . equals ( STRING2 ) ) {
geometryCoordinates = JSONImplFactory . coordinatesAsGeoLocationArray ( array ) ;
} else {
|
Fix the conversion of Geometry Point in PlaceJSONImpl
|
<nb> class GLES20RenderLayer extends GLES20Layer {
@ override
void end ( Canvas currentCanvas ) {
- if ( currentCanvas instanceof GLES20Canvas ) {
- ( ( GLES20Canvas ) currentCanvas ) . resume ( ) ;
- }
HardwareCanvas canvas = getCanvas ( ) ;
if ( canvas != null ) {
canvas . onPostDraw ( ) ;
}
+ if ( currentCanvas instanceof GLES20Canvas ) {
+ ( ( GLES20Canvas ) currentCanvas ) . resume ( ) ;
+ }
}
@ override
|
Finish current Canvas operations then resume previous Canvas
|
<nb> public class FoldingModelSupport {
}
@ notnull
- private static RangeHighlighter createFoldingHighlighter ( @ notnull Editor editor , @ notnull final FoldRegion region ) {
+ private static RangeHighlighter createFoldingHighlighter ( @ notnull final Editor editor , @ notnull final FoldRegion region ) {
return DiffDrawUtil . createLineSeparatorHighlighter ( editor , region . getStartOffset ( ) , region . getEndOffset ( ) , new BooleanGetter ( ) {
@ override
public boolean get ( ) {
- return region . isValid ( ) && ! region . isExpanded ( ) ;
+ return region . isValid ( ) && ! region . isExpanded ( ) && ( ( FoldingModelEx ) editor . getFoldingModel ( ) ) . isFoldingEnabled ( ) ;
}
} ) ;
}
|
hide block separators from folded region popup
|
<nb> public class RemoteObject implements Remote , Unreferenced {
}
if ( foreignException ) {
- Throwable wrapper = new Throwable ( ex . toString ( ) ) ;
+ final RuntimeException wrapper = new RuntimeException ( ex . toString ( ) ) ;
wrapper . setStackTrace ( ex . getStackTrace ( ) ) ;
ex = wrapper ;
}
|
flatten exception chain a bit
|
<nb> public class Environment {
return outer_boundary . bbox ( ) ;
}
- Polygon get ( int i ) {
+ public Polygon get ( int i ) {
if ( i == NUMBER0 ) {
return outer_boundary ;
} else {
<nb> public class Polygon {
return vertices . hashCode ( ) + NUMBER1 ;
}
- Point get ( int i ) {
+ public Point get ( int i ) {
return vertices . get ( i % vertices . size ( ) ) ;
}
|
fix more access control issues
|
<nb> public class DebugDrawerLayout extends ViewGroup implements DrawerLayoutImpl {
COMMENT
COMMENT
COMMENT
- public void onDrawerSlide ( View drawerView , float slideOffset ) ;
+ void onDrawerSlide ( View drawerView , float slideOffset ) ;
COMMENT
COMMENT
<nb> public class DebugDrawerLayout extends ViewGroup implements DrawerLayoutImpl {
COMMENT
COMMENT
COMMENT
- public void onDrawerOpened ( View drawerView ) ;
+ void onDrawerOpened ( View drawerView ) ;
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
- public void onDrawerClosed ( View drawerView ) ;
+ void onDrawerClosed ( View drawerView ) ;
COMMENT
COMMENT
<nb> public class DebugDrawerLayout extends ViewGroup implements DrawerLayoutImpl {
COMMENT
COMMENT
COMMENT
- public void onDrawerStateChanged ( @ state int newState ) ;
+ void onDrawerStateChanged ( @ state int newState ) ;
}
COMMENT
|
Remove redundant public modifiers for interface methods
|
<nb> public class NodeStats extends NodeOperationResponse implements ToXContent {
@ override
public XContentBuilder toXContent ( XContentBuilder builder , Params params ) throws IOException {
- builder . field ( STRING0 , getTimestamp ( ) ) ;
builder . field ( STRING1 , getNode ( ) . name ( ) , XContentBuilder . FieldCaseConversion . NONE ) ;
builder . field ( STRING2 , getNode ( ) . address ( ) . toString ( ) , XContentBuilder . FieldCaseConversion . NONE ) ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT
<nb> public class NodesStatsResponse extends NodesOperationResponse < NodeStats > implem
builder . startObject ( STRING3 ) ;
for ( NodeStats nodeStats : this ) {
builder . startObject ( nodeStats . getNode ( ) . id ( ) , XContentBuilder . FieldCaseConversion . NONE ) ;
-
+ builder . field ( STRING0 , nodeStats . getTimestamp ( ) ) ;
nodeStats . toXContent ( builder , params ) ;
builder . endObject ( ) ;
|
serialize timestamp on the response
|
<nb> public class RenderContext {
Gdx . gl . glDepthFunc ( depthFunc = depthFunction ) ;
if ( ! wasEnabled || this . depthRangeNear != depthRangeNear || this . depthRangeFar != depthRangeFar )
Gdx . gl . glDepthRangef ( this . depthRangeNear = depthRangeNear , this . depthRangeFar = depthRangeFar ) ;
- if ( ! wasEnabled || this . depthMask != depthMask )
- Gdx . gl . glDepthMask ( this . depthMask = depthMask ) ;
}
+ if ( this . depthMask != depthMask )
+ Gdx . gl . glDepthMask ( this . depthMask = depthMask ) ;
}
public final void setBlending ( final boolean enabled , final int sFactor , final int dFactor ) {
|
Fix depth test
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> final class AtomFeedCheckerCmd {
System . out . println ( STRING0 + langCode ) ;
int sleepTimeMillis = Integer . parseInt ( args [ NUMBER0 ] ) ;
System . out . println ( STRING1 + sleepTimeMillis + STRING2 ) ;
+ System . out . println ( STRING3 + JLanguageTool . VERSION + STRING4 + JLanguageTool . BUILD_DATE + STRING5 ) ;
DatabaseConfig databaseConfig = null ;
if ( args . length == NUMBER1 ) {
String propFile = args [ NUMBER2 ] ;
|
also print LT version to stdout
|
<nb> public class GoKeywordCompletionContributor extends CompletionContributor {
private static ElementPattern < ? extends PsiElement > typeExpression ( ) {
return psiElement ( GoTypes . IDENTIFIER ) . withParent (
- psiElement ( GoTypes . TYPE_REFERENCE_EXPRESSION )
- . with ( new PatternCondition < PsiElement > ( STRING0 ) {
- @ override
- public boolean accepts ( @ notnull PsiElement o , ProcessingContext context ) {
- return o instanceof GoTypeReferenceExpression && ( ( GoTypeReferenceExpression ) o ) . getQualifier ( ) == null ;
- }
- } ) ) ;
+ psiElement ( GoTypeReferenceExpression . class ) . with ( new PatternCondition < GoTypeReferenceExpression > ( STRING0 ) {
+ @ override
+ public boolean accepts ( @ notnull GoTypeReferenceExpression element , ProcessingContext context ) {
+ return element . getQualifier ( ) == null ;
+ }
+ } ) ) ;
}
SINGLE
|
Restore completion pattern
|
<nb> public class OperationSetBasicInstantMessagingJabberImpl
{
SINGLE
if ( ! jabberProvider . isRegistered ( ) )
+ {
+ logger . trace ( STRING0
+ + STRING1
+ + jabberProvider . getAccountID ( )
+ . getAccountUniqueID ( ) ) ;
return ;
+ }
Chat chat =
jabberProvider . getConnection ( ) .
|
added a log for keepalive tasks
|
<nb> public class HtmlToPdfMojo extends AbstractMojo {
SINGLE
String content = downloadContent ( ) ;
if ( content == null ) {
+ SINGLE
+ storeDummyFile ( ) ;
return ;
}
<nb> public class HtmlToPdfMojo extends AbstractMojo {
return pdf ;
}
+ private void storeDummyFile ( ) throws FileNotFoundException {
+ PrintWriter out = new PrintWriter ( new BufferedOutputStream ( new FileOutputStream ( getHTMLFileName ( ) ) ) ) ;
+ out . println ( STRING0 ) ;
+ out . println ( STRING1 + page + STRING2 ) ;
+ out . close ( ) ;
+ getLog ( ) . info ( STRING3 + getHTMLFileName ( ) + STRING4 + page + STRING5 ) ;
+ }
+
private void storeHTMLFile ( String content ) throws FileNotFoundException {
PrintWriter out = new PrintWriter ( new BufferedOutputStream ( new FileOutputStream ( getHTMLFileName ( ) ) ) ) ;
out . println ( STRING0 ) ;
|
Manual will create a dummy file in case download fails as the Apache servers does this occationanlly
|
<nb> public class BinaryExpressionHelper {
if ( directAssignment ) {
VariableExpression var = ( VariableExpression ) leftExpression ;
rhsType = controller . getTypeChooser ( ) . resolveType ( var , controller . getClassNode ( ) ) ;
- operandStack . doGroovyCast ( rhsType ) ;
+ if ( ! ( rightExpression instanceof ConstantExpression ) || ( ( ( ConstantExpression ) rightExpression ) . getValue ( ) != null ) ) {
+ operandStack . doGroovyCast ( rhsType ) ;
+ } else {
+ operandStack . replace ( rhsType ) ;
+ }
rhsValueId = compileStack . defineVariable ( var , rhsType , true ) . getIndex ( ) ;
} else {
rhsValueId = compileStack . defineTemporaryVariable ( STRING0 , rhsType , true ) ;
|
Added another case where casting null is not necessary
|
<nb> class PackageManagerService extends IPackageManager . Stub {
pw . println ( STRING0 ) ;
pw . println ( mSettings . mReadMessages . toString ( ) ) ;
}
+
+ synchronized ( mProviders ) {
+ pw . println ( STRING1 ) ;
+ pw . println ( STRING2 ) ;
+ for ( PackageParser . Provider p : mProviders . values ( ) ) {
+ pw . println ( STRING3 ) ; pw . println ( p . info . authority ) ; pw . println ( STRING4 ) ;
+ pw . println ( p . toString ( ) ) ;
+ }
+ }
}
static final class BasePermission {
|
Include the list of registered providers the package manager dumpsys output
|
<nb> public class Entity implements IEntity {
if ( this . mChildren == null ) {
return null ;
}
- return this . mChildren . remove ( pEntityMatcher ) ;
+ return this . mChildren . remove ( pEntityMatcher , Entity . PARAMETERCALLABLE_DETACHCHILD ) ;
}
@ override
|
Fixed a bug where IEntity onDetached was not called when using the method when using IEntity detachChild IEntityMatcher
|
<nb> public class HBaseProducerTest extends CamelHBaseTestSupport {
Object result1 = resp . getOut ( ) . getHeader ( HBaseAttribute . HBASE_VALUE . asHeader ( NUMBER0 ) ) ;
Object result2 = resp . getOut ( ) . getHeader ( HBaseAttribute . HBASE_VALUE . asHeader ( NUMBER1 ) ) ;
Object result3 = resp . getOut ( ) . getHeader ( HBaseAttribute . HBASE_VALUE . asHeader ( NUMBER2 ) ) ;
- System . err . println ( resp . getOut ( ) . getHeaders ( ) . toString ( ) ) ;
+
List < ? > bodies = Arrays . asList ( body [ NUMBER3 ] [ NUMBER3 ] [ NUMBER3 ] , body [ NUMBER0 ] [ NUMBER3 ] [ NUMBER3 ] , body [ NUMBER1 ] [ NUMBER3 ] [ NUMBER3 ] ) ;
assertTrue ( bodies . contains ( result1 ) && bodies . contains ( result2 ) && bodies . contains ( result3 ) ) ;
}
|
Remove unuseful print
|
<nb> public abstract class AbstractClient implements ShellClient
public static final String TITLE_MAX_LENGTH = STRING0 ;
private static final Set < String > EXIT_COMMANDS = new HashSet < String > (
- Arrays . asList ( STRING1 , STRING2 ) ) ;
+ Arrays . asList ( STRING1 , STRING2 , null ) ) ;
private Console console ;
private long timeConnection ;
|
Quit the shell on EOF i e D as per convention rather than parsing null
|
<nb> public class ExecutionHandler implements ChannelUpstreamHandler , ChannelDownstre
COMMENT
COMMENT
+ COMMENT
COMMENT
public ExecutionHandler ( Executor executor ) {
if ( executor == null ) {
|
Javadoc not to receive a question about messy data transfer anymore
|
<nb> public class UberTestCaseGroovySourceSubPackages extends TestCase {
suite . addTest ( AllTestSuite . suite ( BASE , STRING0 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING1 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING2 , EXCLUDES ) ) ;
- suite . addTest ( AllTestSuite . suite ( BASE , STRING3 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING4 , EXCLUDES ) ) ;
+ suite . addTest ( AllTestSuite . suite ( BASE , STRING3 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING5 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING6 , EXCLUDES ) ) ;
suite . addTest ( AllTestSuite . suite ( BASE , STRING7 , EXCLUDES ) ) ;
|
back out bamboo build hack in stages
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Add links to the hash function comparisons to the Hashing javadocs
|
<nb> public class HttpPanelRequest extends HttpPanel {
if ( comboChangeMethod == null ) {
comboChangeMethod = new JComboBox < > ( ) ;
comboChangeMethod . setEditable ( false ) ;
+ comboChangeMethod . setMaximumRowCount ( NUMBER0 ) ; SINGLE
comboChangeMethod . addItem ( Constant . messages . getString ( STRING0 ) ) ;
comboChangeMethod . addItem ( HttpRequestHeader . CONNECT ) ;
comboChangeMethod . addItem ( HttpRequestHeader . DELETE ) ;
|
Tweak http panel so that Method pulldown doesnt need a scrollbar
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class LruPhotoCache {
- private static final float SIZE_RATIO = FLOAT0 / FLOAT1 ;
+ private static final float SIZE_RATIO = FLOAT0 / NUMBER0 f ;
private final PhotoCache photoCache ;
private PhotoRemovedListener photoRemovedListener ;
|
Reduce the default memory cache size
|
<nb> public abstract class TitanGraphTest extends TitanGraphTestCommon {
SINGLE
assertFalse ( v . getProperties ( key ) . iterator ( ) . hasNext ( ) ) ;
- long id = v . getID ( ) ; SINGLE
-
SINGLE
clopen ( ) ;
SINGLE
- v = tx . getVertex ( id ) ;
+ v = tx . getVertex ( v . getID ( ) ) ;
key = tx . getPropertyKey ( pname ) ;
Iterable < TitanProperty > iter = v . getProperties ( key ) ;
assertFalse ( STRING0 ,
|
Fix getID abuse
|
<nb> public class SearchFilter
SINGLE
filterQuery . addContactQuery ( defaultQuery ) ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
-
mclSource . startQuery ( defaultQuery , filterPattern ) ;
}
else if ( sourceContactList . getDefaultFilter ( )
|
Removes commented lines of code
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ActionToolbarImpl extends JPanel implements ActionToolbar {
public void setTargetComponent ( final JComponent component ) {
myTargetComponent = component ;
- if ( myTargetComponent != null && myTargetComponent . isVisible ( ) ) {
- ApplicationManager . getApplication ( ) . invokeLater ( new DumbAwareRunnable ( ) {
+ if ( myTargetComponent != null ) {
+ UiNotifyConnector . doWhenFirstShown ( myTargetComponent , new DumbAwareRunnable ( ) {
@ override
public void run ( ) {
myUpdater . updateActions ( false , false ) ;
}
- } , ModalityState . stateForComponent ( myTargetComponent ) ) ;
+ } ) ;
}
}
|
do not schedule toolbar refresh for partially initialized target component
|
<nb> public class DumbServiceImpl extends DumbService implements Disposable , Modifica
private void queueUpdateFinished ( boolean modal ) {
if ( myUpdateFinishedQueued ) return ;
myUpdateFinishedQueued = true ;
- TransactionGuard . submitTransaction ( myProject , ( ) - > WriteAction . run ( ( ) - > updateFinished ( modal ) ) ) ;
+ TransactionGuard . submitTransaction ( myProject , ( ) - > ApplicationManager . getApplication ( ) . runWriteAction ( ( ) - > updateFinished ( modal ) ) ) ;
}
private void updateFinished ( boolean modal ) {
|
do not lose information about write action caller
|
<nb> public class HighlyAvailableGraphDatabase extends AbstractGraphDatabase
}
}
- private boolean brokerSaysIAmMaster ( )
- {
- return broker . iAmMaster ( ) ;
- }
-
public Transaction beginTx ( )
{
return localGraph . beginTx ( ) ;
<nb> public class HighlyAvailableGraphDatabase extends AbstractGraphDatabase
{
return machineId ;
}
+
+ public boolean isMaster ( )
+ {
+ return broker . iAmMaster ( ) ;
+ }
}
|
Added a temporary method to ask a ha db if it currently is a master or not
|
<nb> public final class MotionEvent implements Parcelable {
}
COMMENT
- < < < < < < < HEAD : core / java / android / view / MotionEvent . java
COMMENT
COMMENT
COMMENT
<nb> public final class MotionEvent implements Parcelable {
COMMENT
COMMENT
COMMENT
- || || || |
- COMMENT
- COMMENT
- == == == =
- COMMENT
- COMMENT
- > > > > > > > cafdea61a85c8f5d0646cc9413a09346c637f43f : core / java / android / view / MotionEvent . java
COMMENT
public final float getX ( ) {
return mX ;
|
Fixes merge conflict
|
<nb> public class KotlinToJVMBytecodeCompiler {
collector . report ( CompilerMessageSeverity . ERROR , message . toString ( ) , CompilerMessageLocation . NO_LOCATION ) ;
}
}
-
- public static CompilerMessageLocation create ( @ nullable String path , @ notnull DiagnosticUtils . LineAndColumn lineAndColumn ) {
- return CompilerMessageLocation . create ( path , lineAndColumn . getLine ( ) , lineAndColumn . getColumn ( ) ) ;
- }
}
|
Remove unused method
|
<nb> public class VertexBufferObject implements VertexData {
}
protected VertexBufferObject ( int usage , ByteBuffer data , boolean ownsBuffer , VertexAttributes attributes ) {
+ bufferHandle = Gdx . gl20 . glGenBuffer ( ) ;
+
setBuffer ( data , ownsBuffer , attributes ) ;
setUsage ( usage ) ;
}
|
Actually generate a buffer handle
|
<nb> public class LauncherAppsService extends SystemService {
private void verifyCallingPackage ( String callingPackage ) {
int packageUid = - NUMBER0 ;
try {
- packageUid = mPm . getPackageUid ( callingPackage ,
+ packageUid = mPm . getPackageUidAsUser ( callingPackage ,
PackageManager . MATCH_ENCRYPTION_AWARE_AND_UNAWARE
- | PackageManager . MATCH_UNINSTALLED_PACKAGES ) ;
+ | PackageManager . MATCH_UNINSTALLED_PACKAGES ,
+ UserHandle . getUserId ( getCallingUid ( ) ) ) ;
} catch ( NameNotFoundException e ) {
Log . e ( TAG , STRING0 + callingPackage ) ;
}
|
Fix caller validation on secondary user
|
<nb> public class DaemonCommand extends Command {
switch ( operationResult . getResultCode ( ) ) {
case OK :
out . println ( STRING0 ) ;
- out . println ( STRING1 ) ;
+ out . println ( STRING2 ) ;
out . println ( ) ;
break ;
<nb> public class DaemonCommand extends Command {
switch ( operationResult . getResultCode ( ) ) {
case OK :
out . println ( STRING3 ) ;
- out . println ( STRING1 ) ;
+ out . println ( STRING2 ) ;
out . println ( ) ;
break ;
|
Correct sy daemon output
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class SearchServer implements Monitored {
String clusterReplicationFactor = settings . get ( STRING0 , STRING1 ) ;
if ( Integer . parseInt ( clusterReplicationFactor ) <= NUMBER0 ) {
node . stop ( ) ;
- throw new MessageException ( STRING2 ) ;
+ throw new MessageException ( STRING3 +
+ STRING4 + ProcessConstants . CLUSTER_ACTIVATE + STRING5 ) ;
}
}
}
<nb> public class SearchServerTest {
slaveServer . start ( ) ;
fail ( ) ;
} catch ( Exception e ) {
- assertThat ( e ) . hasMessage ( STRING2 ) ;
+ assertThat ( e ) . hasMessage ( STRING6 + ProcessConstants . CLUSTER_ACTIVATE + STRING5 ) ;
}
assertThat ( client . admin ( ) . cluster ( ) . prepareClusterStats ( ) . get ( )
|
Fix documentation of sonar cluster activate
|
<nb> public class Message extends Packet {
public String toXML ( ) {
StringBuffer buf = new StringBuffer ( ) ;
buf . append ( STRING0 ) ;
- buf . append ( STRING1 ) . append ( getPacketID ( ) ) . append ( STRING2 ) ;
+ if ( getPacketID ( ) != null ) {
+ buf . append ( STRING1 ) . append ( getPacketID ( ) ) . append ( STRING2 ) ;
+ }
if ( getTo ( ) != null ) {
buf . append ( STRING3 ) . append ( getTo ( ) ) . append ( STRING2 ) ;
}
|
Do not print the packet id in toXML when the id is null
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
COMMENT
@ beta
@ gwtcompatible
+ @ checkreturnvalue
public abstract class MultimapBuilder < K0 , V0 > {
COMMENT
COMMENT
|
Add CheckReturnValue to MultimapBuilder
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class LocallyAvailableResourceFinderFactory implements Factory < LocallyAva
SINGLE
finders . add ( new LocalMavenLocallyAvailableResourceFinder ( localMavenRepositoryLocator , STRING0 ) ) ;
- SINGLE
- try {
- File localMavenRepository = localMavenRepositoryLocator . getLocalMavenRepository ( ) ;
- if ( localMavenRepository . exists ( ) ) {
- addForPattern ( finders , localMavenRepository , STRING0 ) ;
- }
- } catch ( CannotLocateLocalMavenRepositoryException ex ) {
- LOGGER . warn ( String . format ( STRING1 , ex . getMessage ( ) ) ) ;
- }
-
-
return new CompositeLocallyAvailableResourceFinder < ArtifactRevisionId > ( finders ) ;
}
|
Remove duplicate local maven repo definition to LocallyAvailableResourceFinderFactory
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
public final class BytecodeArray {
- COMMENT
- public static final Visitor EMPTY_VISITOR = new BaseVisitor ( ) ;
-
COMMENT
private final ByteArray bytes ;
<nb> public final class BytecodeArray {
COMMENT
public int parseInstruction ( int offset , Visitor visitor ) {
if ( visitor == null ) {
- visitor = EMPTY_VISITOR ;
+ visitor = new BaseVisitor ( ) ;
}
try {
|
Eliminate EMPTY_VISITOR static in DX
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
remove untruth from javadoc
|
<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 ;
|
removed unused imports
|
<nb> public class OUser extends ODocumentWrapper {
}
public OUser setPassword ( final String iPassword ) {
- return setPasswordEncoded ( encryptPassword ( iPassword ) ) ;
+ return setPasswordEncoded ( iPassword ) ;
}
- public OUser setPasswordEncoded ( String iPassword ) {
+ public OUser setPasswordEncoded ( final String iPassword ) {
document . field ( STRING0 , iPassword ) ;
return this ;
}
<nb> public class OUser extends ODocumentWrapper {
return STATUSES . valueOf ( ( String ) document . field ( STRING1 ) ) ;
}
- public void setAccountStatus ( STATUSES accountStatus ) {
+ public void setAccountStatus ( final STATUSES accountStatus ) {
document . field ( STRING1 , accountStatus ) ;
}
|
Fixed issue on set password for OUser
|
<nb> public class HttpBrowser {
if ( newCookies != null ) {
for ( String cookieValue : newCookies ) {
Cookie cookie = new Cookie ( cookieValue ) ;
-
cookies . put ( cookie . getName ( ) , cookie ) ;
}
}
<nb> public class HttpBrowser {
if ( ! cookies . isEmpty ( ) ) {
for ( Cookie cookie : cookies . values ( ) ) {
+
+ Integer maxAge = cookie . getMaxAge ( ) ;
+ if ( maxAge != null && maxAge . intValue ( ) == NUMBER0 ) {
+ continue ;
+ }
+
if ( ! first ) {
cookieString . append ( STRING0 ) ;
}
<nb> public class HttpBrowser {
httpRequest . header ( STRING1 , cookieString . toString ( ) , true ) ;
}
}
- }
+ }
|
don t add cookies to the header that have been deleted
|
<nb> class PeepholeSubstituteAlternateSyntax
}
}
+ private static final ImmutableSet < String > BUILTIN_TYPES = ImmutableSet . of (
+ STRING0 ,
+ STRING1 ,
+ STRING2 ,
+ STRING3 ) ;
+
private Node tryMinimizeWindowRefs ( Node node ) {
SINGLE
SINGLE
<nb> class PeepholeSubstituteAlternateSyntax
Node stringNode = node . getLastChild ( ) ;
SINGLE
- SINGLE
if ( STRING4 . equals ( nameNode . getString ( ) )
- && STANDARD_OBJECT_CONSTRUCTORS . contains ( stringNode . getString ( ) ) ) {
+ && BUILTIN_TYPES . contains ( stringNode . getString ( ) ) ) {
Node newNameNode = IR . name ( stringNode . getString ( ) ) ;
Node parentNode = node . getParent ( ) ;
<nb> public final class PeepholeSubstituteAlternateSyntaxTest extends CompilerTestCas
fold ( STRING5 , STRING6 ) ;
fold ( STRING7 , STRING8 ) ;
fold ( STRING9 , STRING10 ) ;
+ fold ( STRING11 , STRING12 ) ;
SINGLE
foldSame ( STRING13 ) ;
|
Add window RegExp as a standard builtin that can fold to just RegExp
|
<nb> public class PlansActivity extends AppCompatActivity {
startActivity ( intent ) ;
}
} else {
- AppLog . e ( AppLog . T . PLANS , STRING0 + result . getMessage ( ) ) ;
+ AppLog . e ( AppLog . T . PLANS , STRING1 + result . getMessage ( ) ) ;
SINGLE
SINGLE
}
|
Fix log message
|
<nb> public class MetaClassImpl implements MetaClass , MutableMetaClass {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MetaClassImpl implements MetaClass , MutableMetaClass {
}
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MetaClassImpl implements MetaClass , MutableMetaClass {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MetaClassImpl implements MetaClass , MutableMetaClass {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class MetaClassImpl implements MetaClass , MutableMetaClass {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface MetaClassRegistry {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed compilation warnings for javadoc
|
<nb> public class FlipViewController extends AdapterView < Adapter > {
handler . post ( new Runnable ( ) {
public void run ( ) {
- if ( ! inFlipAnimation )
+ if ( ! inFlipAnimation ) {
cards . setVisible ( false ) ;
+ surfaceView . requestRender ( ) ; SINGLE
+ }
}
} ) ;
}
|
Fix an issue when rendering stays on screen after animation ends
|
<nb> public class JobProxyGcm implements JobProxy {
. setExecutionWindow ( Common . getStartMs ( request ) / NUMBER0 , Common . getEndMs ( request ) / NUMBER0 )
. setRequiredNetwork ( convertNetworkType ( request . requiredNetworkType ( ) ) )
. setPersisted ( request . isPersisted ( ) )
- . setRequiresCharging ( false )
+ . setRequiresCharging ( request . requiresCharging ( ) )
. build ( ) ;
mGcmNetworkManager . schedule ( task ) ;
<nb> public class JobProxyGcm implements JobProxy {
. setPeriod ( request . getIntervalMs ( ) / NUMBER0 )
. setRequiredNetwork ( convertNetworkType ( request . requiredNetworkType ( ) ) )
. setPersisted ( request . isPersisted ( ) )
- . setRequiresCharging ( false )
+ . setRequiresCharging ( request . requiresCharging ( ) )
. build ( ) ;
mGcmNetworkManager . schedule ( task ) ;
|
Fix requires charging parameter in GCM proxy
|
<nb> public class RenderScript {
} catch ( InterruptedException e ) {
}
}
- Log . d ( LOG_TAG , STRING0 ) ;
+ SINGLE
}
}
<nb> public class ScriptC extends Script {
String resName = resources . getResourceEntryName ( resourceID ) ;
String cachePath = rs . getApplicationContext ( ) . getCacheDir ( ) . toString ( ) ;
- Log . v ( TAG , STRING1 + resName + STRING2 + pgmLength + STRING2 + pgm ) ;
- Log . v ( TAG , STRING3 + cachePath ) ;
+ SINGLE
+ SINGLE
return rs . nScriptCCreate ( resName , cachePath , pgm , pgmLength ) ;
}
}
|
Remove extraneous logging
|
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Scope
return variable ;
}
+
+ public Variable declareVariable ( String variableName , ByteCodeBlock block , ByteCodeExpression initialValue )
+ {
+ Variable variable = declareVariable ( initialValue . getType ( ) , variableName ) ;
+ block . append ( variable . set ( initialValue ) ) ;
+ return variable ;
+ }
}
|
Add initializer to variables declaration in Scope
|
<nb> public class AppCompatEditText extends EditText implements TintableBackgroundVie
}
public AppCompatEditText ( Context context , AttributeSet attrs ) {
- this ( TintContextWrapper . wrap ( context ) , attrs , R . attr . editTextStyle ) ;
+ this ( context , attrs , R . attr . editTextStyle ) ;
}
public AppCompatEditText ( Context context , AttributeSet attrs , int defStyleAttr ) {
- super ( context , attrs , defStyleAttr ) ;
+ super ( TintContextWrapper . wrap ( context ) , attrs , defStyleAttr ) ;
if ( TintManager . SHOULD_BE_USED ) {
TintTypedArray a = TintTypedArray . obtainStyledAttributes ( getContext ( ) , attrs ,
|
Fix AppCompatEditText s context wrapping
|
<nb> public final class MessageBytes implements Cloneable , Serializable {
public static final int T_CHARS = NUMBER0 ;
private int hashCode = NUMBER1 ;
- SINGLE
+ SINGLE
private boolean hasHashCode = false ;
SINGLE
|
Fix comment typo
|
<nb> public abstract class DexWriter <
@ nullable Iterable < ? extends StringKey > parameterNames ,
@ nullable Iterable < ? extends DebugItem > debugItems ) throws IOException {
int parameterCount = NUMBER0 ;
+ int lastNamedParameterIndex = - NUMBER1 ;
if ( parameterNames != null ) {
+ parameterCount = Iterables . size ( parameterNames ) ;
int index = NUMBER0 ;
for ( StringKey parameterName : parameterNames ) {
- index ++ ;
if ( parameterName != null ) {
- parameterCount = index ;
+ lastNamedParameterIndex = index ;
}
+ index ++ ;
}
}
- if ( parameterCount == NUMBER0 && ( debugItems == null || Iterables . isEmpty ( debugItems ) ) ) {
+ if ( lastNamedParameterIndex == - NUMBER1 && ( debugItems == null || Iterables . isEmpty ( debugItems ) ) ) {
return NO_OFFSET ;
}
|
When writing a debug item always include all parameters
|
<nb> public class CompactionController
this . forceDeserialize = forceDeserialize ;
isMajor = cfs . isCompleteSSTables ( this . sstables ) ;
SINGLE
- throttleResolution = ( int ) ( DatabaseDescriptor . getCompactionThroughputMbPerSec ( ) * NUMBER0 * NUMBER0 / ( NUMBER1 * cfs . getMeanRowSize ( ) ) ) ;
+ long rowSize = cfs . getMeanRowSize ( ) ;
+ int rowsPerSecond = rowSize > NUMBER2
+ ? ( int ) ( DatabaseDescriptor . getCompactionThroughputMbPerSec ( ) * NUMBER0 * NUMBER0 / rowSize )
+ : NUMBER3 ;
+ throttleResolution = rowsPerSecond / NUMBER1 ;
if ( throttleResolution <= NUMBER2 )
throttleResolution = NUMBER4 ;
}
|
handle zero rowSize in throttleResolution calculation
|
<nb> public abstract class ItemLoader < Params , Result > {
return false ;
}
- public Result loadItemFromMemory ( Params itemParams ) {
- return null ;
- }
-
public abstract Params getItemParams ( Adapter adapter , int position ) ;
public abstract Result loadItem ( Params itemParams ) ;
+ public abstract Result loadItemFromMemory ( Params itemParams ) ;
+
public abstract void displayItem ( View itemView , Result result , boolean fromMemory ) ;
private static final class ItemRequest < Params , Result > {
|
library Make ItemLoader s loadItemFromMemory abstract
|
<nb> public class SettingsActivity extends PreferenceActivity implements OnPreference
if ( VECTOR_MAP . equals ( ( String ) newValue ) ) {
osmandSettings . setUsingMapVectorData ( true ) ;
} else {
- osmandSettings . setUsingMapVectorData ( true ) ;
+ osmandSettings . setUsingMapVectorData ( false ) ;
osmandSettings . setMapTileSource ( ( String ) newValue ) ;
}
updateTileSourceSummary ( ) ;
|
Fix bug with changing vector map source
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ SINGLE
public interface ClientConnectionManager {
public void shutdown ( ) ;
|
added TODO about recursive connection of client
|
<nb> import static NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
public class DatabaseActionsTest
{
-
- private static final URI BASE_URI ;
-
- static
- {
- try
- {
- BASE_URI = new URI ( STRING0 ) ;
- } catch ( URISyntaxException e )
- {
- throw new RuntimeException ( e ) ;
- }
- }
-
private DatabaseActions actions ;
private GraphDbHelper graphdbHelper ;
private Database database ;
|
Removing unused code
|
<nb> public final class Bukkit {
return server . getUpdateFolderFile ( ) ;
}
+ public static long getConnectionThrottle ( ) {
+ return server . getConnectionThrottle ( ) ;
+ }
+
public static int getTicksPerAnimalSpawns ( ) {
return server . getTicksPerAnimalSpawns ( ) ;
}
<nb> public interface Server extends PluginMessageRecipient {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public boolean getGenerateStructures ( ) ;
<nb> public interface Server extends PluginMessageRecipient {
public File getUpdateFolderFile ( ) ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public long getConnectionThrottle ( ) ;
+
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Added configurable Connection Throttle
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DatabaseShardManager
{
private static final String INDEX_TABLE_PREFIX = STRING0 ;
- private static final Logger log = Logger . get ( DatabaseShardManager . class ) ;
-
private final IDBI dbi ;
private final ShardManagerDao dao ;
|
Remove unused logger
|
<nb> public class Registry {
SINGLE
SINGLE
if ( isNative && info != null && info . isPersistent ( ) ) {
- try {
- info . getFunctionClass ( ) ;
- } catch ( Exception e ) {
- return registerToSessionRegistry ( qualifiedName , info ) ;
- }
- return info ;
+ return registerToSessionRegistry ( qualifiedName , info ) ;
}
if ( info != null || ! isNative ) {
return info ; SINGLE
|
getFunctionInfo should register jars under a check Reviewed by Amareshwari
|
<nb> public class EmailAlarmCallback implements AlarmCallback {
final AlertCondition alertCondition = result . getTriggeredCondition ( ) ;
final int effectiveBacklogSize = Math . min ( alertCondition . getBacklog ( ) , result . getMatchingMessages ( ) . size ( ) ) ;
final List < MessageSummary > backlogSummaries = result . getMatchingMessages ( )
- . subList ( NUMBER0 , effectiveBacklogSize - NUMBER1 ) ;
+ . subList ( NUMBER0 , Math . max ( effectiveBacklogSize - NUMBER1 , NUMBER0 ) ) ;
final List < Message > backlog = Lists . newArrayListWithCapacity ( effectiveBacklogSize ) ;
for ( MessageSummary messageSummary : backlogSummaries ) {
|
Preventing IndexOutOfBoundsException if search result is empty
|
<nb> public class TestQueries
}
@ test
+ public void testGroupByCount ( )
+ {
+ List < Tuple > expected = computeExpected ( STRING0 , VARIABLE_BINARY , FIXED_INT_64 ) ;
+
+ BlockStream groupBySource = createBlockStream ( ordersData , Column . ORDER_ORDERSTATUS , VARIABLE_BINARY ) ;
+ BlockStream aggregateSource = createBlockStream ( ordersData , Column . ORDER_ORDERSTATUS , VARIABLE_BINARY ) ;
+
+ GroupByBlockStream groupBy = new GroupByBlockStream ( groupBySource ) ;
+ HashAggregationBlockStream aggregation = new HashAggregationBlockStream ( groupBy , aggregateSource , CountAggregation . PROVIDER ) ;
+
+ assertEqualsIgnoreOrder ( tuples ( aggregation ) , expected ) ;
+ }
+
+ @ test
public void testGroupBySum ( )
{
List < Tuple > expected = computeExpected (
|
Add test for group by count
|
<nb> public class InsecureCipherMode extends BugChecker implements MethodInvocationTr
SINGLE
SINGLE
SINGLE
- if ( transformation . matches ( STRING0 ) || transformation . matches ( STRING1 )
+ if ( transformation . matches ( STRING0 )
+ || transformation . matches ( STRING1 )
|| transformation . matches ( STRING2 ) ) {
return Description . NO_MATCH ;
}
<nb> public class InsecureCipherMode extends BugChecker implements MethodInvocationTr
return buildErrorMessage ( tree , STRING3 ) ;
}
- if ( transformation . matches ( STRING4 ) && ! transformation . matches ( STRING5 )
+ if ( transformation . matches ( STRING4 )
+ && ! transformation . matches ( STRING5 )
&& ! transformation . matches ( STRING6 ) ) {
SINGLE
SINGLE
|
Update recognized ciphers in InsecureCipherMode
|
<nb> package NAMESPACE ;
import NAMESPACE ;
+ COMMENT
+ COMMENT
+ COMMENT
public class Intents {
public static final String ACTION_VIEW_EPISODE
= STRING0 ;
- public static final String EXTRA_EPISODE_TVDBID = STRING1 ;
+ public static final String ACTION_VIEW_SHOW
+ = STRING2 ;
+
+ public static final String EXTRA_TVDBID = STRING3 ;
COMMENT
COMMENT
<nb> public class Intents {
COMMENT
public static Intent buildViewEpisodeIntent ( int episodeTvdbId ) {
return new Intent ( ACTION_VIEW_EPISODE )
- . putExtra ( EXTRA_EPISODE_TVDBID , episodeTvdbId ) ;
+ . putExtra ( EXTRA_TVDBID , episodeTvdbId ) ;
+ }
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static Intent buildViewShowIntent ( int showTvdbId ) {
+ return new Intent ( ACTION_VIEW_SHOW )
+ . putExtra ( EXTRA_TVDBID , showTvdbId ) ;
}
}
|
Support building show view intents from API as well
|
<nb> public class InteractiveShell {
out . println ( STRING0 ) ;
out . println ( STRING1 ) ;
- int counter = NUMBER0 ;
boolean running = true ;
while ( running ) {
SINGLE
<nb> public class InteractiveShell {
if ( command . length ( ) > NUMBER1 ) {
SINGLE
try {
- SINGLE
shell . evaluate ( command , STRING2 ) ;
} catch ( Exception e ) {
err . println ( STRING3 + e . getMessage ( ) ) ;
|
removed unneeded counter
|
<nb> public class GitBlit implements ServletContextListener {
SINGLE
if ( getBoolean ( Keys . web . showRepositorySizes , true ) ) {
+ ByteFormat byteFormat = new ByteFormat ( ) ;
msg = STRING0 ;
for ( String repository : repositories ) {
RepositoryModel model = getRepositoryModel ( repository ) ;
if ( ! model . skipSizeCalculation ) {
- calculateSize ( model ) ;
+ model . size = byteFormat . format ( calculateSize ( model ) ) ;
}
}
} else {
<nb> public class GitBlit implements ServletContextListener {
}
model . lastChange = JGitUtils . getLastChange ( r ) ;
+ if ( ! model . skipSizeCalculation ) {
+ ByteFormat byteFormat = new ByteFormat ( ) ;
+ model . size = byteFormat . format ( calculateSize ( model ) ) ;
+ }
}
r . close ( ) ;
|
Added missing repo size values
|
<nb> public class NotificationStackScrollLayout extends ViewGroup
}
public void onChildAnimationFinished ( ) {
- applyCurrentState ( ) ;
+ updateChildren ( ) ;
mAnimationEvents . clear ( ) ;
}
|
Fixed a bug where the notification scroller could crash
|
<nb> public class TypeName {
internal = internal . substring ( NUMBER0 , pos ) ;
pos = internal . lastIndexOf ( STRING0 ) ;
- package_ = internal . substring ( NUMBER1 , pos ) . replace ( STRING0 , STRING1 ) ;
- type = internal . substring ( pos + NUMBER0 ) ;
+ if ( pos == - NUMBER0 ) {
+ package_ = STRING2 ;
+ type = internal ;
+ } else {
+ package_ = internal . substring ( NUMBER1 , pos ) . replace ( STRING0 , STRING1 ) ;
+ type = internal . substring ( pos + NUMBER0 ) ;
+ }
pos = type . indexOf ( STRING3 ) ;
if ( pos != - NUMBER0 ) {
|
fixed a bug occuring when parsing class name without a package
|
<nb> public class HistoryReaderImpl implements HistoryReader {
return this . findByXpath ( expr ) ;
}
- public QueryResultSet findByText ( Date startDate , Date endDate ,
+ public QueryResultSet findByPeriod ( Date startDate , Date endDate ,
String [ ] keywords ) throws UnsupportedOperationException {
String expr = STRING0 + startDate . getTime ( ) + STRING1
+ STRING2 + endDate . getTime ( ) + STRING1 ;
|
changed method signiture in service
|
<nb> public class SLF4JHandler extends OutputHandler {
Class source = null ; SINGLE
Object backupSource = null ; SINGLE
Redwood . Flag flag = Redwood . Flag . STDOUT ;
- for ( Object c : channel ) {
+ for ( Object c : ( ( channel == null ) ? new Object [ NUMBER0 ] : channel ) ) {
if ( c instanceof Class ) {
source = ( Class ) c ; SINGLE
} else if ( c instanceof Redwood . Flag ) {
|
Fix strange null pointer
|
<nb> public class SpringExtension extends AbstractGlobalExtension {
}
private boolean isSpringSpec ( SpecInfo spec ) {
+ if ( isSpringBootSpec ( spec ) ) return true ;
- if ( isSpringBootSpec ( spec ) ) {
- return true ;
- }
return findAnnotationDescriptorForTypesMethod != null
&& ReflectionUtil . invokeMethod (
<nb> public class SpringExtension extends AbstractGlobalExtension {
}
private boolean isSpringBootSpec ( SpecInfo spec ) {
+ if ( bootstrapWithAnnotation == null ) return false ;
boolean bootstrapWithAnnotationPresent ;
<nb> public class SpringExtension extends AbstractGlobalExtension {
SINGLE
bootstrapWithAnnotationPresent = a . annotationType ( ) . isAnnotationPresent ( bootstrapWithAnnotation ) ;
- if ( bootstrapWithAnnotationPresent ) {
- return true ;
- }
+ if ( bootstrapWithAnnotationPresent ) return true ;
}
return false ;
|
Fix NPE if BootstrapWith annotation is not available on classpath
|
<nb> public class CoordinatorDynamicConfig
this . replicantLifetime = replicantLifetime ;
this . replicationThrottleLimit = replicationThrottleLimit ;
this . emitBalancingStats = emitBalancingStats ;
- this . balancerComputeThreads = balancerComputeThreads ;
+ this . balancerComputeThreads = Math . min ( balancerComputeThreads , Runtime . getRuntime ( ) . availableProcessors ( ) - NUMBER0 ) ;
}
@ jsonproperty
|
limit on balancer compute threads
|
<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 static NAMESPACE ;
import static NAMESPACE ;
<nb> public class DemoActivity extends SherlockActivity implements ActionBarOwner . Vie
}
} ) ;
}
+ menu . add ( STRING0 )
+ . setOnMenuItemClickListener ( new MenuItem . OnMenuItemClickListener ( ) {
+ @ override public boolean onMenuItemClick ( MenuItem item ) {
+ Log . d ( STRING1 , MortarScopeDevHelper . scopeHierarchyToString ( activityScope ) ) ;
+ return true ;
+ }
+ } ) ;
return true ;
}
|
DemoActivity can log scope hierarchy
|
<nb> public class RouteCalculationResult {
type = diff > NUMBER0 ? TurnType . KL : TurnType . KR ;
}
SINGLE
- RouteDirectionInfo info = new RouteDirectionInfo ( NUMBER1 , TurnType . valueOf ( type , false ) ) ;
+ RouteDirectionInfo info = new RouteDirectionInfo ( lastDirInf != null ? lastDirInf . getAverageSpeed ( ) : NUMBER2 , TurnType . valueOf ( type , false ) ) ;
info . distance = NUMBER0 ;
info . afterLeftTime = NUMBER0 ;
info . routePointOffset = locations . size ( ) - NUMBER2 ;
|
refine travel time solution
|
<nb> public class ReplaySubjectBoundedConcurrencyTest {
break ;
} else {
Assert . assertEquals ( NUMBER0 , o . get ( ) ) ;
- rs . onCompleted ( ) ;
+ worker . schedule ( new Action0 ( ) {
+ @ override
+ public void call ( ) {
+ rs . onCompleted ( ) ;
+ }
+ } ) ;
}
}
}
|
Fixed wrong subject use in test
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
public class EclipseClasspath {
-
- private static final String DEPRECATED_NOEXPORTCONFIGURATION_FIELD = STRING0 ;
-
private Iterable < SourceSet > sourceSets ;
private Collection < Configuration > plusConfigurations = new ArrayList < Configuration > ( ) ;
<nb> public class EclipseClasspath {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- Collection < Configuration > getNoExportConfigurations ( ) {
- DeprecationLogger . nagUserOfDeprecated ( DEPRECATED_NOEXPORTCONFIGURATION_FIELD ) ;
- return noExportConfigurations ;
- }
-
- void setNoExportConfigurations ( Collection < Configuration > noExportConfigurations ) {
- DeprecationLogger . nagUserOfDeprecated ( DEPRECATED_NOEXPORTCONFIGURATION_FIELD ) ;
- this . noExportConfigurations = noExportConfigurations ;
- }
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
Fixed merge problem
|
<nb> public class LocationManagerService extends ILocationManager . Stub implements Run
SINGLE
int uid = Binder . getCallingUid ( ) ;
+ if ( UserHandle . getUserId ( uid ) != UserHandle . USER_OWNER ) {
+ SINGLE
+ Log . w ( TAG , STRING0 ) ;
+ return ;
+ }
long identity = Binder . clearCallingIdentity ( ) ;
try {
mGeofenceManager . addFence ( sanitizedRequest , geofence , intent , uid , packageName ) ;
|
disable geofences for secondary users
|
<nb> public class MasterInfo extends ImageWriter {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public boolean rename ( int fileId , TachyonURI dstPath , long opTimeMs )
- throws FileDoesNotExistException , InvalidPathException {
- return renameInternal ( fileId , dstPath , opTimeMs ) ;
- }
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
remove rename which is supposed to be a wrapper around renameInternal
|
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
|
Adding license for new file
|
<nb> public class Ir
compressConstantEnums ( messageTokens ) ;
countComponentTokens ( messageTokens ) ;
- messagesByIdMap . put ( messageId , Collections . unmodifiableList ( new ArrayList < > ( messageTokens ) ) ) ;
+ messagesByIdMap . put ( messageId , new ArrayList < > ( messageTokens ) ) ;
}
private static void compressConstantEnums ( final List < Token > tokens )
|
Java Remove a layer or indirection in the IR
|
<nb> public class WorldEdit {
if ( commands . hasCommand ( searchCmd ) ) {
} else if ( config . noDoubleSlash && commands . hasCommand ( STRING0 + searchCmd ) ) {
split [ NUMBER0 ] = STRING0 + split [ NUMBER0 ] ;
- } else if ( commands . hasCommand ( searchCmd . substring ( NUMBER1 ) ) ) {
+ } else if ( split [ NUMBER0 ] . length ( ) >= NUMBER2 && split [ NUMBER0 ] . charAt ( NUMBER0 ) == STRING1
+ && commands . hasCommand ( searchCmd . substring ( NUMBER1 ) ) ) {
split [ NUMBER0 ] = split [ NUMBER0 ] . substring ( NUMBER1 ) ;
}
|
Fixed an error the command parser that resulted it in handling commands it did not really handle
|
<nb> public class QueueContainer implements IdentifiedDataSerializable {
if ( ! fromBackup && store . isEnabled ( ) ) {
Set < Long > keys = store . loadAllKeys ( ) ;
if ( keys != null ) {
+ long maxId = - NUMBER0 ;
for ( Long key : keys ) {
QueueItem item = new QueueItem ( this , key , null ) ;
getItemQueue ( ) . offer ( item ) ;
- nextId ( ) ;
+ maxId = Math . max ( maxId , key ) ;
}
+ idGenerator = maxId ;
}
}
}
|
queue init load fix
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public interface DirectoryProjectGenerator < T > {
String getName ( ) ;
COMMENT
+ COMMENT
+ COMMENT
+ @ nullable
+ default T showGenerationSettings ( final VirtualFile baseDir ) throws ProcessCanceledException {
+ return null ;
+ }
+
+ COMMENT
COMMENT
COMMENT
@ nullable
|
Fix broken API
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.