diff
stringlengths 38
1.78k
| msg_token
stringlengths 9
190
|
|---|---|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
<nb> public class ResultTransformerOutputWriter < T extends OutputWriter > extends Outpu
return new ResultTransformerOutputWriter < > ( new ResultValuesTransformer ( new IdentityValueTransformer ( ) ) , target ) ;
}
- public void stop ( ) {
+ public void stop ( ) throws LifecycleException {
try {
target . stop ( ) ;
} catch ( LifecycleException ex ) {
- logger . debug ( STRING0 ) ;
+ throw ( ex ) ;
}
}
|
Bubble up exceptions caught in stop
|
<nb> public enum OGlobalConfiguration {
FILE_MMAP_MAX_MEMORY (
STRING0 ,
- STRING1 ,
+ STRING2 ,
Long . class , NUMBER0 , new OConfigurationChangeCallback ( ) {
public void change ( final Object iCurrentValue , final Object iNewValue ) {
OMMapManager . setMaxMemory ( OFileUtils . getSizeAsNumber ( iNewValue ) ) ;
|
corrected cfg message
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class PluginsTest {
COMMENT
COMMENT
static final Set < String > DISABLED_PLUGINS = Sets . newHashSet (
+ SINGLE
+ STRING0 ,
+
SINGLE
STRING1 ,
<nb> public class PluginsTest {
new AbapCheck ( ) ,
new CCheck ( ) , new CppCheck ( ) ,
new CobolCheck ( ) ,
- new CssCheck ( ) ,
+ SINGLE
+ SINGLE
new FlexCheck ( ) ,
new GroovyCheck ( ) ,
new JavaCheck ( ) ,
|
Disable css plugin as it s currently incompatible with web plugin
|
<nb> public class MainActivity extends ActionBarActivity
. setIconId ( R . mipmap . icon_location_pin ) ) ;
}
- private void addMarker ( String title , String snippet , LatLng latLng , int id ) {
- map . addMarker ( new AirMapMarker ( latLng , id )
- . setTitle ( title )
- . setSnippet ( snippet )
- . setIconId ( R . mipmap . icon_location_pin ) ) ;
- }
-
@ override public void onMapClick ( LatLng latLng ) {
if ( latLng != null ) {
appendLog (
|
Remove unused method
|
<nb> public class InsertFromValuesAnalyzerTest extends BaseAnalyzerTest {
) ) ;
assertThat ( analysis . sourceMaps ( ) . size ( ) , is ( NUMBER0 ) ) ;
}
-
- @ test ( expected = UnsupportedOperationException . class )
- public void testInsertFromQuery ( ) throws Exception {
- analyze ( STRING0 ) ;
- }
}
|
implemented insert by query analysis
|
<nb> public class ProjectCommandOptions extends BuildCommandOptions {
private boolean processAnnotations ;
@ option (
- name = STRING0 ,
- hidden = true )
- @ suppresswarnings ( STRING1 )
- private boolean withTests = false ;
-
- @ option (
name = STRING2 ,
usage = STRING3 )
private boolean withoutTests = false ;
|
Remove deprecated and dead with tests option
|
<nb> public class PyStringLiteralExpressionImpl extends PyElementImpl implements PySt
for ( EvaluatedTextRange range : characterRanges ) {
if ( offsetInDecoded < range . getValue ( ) . length ( ) ) {
- return range . getRange ( ) . getStartOffset ( ) + offsetInDecoded ;
+ return range . getRange ( ) . getStartOffset ( ) + offsetInDecoded - rangeInsideHost . getStartOffset ( ) ;
}
offsetInDecoded -= range . getValue ( ) . length ( ) ;
}
<nb> public class PyStringLiteralTest extends PyLightFixtureTestCase {
assertEquals ( NUMBER0 , escaper . getOffsetInHost ( NUMBER1 , new TextRange ( NUMBER1 , NUMBER2 ) ) ) ;
assertEquals ( NUMBER3 , escaper . getOffsetInHost ( NUMBER0 , new TextRange ( NUMBER1 , NUMBER2 ) ) ) ;
assertEquals ( NUMBER4 , escaper . getOffsetInHost ( NUMBER5 , new TextRange ( NUMBER1 , NUMBER2 ) ) ) ;
+ assertEquals ( NUMBER1 , escaper . getOffsetInHost ( NUMBER1 , new TextRange ( NUMBER0 , NUMBER4 ) ) ) ;
}
}
|
honor the contract of LiteralTextEscaper
|
<nb> public final class BluetoothMidiDevice {
SINGLE
mBluetoothGatt . setCharacteristicNotification ( characteristic , true ) ;
+ SINGLE
+ SINGLE
+ int originalWriteType = characteristic . getWriteType ( ) ;
+ characteristic . setWriteType ( BluetoothGattCharacteristic . WRITE_TYPE_DEFAULT ) ;
+
BluetoothGattDescriptor descriptor = characteristic . getDescriptor (
CLIENT_CHARACTERISTIC_CONFIG ) ;
if ( descriptor != null ) {
descriptor . setValue ( BluetoothGattDescriptor . ENABLE_NOTIFICATION_VALUE ) ;
- mBluetoothGatt . writeDescriptor ( descriptor ) ;
+ boolean result = mBluetoothGatt . writeDescriptor ( descriptor ) ;
+ Log . d ( TAG , STRING0 + result ) ;
} else {
Log . e ( TAG , STRING1 + mBluetoothDevice ) ;
}
+
+ characteristic . setWriteType ( originalWriteType ) ;
}
@ override
|
change write type to support JamStik
|
<nb> public class BuildInvocationsBuilder extends ProjectSensitiveToolingModelBuilder
SINGLE
SINGLE
SINGLE
- if ( ! taskSelectors . containsKey ( task . getName ( ) ) || hasPathWithLowerOrdering ( task , taskSelectors . get ( task . getName ( ) ) ) ) {
+ if ( ! taskSelectors . containsKey ( task . getName ( ) ) ) {
LaunchableGradleTaskSelector taskSelector = new LaunchableGradleTaskSelector ( ) .
- setDescription ( task . getDescription ( ) ) .
- setProjectPath ( task . getPath ( ) ) ;
+ setDescription ( task . getDescription ( ) ) . setProjectPath ( task . getPath ( ) ) ;
taskSelectors . put ( task . getName ( ) , taskSelector ) ;
+ } else {
+ LaunchableGradleTaskSelector taskSelector = taskSelectors . get ( task . getName ( ) ) ;
+ if ( hasPathWithLowerOrdering ( task , taskSelector ) ) {
+ taskSelector . setDescription ( task . getDescription ( ) ) . setProjectPath ( task . getPath ( ) ) ;
+ }
}
SINGLE
|
Avoid unnecessary creation of new LaunchableGradleTaskSelector instance
|
<nb> class IdeaJHelp extends JHelp {
updateUI ( ) ;
}
-
- public void updateUI ( ) {
- setUI ( new IdeaHelpUI ( ) ) ;
- }
}
|
remove customized HelpUI override
|
<nb> public class KeyEvent extends InputEvent implements Parcelable {
case KeyEvent . KEYCODE_BRIGHTNESS_DOWN :
case KeyEvent . KEYCODE_BRIGHTNESS_UP :
case KeyEvent . KEYCODE_MEDIA_AUDIO_TRACK :
- case KeyEvent . KEYCODE_DPAD_UP :
- case KeyEvent . KEYCODE_DPAD_RIGHT :
- case KeyEvent . KEYCODE_DPAD_DOWN :
- case KeyEvent . KEYCODE_DPAD_LEFT :
return true ;
}
|
Temporarily remove the dpad keys from system keys
|
<nb> public class PeopleTable {
int deleteCount = size - fetchLimit ;
String [ ] args = new String [ ] {
Integer . toString ( localTableBlogId ) ,
- Integer . toString ( localTableBlogId ) ,
Integer . toString ( deleteCount )
} ;
- getWritableDb ( ) . delete ( PEOPLE_TABLE , STRING0 +
- STRING1 + PEOPLE_TABLE + STRING2 +
- STRING3 , args ) ;
+ getWritableDb ( ) . delete ( PEOPLE_TABLE , STRING4 +
+ STRING1 + PEOPLE_TABLE + STRING5 +
+ STRING6 , args ) ;
}
}
|
Use numbered arguments in deletePeopleForLocalBlogIdExceptForFirstPage sql
|
<nb> public class PackageParser {
pkg . baseCodePath = apkPath ;
pkg . mSignatures = null ;
+ SINGLE
+ if ( pkg . usesOptionalLibraries == null ) {
+ pkg . usesOptionalLibraries = new ArrayList < String > ( ) ;
+ }
+ pkg . usesOptionalLibraries . add ( STRING0 ) ;
+
return pkg ;
}
|
Preload the WebView package into all applications
|
<nb> public class ValidateXMLTest extends TestCase {
validator . validate ( STRING0 , STRING1 , STRING2 ) ;
}
+ public void testDisambiguationRuleFile ( ) throws IOException {
+ XMLValidator validator = new XMLValidator ( ) ;
+ SINGLE
+ SINGLE
+ Language lang = Language . FRENCH ;
+ String grammarFile = STRING3 + lang . getShortName ( ) + STRING4 ;
+ validator . validate ( grammarFile , STRING5 , STRING2 ) ;
+ SINGLE
+ }
+
}
|
rule disambiguation file validation
|
<nb> public class Protocol
Deserializer < PAYLOAD > payloadDeserializer ,
ResourceReleaser channelReleaser ) throws IOException
{
- DechunkingChannelBuffer dechunkingBuffer = new DechunkingChannelBuffer ( reader , NUMBER0 ,
+ DechunkingChannelBuffer dechunkingBuffer = new DechunkingChannelBuffer ( reader , timeout ,
internalProtocolVersion , applicationProtocolVersion ) ;
PAYLOAD response = payloadDeserializer . read ( dechunkingBuffer , input ) ;
|
Uses the real timeout
|
<nb> public class DumpZooInfo
{
NeoStoreUtil store = new NeoStoreUtil ( STRING0 ) ;
ClusterManager clusterManager = new ClusterManager (
- STRING1 , store . getCreationTime ( ) , store . getStoreId ( ) , STRING2 ) ;
+ STRING1 , store . getCreationTime ( ) , store . getStoreId ( ) ,
+ StartHaDb . toHaServerFormat ( StartHaDb . HA_SERVERS ) ) ;
System . out . println ( STRING3 + clusterManager . getMaster ( ) ) ;
System . out . println ( STRING4 ) ;
for ( MachineInfo info : clusterManager . getConnectedSlaves ( ) )
<nb> public class StartHaDb
SINGLE
}
- private static String toHaServerFormat ( Map < Integer , String > haServers )
+ static String toHaServerFormat ( Map < Integer , String > haServers )
{
StringBuilder builder = new StringBuilder ( ) ;
for ( Map . Entry < Integer , String > entry : haServers . entrySet ( ) )
|
FIxed the DumpZooInfo class
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
@ entity
- @ namedquery ( name = STRING0 , query = STRING1 )
+ @ namedquery ( name = STRING0 ,
+ query = STRING1 )
public class Customer {
@ id
|
Fixed the CS error of camel jpa
|
<nb> public class TextEditingTarget implements EditingTarget
code = code + STRING0 ;
boolean sweave =
- fileType_ . canCompilePDF ( ) || fileType_ . canKnitToHTML ( ) ;
+ fileType_ . canCompilePDF ( ) ||
+ fileType_ . canKnitToHTML ( ) ||
+ fileType_ . isRpres ( ) ;
RnwWeave rnwWeave = compilePdfHelper_ . getActiveRnwWeave ( ) ;
final boolean forceEcho = sweave && ( rnwWeave != null ) ? rnwWeave . forceEchoOnExec ( ) : false ;
<nb> public class TextEditingTargetCompilePdfHelper
SINGLE
public String getActiveRnwWeaveName ( )
{
- if ( docDisplay_ . getFileType ( ) . canKnitToHTML ( ) )
+ if ( docDisplay_ . getFileType ( ) . canKnitToHTML ( ) ||
+ docDisplay_ . getFileType ( ) . isRpres ( ) )
return STRING1 ;
RnwWeaveDirective rnwWeaveDirective = detectRnwWeaveDirective (
|
run all chunks for Rpres
|
<nb> public abstract class Resource implements ResourceFactory
{
URL url = null ;
SINGLE
- ClassLoader
- loader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
+ ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ;
if ( loader != null )
{
try
<nb> public abstract class Resource implements ResourceFactory
{
url = ClassLoader . getSystemResource ( resource ) ;
if ( url == null && resource . startsWith ( STRING0 ) )
- url = loader . getResource ( resource . substring ( NUMBER0 ) ) ;
+ url = ClassLoader . getSystemResource ( resource . substring ( NUMBER0 ) ) ;
}
if ( url == null )
|
Fixed Resource newSystemResource striped handling
|
<nb> public class HiveOutputTableHandle
{
return temporaryPath ;
}
+
+ @ override
+ public String toString ( )
+ {
+ return STRING0 + schemaName + STRING1 + tableName ;
+ }
}
|
Add toString for HiveOutputTableHandle
|
<nb> public class PostsListAdapter extends BaseAdapter {
PostsListPost newPost = newPostsList . get ( i ) ;
PostsListPost currentPost = mPosts . get ( i ) ;
+ if ( ! ( newPost . getPostId ( ) == currentPost . getPostId ( ) ) )
+ return false ;
if ( ! newPost . getTitle ( ) . equals ( currentPost . getTitle ( ) ) )
return false ;
if ( ! ( newPost . getDateCreatedGmt ( ) == currentPost . getDateCreatedGmt ( ) ) )
|
Also compare postId in postsListMatch because the postId can change if the user refreshes the posts list
|
<nb> private NetworkStateTracker makeWimaxStateTracker ( ) {
NetworkInfo ni = network . getNetworkInfo ( ) ;
if ( ni . isAvailable ( ) == false ) {
- if ( DBG ) log ( STRING0 ) ;
if ( ! TextUtils . equals ( feature , Phone . FEATURE_ENABLE_DUN_ALWAYS ) ) {
+ if ( DBG ) log ( STRING1 + ni . getTypeName ( ) ) ;
return Phone . APN_TYPE_NOT_AVAILABLE ;
} else {
SINGLE
+ if ( DBG ) {
+ log ( STRING2 +
+ ni . getTypeName ( ) ) ;
+ }
}
}
|
Add additional debug
|
<nb> public class Descriptor
COMMENT
COMMENT
COMMENT
- private static boolean versionValidate ( String ver )
+ static boolean versionValidate ( String ver )
{
if ( ver . length ( ) < NUMBER0 ) return false ;
for ( char ch : ver . toCharArray ( ) )
<nb> public class LegacySSTableTest extends CleanupHelper
public void testVersions ( ) throws IOException
{
for ( File version : LEGACY_SSTABLE_ROOT . listFiles ( ) )
- testVersion ( version . getName ( ) ) ;
+ if ( Descriptor . versionValidate ( version . getName ( ) ) )
+ testVersion ( version . getName ( ) ) ;
}
public void testVersion ( String version )
|
LegacySSTableTest should ignore invalid directories
|
<nb> SimpleProjectable < T > {
return queryMixin . set ( param , value ) ;
}
+ @ nullable
private T oneResult ( boolean unique ) {
try {
int maxDoc = maxDoc ( ) ;
|
added Nullable annotation
|
<nb> public class Quaternion implements Serializable {
public float getAngleAroundRad ( final float axisX , final float axisY , final float axisZ ) {
final float d = Vector3 . dot ( this . x , this . y , this . z , axisX , axisY , axisZ ) ;
final float l2 = Quaternion . len2 ( axisX * d , axisY * d , axisZ * d , this . w ) ;
- return MathUtils . isZero ( l2 ) ? FLOAT0 : ( float ) ( FLOAT1 * Math . acos ( ( float ) ( this . w / Math . sqrt ( l2 ) ) ) ) ;
+ return MathUtils . isZero ( l2 ) ? FLOAT0 : ( float ) ( FLOAT1 * Math . acos ( MathUtils . clamp ( ( float ) ( this . w / Math . sqrt ( l2 ) ) , - FLOAT2 , FLOAT2 ) ) ) ;
}
COMMENT
|
Now used MathUtils clamp instead of just a cast
|
<nb> public class PaymentChannelServerState {
throw e ;
}
log . info ( STRING0 , multisigContract ) ;
+ wallet . addWatchedScripts ( ImmutableList . of ( multisigContract . getOutput ( NUMBER0 ) . getScriptPubKey ( ) ) ) ;
state = State . WAITING_FOR_MULTISIG_ACCEPTANCE ;
final SettableFuture < PaymentChannelServerState > future = SettableFuture . create ( ) ;
Futures . addCallback ( broadcaster . broadcastTransaction ( multisigContract ) . future ( ) , new FutureCallback < Transaction > ( ) {
|
Added broadcast multisig contract to wallet bloom filter
|
<nb> public class ShowcaseView extends RelativeLayout
showcaseDrawer . setShowcaseColour ( showcaseColor ) ;
textDrawer . setTitleStyling ( titleTextAppearance ) ;
textDrawer . setDetailStyling ( detailTextAppearance ) ;
+ hasAlteredText = true ;
if ( invalidate ) {
invalidate ( ) ;
<nb> class TextDrawerImpl implements TextDrawer {
@ override
public void setTitleStyling ( int styleId ) {
mTitleSpan = new TextAppearanceSpan ( this . context , styleId ) ;
+ setContentTitle ( mTitle ) ;
}
@ override
public void setDetailStyling ( int styleId ) {
mDetailSpan = new TextAppearanceSpan ( this . context , styleId ) ;
+ setContentText ( mDetails ) ;
}
@ override
|
Fix an issue where a style wouldn t be updated
|
<nb> public class SystemSensorManager extends SensorManager {
} while ( i > NUMBER0 ) ;
sSensorEventPool = new Pools . SynchronizedPool < SensorEvent > (
- Math . max ( sFullSensorsList . size ( ) * NUMBER1 , NUMBER2 ) ) ;
+ sFullSensorsList . size ( ) * NUMBER1 ) ;
sTriggerEventPool = new Pools . SynchronizedPool < TriggerEvent > (
- Math . max ( sFullSensorsList . size ( ) * NUMBER1 , NUMBER2 ) ) ;
+ sFullSensorsList . size ( ) * NUMBER1 ) ;
}
}
}
|
Revert Add a minimum size for the event pools
|
<nb> public final class ByteArray implements Serializable {
private final byte [ ] underlying ;
- COMMENT
- private int hashCode ;
-
public static ByteArray valueOf ( String s ) {
return new ByteArray ( s . getBytes ( ) ) ;
}
<nb> public final class ByteArray implements Serializable {
@ override
public int hashCode ( ) {
- SINGLE
- int h = hashCode ;
- if ( h == NUMBER0 ) {
- h = Arrays . hashCode ( underlying ) ;
- hashCode = h ;
- }
- return h ;
+ return Arrays . hashCode ( underlying ) ;
}
@ override
|
ByteArray caches hashCode but is mutable
|
<nb> public class IrcStack
this . irc . deleteListener ( this ) ;
return ;
}
-
- SINGLE
- SINGLE
- SINGLE
- SINGLE
-
- SINGLE
- SINGLE
-
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
-
- SINGLE
- SINGLE
-
- SINGLE
- SINGLE
- SINGLE
- SINGLE
}
}
|
Removed old commented code
|
<nb> public class LocalMUCRoom implements MUCRoom , GroupEventListener {
}
SINGLE
else if ( outcasts . includes ( occupantJID ) ) {
- newAffiliation = MUCRole . Affiliation . none ;
+ newAffiliation = MUCRole . Affiliation . outcast ;
newRole = MUCRole . Role . none ;
kickMember = true ;
isOutcast = true ;
|
Openfire sends presence updates of affiliation none instead of outcast when banning
|
<nb> public abstract class TransportReplicationAction < Request extends ReplicationRequ
onReplicaFailure ( nodeId , exp ) ;
} else {
String message = String . format ( Locale . ROOT , STRING0 , transportReplicaAction , node ) ;
- logger . warn ( STRING1 , exp , shardId , message ) ;
+ logger . warn ( STRING2 , exp , shardId , message ) ;
shardStateAction . shardFailed (
shard ,
indexUUID ,
|
Log shard ID in TransportReplicationAction
|
<nb> public final class UiAutomationConnection extends IUiAutomationConnection . Stub {
@ override
public void shutdown ( ) {
synchronized ( mLock ) {
- throwIfCalledByNotTrustedUidLocked ( ) ;
+ if ( isConnectedLocked ( ) ) {
+ throwIfCalledByNotTrustedUidLocked ( ) ;
+ }
throwIfShutdownLocked ( ) ;
mIsShutdown = true ;
if ( isConnectedLocked ( ) ) {
|
Uninitialized UiAutomationConnection incorrectly enforces caller id
|
<nb> public class PhoneAccount implements Parcelable {
COMMENT
COMMENT
COMMENT
- @ systemapi
public static final int CAPABILITY_VIDEO_CALLING = NUMBER0 ;
COMMENT
|
Make PhoneAccount CAPABILITY_VIDEO_CALLING public
|
<nb> public class ControlFlowUtils {
final PsiDoWhileStatement loopStatement =
( PsiDoWhileStatement ) statement ;
final PsiExpression test = loopStatement . getCondition ( ) ;
- return statementMayCompleteNormally ( loopStatement ) &&
+ return statementMayCompleteNormally ( loopStatement . getBody ( ) ) &&
! isBooleanConstant ( test , true )
|| statementIsBreakTarget ( loopStatement ) ;
} else if ( statement instanceof PsiSynchronizedStatement ) {
|
statementMayCompleteNormally psiDoWhileStatement calls itself with same parameter
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public interface Cluster {
+ public interface Cluster extends Closeable {
COMMENT
COMMENT
|
Cluster now extends Closeable
|
<nb> public abstract class ContentResolver {
String blockingPackage = ActivityThread . currentPackageName ( ) ;
EventLog . writeEvent (
- EventLogTags . CONTENT_QUERY_OPERATION ,
+ EventLogTags . CONTENT_QUERY_SAMPLE ,
uri . toString ( ) ,
projectionBuffer . toString ( ) ,
selection != null ? selection : STRING0 ,
<nb> public abstract class ContentResolver {
}
String blockingPackage = ActivityThread . currentPackageName ( ) ;
EventLog . writeEvent (
- EventLogTags . CONTENT_UPDATE_OPERATION ,
+ EventLogTags . CONTENT_UPDATE_SAMPLE ,
uri . toString ( ) ,
operation ,
selection != null ? selection : STRING0 ,
|
Missed these ones in the previous rename
|
<nb> public class DefaultCxfRsBinding implements CxfRsBinding , HeaderFilterStrategyAw
Map < String , List < String > > headers = ( Map < String , List < String > > ) cxfMessage . get ( org . apache . cxf . message . Message . PROTOCOL_HEADERS ) ;
for ( Map . Entry < String , List < String > > entry : headers . entrySet ( ) ) {
SINGLE
- if ( headerFilterStrategy . applyFilterToCamelHeaders ( entry . getKey ( ) , entry . getValue ( ) , camelExchange )
+ if ( headerFilterStrategy . applyFilterToExternalHeaders ( entry . getKey ( ) , entry . getValue ( ) , camelExchange )
|| entry . getValue ( ) . get ( NUMBER0 ) == null ) {
LOG . trace ( STRING0 , entry . getKey ( ) , entry . getValue ( ) ) ;
} else {
|
Fix a wrong usage of HeaderFilterStrategy applyFilterTo
|
<nb> import NAMESPACE ;
COMMENT
public class Grape {
- private static boolean enableGrapes = Boolean . valueOf ( System . getProperties ( ) . getProperty ( STRING0 , STRING1 ) ) ;
- private static boolean enableAutoDownload = Boolean . valueOf ( System . getProperties ( ) . getProperty ( STRING2 , STRING1 ) ) ;
+ private static boolean enableGrapes = Boolean . valueOf ( System . getProperty ( STRING0 , STRING1 ) ) ;
+ private static boolean enableAutoDownload = Boolean . valueOf ( System . getProperty ( STRING2 , STRING1 ) ) ;
protected static GrapeEngine instance ;
COMMENT
|
Groovy enforces wider security permissions than it needs partial fix
|
<nb> class SplitwiseHintTextWatcher extends HintSafeTextWatcher {
}
private boolean containsSpansOnly ( String rawText ) {
- return rawText . matches ( STRING0 ) ;
+ return rawText . matches ( STRING1 ) ;
}
boolean textContainsHint ( Editable text ) {
|
Fix the RegEx for detecting leading spaces
|
<nb> public class Activity extends ContextThemeWrapper
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class Fragment implements ComponentCallbacks2 , OnCreateContextMenuListene
COMMENT
COMMENT
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Improve documentation of onRequestPermissionsResult
|
<nb> public class FontListParser {
if ( parser . getEventType ( ) != XmlPullParser . START_TAG ) continue ;
String tag = parser . getName ( ) ;
if ( tag . equals ( STRING0 ) ) {
- int ttcIndex = Integer . parseInt ( parser . getAttributeValue ( STRING1 , STRING2 ) ) ;
+ String ttcIndexStr = parser . getAttributeValue ( null , STRING2 ) ;
+ int ttcIndex = ttcIndexStr == null ? NUMBER0 : Integer . parseInt ( ttcIndexStr ) ;
String weightStr = parser . getAttributeValue ( null , STRING3 ) ;
int weight = weightStr == null ? NUMBER1 : Integer . parseInt ( weightStr ) ;
boolean isItalic = STRING4 . equals ( parser . getAttributeValue ( null , STRING5 ) ) ;
|
Fix invalid API use of XmlPullParser getAttributeValue
|
<nb> import NAMESPACE ;
public class GrailsUtilTests extends TestCase {
public void testGrailsVersion ( ) {
- assertEquals ( STRING0 , GrailsUtil . getGrailsVersion ( ) ) ;
+ assertEquals ( STRING1 , GrailsUtil . getGrailsVersion ( ) ) ;
}
@ override
|
fixed version test
|
<nb> public class IndexService {
SINGLE
public void delete ( String index ) throws APIException , IOException {
- api . path ( routes . IndicesResource ( ) . single ( index ) )
+ api . path ( routes . IndicesResource ( ) . delete ( index ) )
. timeout ( apiTimeout ( STRING0 , NUMBER0 , TimeUnit . SECONDS ) )
. expect ( NUMBER1 )
. execute ( ) ;
|
Use correct route to delete index
|
<nb> public class DataPacketDispatcher implements DataPacketHandler , SetupMessageHand
final int streamId = image . streamId ( ) ;
final Int2ObjectHashMap < PublicationImage > imageBySessionIdMap = sessionsByStreamIdMap . get ( streamId ) ;
- if ( null == imageBySessionIdMap )
- {
- throw new IllegalStateException ( STRING0 + streamId ) ;
- }
imageBySessionIdMap . put ( sessionId , image ) ;
ignoredSessionsMap . remove ( sessionId , streamId ) ;
|
Java Remove exception that does not add value
|
<nb> public class VcsFullCommitDetailsNode extends DefaultMutableTreeNode implements
@ override
public void render ( @ notnull ColoredTreeCellRenderer renderer ) {
String subject = StringUtil . shortenTextWithEllipsis ( myCommit . getSubject ( ) , NUMBER0 , NUMBER1 ) ;
- renderer . append ( subject , new SimpleTextAttributes ( SimpleTextAttributes . STYLE_PLAIN , renderer . getForeground ( ) ) ) ;
+ renderer . append ( subject , new SimpleTextAttributes ( SimpleTextAttributes . STYLE_SMALLER , renderer . getForeground ( ) ) ) ;
}
public String getTooltip ( ) {
|
push make commit node smaller
|
<nb> public class WPNumberPicker extends NumberPicker {
for ( int i = NUMBER0 ; i < DISPLAY_COUNT ; ++ i ) {
mDisplayValues [ i ] = value - MIDDLE_INDEX + i ;
if ( mDisplayValues [ i ] < getMinValue ( ) ) {
- mDisplayValues [ i ] = getMaxValue ( ) - ( mDisplayValues [ i ] + getMinValue ( ) + NUMBER1 ) ;
+ mDisplayValues [ i ] = getMaxValue ( ) + ( mDisplayValues [ i ] + NUMBER1 - getMinValue ( ) ) ;
} else if ( mDisplayValues [ i ] > getMaxValue ( ) ) {
mDisplayValues [ i ] = getMinValue ( ) + ( mDisplayValues [ i ] - getMaxValue ( ) - NUMBER1 ) ;
}
|
Fixing wrapped number picker values
|
<nb> public class DevicePolicyManagerService extends IDevicePolicyManager . Stub {
if ( activitiesToEnable != null ) {
for ( ResolveInfo info : activitiesToEnable ) {
if ( info . activityInfo != null ) {
-
- if ( ! isSystemApp ( pm , info . activityInfo . packageName , primaryUser . id ) ) {
- throw new IllegalArgumentException (
- STRING0 ) ;
+ String packageName = info . activityInfo . packageName ;
+ if ( isSystemApp ( pm , packageName , primaryUser . id ) ) {
+ numberOfAppsInstalled ++ ;
+ pm . installExistingPackageAsUser ( packageName , userId ) ;
+ } else {
+ Slog . d ( LOG_TAG , STRING1 + packageName + STRING2
+ + STRING3 ) ;
}
-
-
- numberOfAppsInstalled ++ ;
- pm . installExistingPackageAsUser ( info . activityInfo . packageName , userId ) ;
}
}
}
|
Dont throw an exception for non system apps when enabling system apps
|
<nb> public interface ClientStateListener
{
public String reason ;
public Throwable error ;
+
+ @ override
+ public String toString ( ) {
+ return STRING0 + reason + STRING1 + error + STRING2 ;
+ }
}
}
|
Added a toString method to DisconnectInfo
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class BuilderPackedSwitchPayload extends BuilderSwitchPayload implements
if ( switchElements == null ) {
this . switchElements = ImmutableList . of ( ) ;
} else {
- this . switchElements = Lists . transform ( switchElements , new Function < Label , BuilderSwitchElement > ( ) {
- int key = startKey ;
- @ nullable @ override public BuilderSwitchElement apply ( @ nullable Label target ) {
- assert target != null ;
- return new BuilderSwitchElement ( BuilderPackedSwitchPayload . this , key ++ , target ) ;
- }
- } ) ;
+ this . switchElements = Lists . newArrayList ( ) ;
+ int key = startKey ;
+ for ( Label target : switchElements ) {
+ this . switchElements . add ( new BuilderSwitchElement ( this , key ++ , target ) ) ;
+ }
}
}
|
Fix issue with BuilderPackedSwitchPayload instructions
|
<nb> public class LogBufferDescriptor
COMMENT
public static int computeTermOffsetFromPosition ( final long position , final int positionBitsToShift )
{
- final int mask = ( int ) ( ( NUMBER0 < < positionBitsToShift ) - NUMBER1 ) ;
+ final long mask = ( NUMBER0 < < positionBitsToShift ) - NUMBER0 ;
return ( int ) ( position & mask ) ;
}
<nb> public class LossHandler
final int capacity = termBuffers [ NUMBER2 ] . capacity ( ) ;
this . positionBitsToShift = Integer . numberOfTrailingZeros ( capacity ) ;
- this . mask = ( int ) ( ( long ) capacity - NUMBER1 ) ;
+ this . mask = capacity - NUMBER1 ;
this . initialTermId = initialTermId ;
}
|
Java Use the right type in the mask calculation
|
<nb> public class BatchGetRequestUtil
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
- public static < RT > Map < String , Object > getQueryParamsForBatchingKey ( BatchRequest < RT > request )
+ public static Map < String , Object > getQueryParamsForBatchingKey ( BatchRequest < ? > request )
{
final Map < String , Object > params = new HashMap < String , Object > ( request . getQueryParamsObjects ( ) ) ;
params . remove ( RestConstants . QUERY_BATCH_IDS_PARAM ) ;
|
Remove unnecessary template param in util method
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
public class GroovyDocTest extends BuildFileTest {
- private static final String SRC_TESTFILES = STRING0 ;
+ private static final String SRC_TESTFILES ;
private File tmpDir ;
+ static {
+ String groovyDocResourcesPathInSubproject = STRING0 ;
+ String groovyDocResourcesPathFromMainProject = STRING1 + groovyDocResourcesPathInSubproject ;
+ if ( new File ( groovyDocResourcesPathInSubproject ) . exists ( ) ) {
+ SRC_TESTFILES = groovyDocResourcesPathInSubproject ;
+ }
+ else if ( new File ( groovyDocResourcesPathFromMainProject ) . exists ( ) ) {
+ SRC_TESTFILES = groovyDocResourcesPathFromMainProject ;
+ }
+ else {
+ fail ( STRING2 ) ;
+ SRC_TESTFILES = STRING3 ;
+ }
+ }
+
public GroovyDocTest ( String name ) {
super ( name ) ;
}
|
made tests runnable from intellij
|
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Change Codahale to Dropwizard in Javadoc
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class CustomFoldingSurroundDescriptor implements SurroundDescriptor {
@ override
public boolean isApplicable ( @ notnull PsiElement [ ] elements ) {
if ( elements . length == NUMBER0 ) return false ;
+ if ( elements [ NUMBER0 ] . getContainingFile ( ) instanceof PsiCodeFragment ) {
+ return false ;
+ }
for ( FoldingBuilder each : LanguageFolding . INSTANCE . allForLanguage ( elements [ NUMBER0 ] . getLanguage ( ) ) ) {
if ( each instanceof CustomFoldingBuilder ) return true ;
}
|
disable custom folding surrounder for debugger evaluate fragment
|
<nb> public interface ComponentMetadataHandler {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
- COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
|
Tweak docs for ComponentMetadataHandler
|
<nb> public final class AppSettings extends HashMap < String , Object > {
defaults . put ( STRING0 , NUMBER0 ) ;
defaults . put ( STRING1 , NUMBER0 ) ;
defaults . put ( STRING2 , false ) ;
- defaults . put ( STRING3 , STRING4 ) ;
+ defaults . put ( STRING3 , JmeVersion . FULL_NAME ) ;
defaults . put ( STRING5 , LWJGL_OPENGL2 ) ;
defaults . put ( STRING6 , LWJGL_OPENAL ) ;
defaults . put ( STRING7 , true ) ;
|
Changed the default app title in AppSettings to use the full name string from JmeVersion
|
<nb>
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removed unused import
|
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public class SavedRequest {
+ public class SavedRequest implements java . io . Serializable {
SINGLE
protected static final Log logger = LogFactory . getLog ( SavedRequest . class ) ;
|
Make SavedRequest serializable
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class OpenCloseIndexTests extends AbstractSharedClusterTest {
OpenIndexResponse openIndexResponse = client ( ) . admin ( ) . indices ( ) . prepareOpen ( STRING0 ) . execute ( ) . actionGet ( ) ;
assertThat ( openIndexResponse . isAcknowledged ( ) , equalTo ( true ) ) ;
assertIndexIsOpenedOnAllNodes ( STRING0 ) ;
+
+ SINGLE
+ closeIndexResponse = client ( ) . admin ( ) . indices ( ) . prepareClose ( STRING0 ) . setTimeout ( TimeValue . timeValueMillis ( NUMBER0 ) ) . execute ( ) . actionGet ( ) ;
+ assertThat ( closeIndexResponse . isAcknowledged ( ) , equalTo ( false ) ) ;
+ SINGLE
+ assertIndexIsClosed ( STRING0 ) ;
}
private void assertIndexIsOpened ( String . . . indices ) {
|
Added acknowledgment timeout test to OpenCloseIndexTests
|
<nb> public class ForgeVersion
SINGLE
public static final int minorVersion = NUMBER0 ;
SINGLE
- public static final int revisionVersion = NUMBER1 ;
+ public static final int revisionVersion = NUMBER2 ;
SINGLE
public static final int buildVersion = NUMBER3 ;
SINGLE
|
Bump version for Recomended Build
|
<nb> public class QueryStats
public void recordAnalysisStart ( )
{
Preconditions . checkState ( createNanos > NUMBER0 , STRING0 ) ;
- queuedTime = System . nanoTime ( ) - createNanos ;
+ queuedTime = ( long ) Duration . nanosSince ( createNanos ) . toMillis ( ) ;
}
public void recordExecutionStart ( )
|
Convert query queued time to mills
|
<nb> public class Execution {
log ( FORCE , t ) ;
exitCode = NUMBER0 ;
}
- endTrack ( STRING0 ) ; SINGLE
+ endTracksTo ( STRING0 ) ; SINGLE
if ( exit ) {
System . exit ( exitCode ) ;
}
|
Fix bug in Execution that s been bugging me for ages
|
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ nonextensible
public class CopySpecWrapper implements CopySpec {
private final CopySpec delegate ;
|
Make this non extensible
|
<nb> public class ClosureException extends RuntimeException {
private final Closure closure ;
public ClosureException ( Closure closure , Throwable cause ) {
- super ( STRING0 + closure + STRING1 + cause , cause ) ;
+ super ( STRING0 + closure + STRING2 + cause , cause ) ;
this . closure = closure ;
}
|
Fix typo in ClosureException
|
<nb> public class ShadowLogger {
debug , error , info , verbose , warning , wtf
}
- static class LogItem {
+ public static class LogItem {
public final LogType type ;
public final String tag ;
public final String msg ;
|
made LogItem public
|
<nb> public class LogbackLoggingSystem extends AbstractLoggingSystem {
Assert . notNull ( configLocation , STRING0 ) ;
String resolvedLocation = SystemPropertyUtils . resolvePlaceholders ( configLocation ) ;
ILoggerFactory factory = StaticLoggerBinder . getSingleton ( ) . getLoggerFactory ( ) ;
- Assert . isInstanceOf ( LoggerContext . class , factory ,
- STRING1
- + STRING2
- + STRING3 + factory . getClass ( ) + STRING4 ) ;
+ Assert . isInstanceOf (
+ LoggerContext . class ,
+ factory ,
+ String . format (
+ STRING5
+ + STRING6
+ + STRING7 ,
+ factory . getClass ( ) , factory . getClass ( ) . getProtectionDomain ( )
+ . getCodeSource ( ) . getLocation ( ) ) ) ;
+
LoggerContext context = ( LoggerContext ) factory ;
context . stop ( ) ;
context . reset ( ) ;
|
Include code source location in message for competing LoggerFactory impl
|
<nb> class Scroller {
COMMENT
- COMMENT
+ COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
<nb> public class Solo {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
|
Clarified javadoc for scrollToSide in Solo and Scroller
|
<nb> public class MysqlPersistenceService implements QueryablePersistenceService , Man
COMMENT
COMMENT
public void updated ( Dictionary < String , ? > config ) throws ConfigurationException {
+ logger . debug ( STRING0 ) ;
if ( config != null ) {
Enumeration < String > keys = config . keys ( ) ;
<nb> public class MysqlPersistenceService implements QueryablePersistenceService , Man
waitTimeout = Integer . parseInt ( tmpString ) ;
}
+ SINGLE
disconnectFromDatabase ( ) ;
connectToDatabase ( ) ;
SINGLE
initialized = true ;
+
+ logger . debug ( STRING1 ) ;
}
}
|
Add startup debug logging
|
<nb> public abstract class ConnectionProxy implements IHikariConnectionProxy
final int length = openStatements . size ( ) ;
for ( int i = NUMBER0 ; i < length ; i ++ )
{
- openStatements . get ( i ) . close ( ) ;
+ try
+ {
+ openStatements . get ( i ) . close ( ) ;
+ }
+ catch ( SQLException e )
+ {
+ checkException ( e ) ;
+ }
}
if ( ! getAutoCommit ( ) )
|
Ensure that even if a close statement fails during connection close that we continue to try to close additional statements
|
<nb> public class LoggingConfigurationProcessor implements DeploymentUnitProcessor {
COMMENT
COMMENT
COMMENT
- COMMENT
COMMENT
- COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class LoggingConfigurationProcessor implements DeploymentUnitProcessor {
@ override
public boolean accepts ( final VirtualFile file ) {
- return file . isDirectory ( ) || configFiles . contains ( file . getName ( ) ) ;
+ return configFiles . contains ( file . getName ( ) ) ;
}
}
}
|
Remove directory match
|
<nb> public class InternalNioOutputBuffer
}
- private synchronized void writeToSocket ( ByteBuffer bytebuffer , boolean flip ) throws IOException {
+ private synchronized int writeToSocket ( ByteBuffer bytebuffer , boolean flip ) throws IOException {
SINGLE
if ( flip ) bytebuffer . flip ( ) ;
int written = NUMBER0 ;
<nb> public class InternalNioOutputBuffer
}
socket . getBufHandler ( ) . getWriteBuffer ( ) . clear ( ) ;
this . total = NUMBER0 ;
+ return written ;
}
|
return the amount of bytes written
|
<nb> public class StringUtil
boolean backOverWhitespace )
{
if ( backOverWhitespace )
- while ( string . substring ( pos - NUMBER0 , pos ) . matches ( STRING0 ) )
+ while ( pos > NUMBER1 && string . substring ( pos - NUMBER0 , pos ) . matches ( STRING0 ) )
-- pos ;
int startPos = Math . max ( NUMBER1 , pos - NUMBER0 ) ;
<nb> public class StringUtil
string . substring ( endPos , endPos + NUMBER0 ) . matches ( tokenRegex ) )
++ endPos ;
+ if ( startPos >= endPos )
+ return STRING1 ;
+
return string . substring ( startPos + NUMBER0 , endPos ) ;
}
|
avoid infinite loop in getToken
|
<nb> public class ProcessorManager implements Handler {
}
}
- try {
- JavaFile . builder ( ClassNames . FLOW_MANAGER_PACKAGE ,
- new FlowManagerHolderDefinition ( processorManager ) . getTypeSpec ( ) )
- . build ( ) . writeTo ( processorManager . getProcessingEnvironment ( ) . getFiler ( ) ) ;
- } catch ( IOException e ) {
+ if ( roundEnvironment . processingOver ( ) )
+ {
+ try
+ {
+ JavaFile . builder ( ClassNames . FLOW_MANAGER_PACKAGE ,
+ new FlowManagerHolderDefinition ( processorManager ) . getTypeSpec ( ) )
+ . build ( ) . writeTo ( processorManager . getProcessingEnvironment ( ) . getFiler ( ) ) ;
+ }
+ catch ( IOException e )
+ {
+ logError ( e . getMessage ( ) ) ;
+ }
}
}
}
|
Push the holder file write to the last round as well
|
<nb> public final class GruntMojo extends AbstractMojo {
COMMENT
COMMENT
COMMENT
- @ parameter
+ @ parameter ( property = STRING0 )
private String arguments ;
@ override
<nb> public final class InstallNodeAndNpmMojo extends AbstractMojo {
COMMENT
COMMENT
COMMENT
- @ parameter ( defaultValue = STRING1 )
+ @ parameter ( property = STRING2 , defaultValue = STRING1 )
private File workingDirectory ;
COMMENT
COMMENT
COMMENT
- @ parameter ( required = true )
+ @ parameter ( property = STRING3 , required = true )
private String nodeVersion ;
COMMENT
COMMENT
COMMENT
- @ parameter ( required = true )
+ @ parameter ( property = STRING4 , required = true )
private String npmVersion ;
@ override
<nb> public final class KarmaRunMojo extends AbstractMojo {
COMMENT
COMMENT
COMMENT
- @ parameter ( defaultValue = STRING5 )
+ @ parameter ( defaultValue = STRING5 , property = STRING6 )
private String karmaConfPath ;
COMMENT
|
Add property annotations
|
<nb> import NAMESPACE ;
public class ReservoirSegmentSampler
{
- private final Random rand = new Random ( ) ;
public BalancerSegmentHolder getRandomBalancerSegmentHolder ( final List < ServerHolder > serverHolders )
{
+ final Random rand = new Random ( ) ;
ServerHolder fromServerHolder = null ;
DataSegment proposalSegment = null ;
int numSoFar = NUMBER0 ;
|
finished profiling here
|
<nb> public abstract class GrammaticalStructure extends TreeGraph {
private List < TypedDependency > getDeps ( boolean getExtra , Filter < TypedDependency > puncTypedDepFilter ) {
List < TypedDependency > basicDep = Generics . newArrayList ( ) ;
- for ( Dependency < Label , Label , Object > d : dependencies ( ) ) {
+ for ( Dependency < Label , Label , Object > d : dependencies ) {
TreeGraphNode gov = ( TreeGraphNode ) d . governor ( ) ;
TreeGraphNode dep = ( TreeGraphNode ) d . dependent ( ) ;
GrammaticalRelation reln = getGrammaticalRelation ( gov , dep ) ;
<nb> public abstract class GrammaticalStructure extends TreeGraph {
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- private Set < Dependency < Label , Label , Object > > dependencies ( ) {
- return dependencies ;
- }
-
- COMMENT
COMMENT
COMMENT
COMMENT
|
Remove an unused method
|
<nb> public class Activity extends ContextThemeWrapper
SINGLE
SINGLE
SINGLE
- EventLog . writeEvent ( NUMBER0 , NUMBER1 , item . getTitleCondensed ( ) ) ;
+ EventLog . writeEvent ( NUMBER0 , NUMBER1 , item . getTitleCondensed ( ) . toString ( ) ) ;
if ( onOptionsItemSelected ( item ) ) {
return true ;
}
<nb> public class Activity extends ContextThemeWrapper
return false ;
case Window . FEATURE_CONTEXT_MENU :
- EventLog . writeEvent ( NUMBER0 , NUMBER2 , item . getTitleCondensed ( ) ) ;
+ EventLog . writeEvent ( NUMBER0 , NUMBER2 , item . getTitleCondensed ( ) . toString ( ) ) ;
if ( onContextItemSelected ( item ) ) {
return true ;
}
|
Fix EventLog string class problem in onOptionMenuSelected
|
<nb> public class ShadowView {
public void setOnFocusChangeListener ( View . OnFocusChangeListener listener ) {
onFocusChangeListener = listener ;
}
+
+ @ implementation
+ public View . OnFocusChangeListener getOnFocusChangeListener ( ) {
+ return onFocusChangeListener ;
+ }
@ implementation
public void invalidate ( ) {
|
Added getOnFocusChangeListener method to ShadowView
|
<nb> public class PackageNamesLoaderTest {
private static URL getMockUrl ( final URLConnection connection ) throws IOException {
final URLStreamHandler handler = new URLStreamHandler ( ) {
@ override
- protected URLConnection openConnection ( final URL url ) {
+ protected URLConnection openConnection ( final URL u ) {
return connection ;
}
} ;
<nb> public class XMLLoggerTest {
private static final long serialVersionUID = NUMBER0 ;
@ override
- public void printStackTrace ( PrintWriter printWriter ) {
- printWriter . print ( STRING0 ) ;
+ public void printStackTrace ( PrintWriter s ) {
+ s . print ( STRING0 ) ;
}
}
<nb> public class FileTabCharacterCheckTest
extends BaseCheckTestSupport {
@ override
protected DefaultConfiguration createCheckerConfig (
- Configuration checkConfig ) {
+ Configuration config ) {
final DefaultConfiguration dc = new DefaultConfiguration ( STRING1 ) ;
- dc . addChild ( checkConfig ) ;
+ dc . addChild ( config ) ;
return dc ;
}
|
Rename parameters to match names in overridden methods
|
<nb> public class TestTomcat extends TomcatBaseTest {
try {
is = conn . getInputStream ( ) ;
reader = new InputStreamReader ( is ) ;
- reader . read ( cbuf ) ;
- res . getWriter ( ) . write ( cbuf ) ;
+ int len = reader . read ( cbuf ) ;
+ res . getWriter ( ) . write ( cbuf , NUMBER0 , len ) ;
} finally {
if ( reader != null ) {
try { reader . close ( ) ; } catch ( IOException ioe ) { COMMENT }
|
Fix FindBugs warning
|
<nb> public class LzoJsonLoader extends LzoBaseLoadFunc {
LOG . warn ( STRING0 + line , e ) ;
incrCounter ( LzoJsonLoaderCounters . LinesParseErrorBadNumber , NUMBER0 ) ;
return null ;
+ } catch ( ClassCastException e ) {
+ LOG . warn ( STRING1 + line , e ) ;
+ incrCounter ( LzoJsonLoaderCounters . LinesParseError , NUMBER0 ) ;
+ return null ;
}
}
}
|
Handle corrupted line
|
<nb> public class PhotoViewerActivity extends SherlockActivity implements OnUploadCha
mIv . post ( new Runnable ( ) {
public void run ( ) {
+ mUpload . setFilterUsed ( mFilter ) ;
mIv . setImageBitmap ( filteredBitmap ) ;
}
} ) ;
<nb> import NAMESPACE ;
public abstract class PhotoUpload {
- private Uri mEditedPhotoUri ;
+ private Filter mFilter ;
public abstract Uri getOriginalPhotoUri ( ) ;
<nb> public abstract class PhotoUpload {
return STRING0 + getOriginalPhotoUri ( ) ;
}
- public void setEditedPhotoUri ( Uri uri ) {
- mEditedPhotoUri = uri ;
+ public void setFilterUsed ( Filter filter ) {
+ mFilter = filter ;
}
- public Uri getEditedPhotoUri ( ) {
- return mEditedPhotoUri ;
+ public Filter getFilterUsed ( ) {
+ return mFilter ;
}
@ override
|
Set Filter on PhotoUpload
|
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import static NAMESPACE ;
-
import static NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
<nb> public abstract class Client < T > extends LifecycleAdapter implements ChannelPipel
@ override
public void release ( )
{
- channelPool . release ( ) ;
+ if ( channelPool != null )
+ {
+ channelPool . release ( ) ;
+ }
}
} ;
}
|
Fix NPE in com Client
|
<nb>
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class FailureDetectorConfig {
public static final long DEFAULT_ASYNC_RECOVERY_INTERVAL = NUMBER0 ;
- public static final List < String > DEFAULT_CATASTROPHIC_ERROR_TYPES = ImmutableList . of ( UnknownHostException . class . getName ( ) ,
+ public static final List < String > DEFAULT_CATASTROPHIC_ERROR_TYPES = ImmutableList . of ( ConnectException . class . getName ( ) ,
+ UnknownHostException . class . getName ( ) ,
NoRouteToHostException . class . getName ( ) ) ;
public static final long DEFAULT_REQUEST_LENGTH_THRESHOLD = NUMBER1 ;
|
Adding ConnectException back as catastrophic exception until the time FD is fixed
|
<nb> public class ManagedSetModelProjection < M > extends TypeCompatibilityModelProjecti
@ override
public M getInstance ( ) {
Class < M > clazz = getType ( ) . getConcreteClass ( ) ; SINGLE
- Object view = Proxy . newProxyInstance ( clazz . getClassLoader ( ) , new Class [ ] { clazz , ManagedInstance . class } , new ManagedSetViewInvocationHandler ( ) ) ;
+ Object view = Proxy . newProxyInstance ( clazz . getClassLoader ( ) , new Class < ? > [ ] { clazz , ManagedInstance . class } , new ManagedSetViewInvocationHandler ( ) ) ;
return Cast . uncheckedCast ( view ) ;
}
|
Fix compilation warning
|
<nb> public class OLiveQueryTest {
db . command ( new OCommandSQL ( STRING0 ) ) . execute ( ) ;
db . command ( new OCommandSQL ( STRING1 ) ) . execute ( ) ;
+ latch . await ( NUMBER0 , TimeUnit . MINUTES ) ;
+
db . command ( new OCommandSQL ( STRING2 + token ) ) . execute ( ) ;
db . command ( new OCommandSQL ( STRING3 ) ) . execute ( ) ;
db . command ( new OCommandSQL ( STRING1 ) ) ;
db . command ( new OCommandSQL ( STRING0 ) ) . execute ( ) ;
- latch . await ( NUMBER0 , TimeUnit . MINUTES ) ;
+
Assert . assertEquals ( listener . ops . size ( ) , NUMBER1 ) ;
for ( ORecordOperation doc : listener . ops ) {
Assert . assertEquals ( doc . type , ORecordOperation . CREATED ) ;
|
Fix OLiveQuery test failure on Travis
|
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
|
Removing unused imports
|
<nb>
package NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- @ entity @ suppresswarnings ( { STRING0 , STRING1 , STRING2 } )
+ @ suppresswarnings ( { STRING0 , STRING1 , STRING2 } )
public class MapreduceResults < T > {
DBObject rawResults = null ;
private Stats counts = new Stats ( ) ;
|
fails Entity Validation due to not having an Id
|
<nb> public class PathChildrenCache implements Closeable
POST_INITIALIZED_EVENT
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public void start ( StartMode mode ) throws Exception
{
Preconditions . checkState ( ! executorService . isShutdown ( ) , STRING0 ) ;
|
Added missing doc
|
<nb> public class HdfsSecurityUtil {
! ( ( ( List ) conf . get ( TOPOLOGY_AUTO_CREDENTIALS ) ) . contains ( AutoTGT . class . getName ( ) ) ) ) ) {
if ( UserGroupInformation . isSecurityEnabled ( ) ) {
SINGLE
- SINGLE
if ( isLoggedIn . compareAndSet ( false , true ) ) {
LOG . info ( STRING0 + TOPOLOGY_AUTO_CREDENTIALS ) ;
String keytab = ( String ) conf . get ( STORM_KEYTAB_FILE_KEY ) ;
|
Removing the unnecessary comment
|
<nb> public class AntStructuredElementImpl extends AntElementImpl implements AntStruc
if ( hasIdElement ( ) ) {
return computeAttributeValue ( getIdElement ( ) . getIdentifierName ( ) ) ;
}
- return super . getName ( ) ;
+ final XmlTag sourceElement = getSourceElement ( ) ;
+ return sourceElement != null ? sourceElement . getName ( ) : super . getName ( ) ;
}
public PsiElement setName ( @ notnull final String name ) throws IncorrectOperationException {
|
for getName replace text with tag name
|
<nb> public class Accounts extends K9ListActivity implements OnItemClickListener {
}
restoreAccountStats ( icicle ) ;
+ mHandler . setViewTitle ( ) ;
SINGLE
mNonConfigurationInstance = ( NonConfigurationInstance ) getLastNonConfigurationInstance ( ) ;
|
Set action bar title for Accounts activity in onCreate
|
<nb> public class EnglishGrammaticalRelations {
SINGLE
SINGLE
STRING0 + copularWordRegex + STRING1 + clausalComplementRegex + STRING2 ,
+
+ SINGLE
+ STRING3 + copularWordRegex + STRING4 ,
+
} ) ;
public static class XClausalComplementGRAnnotation extends GrammaticalRelationAnnotation { }
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
String [ ] testTrees = {
STRING5 ,
STRING6 ,
- SINGLE
- SINGLE
- SINGLE
+ STRING7 ,
STRING8 ,
STRING9 ,
STRING10 ,
<nb> public class EnglishGrammaticalStructureTest extends TestCase {
String [ ] testAnswers = {
STRING11 + STRING12 + STRING13 ,
STRING14 + STRING15 + STRING16 + STRING17 ,
- SINGLE
+ STRING18 + STRING19 + STRING20 + STRING21 + STRING22 ,
STRING18 + STRING19 + STRING23 + STRING24 + STRING25 ,
STRING26 + STRING27 + STRING28 ,
STRING29 + STRING30 + STRING31 + STRING32 + STRING33 ,
|
Use the HeadFinder to figure out whether we are looking at a copula verb head
|
<nb> public abstract class Ordering < T > implements Comparator < T > {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
|
Fix typo just because
|
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class JavaContentEntriesEditor extends CommonContentEntriesEditor {
@ override
protected JPanel createBottomControl ( Module module ) {
+ if ( Registry . is ( STRING0 ) ) return null ;
final JPanel innerPanel = new JPanel ( new GridBagLayout ( ) ) ;
innerPanel . setBorder ( BorderFactory . createEmptyBorder ( NUMBER0 , NUMBER1 , NUMBER1 , NUMBER0 ) ) ;
return innerPanel ;
|
don t create a filler for new project structure
|
<nb> public interface FilterFactory {
COMMENT
COMMENT
COMMENT
+ @ suppresswarnings ( STRING0 )
public static class FilterNotCreatedException extends Exception {
public FilterNotCreatedException ( Exception exception ) {
super ( exception . getMessage ( ) , exception ) ;
|
Suppress serialization warning
|
<nb> public class TestServlet extends HttpServlet {
out . println ( STRING0 ) ;
out . println ( STRING1 ) ;
out . println ( STRING2 ) ;
- out . println ( STRING3 ) ;
+ out . println ( STRING4 ) ;
out . println ( STRING5 ) ;
out . println ( STRING6 ) ;
out . println ( STRING7 ) ;
<nb> public class TestServlet extends HttpServlet {
SINGLE
SINGLE
SINGLE
- Transport . send ( message ) ;
+ Transport . send ( message , message . getAllRecipients ( ) ) ;
out . println ( STRING8 ) ;
|
Updating the list of recepients and title
|
<nb> public class IrcStack
synchronized ( this . irc )
{
SINGLE
- SINGLE
- SINGLE
- this . irc . disconnect ( ) ;
+ try
+ {
+ this . irc . disconnect ( ) ;
+ }
+ catch ( RuntimeException e )
+ {
+ SINGLE
+ SINGLE
+ LOGGER . debug ( STRING0 , e ) ;
+ }
this . irc = null ;
this . connectionState = null ;
}
|
Catch possible ChannelClosedException upon disconnecting
|
<nb> public class EditPeopleControlSet extends PopupControlSet {
if ( ! TextUtils . isEmpty ( assignedCustom . getText ( ) ) ) {
userJson = PeopleContainer . createUserJson ( assignedCustom ) ;
} else {
+ if ( ! hasLoadedUI ( ) || assignedList . getCheckedItemPosition ( ) == ListView . INVALID_POSITION ) {
+ if ( task != null )
+ return task . getValue ( Task . USER_ID ) == Task . USER_ID_SELF ;
+ else
+ return true ;
+ }
AssignedToUser item = ( AssignedToUser ) assignedList . getAdapter ( ) . getItem ( assignedList . getCheckedItemPosition ( ) ) ;
if ( item != null )
userJson = item . user ;
|
Fixed bug in quickadd when sharing links etc to Astrid
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.