diff
stringlengths
38
1.78k
msg_token
stringlengths
9
190
<nb> public class CodegenTestsOnAndroidRunner { downloader . downloadAll ( ) ; downloader . unzipAll ( ) ; - PermissionManager . setPermissions ( pathManager ) ; - String platformPrefixProperty = System . setProperty ( PlatformUtils . PLATFORM_PREFIX_KEY , STRING0 ) ; try { + PermissionManager . setPe...
Fix Android tests
<nb> public class ColumnSnapshotGenerator extends JdbcSnapshotGenerator { SINGLE } else if ( dataType . equalsIgnoreCase ( STRING0 ) || dataType . equalsIgnoreCase ( STRING1 ) ) { SINGLE - type . setColumnSize ( type . getColumnSize ( ) / NUMBER0 ) ; + type . setColumnSize ( columnMetadataResultSet . getInt (...
Fix size retrieval for NCHAR and NVARCHAR
<nb> public class SwitchStatementDensityInspection extends StatementInspection { public int m_limit = DEFAULT_DENSITY_LIMIT ; SINGLE public String getDisplayName ( ) { - return STRING0 ; + return STRING1 ; } public String getGroupDisplayName ( ) { <nb> public class SwitchStatementDensityInspection ext...
Change wording for switch branch density inspection
<nb> public class TestQueryDriversOperator } } - @ test + @ test ( enabled = false ) SINGLE public void testCancel ( ) throws Exception {
Disable broken test
<nb> public final class StringDeserializer extends StdScalarDeserializer < String > if ( p . hasToken ( JsonToken . VALUE_STRING ) ) { return p . getText ( ) ; } + JsonToken t = p . getCurrentToken ( ) ; SINGLE - if ( p . isExpectedStartArrayToken ( ) && ctxt . isEnabled ( DeserializationFeature . UNWRAP_SI...
Undo part of change done for StringDeserializer caused issues with XML handling
<nb> public class ApkMojo extends AbstractAndroidMojo { COMMENT COMMENT private String renameManifestPackage ; + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + private String renameInstrumentationTargetPackage ; COMMENT COMMENT <nb> public class ApkMojo extends A...
Adding support for rename instrumentation target package
<nb> public class View implements Drawable . Callback , KeyEvent . Callback , Accessibility } mPrivateFlags |= FORCE_LAYOUT ; + mPrivateFlags |= INVALIDATED ; if ( mParent != null && ! mParent . isLayoutRequested ( ) ) { mParent . requestLayout ( ) ; <nb> public class View implements Drawable . Callback...
Fix bug with display lists and layout
<nb> package NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ;
Fix missing Date import in Restore java
<nb> public class HttpRequest { Log . d ( ACRA . LOG_TAG , STRING0 + url ) ; + SINGLE + SINGLE + SINGLE final HttpResponse response = httpClient . execute ( httpPost , localContext ) ; if ( response != null ) { final StatusLine statusLine = response . getStatusLine ( ) ;
Added comment to HttpRequest may have found cause of multiple report notifications
<nb> public class H2ODriver extends Configured implements Tool { conf . set ( STRING0 , STRING1 ) ; conf . set ( STRING2 , STRING1 ) ; + conf . set ( STRING3 , jobtrackerName ) ; SINGLE SINGLE Job job = new Job ( conf , jobtrackerName ) ; - conf . set ( STRING4 , jobtrackerName ) ; job . setJarByCla...
Fix setting of jobtrackername
<nb> public class CredentialsAPI implements . setPasswordLoginSupported ( true ) ; if ( ! onlyPasswords ) { - crBuilder . setAccountTypes ( IdentityProviders . GOOGLE ) ; + crBuilder . setAccountTypes ( + IdentityProviders . GOOGLE , + IdentityProviders . TWITTER , + IdentityProviders . FACEBOOK ) ; }...
Add Twitter and Facebook IDP SmartLock support
<nb> public class DesktopSharingButton JMenuItem shareRegion = new JMenuItem ( GuiActivator . getResources ( ) . getI18NString ( STRING0 ) ) ; - shareRegion . setEnabled ( false ) ; - popupMenu . add ( shareFullScreen ) ; popupMenu . add ( shareRegion ) ; <nb> public class DesktopSharingButton ret...
Enables zone desktop sharing
<nb> public class App extends CordovaPlugin { COMMENT COMMENT public void clearHistory ( ) { - this . webView . clearHistory ( ) ; + cordova . getActivity ( ) . runOnUiThread ( new Runnable ( ) { + public void run ( ) { + webView . clearHistory ( ) ; + } + } ) ; } COMMENT
Wrapping this so it runs on the UI thread
<nb> public static class SyntaxQuoteReader extends AFn { throw new IllegalStateException ( STRING0 ) ; else if ( form instanceof IPersistentCollection ) { - if ( form instanceof IPersistentMap ) + if ( form instanceof IRecord ) + ret = form ; + else if ( form instanceof IPersistentMap ) { IPersistentV...
syntax quote was walking records returning maps
<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 N...
Test framework should set MemberImpl lastRead time when a packet is sent
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public abstract class AbstractVcsTestCase { } Collections . addAll ( arguments , commandLine ) ; if ( myTraceClient ) { - System . o...
further debugging blinking perforce tests
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; public abstract class MultiTenantConfigBase {
fix wrong imports in MultiTenantConfigBase
<nb> public class TaskListFragment extends ListFragment implements OnScrollListener , } case CONTEXT_MENU_DELETE_TASK_ID : { itemId = item . getGroupId ( ) ; - Task task = new Task ( ) ; - task . setId ( itemId ) ; + Task task = taskService . fetchById ( itemId , Task . ID , Task . UUID ) ; deleteTask ( t...
Fixed a bug that could mess up order hierarchy when deleting tasks
<nb> public class TupleImpl extends IndifferentAccessMap implements Seqable , Indexed , } public boolean isTick ( ) { - return this . getSourceComponent ( ) . equals ( Constants . SYSTEM_COMPONENT_ID ) && - this . getSourceStreamId ( ) . equals ( Constants . SYSTEM_TICK_STREAM_ID ) ; + return Constants . SY...
Resolve NPE that can occur if there is no SourceComponent in a Tuple
<nb> public class ODocument extends ORecordSchemaAwareAbstract < Object > implements Ite return ( ODocument ) this ; } - @ override - public void unsetDirty ( ) { - _fieldOriginalValues = null ; - _fieldCollectionChangeTimeLines = null ; - super . unsetDirty ( ) ; - } - COMMENT COMMENT COMMENT...
once a hook changed the document the unsetDirty method was called that reset tracked collection
<nb> public class DefaultGroovyStaticMethods { COMMENT COMMENT COMMENT - COMMENT + COMMENT COMMENT protected static void sleepImpl ( Object object , long millis , Closure closure ) { long start = System . currentTimeMillis ( ) ; <nb> public class DefaultGroovyStaticMethods { COMMENT COMMENT COMM...
Corrected javadoc for sleep
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + COMMENT + COMMENT + COMMENT public class ListManageDialogFragment extends DialogFragment { public static ListManageDialogFragment newInstance ( String listId ) { <nb> public class ListManageDialogFragment extends DialogFragment { @ ov...
Properly send view for list manage dialog add description
<nb> public class JavaSourceCodehausPackagesSuite { suite . addTestSuite ( ForTest . class ) ; suite . addTestSuite ( GetPropertyTest . class ) ; suite . addTestSuite ( GroovyTest . class ) ; - suite . addTestSuite ( GroovycTest . class ) ; + SINGLE suite . addTestSuite ( GroovyClassLoaderTest . class ) ; ...
Temporarily remove the Groovyc test to avoid a broken build
<nb> public interface RequestSpec { URI getUrl ( ) ; + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT default RequestSpec connectTimeoutSeconds ( int seconds ) { return connectTimeout ( Duration . of ( seconds , SECONDS ) ) ; } + COM...
Javadoc for http client connect timeout
<nb> public class Ouya { try { Class < ? > buildClass = Class . forName ( STRING0 ) ; Field deviceField = buildClass . getDeclaredField ( STRING1 ) ; - isOuya = STRING2 . equals ( deviceField . get ( null ) ) ; + Object device = deviceField . get ( null ) ; + isOuya = STRING3 . equals ( device ) || STRING2 ...
Added check for new OUYA device name
<nb> public class PeerGroup extends AbstractIdleService implements TransactionBroadca SINGLE SINGLE @ guardedby ( STRING0 ) private int maxConnections ; + SINGLE + private volatile int vMinRequiredProtocolVersion = FilteredBlock . MIN_PROTOCOL_VERSION ; SINGLE SINGLE <nb> public class PeerGroup extend...
Require Bloom filtering capable peers by default
<nb> public class YoutubeVideoUrlIdHandler implements VideoUrlIdHandler { throw new ParsingException ( STRING0 , uee ) ; } } else { - id = Parser . matchGroup1 ( STRING1 , url ) ; + id = Parser . matchGroup1 ( STRING2 , url ) ; } } else if ( url . contains ( STRING3 ) ) {
fixed another pattern problem
<nb> public class TestResultAnalyzer { TestSize expectedSize = TestSize . getTestSize ( expectedTimeout ) ; if ( verbose ) { StringBuilder builder = new StringBuilder ( String . format ( - STRING0 + STRING1 + STRING2 , + target . getLabel ( ) , maxTimeOfShard / FLOAT0 , specifiedTimeout . prettyPrint ...
Test execution time warning contains target name
<nb> public final class DirectCandidateGeneratorBuilder implements CandidateGenerator DirectCandidateGeneratorBuilder tempGenerator = new DirectCandidateGeneratorBuilder ( STRING0 ) ; SINGLE Set < String > tmpFieldName = new HashSet < > ( NUMBER0 ) ; - PARSER . parse ( parseContext . parser ( ) , new Tuple < Se...
Remove redundant generics type declaration
<nb> public class ODocument extends ORecordSchemaAwareAbstract < Object > implements Ite cloned . _fieldTypes = new HashMap < String , OType > ( _fieldTypes ) ; cloned . _fieldOriginalValues = null ; + cloned . _dirty = _dirty ; return cloned ; } <nb> public class SQLSelectTest { } @ test + publ...
Fixed dirty flag on ODocument cloning
<nb> import NAMESPACE ; COMMENT COMMENT @ incubating - public interface JvmTestSuiteSpec extends TestSuiteSpec { + public interface JvmTestSuiteSpec extends TestSuiteSpec , JvmComponentSpec { @ override JvmComponentSpec getTestedComponent ( ) ; }
Make JvmTestSuiteSpec extend JvmComponentSpec
<nb> public class ConfigureMapMenu { AccessibleToast . makeText ( app , R . string . renderer_load_exception , Toast . LENGTH_SHORT ) . show ( ) ; } adapter . setItemDescription ( pos , getRenderDescr ( activity ) ) ; + activity . getDashboard ( ) . refreshContent ( true ) ; dialog . dismiss ( ) ; }
Fix refresh issue
<nb> public abstract class Model < M extends Model < M , P , O > , P extends Model . Parameters , public double score ( double [ ] data ) { return ArrayUtils . maxIndex ( score0 ( data , new float [ _output . nclasses ( ) ] ) ) ; } @ override protected Futures remove_impl ( Futures fs ) { - for ( Key k : _outpu...
Add NPE check
<nb> public abstract class AsynchronousProcessor implements AsyncSupport < AtmosphereRe } if ( config . handlers ( ) . isEmpty ( ) ) { - logger . error ( STRING0 ) ; - throw new AtmosphereMappingException ( STRING1 ) ; + logger . error ( STRING2 ) ; + throw new AtmosphereMappingException ( STRING2 ) ; }...
Improve error message
<nb> package NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class DefaultFileHttpTransmitter implements FileHttpTransmitter { return ; } - channel . ...
Don t send a full http response if we are sending a file
<nb> public class PojoProduceProxyInterceptEndpointTest extends TestCase { context . stop ( ) ; } - public static interface EchoService { - public String echo ( String word ) ; + public interface EchoService { + String echo ( String word ) ; } public static class MyBean {
Fixed the CS error of camel core
<nb> public class RenderTank extends TileEntitySpecialRenderer { GL11 . glBlendFunc ( GL11 . GL_SRC_ALPHA , GL11 . GL_ONE_MINUS_SRC_ALPHA ) ; func_110628_a ( FluidRenderer . getFluidSheet ( liquid ) ) ; - + FluidRenderer . colorFluid ( liquid ) ; + GL11 . glTranslatef ( ( float ) x + FLOAT0 , ( float ) y ...
Adds FluidStack color to tank Render
<nb> public class SASLAuthentication { SINGLE final Map < String , Object > props = new HashMap < > ( ) ; - props . put ( LocalClientSession . class . getCanonicalName ( ) , session ) ; + props . put ( LocalSession . class . getCanonicalName ( ) , session ) ; props . put ( Sasl . POLICY_NOANONYMOUS , Boolea...
Fix ANONYMOUS Sasl mechanism
<nb> public class RealmList < E extends RealmObject > extends AbstractList < E > { } COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT - COMMENT + COMMENT COMMENT public boolean isValid ( ) { SINGLE
Fix RealmList isValid Javadoc
<nb> public class TouchUtils { float xStep = ( toX - fromX ) / stepCount ; MotionEvent event = MotionEvent . obtain ( downTime , eventTime , - MotionEvent . ACTION_DOWN , fromX , y , NUMBER0 ) ; + MotionEvent . ACTION_DOWN , x , y , NUMBER0 ) ; inst . sendPointerSync ( event ) ; inst . waitForIdleSync ( )...
Fix x coordinate of the ACTION_UP event in TouchUtils drag method
<nb> public class GeoPointFieldMapperTests extends ESSingleNodeTestCase { final int numHashes = hashes . size ( ) ; for ( int i = NUMBER0 ; i < numHashes ; ++ i ) { String hash = STRING0 . substring ( NUMBER0 , numHashes - i ) ; - Object expected = version . before ( Version . V_5_0_0_alpha1 ) ? hash : new Byte...
Fix expectations of GeoPointFieldMapperTests
<nb> import NAMESPACE ; import NAMESPACE ; public class MetricsServlet extends HttpServlet implements MetricProcessor < MetricsServlet . Context > { + private static final long serialVersionUID = NUMBER0 ; private static final Logger LOGGER = LoggerFactory . getLogger ( MetricsServlet . class ) ; public sta...
Add a serialVersionUID to MetricsServlet
<nb> public class ContactsActivity extends XmppActivity { } private boolean isMuc ( Contact contact ) { - String server = contact . getJid ( ) . split ( STRING0 ) [ NUMBER0 ] ; - return getMucServers ( ) . contains ( server ) ; + String [ ] parts = contact . getJid ( ) . split ( STRING0 ) ; + if ( parts ....
fixed array out of bounds in isMuc
<nb> public class SimpleIndicesWarmerTests extends ElasticsearchIntegrationTest { @ test public void deleteNonExistentIndexWarmerTest ( ) { createIndex ( STRING0 ) ; - try { - client ( ) . admin ( ) . indices ( ) . prepareDeleteWarmer ( ) . setIndices ( STRING0 ) . setNames ( STRING1 ) . execute ( ) . actio...
Test remove timeout from deleteWarmer call with many shards that might just take a while
<nb> import NAMESPACE ; COMMENT COMMENT + COMMENT COMMENT + @ deprecated public abstract class AbstractContextualMonitor < T , M extends Monitor < T > > implements CompositeMonitor < T > { <nb> import NAMESPACE ; COMMENT COMMENT COMMENT + COMMENT COMMENT + @ deprecated public class Con...
Deprecated contextual monitor
<nb> package NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - import NAMESPACE ; + import NAMESPACE ; public class Agent implements IRef { volatile Object state ; <nb> boolean busy = false ; volatile ISeq errors = null ; SINGLE - final static Executor executor = Execu...
made executor public
<nb> public class NeuralNetConfiguration implements Serializable , Cloneable { @ deprecated private DefaultRandom rng = null ; private long seed = System . currentTimeMillis ( ) ; - @ deprecated private Distribution dist = new NormalDistribution ( FLOAT0 , NUMBER0 ) ; private LossFunctions . LossFunction lo...
Remove incorrect deprecated annotation
<nb> public class JsonHttpResponseHandler extends AsyncHttpResponseHandler { onSuccess ( ( JSONObject ) jsonResponse ) ; } else if ( jsonResponse instanceof JSONArray ) { onSuccess ( ( JSONArray ) jsonResponse ) ; + } else { + throw new JSONException ( STRING0 + jsonResponse . getClass ( ) . getName ( ) ) ; ...
Call onFailure when response is not valid JSON
<nb> public class Moco { } public static Resource version ( final String version ) { - return version ( text ( checkNotNullOrEmpty ( version , STRING0 ) ) ) ; + return version ( HttpProtocolVersion . versionOf ( checkNotNullOrEmpty ( version , STRING0 ) ) ) ; } public static Resource version ( final Htt...
checked http version in publish api
<nb> class MountService extends IMountService . Stub } public boolean hasExternalStorage ( int uid , String packageName ) { + SINGLE + SINGLE + if ( uid == Process . SYSTEM_UID ) { + return true ; + } SINGLE for ( ExternalStorageMountPolicy policy : mPolicies ) { final boolean policyHasStorage = p...
Avoid a deadlock between PMS and AppOpsService
<nb> public final class CellSignalStrengthLte extends CellSignalStrength implements P COMMENT COMMENT public void initialize ( SignalStrength ss , int timingAdvance ) { - mSignalStrength = ss . getLteSignalStrenght ( ) ; + mSignalStrength = ss . getLteSignalStrength ( ) ; mRsrp = ss . getLteRsrp ( ) ; mRs...
Fix misspelling of getLteSignalStrenght
<nb> public class CameraWidgetFrame extends KeyguardWidgetFrame implements View . OnCli return iv ; } + @ override + public void setPivotX ( float pivotX ) { + SINGLE + } + + @ override + public void setPivotY ( float pivotY ) { + SINGLE + } + public void render ( ) { final Throwable [ ] t...
Fix regression in camera transition
<nb> public class ServerTimeRejectionPolicyFactory implements RejectionPolicyFactory @ override public boolean accept ( long timestamp ) { - return timestamp >= ( System . currentTimeMillis ( ) - windowMillis ) ; + long now = System . currentTimeMillis ( ) ; + + boolean notTooOld = timestamp >= ( now - wi...
make ServerTimeRejectionPolicy also reject timestamps AHEAD of server time
<nb> public class BlockingQueueConsumer < T > implements QueueConsumer < T > COMMENT public BlockingQueueConsumer ( ) { - items = new LinkedBlockingQueue < T > ( ) ; + this ( new LinkedBlockingQueue < T > ( ) ) ; } COMMENT <nb> public class BlockingQueueConsumer < T > implements QueueConsumer < T > ...
Added a ctor to wrap a given queue
<nb> public class HueBinding extends AbstractBinding < HueBindingProvider > implements M } SINGLE - activeBridge = new HueBridge ( bridgeIP , bridgeSecret ) ; - activeBridge . pairBridgeIfNecessary ( ) ; + if ( this . bridgeIP != null ) { + activeBridge = new HueBridge ( bridgeIP , bridgeSecret ) ; + ac...
improved startup behavior if no Hue bridge is found
<nb> public final class Tools { public static InputStream getInputStream ( final String resourcePath ) throws IOException { try { - SINGLE + SINGLE URL url = new URL ( resourcePath ) ; SINGLE InputStream is = url . openStream ( ) ; <nb> public final class Tools { } catch ( MalformedURLException e ) ...
improve exception message
<nb> import NAMESPACE ; COMMENT public abstract class CommonXml implements XMLElementReader < List < ModelNode > > , XMLElementWriter < ModelMarshallingContext > { + SINGLE + protected static final Logger log = Logger . getLogger ( STRING0 ) ; + COMMENT protected static final Set < String > RESTRICTED_P...
Make logger visible
<nb> public class HueSettings { settingsData = new SettingsTree ( mapper . readValue ( settings , Map . class ) ) ; } catch ( Exception e ) { - logger . error ( STRING0 ) ; + logger . error ( STRING0 , e ) ; } } <nb> public class HueBridge { + response . getStatus ( ) ) ; return null ; } + log...
Improve logging output for HueBinding when retrieving settings from Bridge
<nb> public class ScheduledJob } } ; - public void runEvery_Seconds ( int seconds ) + public void runEveryXSeconds ( int seconds ) { }
Renamed a method for better readability
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class SettingsGeneralActivity extends SettingsBaseActivity { } , new Runnable ( ) { @ override public void run ( ) { + Toast ...
Fix small issues
<nb> public class FileFilters { private FileFilters ( ) { } + COMMENT + COMMENT + COMMENT public static FileFilter withExtension ( @ notnull final String extension ) { return new FileFilter ( ) { @ override
add isFile check to filtering by extension in non performance critical places
<nb> public class EmbeddedMojo extends AbstractExecMojo { COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT protected String duration ;
Fixed the NPE when using the embedded goal of camel maven plugin
<nb> public class DeskShareStream implements NewScreenListener { this . frameRate = frameRate ; this . timestampBase = NUMBER0 / this . frameRate ; this . changedTileProcessor = new ChangedTileProcessor ( width , height ) ; - SINGLE - SINGLE - calculateEncodingDimensions ( ) ; + encodingHeight = height ; ...
don t resize screen capture size
<nb> public enum AndroidExcludedRefs { } } , + ACTIVITY_MANAGER_MCONTEXT ( SAMSUNG . equals ( MANUFACTURER ) && SDK_INT == LOLLIPOP_MR1 ) { + @ override void add ( ExcludedRefs . Builder excluded ) { + excluded . staticField ( STRING0 , STRING1 ) + . reason ( STRING2 + + STRING3 + + STRING4 + + STRI...
Ignore Samsung ActivityManager context leak on L
<nb> public abstract class PropertyProviderFinder extends AntDomRecursiveVisitor { private Map < String , List < String > > myDependenciesMap = new HashMap < String , List < String > > ( ) ; SINGLE private Set < String > myProcessedTargets = new HashSet < String > ( ) ; + private Set < AntDomProject > myVisited...
fix stack overflow
<nb> public class EndpointWebMvcAutoConfigurationTests { EmbeddedServletContainerAutoConfiguration . class , DispatcherServletAutoConfiguration . class , WebMvcAutoConfiguration . class , ManagementServerPropertiesAutoConfiguration . class , - EndpointWebMvcAutoConfiguration . class ) ; + EndpointWebMvcAutoCo...
Fix broken test
<nb> public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto public boolean isPoweredTile ( TileEntity tile , ForgeDirection side ) { if ( tile == null ) { return false ; - } else if ( tile instanceof IPowerReceptor ) { - return ( ( IPowerReceptor ) tile ) . getPowerReceiver ( side . ...
fixed powered tile detection for engines following RF migration
<nb> public class StatsSearchTermsFragment extends StatsAbstractListFragment { COMMENT COMMENT COMMENT - COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT
Better commenting a part of the new code that could seem a little obscure
<nb> public class PlanGeneratorTest { COMMENT COMMENT COMMENT - class CalendarServiceDataStub extends CalendarServiceData { + private static final class CalendarServiceDataStub extends CalendarServiceData { private static final long serialVersionUID = NUMBER0 ; final Set < AgencyAndId > serviceIds ; <...
Make inner classes in PlanGeneratorTest private static and final
<nb> public class Unifier { if ( tokSequence . size ( ) == readingsCounter ) { tokSequence . add ( new AnalyzedTokenReadings ( aToken , NUMBER0 ) ) ; } else { - tokSequence . get ( readingsCounter ) . addReading ( aToken ) ; + if ( readingsCounter < tokSequence . size ( ) ) { + tokSequence . get ( readingsC...
fix a problem with a Unifier thanks to Jaume Ortola i Font
<nb> public abstract class GrammaticalStructure extends TreeGraph { continue ; int parentId = Integer . parseInt ( parentIdStr ) - NUMBER0 ; String grelString = tokenFields . get ( i ) . get ( CoNLLX_RelnField ) ; - if ( grelString . equals ( STRING0 ) ) + if ( grelString . equals ( STRING0 ) || grelString . ...
Allow skipping of erased dependencies as well as null dependencies when reading in conll dependency trees
<nb> public class JacksonAutoConfigurationTests { ObjectMapper mapper = this . context . getBean ( ObjectMapper . class ) ; DateTime dateTime = new DateTime ( NUMBER0 , NUMBER1 , NUMBER2 , NUMBER3 , NUMBER4 , DateTimeZone . UTC ) ; assertEquals ( STRING0 , mapper . writeValueAsString ( dateTime ) ) ; - Date dat...
Fix customJodaDateTimeFormat to specify time zone when creating Date
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> public class ParseAndMarshalModelsTestCase { @ after public void cleanup ( ) throws Exception { ManagementFactory . getPlatformMBeanServer ( ) . unregist...
Don t leak MSC thread pools in test case
<nb> public class SearchManager COMMENT COMMENT public final static String SUGGEST_URI_PATH_QUERY = STRING0 ; + + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + public final static String SUGGEST_URI_PATH_SHORTCUT = STRING1 ; COMMENT COMMENT ...
Define the URI path columns and constants for shortcut validation
<nb> public class EclipseModelBuilder implements ToolingModelBuilder { } eclipseProject . setTasks ( tasks ) ; - List < String > natures = new ArrayList < String > ( ) ; - for ( String n : eclipseModel . getProject ( ) . getNatures ( ) ) { - natures . add ( n ) ; - } - eclipseProject . setProjectNatures...
In EclipseModelBuilder pass new collection instead of iterating
<nb> public class MessageDispatcher { long currentTime = getCurrentTime ( ) ; telegram . setTimestamp ( currentTime + ( long ) ( delay * NANOS_PER_SEC ) , timeGranularity ) ; - SINGLE - queue . add ( telegram ) ; + SINGLE + if ( ! queue . add ( telegram ) ) pool . free ( telegram ) ; if ( debugEnabled...
Put the telegram back to the pool if it s rejected by the queue
<nb> public class AccountSettingsFragment extends PreferenceFragment implements OnPre mEmailPreference . getEditText ( ) . setInputType ( InputType . TYPE_TEXT_VARIATION_EMAIL_ADDRESS ) ; mEmailPreference . setValidationType ( EditTextPreferenceWithValidation . ValidationType . EMAIL ) ; + mWebAddressPreference...
Web address preference now has an input type of URI
<nb> COMMENT package NAMESPACE ; + import NAMESPACE ; + import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; <nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; - import NAMESPACE ; - COMMENT COMMENT COMMENT <nb> public class StatefulInitMethodInterceptorFactory impleme...
Fix issue with stateful init methods
<nb> public abstract class ByteToMessageDecoder < O > ByteBuf in = ctx . inboundByteBuffer ( ) ; boolean decoded = false ; - for ( ; ; ) { + while ( in . readable ( ) ) { try { int oldInputLength = in . readableBytes ( ) ; O o = decode ( ctx , in ) ;
Only call ByteToMessageDecoder decode
<nb> import NAMESPACE ; import NAMESPACE ; import NAMESPACE ; + import NAMESPACE ; COMMENT COMMENT <nb> public interface Entity { COMMENT public EntityDamageEvent getLastDamageCause ( ) ; + COMMENT + COMMENT + COMMENT + COMMENT + public UUID getUniqueId ( ) ; }
Added UniqueId to entities
<nb> public class DependencyManager implements InstallShinyEvent . Handler STRING0 , userAction , new Dependency [ ] { - Dependency . embeddedPackage ( STRING1 ) + Dependency . embeddedPackage ( STRING1 ) , + Dependency . cranPackage ( STRING2 , STRING3 ) , + Dependency . cranPackage ( STRING4 , STRING3 )...
add additional dependencies required by profvis htmlwidgets and stringr
<nb> public class TagViewFragment extends TaskListFragment { SINGLE switch ( item . getItemId ( ) ) { case MENU_REFRESH_ID : - if ( actFmPreferenceService . isLoggedIn ( ) ) { refreshData ( true ) ; return true ; - } } return super . onOptionsItemSelected ( item ) ;
Removed conditions since we fixed this an alternate path
<nb> public class ProtocolProviderServiceJabberImpl { synchronized ( initializationLock ) { + SINGLE + SINGLE + SINGLE + SINGLE + if ( isRegistered ( ) ) + return ; + JabberLoginStrategy loginStrategy = createLoginStrategy ( ) ; userCredentials = loginStrategy . prepareLogin ( authority , reason...
Avoids second attempt to initialize a xmpp connection if several threads call register method
<nb> public class ApkBuilder { try { addResourcesFromJarMethod . invoke ( builder , new Object [ ] { jarFile } ) ; } catch ( InvocationTargetException e ) { - log . error ( STRING0 + jarFile . getAbsolutePath ( ) , e . getCause ( ) ) ; - throw new MojoExecutionException ( STRING0 + jarFile . getAbsolutePath (...
build error message only once
<nb> public class SecurityRulesDocIT extends ExclusiveServerTestBase COMMENT COMMENT COMMENT - COMMENT - COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT <nb> public class SecurityRulesDocIT extends ExclusiveServerTestBase COMMENT ...
Fixes broken syntax in docs
<nb> public class KillJobsRequest extends TransportRequest { out . writeLong ( job . getLeastSignificantBits ( ) ) ; } } - - @ override - public boolean equals ( Object o ) { - if ( this == o ) return true ; - if ( o == null || getClass ( ) != o . getClass ( ) ) return false ; - KillJobsRequest that =...
remove equals implementation from KillJobsRequest
<nb> public class TestPaymentHelper { } } - public Account addTestExternalPaymentMethod ( final Account account , final PaymentMethodPlugin paymentMethodInfo ) throws Exception { - final UUID paymentMethodId = paymentApi . addPaymentMethod ( account , paymentMethodInfo . getExternalPaymentMethodId ( ) , Exter...
removing method from testhelper and keep it in test
<nb> class OutMessage extends BasicBSONEncoder { } void doneWithMessage ( ) { - if ( _buffer != null && _mongo != null ) + if ( _buffer != null && _mongo != null ) { _buffer . reset ( ) ; _mongo . _bufferPool . done ( _buffer ) ; + } _buffer = null ; _mongo = null ;
Added missing braces to conditional
<nb> public class ClassLoaderUtil { COMMENT COMMENT public static void addURL ( URL u ) throws IOException { + if ( ! ( ClassLoader . getSystemClassLoader ( ) instanceof URLClassLoader ) ) { + return ; + } URLClassLoader sysLoader = ( URLClassLoader ) ClassLoader . getSystemClassLoader ( ) ; URL [ ] u...
Fix ClassCastException in ClassLoaderUtil
<nb> package 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 ; <nb> import NAMESPACE ...
Replace HashMap with SimpleArrayMap
<nb> public interface OryxRecommender { throws NoSuchItemException , NotReadyException ; COMMENT - COMMENT COMMENT COMMENT void refresh ( ) ; <nb> public interface OryxRecommender { COMMENT COMMENT COMMENT - COMMENT - COMMENT - COMMENT + COMMENT + COMMENT COMMENT COMMENT COMMENT ...
Throw exception on ingest if there are too few columns
<nb> public class ResourceExtractor { } public String getResourceName ( int resourceId ) { - return resourceIdToString . get ( resourceId ) ; + String ret = resourceIdToString . get ( resourceId ) ; + if ( ret == null ) + throw new RuntimeException ( STRING0 + resourceId ) ; + return ret ; } - } +...
Throw RuntimeException if getResourceName fails
<nb> public class DemoApplication extends Application { } protected List < Object > getModules ( ) { - return Arrays . < Object > asList ( - new AndroidModule ( this ) + return Arrays . asList ( + new AndroidModule ( this ) , + new DemoModule ( ) ) ; }
Include DemoModule in module list for simple Android example
<nb> public class IntSet { } public void clear ( ) { + if ( size == NUMBER0 ) return ; int [ ] keyTable = this . keyTable ; for ( int i = capacity + stashSize ; i -- > NUMBER0 ; ) keyTable [ i ] = EMPTY ; <nb> public class ObjectSet < T > implements Iterable < T > { } public void clear ( ) { + i...
Don t do the work to clear if the set is empty
<nb> public final class ActivityManagerService extends ActivityManagerNative checkedGrants = true ; } userId = handleIncomingUser ( callingPid , callingUid , userId , - false , ALLOW_NON_FULL_IN_PROFILE , + false , ALLOW_NON_FULL , STRING0 + cpi . authority , null ) ; if ( userId != tmpTargetUserId ) { ...
Allow content provider access across users
<nb> public abstract class BlockOutStream extends OutStream { public static BlockOutStream get ( TachyonFile tachyonFile , WriteType opType , int blockIndex , long initialBytes , TachyonConf tachyonConf ) throws IOException { - if ( tachyonFile . mTachyonFS . hasLocalWorker ( ) ) { + if ( tachyonFile . mTachy...
examine the local write config option
<nb> public class Base { SINGLE SINGLE SINGLE - + toolsMenu . removeAll ( ) ; for ( Tool tool : internalTools ) { toolsMenu . add ( createToolItem ( tool ) ) ; }
Removing all items before adding all
<nb> public class XmppConnectionService extends Service { databaseBackend . updateAccount ( account ) ; } } + mNotificationService . updateErrorNotification ( ) ; } private void dismissErrorNotifications ( ) {
refresh error notification after try again
<nb> public class LockPatternView extends View { mInProgressY = y ; if ( mPatternInProgress ) { + if ( mPattern . isEmpty ( ) ) return false ; + final ArrayList < Cell > pattern = mPattern ; final float radius = mSquareWidth * mDiameterFactor * FLOAT0 ;
Fix android application platform will crash problem
<nb> public class SourceFormatter { _processErrorMessage ( fileName , STRING0 + fileName + STRING1 + lineCount ) ; } + + if ( line . endsWith ( StringPool . PERIOD ) && + line . contains ( StringPool . EQUAL ) ) { + + _processErrorMessage ( + fileName , STRING0 + fileName + STRING1 + lineCount ) ; +...
SourceFormatter check for incorrect line break