diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class PVector implements Serializable {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
public static PVector lerp ( PVector v1 , PVector v2 , float amt ) { | Clarified reference for PVector lerp |
<nb> public class PreviewWorldScreen extends CoreScreenLayer {
image . setVisible ( true ) ;
} catch ( Exception ex ) {
image . setVisible ( false ) ;
+ logger . info ( STRING0 + layerDropdown . getSelection ( ) ) ;
}
currentSettings = newSettings ;
} | Add logging for cases where world preview generation fails on a specific layer |
<nb> public class MinecraftForgeClient {
}
public static void onGameStart ( ) {
- System . out . println ( STRING0 ) ;
- ModLoader . getMinecraftInstance ( ) . effectRenderer = new MinecraftForgeEffectRenderer ( ModLoader . getMinecraftInstance ( ) . theWorld , ModLoader . getMinecraftInstance ( ) . renderEng... | fixed compilation errors |
<nb> public class ImageHelper {
SINGLE
return null ;
}
+
+ if ( bm == null )
+ return null ;
float percentage = ( float ) finalWidth / bm . getWidth ( ) ;
float proportionateHeight = bm . getHeight ( ) * percentage ; | Adding null check in bitmap creation |
<nb> public class PackageManagerService extends IPackageManager . Stub {
for ( int curUser : users ) {
long timeout = SystemClock . uptimeMillis ( ) + NUMBER0 ;
synchronized ( conn ) {
- long now = SystemClock . uptimeMillis ( ) ;
- while ( conn . mContainerService == null && now < timeout ) {
+ long now ; ... | Solve the infinite loop on clearExternalStorageDataSync |
<nb> public final class Service {
if ( other instanceof Service ) {
Service that = ( Service ) other ;
return name . equals ( that . name )
- && fqname . equals ( that . fqname )
&& documentation . equals ( that . documentation )
&& methods . equals ( that . methods ) ;
} | Revert Include fully qualified service name in equals check |
<nb> import NAMESPACE ;
public enum WorldType {
NORMAL ( STRING0 ) ,
FLAT ( STRING1 ) ,
- VERSION_1_1 ( STRING2 ) ;
+ VERSION_1_1 ( STRING2 ) ,
+ LARGE_BIOMES ( STRING3 ) ;
private final static Map < String , WorldType > BY_NAME = Maps . newHashMap ( ) ;
private final String name ; | Add LargeBiomes WorldType |
<nb> public class SlidingUpPanelLayout extends ViewGroup {
boolean result ;
final int save = canvas . save ( Canvas . CLIP_SAVE_FLAG ) ;
- if ( mSlideableView != child ) { SINGLE
+ if ( mSlideableView != null && mSlideableView != child ) { SINGLE
SINGLE
SINGLE
canvas . getClipBounds ( mTmpRect ) ; | Fix NPE in drawChild when returning to Fragment with animation |
<nb> public class RingtoneManager {
SINGLE
SINGLE
- final ContentResolver cr = context . getContentResolver ( ) ;
- final Uri cacheUri = getCacheForType ( type ) ;
- try ( InputStream in = cr . openInputStream ( ringtoneUri ) ;
- OutputStream out = cr . openOutputStream ( cacheUri ) ) {
- Streams . copy... | Don t try caching null ringtones |
<nb> class PackageManagerService extends IPackageManager . Stub {
}
String external = parser . getAttributeValue ( null , STRING0 ) ;
if ( external != null ) {
- mInternalSdkPlatform = Integer . parseInt ( external ) ;
+ mExternalSdkPlatform = Integer . parseInt ( external ) ;
}
} catch ( NumberFormatExce... | Fix typo when parsing external platform version from Settings |
<nb> public class VoiceInteractionService extends Service {
if ( curComp == null ) {
return false ;
}
- return curComp . equals ( cur ) ;
+ return curComp . equals ( service ) ;
}
COMMENT
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
... | Fix VoiceInteractionService isActiveService |
<nb> public final class ParsedReaderResultTestCase extends Assert {
STRING0 ,
STRING0 ,
ParsedResultType . TEXT ) ;
- doTestResult ( STRING1 , STRING1 , ParsedResultType . TEXT ) ;
}
@ test | Cancel one old test case |
<nb> public final class Realm implements Closeable {
COMMENT
COMMENT
public static synchronized boolean compactRealmFile ( Context context , String fileName , byte [ ] key ) {
- if ( key != null || key . length > NUMBER0 ) {
+ if ( key != null ) {
throw new IllegalArgumentException ( STRING0 ) ;
} | Removing unneeded check |
<nb> public class Client {
conf . getBoolean ( CommonConfigurationKeys . IPC_CLIENT_PING_KEY , true ) ;
return new ConnectionId ( addr , protocol , ticket ,
rpcTimeout , remotePrincipal ,
- conf . getInt (
- CommonConfigurationKeysPublic . IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY ,
- CommonConf... | Fix bad merge which mixed up two configuration options |
<nb> public class DefaultBuildSuccessResult extends AbstractBuildResult implements In
public DefaultBuildSuccessResult ( long startTime , long endTime ) {
super ( startTime , endTime , STRING0 ) ;
}
-
}
<nb> package NAMESPACE ;
import NAMESPACE ;
public class DefaultTaskSuccessResult extends AbstractT... | Remove blank lines |
<nb> public abstract class DocumentFile {
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fix minor doc bug on DocumentFile |
<nb> public class DashFavoritesFragment extends DashBaseFragment implements Favourite
@ override
public void updateFavourites ( ) {
- if ( getActivity ( ) == null ) {
- return ;
- }
getActivity ( ) . runOnUiThread ( new Runnable ( ) {
@ override
public void run ( ) { | Removed bad code |
<nb> public abstract class AbstractJPATest {
@ test
@ noopenjpa
+ @ nobatoojpa SINGLE
public void Offset1 ( ) {
List < String > names2 = Arrays . asList ( STRING0 , STRING1 , STRING2 , STRING3 , STRING4 ) ;
assertEquals ( names2 , query ( ) . from ( cat ) . orderBy ( cat . name . asc ( ) ) . offset ( NUMB... | Add Batoo exclusions |
<nb> public class WebFilter implements Filter {
private HazelcastHttpSession getSessionWithId ( final String sessionId ) {
HazelcastHttpSession session = mapSessions . get ( sessionId ) ;
if ( session != null && ! session . isValid ( ) ) {
- session = null ;
destroySession ( session , true ) ;
+ session = n... | set session to null after invalidating it |
<nb> public interface Builders {
public interface IF < A extends IF < ? > > extends ImageViewBuilder < A > , ImageViewFutureBuilder {
}
- public interface BF < A extends BF < ? > > extends BitmapBuilder < A > , BitmapFutureBuilder , IF < IF < ? > > {
+ public interface BF < A extends BF < ? > > extends Bitmap... | fix build break |
<nb> public class CoverageListNode extends AbstractTreeNode {
}
@ override
- public Object getValue ( ) {
- return ApplicationManager . getApplication ( ) . runReadAction ( new Computable < Object > ( ) {
- @ override
- public Object compute ( ) {
- return CoverageListNode . super . getValue ( ) ;
- }... | revert changes in api |
<nb> public final class BeanConverter {
}
@ fallbackconverter
- @ suppresswarnings ( STRING0 )
public static Object convertTo ( Class < ? > type , Exchange exchange , Object value , TypeConverterRegistry registry ) {
SINGLE
if ( BeanInvocation . class . isAssignableFrom ( value . getClass ( ) ) ) {
<nb>... | Removed the useless SuppressWarnings |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class KotlinBuiltIns {
}
SINGLE
+ String text = FileUtil . loadTextAndClose ( new InputStreamReader ( stream ) ) ;
JetFile ... | Convert line separators when loading files with builtins |
<nb>
COMMENT
package NAMESPACE ;
- import NAMESPACE ;
-
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import static NAMESPACE ;
SINGLE
public class Javac
{
+ public static class CompilationError extends Error
+ {
+ public CompilationError ( String message )
+ {
+ super ... | Use custom exception to report compilation failure in Birk |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
<nb> public abstract class PyTestCase extends UsefulTestCase {
PythonLanguageLevelPusher . setForcedLanguageLevel ( myFixture . getProject ( ) , languageLevel ) ;
}
+ ... | Added runWithLanguageLevel for Python testes |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class DiskLruCacheWrapper implements DiskCache {
SINGLE
SINGLE
if ( editor != null ) {
- writer . write ( editor . newOutputStream ( NUMBER0 ) ) ;
+ OutputStream os... | Fix unclosed OutputStream in DiskLruCacheWrapper reported by StrictMode |
<nb> public class Tool {
new Option ( STRING0 , STRING1 , STRING2 ) ,
new Option ( STRING3 , STRING4 , STRING5 ) ,
new Option ( STRING3 , STRING6 , STRING7 ) ,
- new Option ( STRING8 , STRING9 , STRING10 ) ,
+ new Option ( STRING8 , STRING9 , STRING11 ) ,
new Option ( STRING12 , STRING13 , STRING14 ) , | set help msg |
<nb> public class DirectoryFragment extends Fragment {
mRecView . setLayoutManager ( layout ) ;
SINGLE
SINGLE
- mSelectionManager . handleLayoutChanged ( ) ;
+ mModel . mSelectionManager . handleLayoutChanged ( ) ;
SINGLE
mThumbSize = new Point ( thumbSize , thumbSize ) ;
} | Fix broken build |
<nb> public class TestDatastore extends TestBase {
@ test
public void testExists ( ) throws Exception {
- final Key < FacebookUser > k = getDs ( ) . save ( new FacebookUser ( NUMBER0 , STRING0 ) ) ;
+ int id = NUMBER1 ;
+ final Key < FacebookUser > k = getDs ( ) . save ( new FacebookUser ( id , STRING0 ) ) ... | use a different key for clarity |
<nb> public class SortedComboBoxModel < E extends Comparable < E > > extends DefaultComboBo
public void insertElementAt ( E element , int index ) {
addElement ( element ) ;
}
+
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void elementChan... | Changed SortedComboBoxModel to allow to notify the listeners that an element of the model was changed |
<nb> public class ZooClient implements Watcher
private final long storeCreationTime ;
private final long storeId ;
private final int machineId ;
- private final String sequenceNr ;
+ private String sequenceNr ;
private long committedTx ;
SINGLE
<nb> public class ZooClient implements Watcher
{
Syst... | Writes machine tx id when reconnecting |
<nb> public class CodeStyleManager extends FileEditorManagerAdapter implements Window
private boolean applyIndentSize ( final CommonCodeStyleSettings . IndentOptions indentOptions , final String indentSize ) {
try {
- indentOptions . INDENT_SIZE = Integer . parseInt ( indentSize ) ;
+ int indent = Integer . p... | set CONTINUATION_INDENT_SIZE equal to INDENT_SIZE |
<nb> public class InputMethodManagerService extends IInputMethodManager . Stub
screenOnOffFilt . addAction ( Intent . ACTION_CLOSE_SYSTEM_DIALOGS ) ;
mContext . registerReceiver ( new ScreenOnOffReceiver ( ) , screenOnOffFilt ) ;
+ mStatusBar = statusBar ;
+ mInputMethodData = IconData . makeIcon ( STRING0 , ... | Fix acore crash on boot up |
<nb> public class EntityRobot extends EntityRobotBase implements
ItemStack robotStack = new ItemStack ( BuildCraftSilicon . robotItem ) ;
NBTUtils . getItemData ( robotStack ) . setTag ( STRING0 , originalBoardNBT ) ;
entityDropItem ( robotStack , NUMBER0 ) ;
+ if ( itemInUse != null ) {
+ entityDropItem ( it... | robots drop their inventory when destroyed |
<nb> public class Processor {
SINGLE
- return env . getFiler ( ) . getResource ( StandardLocation . SOURCE_PATH ,
- packageElement . getQualifiedName ( ) ,
- sourceElement . getSimpleName ( ) + STRING0 ) ;
+ try {
+ return env . getFiler ( ) . getResource ( StandardLocation . SOURCE_PATH ,
+ packageEl... | added NPE handling for missing sourcepath |
<nb> public final class OSGiSubsystemState implements Serializable {
return properties . isEmpty ( ) && modules . isEmpty ( ) ;
}
- public static class OSGiModule {
+ public static class OSGiModule implements Serializable {
+ private static final long serialVersionUID = - NUMBER0 ;
+
private final Modul... | Fix serialization problem |
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
public class OsgiCamelContextNameStrategy implements CamelContextNameStrategy {
+ private final AtomicInteger counter = new AtomicInteger ( NUMBER0 ) ;
private final String name ;
public OsgiCamelCo... | OSGi CamelContext name strategy is only using bundle id and returns a JMX friendly name |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
COMMENT
COMMENT
<nb> public class SimpleQueryAdapter < T > implements SimpleQuery < SimpleQueryAdapter < T > >
private final Projectable projectable ;
private final Expr < T > projection ;
-
+
+ @ ... | added findbugs annotations |
<nb> public class Mockito extends Matchers {
COMMENT
COMMENT
COMMENT
- public static VerificationAfterDelay after ( int millis ) {
+ public static VerificationAfterDelay after ( long millis ) {
return new After ( millis , VerificationModeFactory . times ( NUMBER0 ) ) ;
} | Align Mockito after with Mockito timeout to take a long instead of int |
<nb> public class CompileDriver {
if ( message != null ) {
compileContext . addMessage ( message ) ;
}
-
+ if ( isRebuild ) {
+ CompilerUtil . runInContext ( compileContext , STRING0 , new ThrowableRunnable < Throwable > ( ) {
+ @ override
+ public void run ( ) throws Throwable {
+ CompilerCacheManage... | on rebuild clear system caches for compilers run internally in IDEA |
<nb> public class IssueIndex extends BaseIndex < Issue , FakeIssueDto , String > {
if ( createdAfter != null ) {
filters . put ( STRING0 , FilterBuilders
. rangeFilter ( IssueIndexDefinition . FIELD_ISSUE_FUNC_CREATED_AT )
- . gte ( createdAfter ) ) ;
+ . gte ( createdAfter )
+ . cache ( false ) ) ;
}
D... | Disable ES cache on date related filters |
<nb> public class DiffContentFactory {
@ notnull
public static DocumentContent create ( @ notnull String text , @ nullable FileType type ) {
Document document = EditorFactory . getInstance ( ) . createDocument ( text ) ;
+ document . setReadOnly ( true ) ;
return new DocumentContentImpl ( document , type , nu... | create read only documents from string |
<nb> public abstract class TrackRenderer implements ExoPlayerComponent {
COMMENT
COMMENT
protected final boolean isSourceReady ( ) {
- return stream . isReady ( ) ;
+ return readEndOfStream ? streamIsFinal : stream . isReady ( ) ;
}
SINGLE | Handle TrackStream transitions in isSourceReady |
<nb> public class NPNModuleTest
static
{
COMMENT
+ KNOWN_GOOD_NPN_URLS . add ( STRING0 ) ;
KNOWN_GOOD_NPN_URLS . add ( STRING1 ) ;
KNOWN_GOOD_NPN_URLS . add ( STRING2 ) ;
KNOWN_GOOD_NPN_URLS . add ( STRING3 ) ; | Added URL for new NPN version |
<nb> public class ByteBufferList {
}
public ByteBuffer getAll ( ) {
+ if ( remaining ( ) == NUMBER0 )
+ return EMPTY_BYTEBUFFER ;
read ( remaining ( ) ) ;
return remove ( ) ;
} | Fix bug in ByteBuffer getAll if the list is empty |
<nb> public abstract class AbstractVcsTestCase {
@ override
protected void run ( ) throws Throwable {
try {
- file . setBinaryContent ( newContent . getBytes ( ) ) ;
+ final long newModTs = Math . max ( System . currentTimeMillis ( ) , file . getModificationStamp ( ) + NUMBER0 ) ;
+ final long newTs = Math ... | write modification ts when changing files |
<nb> public class Pop3Store extends Store
private HashMap < String , Folder > mFolders = new HashMap < String , Folder > ( ) ;
private Pop3Capabilities mCapabilities ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- COMMENT
- SINGLE
- SINGLE
- SINGLE
... | Remove commented out code |
<nb> public class MessageListFragment extends SherlockFragment implements OnItemClick
}
case ACTION_RESTORE_LIST_POSITION : {
mListView . onRestoreInstanceState ( ( Parcelable ) msg . obj ) ;
- mSavedListState = null ;
break ;
}
case ACTION_OPEN_MESSAGE : { | Remove useless assignment |
<nb> public interface RobolectricPackageManager {
void setNameForUid ( int uid , String name ) ;
- void setPackagesForCallingUid ( String [ ] packagesForCallingUid ) ;
+ void setPackagesForCallingUid ( String . . . packagesForCallingUid ) ;
- void setPackagesForUid ( int uid , String [ ] packagesForCallin... | Fix varargs on RobolectricPackageManager |
<nb> public class ApkMojo extends AbstractAndroidMojo {
SINGLE
File destinationDirectory = new File ( outputDirectory . getAbsolutePath ( ) ) ;
- if ( destinationDirectory . exists ( ) )
- {
- SINGLE
- }
- else
- {
- if ( ! destinationDirectory . mkdir ( ) ) ;
- {
- getLog ( ) . debug ( STRING0 ... | Create the directory and any needed parent directories simpler |
<nb> public final class InodeFile extends Inode < InodeFile > {
COMMENT
private InodeFile ( long id ) {
super ( NUMBER0 ) ;
- mBlocks = new ArrayList < Long > ( NUMBER1 ) ;
+ mBlocks = new ArrayList < Long > ( NUMBER2 ) ;
mBlockContainerId = id ;
mBlockSizeBytes = NUMBER0 ;
mCacheable = false ; | Use smaller default array size in InodeFile |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TaskContainer extends ComponentContainer {
private void addCoreComponents ( ) {
SINGLE
if ( ! getParent ( ) . getComponen... | Move PastMeasureLoader as it is used by dev cockpit |
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
package NAMESPACE ;
import NAMESPACE ;
<nb>
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT... | Fixed the CS errors of camel cxf |
<nb> public final class UpgradeService {
StringBuilder changeLog = new StringBuilder ( ) ;
if ( from >= V4_4 && from < V4_4_1 ) {
- newVersionString ( changeLog , STRING0 , new String [ ] {
+ newVersionString ( changeLog , STRING1 , new String [ ] {
STRING2 ,
STRING3
} ) ; | Fixed typo in upgrade message |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class Utils {
COMMENT
COMMENT
public static boolean isSupporterChannel ( Context context ) {
- if ( getChannel ( context ) !=... | Also use last upgraded state to enable supporter features |
<nb> public class MyRoutes extends RouteBuilder {
@ uri ( STRING0 )
private Endpoint resultEndpoint ;
- @ inject
- private SomeBean someBean ;
-
@ override
public void configure ( ) throws Exception {
SINGLE
from ( inputEndpoint )
- . bean ( someBean )
+ . beanRef ( STRING1 )
. to ( resultEn... | Improved the cdi archetype to let the bean be looked up by name |
<nb> public abstract class BreakpointWithHighlighter extends Breakpoint {
if ( ! isVerified ) {
return getInvalidIcon ( ) ;
}
- return getVerifiedWarningsIcon ( ) ; SINGLE
+ return getVerifiedWarningsIcon ( ) ;
}
if ( isVerified ) { | remove obsolete todo message |
<nb> package NAMESPACE ;
COMMENT
public class Runtime {
public static Runtime getRuntime ( ) {
- throw new UnsupportedOperationException ( STRING0 ) ;
+ return new Runtime ( ) ;
}
public long totalMemory ( ) {
- throw new UnsupportedOperationException ( STRING1 ) ;
+ return NUMBER0 ;
}
public ... | Have Runtime return values rather than throwing for the no op GWT version |
<nb> public class Ray implements Serializable {
public final Vector3 origin = new Vector3 ( ) ;
public final Vector3 direction = new Vector3 ( ) ;
+ public Ray ( ) { }
+
COMMENT
COMMENT
COMMENT | Add no arg constructor |
<nb> public class Person {
private long personID ;
private int localTableBlogId ;
-
- private String username ;
private String displayName ;
private String avatarUrl ;
+ private PersonType personType ;
+
+ SINGLE
private String role ;
+
+ SINGLE
+ private String username ;
+
+ SINGLE
p... | Adds comments to Person properties to explain which belong to which type |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TablePropertyManager
SINGLE
BlockBuilder blockBuilder = expectedType . createBlockBuilder ( new BlockBuilderStatus ( ) , NUMBER0 ) ;
- BlockUtils . appendOb... | Fix BlockUtils merge issue |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TraitASTTransformation extends AbstractASTTransformation implements
if ( Traits . isTrait ( superClass ) ) {
SINGLE
cNode... | Cannot extend trait with generic parameter |
<nb> public class TestNGRunnableState extends JavaCommandLineState
LOGGER . info ( STRING0 + is15 ) ;
SINGLE
- javaParameters . getClassPath ( ) . add ( new File ( PathManager . getPluginsPath ( ) ,
- STRING1 ) . getPath ( ) ) ;
- javaParameters . getClassPath ( ) . add ( new File ( PathManager . getPlugins... | Use the internal plugin path to lookup testng jar files |
<nb> public class MBeanCpuUsageReporter {
}
if ( currentSafePointCount > NUMBER0 ) {
if ( currentSafePointCount == lastSafePointCount ) {
- sb . append ( String . format ( STRING0 ) ) ;
+ sb . append ( String . format ( STRING1 ) ) ;
}
else {
double spRate = ( TimeUnit . SECONDS . toNanos ( NUMBER1 ) * ... | Missed line end in ttop report |
<nb> public class TestExchangeClient
assertStatus ( exchangeClient . getStatus ( ) . getPageBufferClientStatuses ( ) . get ( NUMBER0 ) , location , STRING0 , NUMBER1 , NUMBER2 , NUMBER2 , STRING1 ) ;
}
- @ test
+ @ test ( timeOut = NUMBER3 )
public void testAddLocation ( )
throws Exception
{
<nb> publ... | Fix race condition in TestExchangeClient |
<nb> public class GLM2 extends Job . ModelJobWithoutClassificationField {
if ( _lbs [ i ] > NUMBER0 ) throw new IllegalArgumentException ( STRING0 ) ;
if ( _srcDinfo . _normMul != null ) {
for ( int i = numoff ; i < _srcDinfo . fullN ( ) ; ++ i ) {
- if ( Double . isInfinite ( _ubs [ i ] ) ) continue ;
+ if (... | Fix omitted in my latest commit |
<nb> public class FindPath implements SingleSourceSingleSinkShortestPath < Integer >
{
dijkstra . setStartNode ( startNode ) ;
}
+
+ public void limitMaxCostToTraverse ( MaxCostEvaluator < Integer > evaluator )
+ {
+ dijkstra . limitMaxCostToTraverse ( evaluator ) ;
+ }
+
COMMENT
COMMENT
COMMENT | Exposed the cost limit |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public enum FileSystemContext {
} catch ( AlluxioException e ) {
throw new IOException ( e ) ;
}
+ if ( infos . isEmpty ( ) ) {
+ ... | Throw an exception if there are no workers available when requesting workers |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
@ path ( STRING0 )
public class GeocoderResource {
+ @ injectparam @ setter
private Geocoder geocoder ; ... | inject specific handler remove XML support |
<nb> public class CxfEndpointBeanBusSettingTest extends AbstractSpringBeanTestSupport
assertEquals ( cxf2 , endpoint . getBus ( ) ) ;
assertEquals ( STRING0 , endpoint . getBus ( ) . getProperty ( STRING1 ) ) ;
+
+ }
+
+ @ test
+ public void testBusInjectionOnURI ( ) throws Exception {
+ CamelContext ... | Added an unit test to verify the bus setting of camel cxf endpoint |
<nb> public class LineageFileSystem extends BaseFileSystem {
COMMENT
COMMENT
public static synchronized LineageFileSystem get ( ) {
- return new LineageFileSystem ( ) ;
+ return new LineageFileSystem ( FileSystemContext . INSTANCE , LineageContext . INSTANCE ) ;
}
- protected LineageFileSystem ( ) {
-... | Dependency inject a bit more |
<nb> public class BaseBulletTest extends BulletTest {
public ModelBuilder modelBuilder = new ModelBuilder ( ) ;
public ModelBatch modelBatch ;
public Array < Disposable > disposables = new Array < Disposable > ( ) ;
- private int debugMode = DebugDrawModes . DBG_DrawFeaturesText ;
+ private int debugMode = De... | Fix bullet tests |
<nb> public class ProducteevSyncProvider extends SyncProvider < ProducteevTaskContainer
SINGLE
if ( remote . task . hasDueDate ( ) && remote . task . getValue ( Task . DUE_DATE ) < DateUtilities . now ( ) )
remote . task . setFlag ( Task . REMINDER_FLAGS , Task . NOTIFY_AFTER_DEADLINE , false ) ;
- boolean foun... | fix reference to read only patch that we haven t pulled yet |
<nb> public final class Iterables {
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public final class Iterables {
COMMENT
COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Document the advantages of Iterables frequency |
<nb> public class NetworkUtils
COMMENT
private static final Random random = new Random ( ) ;
+ static
+ {
+ String prefer6 = System . getProperty ( STRING0 ) ;
+ String prefer4 = System . getProperty ( STRING1 ) ;
+ logger . info ( STRING2 + prefer6 ) ;
+ logger . info ( STRING3 + prefer4 ) ;
+ }
... | Log Java IP stack properties |
<nb> public class GremlinPluginFunctionalTest implements GraphHolder
public void setVariables ( ) throws UnsupportedEncodingException
{
String payload = STRING0
- + STRING1 ;
+ + STRING2 ;
String response = gen . get ( )
. expectedStatus ( Status . OK . getStatusCode ( ) )
. payload ( JSONPrettifier . p... | choosing a longer number to fool the HTML manual formatter |
<nb> public class MixinTransformation implements ASTTransformation {
}
}
- List < PropertyNode > properties = mixinClassNode . getProperties ( ) ;
- System . out . println ( STRING0 + properties ) ;
- for ( PropertyNode property : properties ) {
- System . out . println ( STRING1 + property ) ;
- }
- ... | remove println statements from new Mixin impl |
<nb> public class FakeVertxMetrics implements VertxMetrics {
}
public void verticleDeployed ( Verticle verticle ) {
- throw new UnsupportedOperationException ( ) ;
}
public void verticleUndeployed ( Verticle verticle ) {
- throw new UnsupportedOperationException ( ) ;
}
public void timerCreated ( ... | Remove UnsupportedOperationException from verticle life cycle FakeMetrics SPI |
<nb> public class ConsoleViewImpl extends JPanel implements ConsoleView , ObservableCo
}
if ( myFlushAlarm . isDisposed ( ) ) return ;
cancelAllFlushRequests ( ) ;
- addFlushRequest ( new MyClearRunnable ( ) ) ;
+ UIUtil . invokeLaterIfNeeded ( new MyClearRunnable ( ) ) ;
cancelHeavyAlarm ( ) ;
} | fixed the Analyze stacktrace race condition differently |
<nb> public abstract class IntentBuilder < I extends IntentBuilder < I > > extends Builder
return ( I ) this ;
}
+ public I type ( String type ) {
+ intent . setType ( type ) ;
+ return ( I ) this ;
+ }
+
public I extra ( String name , boolean value ) {
intent . putExtra ( name , value ) ;
return ... | Added type method to IntentBuilder class |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class AggregateOperation < T > extends BaseOperation < MongoCursor < T > > {
this . pipeline = pipeline ;
this . options = options ;
command = asC... | Updated AggregateOperation to use the new read preference selector helper |
<nb> public class ListsDialogFragment extends DialogFragment implements
SINGLE
throw new RuntimeException ( STRING0 , e ) ;
}
+
+ getActivity ( ) . getContentResolver ( ) . notifyChange ( ListItems . CONTENT_WITH_DETAILS_URI , null ) ;
dismiss ( ) ;
} | Notify content provider on correct uri |
<nb> public class MetricsManager
return nameSanitizationRegex . matcher ( name ) . replaceAll ( STRING0 ) ; SINGLE
}
- public MetricRegistry getRegistry ( )
+ protected MetricRegistry getRegistry ( )
{
return registry ;
} | Fix accessibility of getRegistry |
<nb> public class ReaderPostAdapter extends RecyclerView . Adapter < RecyclerView . ViewHol
}
private boolean hasTagHeader ( ) {
- return mCurrentTag != null && mCurrentTag . isTagTopic ( ) ;
+ return mCurrentTag != null && mCurrentTag . isTagTopic ( ) && ! isEmpty ( ) ;
}
private boolean isDiscover ( )... | Don t show tag header when no posts |
<nb> public class SSHMain implements GitExternalApp {
@ override
public String toString ( ) {
return String
- . format ( STRING0 , myHost , myHandlerNo , myCommand ,
+ . format ( STRING1 , myHost , myHandlerNo , myCommand ,
myExitCode , myLastError ) ;
} | Malformed format string warning fixed |
<nb> public final class Posix implements Os {
}
] - * / ;
- public native void close ( FileDescriptor javaFd ) throws ErrnoException ;
+ public native void close ( FileDescriptor javaFd ) throws ErrnoException COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT ;
public native ... | Fixed repository sync error |
<nb> public class DateUtils implements DateConstants {
Date retVal = null ;
try {
- String newString = input . replace ( STRING0 , STRING1 ) . replace ( STRING2 , STRING1 ) . replace ( STRING3 , STRING1 ) . replace (
+ String newString = input . trim ( ) . replace ( STRING0 , STRING1 ) . replace ( STRING2 , S... | turn off lenient date parsing so yyyy mm dd is not parsed as mm dd yyyy |
<nb> public class XmlTagInsertHandler implements InsertHandler < LookupElement > {
}
}
}
- else if ( attributeDecl . isFixed ( ) && attributeDecl . getDefaultValue ( ) != null && ! htmlCode ) {
+ else if ( attributeDecl . isRequired ( ) && attributeDecl . isFixed ( ) && attributeDecl . getDefaultValue ( ) != ... | do not complete fixed attributes if they are optional |
<nb> public class LocalStore extends Store {
if ( isOpen ( ) ) {
return ;
}
- if ( ! exists ( ) ) {
- }
Cursor cursor = null ;
try {
cursor = mDb . rawQuery ( STRING0 | removing that empty call to the heavy query helps performance even more |
<nb> public class StructuralReplaceTest extends StructuralReplaceTestCase {
actualResult
) ;
- String s55 = STRING0 +
+ String s55 = STRING1 +
STRING2 +
STRING3 +
STRING4 ; | replace LOG assert with NotNull cleanup |
<nb> public final class BluetoothGatt implements BluetoothProfile {
COMMENT
for ( BluetoothGattService svc : mServices ) {
for ( BluetoothGattCharacteristic charac : svc . getCharacteristics ( ) ) {
- Log . w ( TAG , STRING0 + charac . getInstanceId ( ) + STRING1 + instanceId ) ;
if ( charac . getInstanceId (... | Fix log spam in getCharacteristicById |
<nb> public abstract class TerasologyTestingEnvironment {
private static ModuleManager moduleManager ;
private static AssetManager assetManager ;
- private static DisplayEnvironment env ;
+ private static HeadlessEnvironment env ;
private EngineEntityManager engineEntityManager ;
private ComponentSystem... | Use headless env |
<nb> public class AnnotationSetRefPool {
public int getOffset ( @ nonnull Method method ) {
Key annotationSetRefKey = new Key ( method ) ;
- Integer offset = internedAnnotationSetRefItems . put ( annotationSetRefKey , NUMBER0 ) ;
+ Integer offset = internedAnnotationSetRefItems . get ( annotationSetRefKey ) ;... | Fix AnnotationSetRefPool getOffset |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
public class WelcomeScreen extends Activity implements Eula . EulaCallback {
<nb> public class WelcomeScreen extends Activity implements Eula . EulaCallback {
requestWindowFeature ( Window . FEATURE_N... | Call startup service from welcome screen |
<nb> public class GestureLibrary {
return mOrientationStyle ;
}
- public void setGestureType ( int type ) {
+ COMMENT
+ COMMENT
+ COMMENT
+ public void setSequenceType ( int type ) {
mSequenceType = type ;
}
- public int getGestureType ( ) {
+ COMMENT
+ COMMENT
+ COMMENT
+ public int get... | Renamed setGestureType in GestureLibrary |
<nb> class LwjglGLDebugOutputHandler implements ARBDebugOutputCallback . Handler {
String severityStr = constMap . get ( severity ) ;
System . err . println ( String . format ( MESSAGE_FORMAT , id , sourceStr , typeStr , severityStr , message ) ) ;
+ Thread . dumpStack ( ) ;
}
} | dump stack on debug messages |
<nb> public class Main {
for ( int i = NUMBER0 ; i < elem . length ; i ++ ) {
msg += elem [ i ] . toString ( ) + STRING0 ;
}
- JOptionPane . showMessageDialog ( null , msg , STRING1 , JOptionPane . ERROR_MESSAGE ) ;
+ DialogThread dt = new DialogThread ( msg ) ;
+ dt . start ( ) ;
e . printStackTrace ( ) ... | put error message in its own thread to avoid focus problems mouse click on OK button didn t work |
<nb> package NAMESPACE ;
import static NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class MergeAndroidResourcesStep implements Step {
if ( uberRDotTxtIds . isPresent ( ) ) {
Preconditions . checkNotNull ( finalIds ) ;
if (... | Change the log level from SEVERE to WARNING for resource not found error |
<nb> public class ConfigurationProperty {
return Integer . valueOf ( ( String ) value ) ;
} else if ( type . equals ( BigDecimal . class ) ) {
return new BigDecimal ( ( String ) value ) ;
+ } else if ( type . equals ( Long . class ) ) {
+ return new Long ( ( String ) value ) ;
} else {
throw new Unexpecte... | When using the system property |
<nb> import NAMESPACE ;
public class Settings {
public static final float MAX_ZOOM = FLOAT0 ;
- public static final float OVERZOOM_FACTOR = FLOAT1 ;
+ public static final float OVERZOOM_FACTOR = FLOAT0 ;
COMMENT
COMMENT | Increasing default overzoom factor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.