diff stringlengths 38 1.78k | msg_token stringlengths 9 190 |
|---|---|
<nb> public class Registry {
for ( Class < ? > dataClass : dataClasses ) {
List < ? extends Class < ? > > registeredResourceClasses =
decoderRegistry . getResourceClasses ( dataClass , resourceClass ) ;
- result . addAll ( registeredResourceClasses ) ;
+ for ( Class < ? > registeredResourceClass : registeredR... | Fix bugs obtaining the set of available resources to decode for a model |
<nb> import NAMESPACE ;
public class DirectedMultiGraph < V , E > implements Graph < V , E > COMMENT {
- Map < V , Map < V , List < E > > > outgoingEdges = Generics . newHashMap ( ) ;
+ final Map < V , Map < V , List < E > > > outgoingEdges ;
- Map < V , Map < V , List < E > > > incomingEdges = Generics .... | Make the maps in a DirectedMultiGraph final |
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
public class IntroduceConstantHandler extends BaseExpressionToFieldHandler {
public static final... | forbid expressions with thrown checked exceptions |
<nb> public class XDebugSessionTab extends DebuggerSessionTabBase {
public void rebuildViews ( ) {
AppUIUtil . invokeLaterIfProjectAlive ( myProject , ( ) - > {
- for ( XDebugView view : myViews . values ( ) ) {
- view . processSessionEvent ( XDebugView . SessionEvent . SETTINGS_CHANGED , mySession ) ;
+ if... | fixed groovy tests |
<nb> public abstract class SocketWrapperBase < E > {
socketBufferHandler . configureWriteBufferForWrite ( ) ;
thisTime = transfer ( buf , off , len , socketBufferHandler . getWriteBuffer ( ) ) ;
} else {
- thisTime = NUMBER0 ;
+ SINGLE
+ SINGLE
+ SINGLE
+ break ;
}
len = len - thisTime ;
} | Fix an infinite loop |
<nb> public class EJBWebServicesTestCase {
+ STRING0
+ STRING1
+ STRING2 ;
- String result = HttpRequest . put ( STRING3 , message , NUMBER0 , SECONDS ) ;
+ String result = HttpRequest . post ( STRING3 , message , NUMBER0 , SECONDS ) ;
SINGLE
System . out . println ( result ) ;
} | Fix TestCase because changed behaviour of HttpRequest |
<nb> public class BreakpointManager {
breakpoint = createJavaBreakpoint ( xBreakpoint ) ;
myBreakpoints . put ( xBreakpoint , breakpoint ) ;
}
- myBreakpointsListForIteration . add ( breakpoint ) ;
}
}
+
+ myBreakpointsListForIteration . addAll ( myBreakpoints . values ( ) ) ;
}
return myBreakpoints... | preserve non java breakpoints in the BreakpointManager |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> class ActionBarDrawerToggleHoneycomb {
try {
final ActionBar actionBar = activity . getActionBar ( ) ;
sii . setHomeActionContentDescr... | Revert Force action bar to update generated content description |
<nb> public class FileUtils extends Plugin {
if ( fp . isDirectory ( ) ) {
File [ ] files = fp . listFiles ( ) ;
for ( int i = NUMBER0 ; i < files . length ; i ++ ) {
- entries . put ( getEntry ( files [ i ] ) ) ;
+ if ( files [ i ] . canRead ( ) ) {
+ entries . put ( getEntry ( files [ i ] ) ) ;
+ }
} ... | DirectoryReader creates null error code for inaccessible directory |
<nb> public class TransportBroadcastByNodeActionTests extends ESTestCase {
for ( int i = NUMBER0 ; i < numberOfNodes ; i ++ ) {
final DiscoveryNode node = newNode ( i ) ;
discoBuilder = discoBuilder . put ( node ) ;
- int numberOfShards = randomIntBetween ( NUMBER0 , NUMBER1 ) ;
+ int numberOfShards = randomI... | Fix test bug in o e a s b n TransportBroadcastByNodeActionTests |
<nb> public abstract class StreamInput extends InputStream {
return null ;
}
+ @ nullable
+ public Text readOptionalText ( ) throws IOException {
+ int length = readInt ( ) ;
+ if ( length == - NUMBER0 ) {
+ return null ;
+ }
+ return new StringAndBytesText ( readBytesReference ( length ) ) ;
+ } ... | add read write optional text |
<nb> public class DriverConnection implements AutoCloseable
final long oldCompletedPosition = this . completedPosition . position ( ) ;
final long completedPosition = Math . max ( oldCompletedPosition , maxSubscriberPosition ) ;
+ final int positionBitsToShift = this . positionBitsToShift ;
final int activeIn... | Java Register cache common used field |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
COMMENT
COMMENT
COMMENT
+ @ ignore ( STRING0 )
public class ApnsProducerTest extends CamelTestSupport {
private static final String FAKE_TOKEN = STRING1 ; | Skip test which occationally may fail on CI servers |
<nb> public final class EditorImpl extends UserDataHolderBase implements EditorEx , Hi
break ;
case NUMBER0 :
- if ( mySettings . isMouseClickSelectionHonorsCamelWords ( ) ) {
- SINGLE
- SINGLE
- selectWordAtCaret ( false ) ;
- break ;
- }
- case NUMBER1 :
mySelectionModel . selectLineAtCaret ( ) ... | triple click selects line |
<nb> import NAMESPACE ;
import NAMESPACE ;
COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Added TODO in QuadTree |
<nb> public class DefaultResponse implements Response {
private void commit ( ByteBuf byteBuf ) {
setCookieHeader ( ) ;
- headers . set ( HttpHeaderConstants . CONTENT_LENGTH , byteBuf . readableBytes ( ) ) ;
responseTransmitter . transmit ( status , byteBuf ) ;
}
}
<nb> public class DefaultResponseTran... | Render a byte buf as http content |
<nb> public class CassandraEmbeddedStoreManager extends AbstractCassandraStoreManager
COMMENT
COMMENT
public List < KeyRange > getLocalKeyPartition ( ) throws BackendException {
+ ensureKeyspaceExists ( keySpaceName ) ;
+
@ suppresswarnings ( STRING0 )
Collection < Range < Token > > ranges = StorageServic... | Create keyspace before getting ring embedded Cas |
<nb> public class Action {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
public int getEntityIdentifier ( ) {
<nb> public class Action {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
... | Fix api example self closing tags |
<nb> public class GenMRTableScan1 implements NodeProcessor {
if ( parseCtx . getQueryProperties ( ) . isAnalyzeCommand ( ) ) {
boolean partialScan = parseCtx . getQueryProperties ( ) . isPartialScanAnalyzeCommand ( ) ;
boolean noScan = parseCtx . getQueryProperties ( ) . isNoScanAnalyzeCommand ( ) ;
- if ( inpu... | Analyze command should support custom input formats Chao Sun reviewed by Xuefu Zhang and Prasanth Jayachandran |
<nb> public enum BlockType {
case BlockID . GRAVEL :
if ( random . nextDouble ( ) >= FLOAT0 ) {
return new BaseItemStack ( ItemID . FLINT ) ;
+ } else {
+ return new BaseItemStack ( BlockID . GRAVEL ) ;
}
case BlockID . COAL_ORE :
<nb> public enum BlockType {
return new BaseItemStack ( ItemID . BED_... | Fixed case fallthroughs in BlockType |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ; | Remove unused import |
<nb>
package NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class BuilderRegistry {
}
public List < ModuleLevelBuilder > getBuilders ( BuilderCategory category ) {
- return Collections . unmodifiableList ( myModuleLevelBui... | endure order for module level builders |
<nb> public class JetVisitorVoid extends JetVisitor < Void , Void > {
}
@ override
+ public final Void visitPrimaryConstructor ( @ notnull JetPrimaryConstructor constructor , Void data ) {
+ visitPrimaryConstructor ( constructor ) ;
+ return null ;
+ }
+
+ @ override
public final Void visitNamedFunc... | Override all methods from based visitor class |
<nb> public final class ActivityStackSupervisor implements DisplayListener {
r . userId , r . info . configChanges , task . voiceSession != null ,
r . mLaunchTaskBehind ) ;
}
- mWindowManager . addTask ( taskId , stackId , false ) ;
}
resumeHomeStackTask ( HOME_ACTIVITY_TYPE , null ) ;
} | Remove redundant call to window manager addTask |
<nb> public abstract class TWLayoutManager extends LayoutManager {
private int mFirstPosition ;
private int mFirstVisiblePosition ;
- private boolean mIsVertical ;
+ private boolean mIsVertical = true ;
private SavedState mPendingSavedState = null ; | core Set TWLayoutManager to have vertical orientation by default |
<nb> public class ShortcutManager implements NativePreviewHandler ,
SINGLE
private UserCommandManager userCommands_ ;
- private EditorCommandManager editorCommands_ ;
+ @ suppresswarnings ( STRING0 ) private EditorCommandManager editorCommands_ ;
@ suppresswarnings ( STRING0 ) private ApplicationCommandMana... | suppress unused warning injection used to ensure construction |
<nb> public abstract class SensorManager {
float q2 = rotationVector [ NUMBER0 ] ;
float q3 = rotationVector [ NUMBER1 ] ;
- if ( rotationVector . length == NUMBER2 ) {
+ if ( rotationVector . length >= NUMBER2 ) {
q0 = rotationVector [ NUMBER3 ] ;
} else {
q0 = NUMBER0 - q1 * q1 - q2 * q2 - q3 * q3 ;
... | take account of RotationVector s new extra parameter |
<nb> public class GameData {
. put ( STRING0 , Item . class ) . build ( ) ) ;
private void findSuperTypes ( Class < ? > type , Set < Class < ? > > types ) {
- if ( type == Object . class ) {
+ if ( type == null || type == Object . class ) {
return ;
}
types . add ( type ) ; | Fix a possible NPE when checking supertypes of interfaces |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- public class ExtendedBeanInfo implements BeanInfo {
+ class ExtendedBeanInfo implements BeanInfo {
private final BeanInfo delegate ;
private final SortedSet < PropertyDescriptor > propertyDescriptors =
new TreeSet < PropertyDescriptor > ( new PropertyDes... | Give ExtendedBeanInfo package private visibility |
<nb> public class OChannelBinaryAsynch extends OChannelBinary {
private final ReentrantLock lockRead = new ReentrantLock ( true ) ;
private final Condition readCondition = lockRead . newCondition ( ) ;
private final ReentrantLock lockWrite = new ReentrantLock ( ) ;
- private boolean channelRead = false ;
+ pr... | Fixed concurrency problem on read from socket in multi threads clients |
<nb> public class RouteStopTest extends ContextTestSupport {
return new RouteBuilder ( ) {
@ override
public void configure ( ) throws Exception {
+ SINGLE
from ( STRING0 )
. choice ( )
. when ( body ( ) . contains ( STRING1 ) ) . to ( STRING2 )
<nb> public class RouteStopTest extends ContextTestSupport... | added code snippets for wiki documentation |
<nb> public class PmdPlugin extends AbstractCodeQualityPlugin < Pmd > {
return extension ;
}
- private static TargetJdk getDefaultTargetJdk ( JavaVersion javaVersion ) {
+ public TargetJdk getDefaultTargetJdk ( JavaVersion javaVersion ) {
try {
return TargetJdk . toVersion ( javaVersion . toString ( ) ) ;... | Restore lost access levels in codeQuality |
<nb> public class JavacInMemoryCommand implements Command {
SINGLE
JavaCompiler compiler = ToolProvider . getSystemJavaCompiler ( ) ;
+ Preconditions . checkNotNull ( compiler ,
+ STRING0 ) ;
StandardJavaFileManager fileManager = compiler . getStandardFileManager ( null , null , null ) ;
DiagnosticCollect... | Print out a custom error if using JRE without JDK |
<nb> package NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
+ import NAMESPACE ;
+
COMMENT
# import " NAMESPACE / lang / IllegalThreadStateException . h STRING0 java / lang / InterruptedException . h STRING1 Expected STRING2 but was " + removed ) ;
}
}
}
}
+
+
+
+
... | Android s thread push pop interrupt action support needed for NIO channels |
<nb> public class Vector2 implements Serializable {
COMMENT
COMMENT
- public final static Vector2 tmp = new Vector2 ( ) ;
- public final static Vector2 tmp2 = new Vector2 ( ) ;
+ public final static Vector2 tmp = new Vector2 ( ) , tmp2 = new Vector2 ( ) , tmp3 = new Vector2 ( ) ;
public final static Vec... | Added Vector tmp3 |
<nb> import NAMESPACE ;
import static NAMESPACE ;
import static NAMESPACE ;
+ import static NAMESPACE ;
public class OrcReader
{
<nb> public class OrcReader
}
SINGLE
- byte [ ] buffer = new byte [ ( int ) Math . min ( size , EXPECTED_FOOTER_SIZE ) ] ;
+ byte [ ] buffer = new byte [ Ints . chec... | Fix int cast warning in OrcReader |
<nb> import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
COMMENT
COMMENT
<nb> public class DeviceEventManagerModule extends ReactContextBaseJavaModu... | Add support placeholder in AdsManager for proper deep linking |
<nb> public class PlaybackService extends Service {
PlaybackService . getPlayerActivityIntent ( this ) ,
PendingIntent . FLAG_UPDATE_CURRENT ) ;
- Bitmap icon = BitmapFactory . decodeResource ( null ,
+ Bitmap icon = BitmapFactory . decodeResource ( getResources ( ) ,
R . drawable . ic_stat_antenna ) ;
no... | Fixed NullPointerException on some devices |
<nb> public class PathSourcePath extends AbstractSourcePath {
this . relativePath = Preconditions . checkNotNull ( relativePath ) ;
}
+ @ override
public Path resolve ( ) {
return relativePath ;
}
<nb> public class AppleSourceTypeCoercer implements TypeCoercer < AppleSource > {
SINGLE
SINGLE
- i... | Fix Eclipse warnings |
<nb> public abstract class Command {
return true ;
}
- target . sendMessage ( ChatColor . RED + STRING0 ) ;
+ target . sendMessage ( ChatColor . RED + STRING1 ) ;
return false ;
} | Bukkit will no longer leak tears |
<nb> public class CommentDetailFragment extends Fragment implements NotificationFragm
mSubmitReplyBtn = mLayoutReply . findViewById ( R . id . btn_submit_reply ) ;
View replyBox = mLayoutReply . findViewById ( R . id . reply_box ) ;
- if ( mComment . getStatusEnum ( ) == CommentStatus . SPAM ||
- mComment . g... | Fixed mComment NPE |
<nb> public class RoutingRequestBuilderTest {
public void testSetNumItineraries ( ) {
int n = NUMBER0 ;
RoutingRequest rr = ( new RoutingRequestBuilder ( ) ) . setNumItineraries ( n ) . build ( ) ;
- assertEquals ( n , rr . getNumItineraries ( ) . intValue ( ) ) ;
+ assertEquals ( n , rr . getNumItineraries (... | Fix testSetNumItineraries test |
<nb> public class ScriptGroup extends BaseObj {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT | Fix a broken link in doc comment to Closure |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
COMMENT | Fix JSON serialization of the LocalResponseNormalization layer configuration |
<nb> public class Node {
public void setMasterAddress ( final Address master ) {
if ( master != null ) {
- logger . log ( Level . INFO , STRING0 + master . toString ( ) ) ;
+ logger . log ( Level . FINEST , STRING0 + master . toString ( ) ) ;
}
masterAddress = master ;
} | changed the log level to FINEST for log setting master address |
<nb> public class DefaultPassConfig extends PassConfig {
passes . add ( operaCompoundAssignFix ) ;
}
- SINGLE
+ SINGLE
+ passes . add ( sanityCheckAst ) ;
if ( options . checkSymbols ) {
passes . add ( sanityCheckVars ) ;
}
<nb> public class DefaultPassConfig extends PassConfig {
} ;
COMMENT
... | Always do an AST validation sanity check |
<nb>
package NAMESPACE ;
- import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
public class FacadeManager
{
+ private static Method addFacade ;
+
public static void addFacade ( ItemStack is ) {
- ItemFacade . addFacade ( is ) ;
+ try {
+ if ( addFacade == null ) {
+ Class facade = C... | Removed BC dep from FacadeManager untested |
<nb> public class OperatorSubscribeOn < T > implements Operator < T , Observable < T > > {
@ override
public void call ( final Inner inner ) {
cs . unsubscribe ( ) ;
- inner . unsubscribe ( ) ;
}
} ) ; | Remove inner unsubscribe |
<nb> public class InspectionResultsView extends JPanel implements Disposable , Occuren
}
private void initTreeListeners ( ) {
+ if ( ApplicationManager . getApplication ( ) . isUnitTestMode ( ) ) {
+ return ;
+ }
myTree . getSelectionModel ( ) . addTreeSelectionListener ( new TreeSelectionListener ( ) {
... | do not add listeners in test mode |
<nb> public class AccumulatingAlignedProcessingTimeWindowOperatorTest {
}
SINGLE
- System . out . println ( STRING0 + testHarness . getOutput ( ) ) ;
int beforeSnapShot = testHarness . getOutput ( ) . size ( ) ;
StreamStateHandle state = testHarness . snapshot ( NUMBER0 , System . currentTimeMillis ( ) ) ; ... | hotfix tests Remove leftover sysout logging from AccumulatingAlignedProcessingTimeWindowOperatorTest |
<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 NAM... | Cleaned up some imports |
<nb> public class DistributedLogicalPlanner
private class Visitor
extends PlanVisitor < Void , SubPlanBuilder >
{
- private int nextFragmentId = NUMBER0 ;
+ private int nextFragmentId ;
private final SymbolAllocator allocator ;
private final boolean createSingleNodePlan ;
<nb> public class Distributed... | Remove unused method and fix intellij warning |
<nb> import NAMESPACE ;
public class DefaultFileWatcherFactory implements FileWatcherFactory , Stoppable {
private static final Logger LOGGER = LoggerFactory . getLogger ( DefaultFileWatcherFactory . class ) ;
- public static final int STOP_TIMEOUT_SECONDS = NUMBER0 ;
+ private static final int STOP_TIMEOUT_S... | Replace use of WatchService take with WatchService poll |
<nb>
COMMENT
package NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class X11Test extends TestCase {
}
}
+ @ override
+ protected void runTest ( ) throws Throwable {
+ if ( ! GraphicsEnvironment . isHeadless ( ) ) {
+ super . runTest ( ) ;
+ }
+ }
... | skip X11 tests if headless |
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
class StaxEventXMLReader extends AbstractStaxXMLReader {
<nb> import NAMESPACE ;
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
class StaxStreamXMLReader extends AbstractStaxXMLReader { | Fixed version numbers |
<nb> public class VActivityService extends IActivityManager . Stub {
ActivityRecord sourceRecord = mMainStack . findRecord ( request . resultTo ) ;
if ( ( launchFlags & Intent . FLAG_ACTIVITY_CLEAR_TASK ) != NUMBER0 ) {
- am . removeTask ( NUMBER0 ) ;
+ ActivityTaskRecord task = mMainStack . findTask ( taskAf... | support clear task flag |
<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... | Add missing license headers |
<nb> package NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
- import NAMESPACE ;
COMMENT
COMMENT | Removing redundant imports |
<nb> public class BlockMetadataManager {
}
StorageDir oldDir = blockMeta . getParentDir ( ) ;
oldDir . removeBlockMeta ( blockMeta ) ;
- newDir . addBlockMeta ( blockMeta ) ;
- return blockMeta ;
+ BlockMeta newBlockMeta =
+ new BlockMeta ( blockMeta . getBlockId ( ) , blockMeta . getBlockSize ( ) , newDi... | Update the dir in BlockMeta when moving BlockMeta |
<nb> public class Mongo {
}
COMMENT
+ COMMENT
+ COMMENT
+ public MongoOptions getMongoOptions ( ) {
+ return _options ;
+ }
+
+ COMMENT
COMMENT
COMMENT
COMMENT | expose the Mongo Options via get method |
<nb>
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT
<nb> public class ColorUtil {
return String . format ( STRING0 , com . intellij . ui . ColorUtil . toHex ( color ) ) ;
}
+ @ suppresswarnings ( STRING1 )
public static void appendColorPreview ( final PsiVariable variable , final StringBuil... | suppress JBColor warning |
<nb> public class PhoneWindowManager implements WindowManagerPolicy {
if ( ! mKeyguardMediator . onWakeKeyWhenKeyguardShowingTq ( event . keycode )
&& ( event . keycode == KeyEvent . KEYCODE_VOLUME_DOWN
|| event . keycode == KeyEvent . KEYCODE_VOLUME_UP ) ) {
+ SINGLE
+ SINGLE
if ( isInCall ( ) ) {
- SING... | Fix volume keys when in call and screen is off due to proximity sensor |
<nb> public class EncodedImage implements Closeable {
this . mInputStreamSupplier = inputStreamSupplier ;
}
- public EncodedImage ( Supplier < InputStream > inputStreamSupplier , int streamSize ) {
+ public EncodedImage ( Supplier < InputStream > inputStreamSupplier , int streamSize ) {
Preconditions . chec... | Fixed small bug in EncodedImage clone |
<nb> public final class Settings {
COMMENT
COMMENT
COMMENT
- COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | Fix documentation typo |
<nb> public class Moco {
checkNotNull ( filename , STRING0 ) ;
File file = new File ( filename ) ;
- if ( ! file . exists ( ) ) {
- throw new RuntimeException ( format ( STRING1 , filename ) ) ;
- }
-
return new FileResource ( file ) ;
} | removed file existence detection so we can start without any existing file for cache |
<nb> public class AIMSICD extends FragmentActivity implements AsyncResponse {
trackFemtocell ( ) ;
} else if ( selectedItem . getId ( ) == NUMBER0 ) {
showmap ( ) ;
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
- SINGLE
} else if ( selectedItem . getId ( ) == NUMBER1 ) {
Inten... | Removed unused GooglePlay code |
<nb> public class Http {
httpTransfer . setHost ( hostName ) ;
httpTransfer . setPort ( port ) ;
- httpTransfer . addHeader ( STRING0 , hostName ) ;
+ String host = hostName ;
+
+ if ( port != NUMBER0 ) {
+ host += STRING1 + port ;
+ }
+
+ httpTransfer . addHeader ( STRING0 , host ) ;
return htt... | Add port to host header as per HTTP spec |
<nb> public class ContentObserverTest extends FlowTestCase {
Uri notificationUri = SqlUtils . getNotificationUri ( TestModel1 . class , BaseModel . Action . SAVE , TestModel1_Table . name . getQuery ( ) , STRING0 ) ;
assertEquals ( notificationUri . getAuthority ( ) , FlowManager . getTableName ( TestModel1 . class... | got all tests to pass |
<nb> public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport {
COMMENT
COMMENT
protected static String toString ( Object value ) {
- if ( value instanceof Map )
- return toMapString ( ( Map ) value ) ;
- else if ( value instanceof Collection )
- return toListString ( ( Collection ) value ) ;... | Delete redundant instanceof checks |
<nb> public class GtfsRealtimeHttpUpdateStreamer extends GtfsRealtimeAbstractUpdateSt
protected FeedMessage getFeedMessage ( ) {
FeedMessage feed = null ;
try {
- InputStream is = HttpUtils . getData ( url ) ;
- feed = GtfsRealtime . FeedMessage . parseFrom ( is ) ;
+ InputStream is = HttpUtils . getData ( ... | avoid null value if feed failed to fetch |
<nb> public class PsiDocumentManagerImpl extends PsiDocumentManager implements Projec
}
}
if ( mySmartPointerManager != null ) { SINGLE
- mySmartPointerManager . fastenBelts ( file ) ;
+ if ( file . isPhysical ( ) ) {
+ mySmartPointerManager . fastenBelts ( file ) ;
+ }
}
} | do not fasten belts for nonphysical files |
<nb> public class TachyonURI implements Comparable < TachyonURI > {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
COMMENT
COMMENT | fix a TachyonURI bug |
<nb> public final class IntrospectionUtils {
params [ NUMBER0 ] = value ;
if ( setPropertyMethodBool != null ) {
try {
- return ( Boolean ) setPropertyMethodBool . invoke ( o , params ) ;
+ return ( ( Boolean ) setPropertyMethodBool . invoke ( o ,
+ params ) ) . booleanValue ( ) ;
} catch ( IllegalArgumen... | Resolve a warning about unboxing operation |
<nb> class GroovyPageScanner implements Tokens {
levelTokens . push ( STRING0 ) ;
} else if ( c == STRING1 ) {
levelTokens . push ( STRING2 ) ;
- } else if ( c == STRING3 ) {
+ } else if ( c == STRING3 && ! levelTokens . empty ( ) ) {
levelTokens . push ( STRING4 ) ;
}
continue ; | improve parsing GSP that contain square brackets outside of a Groovy expression |
<nb> class DefaultRealmModuleMediator extends RealmProxyMediator {
@ override
public < E extends RealmObject > E copyOrUpdate ( Realm realm , E obj , boolean update , Map < RealmObject , RealmObjectProxy > cache ) {
- Class < E > clazz = ( Class < E > ) ( ( obj instanceof RealmObjectProxy ) ? obj . getClass ( )... | fix the expected generated DefaultRealmModuleMediator |
<nb> public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
@ notnull
@ override
- public RefElementNode createRefNode ( @ notnull RefEntity entity ) {
+ public RefElementNode createRefNode ( @ nullable RefEntity entity ) {
return new RefElementNode ( entity , this ) {
@ nullable... | entity in RefElementNode can be null use Nullable |
<nb> public class MessagingController implements Runnable {
return false ;
}
- if ( account . isNotifyContactsMailOnly ( ) && ! contacts . containsContact ( message . getFrom ( ) ) ) {
+ if ( account . isNotifyContactsMailOnly ( ) && ! contacts . isAnyInContacts ( message . getFrom ( ) ) ) {
return false ; ... | Rename method for consistency |
<nb> public class BindyComplexCsvUnmarshallTest extends AbstractJUnit4SpringContextTe
public static class ContextConfig extends RouteBuilder {
public void configure ( ) {
- BindyCsvDataFormat camelDataFormat =
- new BindyCsvDataFormat ( org . apache . camel . dataformat . bindy . model . complex . twoclassesa... | Bindy ignores bean class type initial work |
<nb> public class PreferenceController implements SharedPreferences . OnSharedPreferenc
requestCode == DirectoryChooserActivity . RESULT_CODE_DIR_SELECTED ) {
String dir = data . getStringExtra ( DirectoryChooserActivity . RESULT_SELECTED_DIR ) ;
- File path = new File ( dir ) ;
+ File path ;
+ if ( dir != ... | Use default dir when Directory Chooser returns null user clicks Choose default dir |
<nb> public class DefaultJettyAtJettyHomeHelper
Util . setProperty ( properties , OSGiServerConstants . JETTY_PORT_SSL , System . getProperty ( OSGiServerConstants . JETTY_PORT_SSL ) ) ;
Server server = ServerInstanceWrapper . configure ( null , configURLs , properties ) ;
+ SINGLE
+ server . setAttribute ( O... | Ensure jetty home set as Server attribute on defaultJettyServer instance |
<nb> public class Keyspace
public List < Future < ? > > flush ( )
{
List < Future < ? > > futures = new ArrayList < > ( columnFamilyStores . size ( ) ) ;
- for ( UUID cfId : columnFamilyStores . keySet ( ) )
- futures . add ( columnFamilyStores . get ( cfId ) . forceFlush ( ) ) ;
+ for ( ColumnFamilyStore c... | iterate over the values collection |
<nb> public class MapReduceIndexManagement {
titanmrConf . set ( TitanHadoopConfiguration . SCAN_JOB_CONFIG_ROOT ,
GraphDatabaseConfiguration . class . getName ( ) + STRING0 ) ;
SINGLE
- copyInputKeys ( hadoopConf , graph . getConfiguration ( ) . getLocalConfiguration ( ) ) ;
+ org . apache . commons . config... | Avoid a warning about an invalid config option |
<nb> public class CodeStyleSettings implements Cloneable , JDOMExternalizable {
private void copyOldIndentOptions ( @ nonnls final String extension , final IndentOptions options ) {
final FileType fileType = FileTypeManager . getInstance ( ) . getFileTypeByExtension ( extension ) ;
- if ( fileType != FileTypes ... | fix additional indent options empty extension on write |
<nb> public class DataSupport {
getFieldsToSetToDefault ( ) . add ( fieldName ) ;
}
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ public void assignBaseObjId ( int baseObjId ) {
+ this . baseObjId = baseObjId ;
+ }
+
COMMENT
COMMENT
COMMENT | Add assignBaseObjId method in DataSupport |
<nb> public class DeepWaterTest extends TestUtil {
}
br . close ( ) ;
- int batch_size = NUMBER0 ;
+ int batch_size = NUMBER1 ;
int classes = NUMBER2 ;
ImageTrain m = new ImageTrain ( ) ;
m . buildNet ( classes , batch_size , STRING0 ) ;
- int max_iter = NUMBER2 ; SINGLE
+ int max_iter = NUMBER3... | Add learning rate annealing and larger batch size |
<nb> public class TestSerialization extends TestCase {
}
public void testSerializedDateTimeZone ( ) throws Exception {
- DateTimeZone test = PARIS ;
+ SINGLE
+ SINGLE
+ DateTimeZone test = DateTimeZone . forID ( STRING0 ) ;
loadAndCompare ( test , STRING1 , true ) ;
inlineCompare ( test , true ) ;
} | Fix test to work reliably as part of larger test suite |
<nb> public class GetOnRootFunctionalTest {
Map < String , Object > map = JsonHelper . jsonToMap ( body ) ;
assertEquals ( functionalTestHelper . nodeUri ( ) , map . get ( STRING0 ) ) ;
assertNotNull ( map . get ( STRING1 ) ) ;
- assertNotNull ( map . get ( STRING2 ) ) ;
+ assertNotNull ( map . get ( STRING3 ... | fixed content of root which now has references to distinct node and relationship indexes |
<nb> class Camera1 extends CameraViewImpl {
@ override
public void onPictureTaken ( byte [ ] data , Camera camera ) {
mCallback . onPictureTaken ( data ) ;
+ camera . cancelAutoFocus ( ) ;
camera . startPreview ( ) ;
}
} ) ; | Fix auto focus on Camera1 |
<nb> public abstract class ConnectionWizard extends Wizard implements INewWizard
} else {
monitor . subTask ( CoreMessages . dialog_connection_wizard_start_connection_monitor_subtask_test ) ;
try {
- SINGLE
- dataSource . initialize ( monitor ) ;
+ monitor . subTask ( CoreMessages . dialog_connection_wizard... | Remove additional initialization on connection test |
<nb> public class CallSessionImpl
{
SINGLE
- GainControl gc
- = ( GainControl ) player . getControl ( GainControl . class . getName ( ) ) ;
- if ( gc != null )
- {
- logger . debug ( STRING0 ) ;
- gc . setLevel ( NUMBER0 ) ;
- }
- else
- logger . debug ( STRING1 ) ;
+ SINGLE
+ SINGLE
+ SIN... | Removed call to gain control |
<nb> public class IOSTarget extends AbstractTarget {
}
private File createPartialInfoPlistFile ( File f ) throws IOException {
- return File . createTempFile ( f . getName ( ) + STRING0 , STRING1 , partialPListDir ) ;
+ File tmpFile = File . createTempFile ( f . getName ( ) + STRING0 , STRING1 , partialPListD... | Prevent empty partial plist files from being created and then causing |
<nb> public class LicenseManager {
return false ;
}
- Pattern p = Pattern . compile ( STRING0 ) ;
+ Pattern p = Pattern . compile ( STRING1 ) ;
Scanner scanner = new Scanner ( _license ) ;
while ( scanner . hasNextLine ( ) ) {
String line = scanner . nextLine ( ) ; | Tweak pattern match |
<nb> public class ASTBuilder
protected ConstructorCallExpression newExpression ( CSTNode expressionRoot )
{
- String datatype = resolvedQualifiedNameNotNull ( expressionRoot . getChild ( NUMBER0 ) ) ;
+ SINGLE
+ String datatype = resolvedQualifiedName ( expressionRoot . getChild ( NUMBER0 ) ) ;
TupleExp... | disabled failing null check |
<nb> public class PyParameterInfoTest extends LightMarkedTestCase {
feignCtrlP ( marks . get ( STRING0 ) . getTextOffset ( ) ) . check ( STRING1 , new String [ ] { STRING2 } ) ;
}
+ public void testTupleArgPlainParam ( ) throws Exception {
+ Map < String , PsiElement > marks = loadTest ( ) ;
+ assertEquals ... | Missing added test |
<nb> public class ActivityFragment extends MainFragment {
}
+ if ( cursor . getCount ( ) == NUMBER0 ) {
+ spinner . setVisibility ( View . VISIBLE ) ;
+ } else {
+ spinner . setVisibility ( View . GONE ) ;
+ }
+
try {
if ( update ) {
showToastBar ( getString ( R . string . new_activity ) , getSt... | Fix Make sure we remove the no activity placeholder in all cases |
<nb> public interface Query {
COMMENT
COMMENT
COMMENT
- COMMENT
- COMMENT
+ COMMENT
+ COMMENT
COMMENT
long getStartTime ( ) ;
<nb> public interface Query {
void downsample ( long interval , Aggregator downsampler ) ;
COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COMMENT
+ COM... | Add a downsample setter override to the Query interface for fills |
<nb> public class SQLiteCursorTest extends AndroidTestCase {
assertTrue ( db . isOpen ( ) ) ;
}
- @ smalltest
+ COMMENT
+ COMMENT
+ COMMENT
+ @ largetest
public void testFillWindow ( ) {
SINGLE
final String testTable = STRING0 ;
<nb> public class SQLiteStatementTest extends AndroidTestCase {
C... | annotate some tests large just in case they take longer |
<nb> import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
+ import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
import NAMESPACE ;
<nb> public class TestNetworkSerializerIndipendency {
server . shutdown ( ) ;
File iDirectory = new File ( SERVER_DIRECTORY ) ;
deleteDirectory ( iDirectory )... | fixed test for keep static context alive |
<nb> public class ToolbarWidgetWrapper implements DecorToolbar {
mTitle = toolbar . getTitle ( ) ;
mSubtitle = toolbar . getSubtitle ( ) ;
mTitleSet = mTitle != null ;
- mNavIcon = mToolbar . getNavigationIcon ( ) ;
+ mNavIcon = toolbar . getNavigationIcon ( ) ;
if ( style ) {
final TintTypedArray a = T... | Don t overwrite Toolbar s icon with the Action Bar style |
<nb> public class SecurityConstraint implements Serializable {
SINGLE
omittedMethods . removeAll ( methods ) ;
- handleOmittedMethods ( omittedMethods , pattern , denyUncoveredHttpMethods , newConstraints , log ) ;
+ handleOmittedMethods ( omittedMethods , pattern , denyUncoveredHttpMethods ,
+ newConstrain... | Fix line length |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.