diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class Antlr4ErrorLog implements ANTLRToolListener {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
@ override
<nb> public class Antlr4ErrorLog implements ANTLRToolListener {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
@ override
<nb> public cl... | Add closing p tag |
<nb> public class JmsMessage extends DefaultMessage {
}
public Object getHeader ( String name ) {
- Object answer = null ;
-
- SINGLE
- SINGLE
- SINGLE
- if ( jmsMessage != null && ! hasPopulatedHeaders ( ) && ! name . startsWith ( STRING0 ) ) {
- try {
- SINGLE
- answer = getBinding ( ) . getOb... | Configure AllowUseOriginalMessage to be disabled by default if not in use |
<nb> public abstract class WeaksTestCase extends TestCase {
protected static void gc ( ) {
System . gc ( ) ;
- try {
- List < Object > list = new ArrayList < Object > ( ) ;
- while ( Runtime . getRuntime ( ) . freeMemory ( ) > NUMBER0 ) {
- list . add ( new byte [ NUMBER1 ] ) ;
- }
-
- System . gc (... | removed memory stress instructions |
<nb> public class MapMarkersWidgetsFactory {
@ override
public boolean updateInfo ( DrawSettings drawSettings ) {
MapMarker marker = getMarker ( ) ;
- if ( marker == null || map . getMyApplication ( ) . getRoutingHelper ( ) . isFollowingMode ( ) ) {
+ if ( marker == null
+ || map . getMyApplication ( ) . ge... | Hide marker widgets in route preparation mode |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class EJB3Extension implements Extension {
subsystemRegistration . registerOperationHan... | Add timer service attributes |
<nb> public class FileTest extends junit . framework . TestCase {
File f = base ;
for ( int i = NUMBER0 ; f . toString ( ) . length ( ) <= PATH_MAX - NUMBER1 ; ++ i ) {
f = new File ( f , longString ) ;
- System . err . println ( f . getAbsolutePath ( ) ) ;
assertTrue ( f . mkdir ( ) ) ;
}
return f ; | Removed System err println call used for debugging a previous problem |
<nb> final public class H2O {
defReq . clientId ( bakedGaId ) ;
}
}
- } catch ( IOException ignore ) { }
+ } catch ( Exception ignore ) { }
defReq . customDimension ( CLIENT_ID_GA_CUST_DIM , defReq . clientId ( ) ) ;
GA . setDefaultRequest ( defReq ) ;
} catch ( Throwable t ) { | Swallow all exceptions with the baked ID nut just IO exceptions |
<nb> public class ECKey implements EncryptableItem , Serializable {
builder . append ( address . toString ( ) ) ;
builder . append ( STRING0 ) ;
builder . append ( Utils . HEX . encode ( getPubKeyHash ( ) ) ) ;
+ if ( creationTimeSeconds > NUMBER0 )
+ builder . append ( STRING1 ) . append ( creationTimeSecond... | Add creationTimeSeconds to wallet dump |
<nb> public class ContractionHierarchy implements Serializable {
upOptions . setRoutingContext ( graph , origin , target ) ;
downOptions . setArriveBy ( true ) ;
downOptions . dateTime = time ;
- upOptions . setRoutingContext ( graph , target , origin ) ;
+ downOptions . setRoutingContext ( graph , target , o... | fix presumed copypasta |
<nb> public final class CacheBuilder < K , V > {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Clarify the impact of having a synchronous refresh implementation |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class QualityGatesTest {
assertThat ( qGates . currentUserHasWritePermission ( ) ) . isTrue ( ) ;
}
- @ test ( expected = Una... | DoPrivileged do not set anymore a System user |
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public interface DataContext {
COMMENT
COMMENT
COMMENT
+ COMMENT
COMMENT
@ nullable
Object getData ( @ nonnls String dataI... | add default method getData DataKey to DataContext interface |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
- import NAMESPACE ;
+ i... | Tweaked the imports to avoid a clash and a compilation failure |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fixed doc mistake |
<nb> public final class ResXmlEncoders {
if ( pos + NUMBER0 == length ) {
break ;
}
- if ( str . charAt ( pos + NUMBER0 ) != STRING0 ) {
+ char c = str . charAt ( pos + NUMBER0 ) ;
+ if ( c >= STRING1 && c <= STRING2 ) {
ret . add ( pos ) ;
if ( max != - NUMBER0 && ++ count >= max ) {
break ; | it now really finds non positional substs only |
<nb> public class DocTabLayoutPanel
label_ = new Label ( title , false ) ;
label_ . addStyleName ( styles_ . docTabLabel ( ) ) ;
- label_ . setTitle ( title ) ;
contentPanel_ . add ( label_ ) ;
appendDirtyMarker ( ) ;
<nb> public class DocTabLayoutPanel
public void replaceTitle ( String title )
{
... | don t replace dirty marker when replacing title |
<nb> public class MapActivity extends AccessibleActivity implements IMapLocationListe
@ override
public void locationChanged ( double newLatitude , double newLongitude , Object source ) {
SINGLE
+ linkMapToLocation = false ;
if ( mapLayers . getLocationLayer ( ) . getLastKnownLocation ( ) != null ) {
setMap... | delete linkMApToLocation memory for search etc activities |
<nb> public class MimeUtility
COMMENT
COMMENT
COMMENT
- final InputStream in = part . getBody ( ) . getInputStream ( ) ;
ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ;
+ InputStream in = part . getBody ( ) . getInputStream ( ) ;
IOUtils . copy ( in , out ) ;
in . close ( ) ;
+ in = null ;... | Backport a bit of memory efficiency I m not sure I believe from AOSP |
<nb> public class VFSResourceLoader implements ResourceLoader {
SINGLE
is . close ( ) ;
spec . setBytes ( bytes ) ;
- SINGLE
- spec . setCodeSource ( new CodeSource ( rootUrl , ( CodeSigner [ ] ) null ) ) ;
+ spec . setCodeSource ( new CodeSource ( rootUrl , file . getCodeSigners ( ) ) ) ;
return spec ;
... | Support signed deployments |
<nb> public class WarPackagingTests {
STRING0 , STRING1 , STRING2 ,
STRING3 , STRING4 , STRING5 ,
STRING6 , STRING7 , STRING8 ,
- STRING9 , STRING10 , STRING11 , STRING12 ,
- STRING13 , STRING14 ,
+ STRING15 , STRING9 , STRING10 , STRING11 ,
+ STRING12 , STRING13 , STRING14 ,
STRING16 , STRING17 ,
STR... | Fix broken Gradle test |
<nb> public class DefaultTracerDriver implements TracerDriver
@ override
public void addTrace ( String name , long time , TimeUnit unit )
{
- log . debug ( STRING0 + TimeUnit . MILLISECONDS . convert ( time , unit ) + STRING1 ) ;
+ log . trace ( STRING0 + TimeUnit . MILLISECONDS . convert ( time , unit ) + ST... | Changed level to trace |
<nb> public class AndroidNdkScriptGenerator {
template = template . replace ( STRING0 , target . linkerFlags ) ;
template = template . replace ( STRING1 , srcFiles ) ;
- System . out . println ( template ) ;
config . jniDir . child ( STRING2 ) . writeString ( template , false ) ;
} | removed output from AndroidNdkScriptGenerator |
<nb> public enum BillingPeriod {
MONTHLY ( NUMBER0 ) ,
QUARTERLY ( NUMBER1 ) ,
SINGLE
- ANNUAL ( NUMBER2 ) ;
+ ANNUAL ( NUMBER2 ) ,
SINGLE
+ NO_BILLING_PERIOD ( NUMBER3 ) ;
private final int numberOfMonths ;
<nb> public class PlanPhase extends ValidatingConfig < Catalog > implements IPlanPhase {
... | Fixing the null Billing Period issue |
<nb> public final class System {
SINGLE
p . put ( STRING0 , VM . basePath ( ) ) ;
- p . put ( STRING1 , STRING2 ) ;
+ SINGLE
+ String tmpdir = getenv ( STRING3 ) ;
+ p . put ( STRING1 , tmpdir != null ? tmpdir : STRING2 ) ;
String ldLibraryPath = getenv ( STRING4 ) ;
if ( ldLibraryPath != null ) { | Use TMPDIR if set as java io tmpdir value |
<nb> public class FilteredRecyclerView extends RelativeLayout {
mRecyclerView . addItemDecoration ( decor ) ;
}
+ public void addOnScrollListener ( RecyclerView . OnScrollListener listener ) {
+ if ( mRecyclerView != null ) {
+ mRecyclerView . addOnScrollListener ( listener ) ;
+ }
+ }
+
+ public vo... | Implemented addOnScrollListener and removeOnScrollListener wrappers in FilteredRecyclerView |
<nb> public class SimpleValidateQueryTests extends ElasticsearchIntegrationTest {
}
+ @ test
public void explainValidateQueryTwoNodes ( ) throws IOException {
createIndex ( STRING0 ) ;
ensureGreen ( ) ; | restored Test annotation in SimpleValidateQueryTests |
<nb> public class JSONReader implements Closeable {
return TypeUtils . castToString ( object ) ;
}
+
+ public < T > T readObject ( TypeReference < T > typeRef ) {
+ return readObject ( typeRef . getType ( ) ) ;
+ }
public < T > T readObject ( Type type ) {
if ( context == null ) { | JSONReader add type reference support |
<nb> public class SelectorTest {
assertEquals ( STRING0 , els . text ( ) ) ;
}
+ @ test public void testCombinedWithContains ( ) {
+ Document doc = Jsoup . parse ( STRING1 ) ;
+ Elements els = doc . select ( STRING2 ) ;
+ assertEquals ( NUMBER0 , els . size ( ) ) ;
+ assertEquals ( STRING3 , els . text ... | Added a test to confirm combinators don t match in balanced contains queries |
<nb> class LibraryItem extends ClasspathTableItem < LibraryOrderEntry > {
if ( library == null ) return null ;
final List < String > descriptions = LibraryPresentationManager . getInstance ( ) . getDescriptions ( library , myContext ) ;
+ if ( descriptions . isEmpty ( ) ) return null ;
+
return STRING0 + St... | fixed empty tooltip for libraries |
<nb> public class StateMachineProxyFactory
}
while ( response == null )
- this . wait ( ) ;
+ this . wait ( NUMBER0 ) ;
return getResult ( ) ;
} | Adds timed wait on ResponseFuture so it is more frequently scheduled |
<nb> public class CRUDDocumentPhysicalTest {
database = ODatabaseDocumentPool . global ( ) . acquire ( url , STRING0 , STRING0 ) ;
try {
- database . begin ( ) ;
-
bank . reload ( ) ;
Assert . assertTrue ( ( ( ODocument ) bank . field ( STRING1 ) ) . isEmbedded ( ) ) ;
Assert . assertFalse ( ( ( ODocume... | embedded records improved management and errors in case non odocument are used |
<nb> import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public final class ColQuerySerializer extends SerializerBase < ColQuerySerializer >
}
}
+ @ suppresswarnings ( STRING0 )
@ override
public Void visit ( FactoryExpression < ? > expr , Void context ... | fixed SimpleConstant usage |
<nb>
COMMENT
COMMENT
COMMENT
-
package NAMESPACE ;
import NAMESPACE ;
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> pub... | Include resource details in the caused exception when failed to compile stylesheet in XSLT |
<nb> public class CreateTestDialog extends DialogWrapper {
}
}
} ) ;
+ final boolean hasTestRoots = ! ModuleRootManager . getInstance ( myTargetModule ) . getSourceRoots ( JavaModuleSourceRootTypes . TESTS ) . isEmpty ( ) ;
final List < TestFramework > attachedLibraries = new ArrayList < TestFramework > ( ) ;... | don t check attached libraries for preselection if current module doesn t have test sources anyway |
<nb> class BasicCompletableFuture < V > implements CompletableFuture < V > {
isNotNull ( callback , STRING0 ) ;
isNotNull ( executor , STRING1 ) ;
- synchronized ( this ) {
- if ( isDone ( ) ) {
- runAsynchronous ( callback , executor ) ;
- return ;
- }
+ if ( isDone ( ) ) {
+ runAsynchronous ( call... | Lowered synchronized area |
<nb> public abstract class PageCacheTest < T extends PageCache >
pagedFile . flushAndForce ( ) ;
- assertThat ( writeCounter . get ( ) , is ( NUMBER0 ) ) ;
+ assertThat ( writeCounter . get ( ) , greaterThanOrEqualTo ( NUMBER0 ) ) ; SINGLE
assertThat ( forceCounter . get ( ) , is ( NUMBER1 ) ) ;
}
}
<... | Fix flaky PageCacheTest channelMustBeForced tests |
<nb> public class CompressionMetadata
{
long offset = i * NUMBER0 ;
long chunkOffset = chunkOffsets . getLong ( offset ) ;
- long nextChunkOffset = ( i + NUMBER0 == chunkOffsets . size ( ) )
- ? compressedFileLength
- : chunkOffsets . getLong ( offset + NUMBER0 ) ;
+ long nextChunkOffset = offset + NUMBER... | fix offset calculation |
<nb> public class PhoneWindowManager implements WindowManagerPolicy {
return - NUMBER0 ;
}
- SINGLE
- SINGLE
- SINGLE
- TelecomManager telecomManager = getTelecommService ( ) ;
- if ( telecomManager != null && telecomManager . isRinging ( ) ) {
- Log . i ( TAG , STRING0 ) ;
- return - NUMBER0 ;
- ... | Allow home to be pressed while in incoming call screen |
<nb> public class ChatSystem extends BaseComponentSystem {
}
@ command ( runOnServer = true , shortDescription = STRING0 )
- public String tell (
+ public String whisper (
EntityRef sender ,
@ commandparameter ( value = STRING1 , suggester = CommandParameterSuggester . UsernameSuggester . class ) String u... | Change tell command to whisper |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class DefaultRestletBinding implements RestletBinding , HeaderFilterStrate
form . add ( key . toString ( ) , value != null ? value ... | throw exception when body is incorrect type for form data |
<nb> public class PDFViewerPresenter implements IsWidget ,
updateState ( true ) ;
dismissProgressDialog ( ) ;
+ PDFView . setLoadingVisible ( false ) ;
activeProgressDialog_ = new CompilePdfProgressDialog ( ) ; | Also hide loading indicator on compile start |
<nb> class VoiceInteractionManagerServiceImpl {
@ override
public void onServiceDisconnected ( ComponentName name ) {
- try {
- if ( mService != null ) {
- mService . shutdown ( ) ;
- }
- } catch ( RemoteException e ) {
- Slog . w ( TAG , STRING0 , e ) ;
- }
mService = null ;
}
} ;
<nb> clas... | Notify VIS of shutdown before switching implementations |
<nb> public class DroidGap extends Activity implements CordovaInterface {
this . appView . setWebChromeClient ( webChromeClient ) ;
webChromeClient . setWebView ( this . appView ) ;
+ webViewClient = appView . viewClient ;
this . appView . setLayoutParams ( new LinearLayout . LayoutParams (
ViewGroup . La... | Added fix for webViewClient |
<nb> public class UnifiedParser
return ! isEOL ( ) && data_ . charAt ( pos_ ) == STRING0 ;
}
- private String peekLine ( )
- {
- if ( isEOL ( ) )
- return null ;
-
- Match match = newline_ . match ( data_ , pos_ ) ;
- if ( match == null )
- {
- return data_ . substring ( pos_ ) ;
- }
- else ... | Remove unused method |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | Remove bad import |
<nb> public class FeedUtils {
disabledHours = Math . min ( NUMBER0 * NUMBER1 , disabledHours ) ;
return DateUtils . addHours ( now , disabledHours ) ;
}
- return null ;
+ return now ;
}
COMMENT | set disabledUntil to now instead of null when the error count threshold has not been reached yet |
<nb> public class TextView extends View implements ViewTreeObserver . OnPreDrawListener
SINGLE
long duration = SystemClock . uptimeMillis ( ) - mPreviousTapUpTime ;
- if ( duration <= ViewConfiguration . getDoubleTapTimeout ( ) ) {
+ if ( duration <= ViewConfiguration . getDoubleTapTimeout ( ) &&
+ isPositi... | A double tap starts selection when done on text only |
<nb> public class SearchView extends LinearLayout implements CollapsibleActionView {
COMMENT
@ override
public void onActionViewExpanded ( ) {
+ if ( mExpandedInActionView ) return ;
+
mExpandedInActionView = true ;
mCollapsedImeOptions = mQueryTextView . getImeOptions ( ) ;
mQueryTextView . setImeOptio... | Don t expand the SearchView if already expanded |
<nb> public class ContextHolderTests extends TestCase {
super . setUp ( ) ;
}
+ public void tearDown ( ) {
+ ContextHolder . setContext ( null ) ;
+ }
+
public static void main ( String [ ] args ) {
junit . textui . TestRunner . run ( ContextHolderTests . class ) ;
} | Added tearDown method which resets the Context to null |
<nb> public class SubmitterMain {
. put ( Keys . cluster ( ) , cluster )
. put ( Keys . role ( ) , role )
. put ( Keys . environ ( ) , environ )
- . put ( Keys . verbose ( ) , verbose . toString ( ) )
+ . put ( Keys . verbose ( ) , verbose )
. build ( ) ;
return config ;
} | pass verbose flag as boolean instead of string |
<nb> public class LdapUserProfile {
fullName = STRING0 ;
nickname = STRING1 ;
birthday = STRING1 ;
+ photo = STRING2 ;
homeStreet = STRING3 ;
homeCity = STRING1 ;
homeState = STRING1 ;
<nb> public class LdapUserProfile {
fullName = STRING0 ;
nickname = STRING4 ;
birthday = STRING1 ;
+ photo = ST... | Added default LDAP field for photo |
<nb> public class BootStrapperTest extends SchemaLoader
return s ;
}
- @ test
- public void testException ( ) throws UnknownHostException
- {
- String table = Schema . instance . getNonSystemTables ( ) . iterator ( ) . next ( ) ;
- int replicationFactor = Table . open ( table ) . getReplicationStrategy ... | Remove obsolete test |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> final class ShardIterator
extends AbstractIterator < ShardNodes >
implements CloseableIterator < ShardNodes >
{
+ private static final Logger log = Log... | Log Raptor shard query |
<nb> public class Block extends Node {
}
- public boolean isEmpty ( ) {
- return seq . isEmpty ( ) ;
- }
-
-
@ notnull
@ override
public String toString ( ) {
- return STRING0 + seq + STRING1 ;
+ return STRING2 + seq + STRING3 ;
}
}
<nb> public class FunType extends Type {
}
- ... | remove useless code |
<nb> public class TimeTools {
}
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static String formatToLocalDate ( Context context , Date dateTime ) {
+ return DateUtils . formatDateTime ( context , dateTime . getTime ( ) , DateUtils . FORMAT_SHOW_DATE ) ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMME... | Add local date format helper to TimeTools |
<nb> public class GlobalSettings {
s . put ( STRING0 , Settings . versions (
new V ( NUMBER0 , new BooleanSetting ( true ) )
) ) ;
+ s . put ( STRING1 , Settings . versions (
+ new V ( NUMBER1 , new BooleanSetting ( true ) )
+ ) ) ;
SETTINGS = Collections . unmodifiableMap ( s ) ;
<nb> public class ... | Add setting for contact pictures to import export code |
<nb> public class MeFragment extends Fragment {
}
public void onEventMainThread ( GravatarLoadFinished event ) {
- showGravatarProgressBar ( false ) ;
-
- if ( ! event . success ) {
+ if ( ! event . success && mIsUpdatingGravatar ) {
Toast . makeText ( getActivity ( ) , getString ( R . string . error_re... | Only show toast when gravatar is being updated |
<nb> public class CodeSearchLauncher
@ handler
public void onGoToFileFunction ( )
{
- new CodeSearchDialog ( pCodeSearch_ ) . showModal ( ) ;
+ if ( dialog_ != null )
+ dialog_ . closeDialog ( ) ;
+ dialog_ = new CodeSearchDialog ( pCodeSearch_ ) ;
+ dialog_ . showModal ( ) ;
}
private final Provi... | avoid multiple dialogs on Ctrl |
<nb> public class RenderQueue {
list . setCamera ( cam ) ; SINGLE
list . sort ( ) ;
for ( int i = NUMBER0 ; i < list . size ( ) ; i ++ ) {
- Spatial obj = list . get ( i ) ;
+ Geometry obj = list . get ( i ) ;
assert obj != null ;
- if ( obj instanceof Geometry ) {
- Geometry g = ( Geometry ) obj ;
- ... | remove unnecessary checks in RenderQueue renderGeometryList |
<nb> public class ConfigUserService implements IUserService {
}
read ( ) ;
UserModel storedModel = users . get ( model . username . toLowerCase ( ) ) ;
+ if ( storedModel == null ) {
+ return null ;
+ }
return storedModel . cookie ;
} | Fix potential NPE in cookie retrieval |
<nb> public final class HdmiCecDeviceInfo implements Parcelable {
SINGLE
public static final int DEVICE_INACTIVE = - NUMBER0 ;
- SINGLE
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public static final int ADDR_INTERNAL = NUMBER1 ;
+
+ SINGLE
SINGLE
private final int mLogicalAddress ;
private fi... | Define a constant for HDMI CEC logical address used for internal source |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- SINGLE
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
imp... | commented out unused method |
<nb> public class ShutdownMonitor extends Thread
private void startListenSocket ( )
{
- try
+ if ( this . port < NUMBER0 )
{
- if ( this . port < NUMBER0 )
- {
- System . out . println ( STRING0 + port ) ;
- return ;
- }
+ System . out . println ( STRING0 + port ) ;
+ return ;
+ }
+ try ... | Fixing confusing output |
<nb> public class MessageView extends K9Activity implements OnClickListener
{
if ( uri == null )
{
- restoreMessageReferences ( icicle ) ;
+ restoreMessageReferencesExtra ( intent ) ;
}
else
{
<nb> public class MessageView extends K9Activity implements OnClickListener
mMessageReferences = ( ArrayLis... | Fix code that was broken when fixing warnings |
<nb> public class EditPreferences extends TodorooPreferenceActivity {
private void onVoiceInputStatusChanged ( final Preference preference , boolean newValue ) {
if ( ! newValue )
return ;
- if ( AndroidUtilities . indexOf ( Constants . MARKET_STRATEGY . excludedSettings ( ) , R . string . p_voiceInputEnabled )... | Fixed a crash in preferences |
<nb> public class HostConfig
DeployedApplication deployedApp ;
+ boolean copyThisXml = copyXML ;
try {
if ( deployXML && xml . exists ( ) ) {
<nb> public class HostConfig
}
}
- boolean copyThisXml = copyXML ;
if ( copyThisXml == false && context instanceof StandardContext ) {
SINGLE
copyTh... | Avoid unnecessary redeployment of context descriptor |
<nb> import NAMESPACE ;
public class SingleServerAsyncMongoClient extends SingleServerMongoClient {
private final ServerAddress serverAddress ;
private final SimplePool < MongoAsynchronousChannel > channelPool ;
- private final ThreadLocal < SingleChannelMongoClient > boundClient = new ThreadLocal < SingleChann... | Removed redundant field |
<nb> public class AggregationAnalyzer
}
}
- if ( node . getDefaultValue ( ) . isPresent ( ) && ! process ( node . getDefaultValue ( ) . get ( ) , context ) ) {
- return false ;
- }
-
- return true ;
+ return ! node . getDefaultValue ( ) . isPresent ( ) || process ( node . getDefaultValue ( ) . get ( )... | Simplify visitSearchedCaseExpression in AggregationAnalyzer |
<nb> import NAMESPACE ;
import NAMESPACE ;
- @ suppresswarnings ( STRING0 )
public class DefaultClassDirectoryBinarySpec extends AbstractBuildableModelElement implements ClassDirectoryBinarySpecInternal {
private final DefaultDomainObjectSet < LanguageSourceSet > sourceSets = new DefaultDomainObjectSet < La... | Removed unused suppression |
<nb> public class PerformanceTests
testJob ( new CommonJobs . PerformanceIdAllocationJob ( NUMBER0 ) ) ;
}
+ @ test
+ public void createNodes ( ) throws Exception
+ {
+ testJob ( new CommonJobs . PerformanceCreateNodesJob ( NUMBER1 , NUMBER2 ) ) ;
+ }
+
private void testJob ( Job < Void > job ) thro... | Added createNode test |
<nb> public abstract class GitHandler {
}
COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- COMMENT
- public void addRelativePathsForFiles ( @ notnull final Collection < File > files ) {
- checkNotStarted ( ) ;
- for ( File file : files ) {
- myCommandLine . addParameter ( VcsFileUtil . relative... | remove unused methods |
<nb> public class JetPsiFactory {
public static JetWhenExpression createWhenWithoutSubject ( Project project , int positiveBranchCount ) {
return new WhenTemplateBuilder ( false ) . addBranchesWithSingleCondition ( positiveBranchCount ) . toExpression ( project ) ;
}
+
+ public static JetParenthesizedExpressi... | Add factory methods for parenthesized expressions |
<nb> public abstract class BaseStatusBar extends SystemUI implements
if ( wasExpanded ) {
final NotificationData . Entry newEntry = mNotificationData . findByKey ( key ) ;
expandView ( newEntry , true ) ;
+ newEntry . setUserExpanded ( true ) ;
}
}
<nb> public class NotificationData {
public boolean u... | Retain expanded state across more than one violent update |
<nb> extends BaseTest < A , AP , B , S , B2S , BS , L , X , DATE , BOOL , D , T , U , UU , I , IPK , T7
val ( STRING0 ) . coerce ( Short . class ) ,
val ( NUMBER0 ) . coerce ( String . class ) )
. from ( TBook ( ) )
- . where ( id1 . in ( NUMBER1 , NUMBER2 ) )
- . and ( id2 . in ( STRING0 , STRING1 ) )
+ . ... | Fixed broken test |
<nb> public abstract class Operation implements DataSerializable {
return this ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
public final int getPartitionId ( ) {
return pa... | Improved Operation partitionId javadoc |
<nb>
package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
public class InventoryAccessComponent implements Component {
- public Map < Side , List < Integer > > input ;
- public Map < Side , List < Integer > > output ;
+ public Map... | Maps can only have Strings as keys |
<nb> public class Version {
} catch ( Exception e ) {
}
- String version = STRING0 , code = version ;
+ String version = null , code = version ;
if ( manifest != null ) {
version = manifest . getMainAttributes ( ) . getValue ( STRING1 ) ;
code = manifest . getMainAttributes ( ) . getValue ( STRING2 ) ; ... | Improve unit testing around Version by assigning a default version when the manifest is unconfigured |
<nb> class NetworkManagementService extends INetworkManagementService . Stub {
COMMENT
COMMENT
COMMENT
- String str = String . format ( STRING0 + wlanIface + STRING1 + softapIface + STRING2 ,
- wifiConfig . SSID ,
+ String str = String . format ( STRING0 + wlanIface + STRING1 + softapIface +
+ STRING3 , w... | Allow space in SSID |
<nb> public class ODocument extends ORecordVirtualAbstract < Object > implements Iterabl
for ( int i = NUMBER0 ; i < iPropertyName . length ( ) ; ++ i ) {
final char c = iPropertyName . charAt ( i ) ;
if ( c == STRING0 || c == STRING1 )
- throw new IllegalArgumentException ( STRING2 ) ;
+ throw new IllegalArg... | added a detail in the exception |
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
public class DeleteIndexedScriptResponse extends ActionResponse { | DOCS fixed DeleteIndexedScriptResponse javadocs |
<nb> public class Vec extends Keyed {
ck . close ( ck . cidx ( ) , fs ) ; SINGLE
postWrite ( fs ) ;
fs . blockForPending ( ) ;
- _cache = null ;
return ret ;
}
<nb> public class Vec extends Keyed {
ck . close ( ck . cidx ( ) , fs ) ; SINGLE
postWrite ( fs ) ;
fs . blockForPending ( ) ;
- _cache ... | Remove unneeded cache flush |
<nb>
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Corrected the two way of the selectedItemPosition to yes in |
<nb> public class ValveUtil {
ModelNode op = new ModelNode ( ) ;
op . get ( OP ) . set ( STRING0 ) ;
op . get ( OP_ADDR ) . add ( STRING1 , STRING2 ) ;
- op . get ( NAME ) . set ( STRING3 ) ;
op . get ( STRING3 ) . set ( STRING1 ) ;
ModelNode result = client . execute ( new OperationBuilder ( op ) . build (... | get ride of useless line of code |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class OUser extends ODocumentWrapper {
COMMENT
COMMENT
public ORole checkIfAllowed ( final String iResource , final int iOperation ) {
- for ( O... | added additional check on null role in user |
<nb> public class XMPPServer {
name = STRING0 ;
}
- version = new Version ( NUMBER0 , NUMBER0 , NUMBER1 , Version . ReleaseStatus . Beta , NUMBER0 ) ;
+ version = new Version ( NUMBER0 , NUMBER0 , NUMBER1 , Version . ReleaseStatus . Release_Candidate , NUMBER2 ) ;
if ( STRING1 . equals ( JiveGlobals . getXM... | Updating version info |
<nb> public class SecureServletTest {
WebClient webClient = new WebClient ( ) ;
webClient . setCredentialsProvider ( incorrectCreds ) ;
try {
- HtmlPage page = webClient . getPage ( base + STRING0 ) ;
+ webClient . getPage ( base + STRING0 ) ;
} catch ( FailingHttpStatusCodeException e ) {
assertNotNull (... | Removing a redundant variable |
<nb> public class FileManagerImpl implements FileManager {
handleFileTypesChange ( new FileTypesChanged ( ) {
protected void updateMaps ( ) {
for ( final FileViewProvider provider : myVFileToViewProviderMap . values ( ) ) {
+ if ( ! provider . getVirtualFile ( ) . isValid ( ) ) {
+ continue ;
+ }
+
for ... | don t refresh psi for invalid files |
<nb> public class TestBox extends SimpleApplication {
@ override
public void simpleInitApp ( ) {
- Box b = new Box ( Vector3f . ZERO , NUMBER0 , NUMBER0 , NUMBER0 ) ;
+ Box b = new Box ( NUMBER0 , NUMBER0 , NUMBER0 ) ;
Geometry geom = new Geometry ( STRING0 , b ) ;
Material mat = new Material ( assetManag... | Fix use of deprecated Box constructor in TestBox |
<nb> public class FloatingActionsMenu extends ViewGroup {
}
}
+ public boolean isExpanded ( ) {
+ return mExpanded ;
+ }
+
@ override
public Parcelable onSaveInstanceState ( ) {
Parcelable superState = super . onSaveInstanceState ( ) ; | Expose FloatingActionsMenu isExpanded state |
<nb> public class OpenIE implements Annotator {
assert prep != null ;
tree . addEdge ( adj , pobj , GrammaticalRelation . valueOf ( Language . English , prep ) , Double . NEGATIVE_INFINITY , false ) ;
}
- SINGLE
- adjFragments . add ( new SentenceFragment ( tree , clause . assumedTruth , false ) ) ;
+ SINGL... | Consider polarity in adjective entailments |
<nb>
package NAMESPACE ;
+ import static NAMESPACE ;
import static NAMESPACE ;
- import static NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
... | Replace JUnitMatchers with CoreMatchers |
<nb> class GitRepositoryReader {
branch = line . substring ( start , i ) ;
}
- if ( branch == null ) {
- LOG . warn ( STRING0 + line + STRING1 ) ;
+ if ( branch == null || branch . startsWith ( GitTag . REFS_TAGS_PREFIX ) ) {
+ LOG . debug ( STRING2 + line + STRING1 ) ;
return null ;
}
return new Ha... | git ignore tags when reading packed refs |
<nb> public class Queue < T > {
if ( head < tail ) {
SINGLE
System . arraycopy ( values , head , newArray , NUMBER0 , tail - head ) ;
- } else {
+ } else if ( size > NUMBER0 ) {
SINGLE
final int rest = values . length - head ;
System . arraycopy ( values , head , newArray , NUMBER0 , rest ) ; | Optimize Queue resize for empty queues |
<nb> public class StatusBarService extends IStatusBar . Stub
SINGLE
pixelFormat = PixelFormat . TRANSLUCENT ;
- if ( false ) {
- bg = mExpandedView . getBackground ( ) ;
- if ( bg != null ) {
- pixelFormat = bg . getOpacity ( ) ;
+ bg = mExpandedView . getBackground ( ) ;
+ if ( bg != null ) {
+ pix... | make the window shade use an opaque surface if possible |
<nb> public class BottomSheetLayout extends FrameLayout {
return super . onKeyPreIme ( keyCode , event ) ;
}
- private void setSheetTranslation ( float sheetTranslation ) {
- this . sheetTranslation = sheetTranslation ;
+ private void setSheetTranslation ( float newTranslation ) {
+ this . sheetTranslatio... | Fix incorrect dimming and sheet position |
<nb> public class UncompressedDoubleBlockCursor
}
SINGLE
- position = newPosition ;
+ position = Math . max ( newPosition , this . range . getStart ( ) ) ;
offset = ( int ) ( ( position - this . range . getStart ( ) ) * SIZE_OF_DOUBLE ) ;
return SUCCESS ;
}
<nb> public class UncompressedLongBlockCurso... | Fix bug where advanceToPosition of an unadvanced cursor can stop before first position |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class TestServlet extends HttpServlet {
out . println ( STRING0 ) ;
out . println ( STRING1 ) ;
Client client = ClientBuilder . newClient ( ) ;
- WebTarget target = c... | Fixing a log statement |
<nb> public class JavaCompileAction extends AbstractAction {
@ override
protected String getRawProgressMessage ( ) {
- int count = sourceFiles . size ( ) ;
- if ( count == NUMBER0 ) { SINGLE
- count = resources . size ( ) + classpathResources . size ( ) + messages . size ( ) ;
- }
+ int count = sourceFi... | Include all input files in the files count in the description of a JavaCompileAction |
<nb> public class PyUserSkeletonsUtil {
}
if ( ! ourNoSkeletonsErrorReported && ourUserSkeletonsDirectory == null ) {
ourNoSkeletonsErrorReported = true ;
- LOG . error ( STRING0 + getPossibleUserSkeletonsPaths ( ) ) ;
+ LOG . warn ( STRING0 + getPossibleUserSkeletonsPaths ( ) ) ;
}
return ourUserSkeleton... | Don t report exception about user skeletons absence |
<nb> import static NAMESPACE ;
COMMENT
COMMENT
public final class OpenSslServerContext extends OpenSslContext {
+ private static final byte [ ] ID = new byte [ ] { STRING0 , STRING1 , STRING2 , STRING2 , STRING3 } ;
private final OpenSslServerSessionContext sessionContext ;
COMMENT
<nb> public final cla... | Set the session id context properly to make client authentication work with open ssl provider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.