nus-yam/ex-repair huggingface dataset:
Buggy code:
class ClassFileInfo extends OpenableElementInfo implements SuffixConstants { protected JavaElement [ ] binaryChildren = null ; protected ClassFile classFile = null ; ClassFileInfo ( ClassFile classFile ) { } private void generateFieldInfos ( IType type , IBinaryType typeInfo , HashMap newElements , ArrayList childrenHandles ) { } private void generateInnerClassHandles ( IType type , IBinaryType typeInfo , ArrayList childrenHandles ) { } private void generateMethodInfos ( IType type , IBinaryType typeInfo , HashMap newElements , ArrayList childrenHandles ) { } IJavaElement [ ] getBinaryChildren ( HashMap newElements ) { } boolean hasReadBinaryChildren ( ) { } protected void readBinaryChildren ( HashMap newElements , IBinaryType typeInfo ) { ArrayList childrenHandles = new ArrayList ( ) ; BinaryType type = null ; try { type = ( ( BinaryType ) ( this . classFile . getType ( ) ) ) ; if ( typeInfo == null ) { typeInfo = ( ( IBinaryType ) ( newElements . get ( type ) ) ) ; if ( typeInfo == null ) { <START_BUG> typeInfo = classFile . getBinaryTypeInfo ( ( ( IFile ) ( classFile . getResource ( ) ) ) ) ; <END_BUG> } } } catch ( JavaModelException npe ) { return ; } if ( typeInfo != null ) { generateFieldInfos ( type , typeInfo , newElements , childrenHandles ) ; generateMethodInfos ( type , typeInfo , newElements , childrenHandles ) ; generateInnerClassHandles ( type , typeInfo , childrenHandles ) ; } this . binaryChildren = new JavaElement [ childrenHandles . size ( ) ] ; childrenHandles . toArray ( this . binaryChildren ) ; } void removeBinaryChildren ( ) throws JavaModelException { } }

Fix:
typeInfo = this . classFile . getBinaryTypeInfo ( ( ( IFile ) ( this . classFile . getResource ( ) ) ) ) ;
Buggy code:
public class ShippedCodeFlagTest { static Category CAT = Category . getInstance ( ShippedCodeFlagTest . class . getName ( ) ) ; public static void main ( String [ ] argv ) { String type = null ; if ( ( argv . length ) == 1 ) type = argv [ 0 ] ; else ShippedCodeFlagTest . Usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; if ( type . equals ( "basic" ) ) { System . out . println ( ( ( ( ( "System<seq2seq4repair_space>property<seq2seq4repair_space>\"" + ( DISABLE_OVERRIDE_KEY ) ) + "\"<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>[" ) + ( System . getProperty ( DISABLE_OVERRIDE_KEY ) ) ) + "]." ) ) ; BasicConfigurator . configure ( new FileAppender ( new SimpleLayout ( ) , System . out ) ) ; } else { PropertyConfigurator . configure ( type ) ; } <START_BUG> BasicConfigurator . disableInfo ( ) ; <END_BUG> ShippedCodeFlagTest . CAT . debug ( "Hello<seq2seq4repair_space>world" ) ; } static void Usage ( String msg ) { } }

Fix:
Category . getDefaultHierarchy ( ) . disableInfo ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class Brick extends BreakoutComponent { static Color c = Color . RED ; public Brick ( int x , int y , int w , int h ) { } public void collisionCheck ( ) { Line2D top = new Line2D . Double ( this . x , this . y , ( ( this . x ) + ( this . width ) ) , this . y ) ; Line2D left = new Line2D . Double ( this . x , this . y , this . x , ( ( this . y ) + ( this . height ) ) ) ; Line2D right = new Line2D . Double ( ( ( this . x ) + ( this . height ) ) , this . y , ( ( this . x ) + ( this . width ) ) , ( ( this . y ) + ( this . height ) ) ) ; Line2D bottom = new Line2D . Double ( this . x , ( ( this . y ) + ( this . height ) ) , ( ( this . x ) + ( this . width ) ) , ( ( this . y ) + ( this . height ) ) ) ; for ( int i = 0 ; i < ( movingC . size ( ) ) ; i ++ ) { if ( ( movingC . get ( i ) . getClass ( ) . equals ( Ball . class ) ) && ( ( this . color ) != ( Color . BLACK ) ) ) { if ( movingC . get ( i ) . intersectsLine ( top ) ) { ( ( Ball ) ( movingC . get ( i ) ) ) . vY *= - 1 ; } else if ( movingC . get ( i ) . intersectsLine ( left ) ) { ( ( Ball ) ( movingC . get ( i ) ) ) . vX *= - 1 ; } else if ( movingC . get ( i ) . intersectsLine ( right ) ) { ( ( Ball ) ( movingC . get ( i ) ) ) . vX *= - 1 ; } else if ( movingC . get ( i ) . intersectsLine ( bottom ) ) { ( ( Ball ) ( movingC . get ( i ) ) ) . vY *= - 1 ; } if ( ( this . color ) != ( Color . BLACK ) ) { this . changeColor ( Color . BLACK ) ; <START_BUG> Breakout . brickCount = ( Breakout . brickCount ) - 1 ; <END_BUG> } } } } public void updatePosition ( ) { } No newline ; at end ; of file ; }

Fix:
Breakout . reduceCount ( ) ;
Buggy code:
public class SportsList extends Activity { ListView listView ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; <START_BUG> setContentView ( R . layout . SportsList ) ; <END_BUG> listView = ( ( ListView ) ( findViewById ( list ) ) ) ; String [ ] values = new String [ ] { "Basketball" , "Football" , "Baseball" , "Soccer" , "Cricket" , "Ultimate<seq2seq4repair_space>Frisbee" } ; ArrayAdapter < String > adapter = new ArrayAdapter < String > ( this , layout . simple_list_item_1 , id . text1 , values ) ; listView . setAdapter ( adapter ) ; listView . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { int itemposition = position ; String itemvalue = ( ( String ) ( listView . getItemAtPosition ( position ) ) ) ; Toast . makeText ( getApplicationContext ( ) , ( ( ( "Position<seq2seq4repair_space>:" + itemposition ) + "ListItem:" ) + itemvalue ) , LENGTH_LONG ) . show ( ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void profile ( View view ) { } public void newsfeed ( View view ) { } public void map ( View view ) { } }

Fix:
setContentView ( sportslist ) ;
Buggy code:
public class UnboundedQueueThreadPoolAdd implements ModelAddOperationHandler { static final OperationHandler INSTANCE = new UnboundedQueueThreadPoolAdd ( ) ; @ Override public OperationResult execute ( final OperationContext context , final ModelNode operation , final ResultHandler resultHandler ) { final BaseOperationParameters params = ThreadsSubsystemThreadPoolOperationUtils . parseUnboundedQueueThreadPoolOperationParameters ( operation ) ; final ModelNode model = context . getSubModel ( ) ; model . get ( NAME ) . set ( params . getName ( ) ) ; if ( ( params . getThreadFactory ( ) ) != null ) { model . get ( CommonAttributes . THREAD_FACTORY ) . set ( params . getThreadFactory ( ) ) ; } if ( ( ( params . getProperties ( ) ) != null ) && ( ( params . getProperties ( ) . asList ( ) . size ( ) ) > 0 ) ) { model . get ( CommonAttributes . PROPERTIES ) . set ( params . getProperties ( ) ) ; } if ( ( params . getMaxThreads ( ) ) != null ) { model . get ( CommonAttributes . MAX_THREADS ) . set ( operation . get ( CommonAttributes . MAX_THREADS ) ) ; } if ( ( params . getKeepAliveTime ( ) ) != null ) { model . get ( CommonAttributes . KEEPALIVE_TIME ) . set ( operation . get ( CommonAttributes . KEEPALIVE_TIME ) ) ; } if ( ( context . getRuntimeContext ( ) ) != null ) { context . getRuntimeContext ( ) . setRuntimeTask ( new RuntimeTask ( ) { public void execute ( RuntimeTaskContext context ) throws OperationFailedException { ServiceTarget target = context . getServiceTarget ( ) ; final ServiceName serviceName = ThreadsServices . executorName ( params . getName ( ) ) ; final UnboundedQueueThreadPoolService service = new UnboundedQueueThreadPoolService ( params . getMaxThreads ( ) . getScaledCount ( ) , params . getKeepAliveTime ( ) ) ; final ServiceBuilder < ExecutorService > serviceBuilder = target . addService ( serviceName , service ) ; <START_BUG> ThreadsSubsystemThreadPoolOperationUtils . addThreadFactoryDependency ( params . getThreadFactory ( ) , serviceName , serviceBuilder , service . getThreadFactoryInjector ( ) , target ) ; <END_BUG> serviceBuilder . addListener ( new ResultHandler . ServiceStartListener ( resultHandler ) ) ; serviceBuilder . install ( ) ; } } ) ; } else { resultHandler . handleResultComplete ( ) ; } final ModelNode compensating = Util . getResourceRemoveOperation ( params . getAddress ( ) ) ; return new org . jboss . as . controller . BasicOperationResult ( compensating ) ; } }

Fix:
ThreadsSubsystemThreadPoolOperationUtils . addThreadFactoryDependency ( params . getThreadFactory ( ) , serviceName , serviceBuilder , service . getThreadFactoryInjector ( ) , target , ( ( params . getName ( ) ) + "-threads" ) ) ;
Buggy code:
public class DefaultTransformer implements Serializable , NumberTransformer { private static final long serialVersionUID = 4019938025047800455L ; public double transform ( Object o ) throws MathException { if ( o == null ) { throw new MathException ( "Conversion<seq2seq4repair_space>Exception<seq2seq4repair_space>in<seq2seq4repair_space>Transformation,<seq2seq4repair_space>Object<seq2seq4repair_space>is<seq2seq4repair_space>null" , new Object [ 0 ] ) ; } if ( o instanceof Number ) { return ( ( Number ) ( o ) ) . doubleValue ( ) ; } try { <START_BUG> return Double . valueOf ( o . toString ( ) ) . doubleValue ( ) ; <END_BUG> } catch ( Exception e ) { throw new MathException ( "Conversion<seq2seq4repair_space>Exception<seq2seq4repair_space>in<seq2seq4repair_space>Transformation:<seq2seq4repair_space>{0}" , new Object [ ] { e . getMessage ( ) } , e ) ; } } }

Fix:
return new Double ( o . toString ( ) ) . doubleValue ( ) ;
Buggy code:
public class SynchronizedStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( SynchronizedStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( SynchronizedStatement . class , "body" , Block . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; private Block body = null ; SynchronizedStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { SynchronizedStatement result = new SynchronizedStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . setBody ( ( ( Block ) ( getBody ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public Block getBody ( ) { } public void setBody ( Block block ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
@ Target ( { ElementType . FIELD , ElementType . METHOD } ) @ Retention ( RetentionPolicy . RUNTIME ) @ Documented public @ interface ByteAttribute { String attributeId ( ) default "" ; <START_BUG> boolean [ ] defaultValue ( ) default { } ; <END_BUG> String description ( ) default "" ; boolean dynamic ( ) default false ; String label ( ) default "" ; boolean metatype ( ) default true ; ThreeStateBoolean multiple ( ) default ThreeStateBoolean . DEFAULT ; boolean optional ( ) default false ; ByteAttributeOption [ ] options ( ) default { } ; String setter ( ) default "" ; }

Fix:
byte [ ] defaultValue ( ) default { } ;
Buggy code:
public class AppDataFormatter implements Serializable { private String floatFormatString ; private String doubleFormatString ; private String byteFormatString ; private String shortFormatString ; private String intFormatString ; private String longFormatString ; private String discreteFormatString ; private String continuousFormatString ; private transient DecimalFormat floatFormat ; private transient DecimalFormat doubleFormat ; private transient DecimalFormat byteFormat ; private transient DecimalFormat shortFormat ; private transient DecimalFormat intFormat ; private transient DecimalFormat longFormat ; public AppDataFormatter ( ) { } public String format ( Object object ) { Type type = CLASS_TO_TYPE . get ( object . getClass ( ) ) ; if ( type == null ) { return object . toString ( ) ; } switch ( type ) { case FLOAT : { return getFloatFormat ( ) . format ( ( ( Float ) ( object ) ) ) ; } case DOUBLE : { return getDoubleFormat ( ) . format ( ( ( Double ) ( object ) ) ) ; } case BYTE : { return getByteFormat ( ) . format ( ( ( Byte ) ( object ) ) ) ; } case SHORT : { return getShortFormat ( ) . format ( ( ( Short ) ( object ) ) ) ; } case INTEGER : { return getIntFormat ( ) . format ( ( ( Integer ) ( object ) ) ) ; } case LONG : { <START_BUG> return longFormat . format ( ( ( Long ) ( object ) ) ) ; <END_BUG> } default : return object . toString ( ) ; } } public String format ( float val ) { } public String format ( double val ) { } public String format ( byte val ) { } public String format ( short val ) { } public String format ( int val ) { } public String format ( long val ) { } public DecimalFormat getFloatFormat ( ) { } public DecimalFormat getDoubleFormat ( ) { } public DecimalFormat getByteFormat ( ) { } public DecimalFormat getShortFormat ( ) { } public DecimalFormat getIntFormat ( ) { } public DecimalFormat getLongFormat ( ) { } public String getDiscreteFormatString ( ) { } public void setDiscreteFormatString ( @ NotNull String discreteFormatString ) { } public String getContinuousFormatString ( ) { } public void setContinuousFormatString ( @ NotNull String continuousFormatString ) { } public String getFloatFormatString ( ) { } public void setFloatFormatString ( @ NotNull String decimalFormatString ) { } public String getDoubleFormatString ( ) { } public void setDoubleFormatString ( @ NotNull String doubleFormatString ) { } public String getIntFormatString ( ) { } public void setIntFormatString ( @ NotNull String intFormatString ) { } public String getByteFormatString ( ) { } public void setByteFormatString ( @ NotNull String byteFormatString ) { } public String getShortFormatString ( ) { } public void setShortFormatString ( @ NotNull String shortFormatString ) { } public String getLongFormatString ( ) { } public void setLongFormatString ( @ NotNull String longFormatString ) { } }

Fix:
return getLongFormat ( ) . format ( ( ( Long ) ( object ) ) ) ;
Buggy code:
public final class JettyHelper { private static final int CONFIDENTIALPORT = 8443 ; private static final int LOW_RESOURCE_PERSIST_TIME = 2000 ; private static final int MAX_IDLE_TIME = 30000 ; private static final int MAX_THREADS = 10 ; private static Log log = LogFactory . getLog ( JettyHelper . class ) ; private JettyHelper ( ) { } public static Server getJettyServerInstance ( URL config , boolean useJettyPlus ) throws JettyHelperException { } public static Server getJettyServerInstance ( int port , String webappContextRoot , String contextPath , boolean useJettyPlus ) throws JettyHelperException { } public static Server startJetty ( int port , String webappContextRoot , String contextPath , boolean useJettyPlus ) throws JettyHelperException { } public static Server startJetty ( String jettyConfig , boolean useJettyPlus ) throws JettyHelperException { } public static boolean pingMonitorForServerStarted ( String commKey , String host , int monitorPort , int maxTries , long sleepBetweenTries ) { } public static boolean pingMonitorForServerStarted ( String commKey , String host , int monitorPort ) throws IOException { } public static void issueStopCommandToMonitor ( String commKey , String host , int monitorPort ) throws IOException , JettyMonitorException { Socket socket = null ; try { socket = new Socket ( InetAddress . getByName ( host ) , monitorPort ) ; OutputStream out = socket . getOutputStream ( ) ; out . write ( ( commKey + "\r\nstop\r\n" ) . getBytes ( ) ) ; out . flush ( ) ; InputStream is = socket . getInputStream ( ) ; String response = JettyHelper . readFromInputStream ( is ) . trim ( ) ; if ( "ACK_STOP" . equalsIgnoreCase ( response ) ) { JettyHelper . log . info ( "Monitor<seq2seq4repair_space>acknowledged<seq2seq4repair_space>stop<seq2seq4repair_space>command" ) ; } else if ( "" . equalsIgnoreCase ( response ) ) { throw new JettyMonitorException ( "monitor<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>respond<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>ack" ) ; } else { <START_BUG> throw new JettyMonitorException ( ( "unknown<seq2seq4repair_space>wicket.response<seq2seq4repair_space>from<seq2seq4repair_space>monitor:<seq2seq4repair_space>" + response ) ) ; <END_BUG> } } catch ( JettyMonitorException e ) { JettyHelper . log . error ( e . getMessage ( ) , e ) ; throw e ; } finally { if ( socket != null ) { socket . shutdownOutput ( ) ; socket . close ( ) ; } } } private static String readFromInputStream ( InputStream inputStream ) throws IOException { } }

Fix:
throw new JettyMonitorException ( ( "unknown<seq2seq4repair_space>response<seq2seq4repair_space>from<seq2seq4repair_space>monitor:<seq2seq4repair_space>" + response ) ) ;
Buggy code:
public class JmxMonitoredMap < K , V > extends ConcurrentHashMap < String , SolrInfoMBean > { private static final Logger LOG = LoggerFactory . getLogger ( JmxMonitoredMap . class . getName ( ) ) ; private MBeanServer server = null ; private String jmxRootName ; public JmxMonitoredMap ( String coreName , JmxConfiguration jmxConfig ) { } @ Override public void clear ( ) { } @ Override public SolrInfoMBean put ( String key , SolrInfoMBean infoBean ) { } @ Override public SolrInfoMBean remove ( Object key ) { } private void unregister ( String key , SolrInfoMBean infoBean ) { } private ObjectName getObjectName ( String key , SolrInfoMBean infoBean ) throws MalformedObjectNameException { } static class SolrDynamicMBean implements DynamicMBean { private SolrInfoMBean infoBean ; private HashSet < String > staticStats ; public SolrDynamicMBean ( SolrInfoMBean managedResource ) { } public MBeanInfo getMBeanInfo ( ) { } public Object getAttribute ( String attribute ) throws AttributeNotFoundException , MBeanException , ReflectionException { Object val ; if ( ( ( staticStats . contains ( attribute ) ) && ( attribute != null ) ) && ( ( attribute . length ( ) ) > 0 ) ) { try { <START_BUG> String getter = ( "get" + ( attribute . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( attribute . substring ( 1 ) ) ; <END_BUG> Method meth = infoBean . getClass ( ) . getMethod ( getter ) ; val = meth . invoke ( infoBean ) ; } catch ( Exception e ) { throw new AttributeNotFoundException ( attribute ) ; } } else { NamedList list = infoBean . getStatistics ( ) ; val = list . get ( attribute ) ; } if ( val != null ) return val . toString ( ) ; else return val ; } public AttributeList getAttributes ( String [ ] attributes ) { } public void setAttribute ( Attribute attribute ) throws AttributeNotFoundException , InvalidAttributeValueException , MBeanException , ReflectionException { } public AttributeList setAttributes ( AttributeList attributes ) { } public Object invoke ( String actionName , Object [ ] params , String [ ] signature ) throws MBeanException , ReflectionException { } } }

Fix:
String getter = ( "get" + ( attribute . substring ( 0 , 1 ) . toUpperCase ( Locale . ENGLISH ) ) ) + ( attribute . substring ( 1 ) ) ;
Buggy code:
public final class Strings { private static final Pattern htmlNumber = Pattern . compile ( "\\&\\#\\d+\\;" ) ; private static final char [ ] hexDigit = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' } ; public static final String LINE_SEPARATOR ; public static String afterFirst ( final String s , final char c ) { } public static String afterFirstPathComponent ( final String path , final char separator ) { } public static String afterLast ( final String s , final char c ) { } public static String beforeFirst ( final String s , final char c ) { } public static String beforeLast ( final String s , final char c ) { } public static String beforeLastPathComponent ( final String path , final char separator ) { } public static String capitalize ( final String s ) { } public static CharSequence escapeMarkup ( final String s ) { } public static CharSequence escapeMarkup ( final String s , final boolean escapeSpaces ) { } public static CharSequence escapeMarkup ( final String s , final boolean escapeSpaces , final boolean convertToHtmlUnicodeEscapes ) { } public static String replaceHtmlEscapeNumber ( String str ) { } public static String firstPathComponent ( final String path , final char separator ) { } public static boolean isEmpty ( final CharSequence string ) { <START_BUG> return ( ( string == null ) || ( ( string . length ( ) ) == 0 ) ) || ( string . toString ( ) . trim ( ) . equals ( "" ) ) ; <END_BUG> } public static boolean isEqual ( final String string1 , final String string2 ) { } public static boolean isTrue ( final String s ) throws StringValueConversionException { } public static String lastPathComponent ( final String path , final char separator ) { } public static CharSequence replaceAll ( final CharSequence s , final CharSequence searchFor , CharSequence replaceWith ) { } public static String fromEscapedUnicode ( String escapedUnicodeString ) { } public static String toEscapedUnicode ( String unicodeString ) { } public static String [ ] split ( final String s , final char c ) { } public static String stripEnding ( final String s , final String ending ) { } public static Boolean toBoolean ( final String s ) throws StringValueConversionException { } public static char toChar ( final String s ) throws StringValueConversionException { } public static CharSequence toMultilineMarkup ( final CharSequence s ) { } public static String toString ( final Object object ) { } public static String toString ( final Throwable throwable ) { } private static void outputThrowable ( Throwable cause , AppendingStringBuffer sb , boolean stopAtWicketServlet ) { } private static char toHex ( int nibble ) { } private static void append ( AppendingStringBuffer buffer , CharSequence s , int from , int to ) { } private static int search ( final CharSequence s , String searchString , int pos ) { } private Strings ( ) { } }

Fix:
return ( ( string == null ) || ( ( string . length ( ) ) == 0 ) ) || ( ( string . toString ( ) . trim ( ) . length ( ) ) == 0 ) ;
Buggy code:
public final class ReportFileDialoger { private static String lastJFCDirectory = null ; private static JFileChooser jfc = new JFileChooser ( ) ; private ReportFileDialoger ( ) { } public static JFileChooser promptToOpenFile ( String [ ] exts ) { } private static void clearFileFilters ( ) { } public static JFileChooser promptToOpenFile ( ) { } public static JFileChooser promptToSaveFile ( String filename ) { } public static JFileChooser promptToSaveFile ( String filename , String [ ] extensions ) { if ( ( ReportFileDialoger . lastJFCDirectory ) == null ) { String start = System . getProperty ( "user.dir" , "" ) ; if ( ! ( start . equals ( "" ) ) ) { ReportFileDialoger . jfc = new JFileChooser ( new File ( start ) ) ; } ReportFileDialoger . lastJFCDirectory = ReportFileDialoger . jfc . getCurrentDirectory ( ) . getAbsolutePath ( ) ; } String ext = ".jmx" ; if ( filename != null ) { ReportFileDialoger . jfc . setSelectedFile ( new File ( ReportFileDialoger . lastJFCDirectory , filename ) ) ; int i = - 1 ; <START_BUG> if ( ( i = filename . lastIndexOf ( "." ) ) > ( - 1 ) ) { <END_BUG> ext = filename . substring ( i ) ; } } ReportFileDialoger . clearFileFilters ( ) ; if ( extensions != null ) { ReportFileDialoger . jfc . addChoosableFileFilter ( new JMeterFileFilter ( extensions ) ) ; } else { ReportFileDialoger . jfc . addChoosableFileFilter ( new JMeterFileFilter ( new String [ ] { ext } ) ) ; } int retVal = ReportFileDialoger . jfc . showSaveDialog ( ReportGuiPackage . getInstance ( ) . getMainFrame ( ) ) ; ReportFileDialoger . lastJFCDirectory = ReportFileDialoger . jfc . getCurrentDirectory ( ) . getAbsolutePath ( ) ; if ( retVal == ( JFileChooser . APPROVE_OPTION ) ) { return ReportFileDialoger . jfc ; } else { return null ; } } }

Fix:
if ( ( i = filename . lastIndexOf ( '.' ) ) > ( - 1 ) ) {
Buggy code:
public class DBTrack { protected static boolean write ( Track t , long id_annotation , DBInstance db ) throws DBRuntimeException , SQLException { if ( t == null ) return true ; boolean allOK = true ; String name = t . getName ( ) ; String sql = ( ( ( ( ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>track<seq2seq4repair_space>(name,<seq2seq4repair_space>type,<seq2seq4repair_space>id_annotation)<seq2seq4repair_space>values<seq2seq4repair_space>('" + name ) + "',<seq2seq4repair_space>'" ) + ( t . getTypeString ( ) ) ) + "'," ) + id_annotation ) + ")" ; ResultSet rs = null ; long id_track = - 1 ; Statement stmt = db . getStatement ( ) ; if ( ( stmt . executeUpdate ( sql , Statement . RETURN_GENERATED_KEYS ) ) != 1 ) throw new DBRuntimeException ( ( ( "Insert<seq2seq4repair_space>track<seq2seq4repair_space>failed<seq2seq4repair_space>(" + name ) + ")" ) ) ; rs = stmt . getGeneratedKeys ( ) ; if ( rs . next ( ) ) { <START_BUG> id_annotation = rs . getLong ( 1 ) ; <END_BUG> } else { throw new DBRuntimeException ( ( ( "Can't<seq2seq4repair_space>get<seq2seq4repair_space>id_track<seq2seq4repair_space>of<seq2seq4repair_space>(" + name ) + ")" ) ) ; } try { rs . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } for ( Slice s : t . getSlices ( ) ) { try { allOK &= DBSlice . write ( s , id_track , db ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; allOK = false ; } } return allOK ; } protected static List < Track > readAll ( long id_annotation , Track . Types tt , DBInstance db ) throws SQLException { } }

Fix:
id_track = rs . getLong ( 1 ) ;
Buggy code:
public final class CommandCallback implements ICallback { private final Map registeredTextListeners = new HashMap ( ) ; private final IWorkbench workbench ; public CommandCallback ( final IWorkbench workbenchToUse ) { } public void addActionTextListener ( final String commandId , final IActionTextListener listener ) { } public final Integer getAccelerator ( final String commandId ) { } public final String getAcceleratorText ( final String commandId ) { } public boolean isAcceleratorInUse ( int accelerator ) { } public final boolean isActive ( final String commandId ) { } public final void removeActionTextListener ( final String commandId , final IActionTextListener listener ) { final ICommand command = workbench . getCommandSupport ( ) . getCommandManager ( ) . getCommand ( commandId ) ; <START_BUG> final Object associatedListener = registeredTextListeners . get ( listener ) ; <END_BUG> if ( associatedListener instanceof ICommandListener ) { final ICommandListener commandListener = ( ( ICommandListener ) ( associatedListener ) ) ; command . removeCommandListener ( commandListener ) ; } } }

Fix:
final Object associatedListener = registeredTextListeners . remove ( listener ) ;
Buggy code:
public class NEIConfig implements IConfigureNEI { @ Override public void loadConfig ( ) { API . registerRecipeHandler ( new RecipeHandlerMeowMachine ( ) ) ; <START_BUG> API . registerRecipeHandler ( new RecipeHandlerMeowMachine ( ) ) ; <END_BUG> API . setGuiOffset ( GuiMeowMachine . class , 0 , 0 ) ; } @ Override public String getName ( ) { } @ Override public String getVersion ( ) { } }

Fix:
API . registerUsageHandler ( new RecipeHandlerMeowMachine ( ) ) ;
Buggy code:
public class MarkupParser { private final IXmlPullParser xmlParser ; private IMarkupFilter markupFilterChain ; private final Markup markup ; private Application application ; public MarkupParser ( final Application application , final IXmlPullParser xmlParser ) { } public final void setWicketNamespace ( final String namespace ) { } private final IMarkupFilter newFilterChain ( final List tagList ) { } protected void initFilterChain ( ) { } public final void appendMarkupFilter ( final IMarkupFilter filter ) { } final Markup readAndParse ( final MarkupResourceStream resource ) throws IOException , ParseException , ResourceStreamNotFoundException { } final Markup parse ( final String string ) throws IOException , ParseException , ResourceStreamNotFoundException { } private void parseMarkup ( ) throws ParseException { } private boolean determineWicketNamespace ( final ComponentTag tag ) { String attrValue = null ; final ValueMap attributes = tag . getAttributes ( ) ; final Iterator it = attributes . keySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { final String attributeName = ( ( String ) ( it . next ( ) ) ) ; if ( attributeName . startsWith ( "xmlns:" ) ) { final String xmlnsUrl = attributes . getString ( attributeName ) ; if ( ( ( xmlnsUrl == null ) || ( ( xmlnsUrl . trim ( ) . length ( ) ) == 0 ) ) || ( xmlnsUrl . toLowerCase ( ) . startsWith ( "http:////wicket.sourceforge.net" ) ) ) { String namespace = attributeName . substring ( 6 ) ; markup . setWicketNamespace ( namespace ) ; attrValue = attributeName ; } } } <START_BUG> if ( ( attrValue != null ) && ( Application . get ( ) . getMarkupSettings ( ) . getStripWicketTags ( ) ) ) { <END_BUG> attributes . remove ( attrValue ) ; return true ; } return false ; } }

Fix:
if ( ( attrValue != null ) && ( this . application . getMarkupSettings ( ) . getStripWicketTags ( ) ) ) {
Buggy code:
public class BufferedImageHttpMessageConverter extends AbstractHttpMessageConverter < BufferedImage > { private MediaType contentType ; private File cacheDir ; public BufferedImageHttpMessageConverter ( ) { } @ Override public void setSupportedMediaTypes ( List < MediaType > supportedMediaTypes ) { } public void setContentType ( MediaType contentType ) { } public void setCacheDir ( File cacheDir ) { Assert . notNull ( cacheDir , "'cacheDir'<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; <START_BUG> Assert . isTrue ( cacheDir . isDirectory ( ) , "'cacheDir'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>directory" ) ; <END_BUG> this . cacheDir = cacheDir ; } public boolean supports ( Class < ? extends BufferedImage > clazz ) { } @ Override public BufferedImage readInternal ( Class < BufferedImage > clazz , HttpInputMessage inputMessage ) throws IOException { } private ImageInputStream createImageInputStream ( InputStream is ) throws IOException { } @ Override protected MediaType getContentType ( BufferedImage image ) { } @ Override protected void writeInternal ( BufferedImage image , HttpOutputMessage outputMessage ) throws IOException { } private ImageOutputStream createImageOutputStream ( OutputStream os ) throws IOException { } protected void process ( ImageReadParam irp ) { } protected void process ( ImageWriteParam iwp ) { } }

Fix:
Assert . isTrue ( cacheDir . isDirectory ( ) , "'cacheDir'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>directory" ) ;
Buggy code:
public class TaskHandler { private Main m ; private WorldChecker wc ; public TaskHandler ( Main m , WorldChecker wc ) { } protected void performTP ( Player p , String target ) { if ( ! ( wc . isValid ( target ) ) ) { p . sendMessage ( ( ( ( m . sendConfig ( ) . getMessage ( "messages.prefix" ) ) + "§r<seq2seq4repair_space>" ) + ( m . sendConfig ( ) . getMessage ( "messages.not_enabled" ) ) ) ) ; return ; } UUID player = p . getUniqueId ( ) ; Long cooldown = Cooldown . test ( player ) ; <START_BUG> if ( cooldown < 1000 ) { <END_BUG> p . sendMessage ( ( ( ( m . sendConfig ( ) . getMessage ( "messages.prefix" ) ) + "§r<seq2seq4repair_space>" ) + ( m . sendConfig ( ) . getMessage ( "messages.cooldown" ) . replace ( "%time%" , ( "" + ( cooldown // 1000 ) ) ) ) ) ) ; return ; } Run r = new Run ( m , player , target ) ; int taskid = Bukkit . getScheduler ( ) . runTask ( m , r ) . getTaskId ( ) ; r . set ( taskid ) ; } }

Fix:
if ( cooldown >= 1000 ) {
Buggy code:
public class MainActivity extends ActionBarActivity { public static final String TAG = "MainActivity" ; private View mDemo ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } boolean mCenterXReverse = false ; boolean mCenterYReverse = false ; public void onClick ( View v ) { final int START_OFFSET = 0 ; final int DURATION = 234 ; final Animation . AnimationListener LISTENER = new Animation . AnimationListener ( ) { @ Override public void onAnimationStart ( Animation animation ) { Log . d ( MainActivity . TAG , "start" ) ; } @ Override public void onAnimationEnd ( Animation animation ) { Log . d ( MainActivity . TAG , "end" ) ; } @ Override public void onAnimationRepeat ( Animation animation ) { Log . d ( MainActivity . TAG , "repeat" ) ; } } ; Animator animator = new Animator ( mDemo ) ; switch ( v . getId ( ) ) { case id . btn_alpha : { animator . alpha ( 0.0 , 1.0 , 0 , DURATION , LISTENER ) ; } break ; case id . btn_blank : { animator . twinkle ( new double [ ] { 1.0 , 0.0 , 1.0 , 0.0 , 1.0 , 0.0 } , START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_translate : { animator . translate ( 0 , 100 , 0 , 50 , START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_shake : { animator . shakeH ( new int [ ] { - 50 , + 100 , - 100 , + 100 , - 100 , + 100 , - 50 } , START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_scale : { <START_BUG> animator . scale ( 1.0 , 2.0 , 1.0 , 2.0 , RELATIVE_TO_SELF , 0.5 , RELATIVE_TO_SELF , 0.5 , START_OFFSET , DURATION , LISTENER ) ; <END_BUG> } break ; case id . btn_mirrorLeft : { animator . mirrorLeft ( START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_mirrorCenterX : { animator . mirrorCenterX ( ( mCenterXReverse = ! ( mCenterXReverse ) ) , START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_mirrorRight : { animator . mirrorRight ( START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_mirrorTop : { animator . mirrorTop ( START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_mirrorCenterY : { animator . mirrorCenterY ( ( mCenterYReverse = ! ( mCenterYReverse ) ) , START_OFFSET , DURATION , LISTENER ) ; } break ; case id . btn_mirrorBottom : { animator . mirrorBottom ( START_OFFSET , DURATION , LISTENER ) ; } break ; default : { } break ; } } No newline ; at end ; of file ; }

Fix:
animator . scale ( 0.0 , ( - 1.0 ) , 1.0 , 1.0 , RELATIVE_TO_SELF , 0.5 , RELATIVE_TO_SELF , 0.5 , START_OFFSET , DURATION , LISTENER ) ;
Buggy code:
public class StartGrammarAction < T > implements CsvGrammarAction < CsvGrammarAction < ? > > { private CsvGrammarAction < ? > delegatedAction ; private final Class < T > beanClass ; private final CsvBangConfiguration conf ; private long endOffset = - 1 ; public StartGrammarAction ( final Class < T > beanClass , final CsvBangConfiguration conf ) { } private void initDelegatedAction ( final CsvGrammarActionType actionType ) { } @ Override public CsvGrammarActionType getType ( ) { } @ Override public void add ( final byte b ) throws CsvBangException { } @ Override public boolean add ( final CsvGrammarAction < ? > word ) throws CsvBangException { } @ Override public boolean isActionCompleted ( final CsvGrammarActionType next ) { } @ Override public CsvGrammarAction < ? > execute ( ) throws CsvBangException { } @ Override public long getStartOffset ( ) { } @ Override public long getEndOffset ( ) { } @ Override public void setStartOffset ( long offset ) { } @ Override public void setEndOffset ( long offset ) { } @ Override public boolean isLastAction ( ) { } @ Override public boolean isChuck ( final CsvGrammarActionType next , final byte [ ] keyword ) { <START_BUG> return false ; <END_BUG> } }

Fix:
return ( delegatedAction ) == null ? false : delegatedAction . isChuck ( next , keyword ) ;
Buggy code:
public class ResponseStatusExceptionResolverTests { private ResponseStatusExceptionResolver exceptionResolver ; private MockHttpServletRequest request ; private MockHttpServletResponse response ; @ Before public void setUp ( ) { } @ Test public void statusCode ( ) { } @ Test public void statusCodeAndReason ( ) { } @ Test public void statusCodeAndReasonMessage ( ) { Locale locale = Locale . CHINESE ; LocaleContextHolder . setLocale ( locale ) ; try { StaticMessageSource messageSource = new StaticMessageSource ( ) ; messageSource . addMessage ( "gone.reason" , locale , "Gone<seq2seq4repair_space>reason<seq2seq4repair_space>message" ) ; exceptionResolver . setMessageSource ( messageSource ) ; ResponseStatusExceptionResolverTests . StatusCodeAndReasonMessageException ex = new ResponseStatusExceptionResolverTests . StatusCodeAndReasonMessageException ( ) ; <START_BUG> exceptionResolver . resolveException ( request , response , null , ex ) ; <END_BUG> assertEquals ( "Invalid<seq2seq4repair_space>status<seq2seq4repair_space>reason" , "Gone<seq2seq4repair_space>reason<seq2seq4repair_space>message" , response . getErrorMessage ( ) ) ; } finally { LocaleContextHolder . resetLocaleContext ( ) ; } } @ Test public void notAnnotated ( ) { } @ ResponseStatus ( HttpStatus . BAD_REQUEST ) @ SuppressWarnings ( "serial" ) private static class StatusCodeException extends Exception { } @ ResponseStatus ( value = HttpStatus . GONE , reason = "You<seq2seq4repair_space>suck!" ) @ SuppressWarnings ( "serial" ) private static class StatusCodeAndReasonException extends Exception { } @ ResponseStatus ( value = HttpStatus . GONE , reason = "gone.reason" ) @ SuppressWarnings ( "serial" ) private static class StatusCodeAndReasonMessageException extends Exception { } }

Fix:
ModelAndView mav = exceptionResolver . resolveException ( request , response , null , ex ) ;
Buggy code:
public class CompleteWord extends JWindow { public static void completeWord ( View view ) { } public CompleteWord ( View view , String word , CompleteWord . Completion [ ] completions , Point location , String noWordSep ) { } public void dispose ( ) { } private static String getNonAlphaNumericWordChars ( Buffer buffer , KeywordMap keywordMap ) { } private static String getWordToComplete ( Buffer buffer , int caretLine , int caret , String noWordSep ) { } private static CompleteWord . Completion [ ] getCompletions ( Buffer buffer , String word , int caret ) { <START_BUG> Set completions = new TreeSet ( new MiscUtilities . StringICaseCompare ( ) ) ; <END_BUG> Set buffers = new HashSet ( ) ; KeywordMap keywordMap = buffer . getKeywordMapAtOffset ( caret ) ; String noWordSep = CompleteWord . getNonAlphaNumericWordChars ( buffer , keywordMap ) ; View views = jEdit . getFirstView ( ) ; while ( views != null ) { EditPane [ ] panes = views . getEditPanes ( ) ; for ( int i = 0 ; i < ( panes . length ) ; i ++ ) { Buffer b = panes [ i ] . getBuffer ( ) ; if ( buffers . contains ( b ) ) continue ; buffers . add ( b ) ; KeywordMap _keywordMap ; if ( b == buffer ) _keywordMap = keywordMap ; else _keywordMap = null ; int offset = ( b == buffer ) ? caret : 0 ; CompleteWord . getCompletions ( b , word , keywordMap , noWordSep , offset , completions ) ; } views = views . getNext ( ) ; } CompleteWord . Completion [ ] completionArray = ( ( CompleteWord . Completion [ ] ) ( completions . toArray ( new CompleteWord . Completion [ completions . size ( ) ] ) ) ) ; return completionArray ; } private static void getCompletions ( Buffer buffer , String word , KeywordMap keywordMap , String noWordSep , int caret , Set completions ) { } private static String completeWord ( String line , int offset , String noWordSep ) { } private View view ; private JEditTextArea textArea ; private Buffer buffer ; private String word ; private JList words ; private String noWordSep ; private void insertSelected ( ) { } static class Completion { String text ; boolean keyword ; Completion ( String text , boolean keyword ) { } public String toString ( ) { } public int hashCode ( ) { } public boolean equals ( Object obj ) { } } static class Renderer extends DefaultListCellRenderer { public Component getListCellRendererComponent ( JList list , Object value , int index , boolean isSelected , boolean cellHasFocus ) { } } class KeyHandler extends KeyAdapter { public void keyPressed ( KeyEvent evt ) { } public void keyTyped ( KeyEvent evt ) { } } class MouseHandler extends MouseAdapter { public void mouseClicked ( MouseEvent evt ) { } } }

Fix:
Set completions = new TreeSet ( new MiscUtilities . StringCompare ( ) ) ;
Buggy code:
public class TimestampPolicy extends BaseLibraryPolicy { public boolean beforeConnect ( Libraries owner , ListIterator libraries ) { owner . markAllLibrariesForFetch ( true ) ; <START_BUG> owner . _setUseTimestamp ( true ) ; <END_BUG> return true ; } }

Fix:
owner . setUseTimestamp ( true ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { } private static void runAnalyse ( String inputDirStr , String outputDirStr ) { } private static void runStatistic ( String inputDirStr , String outputDirStr ) { } private static void runCalculate ( String inputDir , String outputDir ) { String [ ] sinks = FileUtil . getAllSinksFromDefinition ( SINK_SOURCE_FILE_NAME ) ; DataUtil . initData ( sinks ) ; final String INPUT_DIR = ( inputDir == null ) ? ".//inputDir" : inputDir ; final String OUTPUT_DIR = ( outputDir == null ) ? ".//outputDir" : outputDir ; double [ ] weight = new double [ sinks . length ] ; try { File matlabRes = new File ( ( ( inputDir + "//" ) + ( Constants . MATLAB_OUTPUT_FILE_NAME ) ) ) ; BufferedReader bd = new BufferedReader ( new FileReader ( matlabRes ) ) ; for ( int i = 0 ; i < ( weight . length ) ; i ++ ) { <START_BUG> weight [ i ] = Double . valueOf ( bd . readLine ( ) ) ; <END_BUG> } bd . close ( ) ; } catch ( IOException ex ) { System . out . println ( "[CALC]<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>getting<seq2seq4repair_space>weights!" ) ; return ; } List < FileSinkInfo > sinkInfos = new ArrayList < FileSinkInfo > ( ) ; File dir = new File ( INPUT_DIR ) ; File [ ] files = dir . listFiles ( ) ; for ( File file : files ) { if ( FileUtil . isResultFile ( file . getName ( ) ) ) { FileSinkInfo info = new FileSinkInfo ( ) ; info . sinks = FileUtil . getResult ( file . getPath ( ) ) ; info . apkName = StringUtil . getApkNameFromString ( file . getName ( ) ) ; sinkInfos . add ( info ) ; } } try { File valuesFile = new File ( ( ( outputDir + "//" ) + ( Constants . CALCULATE_RESULT_FILE_NAME ) ) ) ; BufferedWriter bw = new BufferedWriter ( new FileWriter ( valuesFile ) ) ; for ( FileSinkInfo info : sinkInfos ) { bw . write ( info . apkName ) ; bw . write ( "\t\t" ) ; double value = 0 ; for ( int i = 0 ; i < ( info . sinks . length ) ; i ++ ) { value += ( info . sinks [ i ] ) * ( weight [ i ] ) ; } bw . write ( String . valueOf ( value ) ) ; bw . newLine ( ) ; } bw . flush ( ) ; bw . close ( ) ; } catch ( Exception ex ) { System . out . println ( "[OUT]<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>writing<seq2seq4repair_space>calculated<seq2seq4repair_space>values<seq2seq4repair_space>into<seq2seq4repair_space>file!" ) ; return ; } } }

Fix:
weight [ i ] = Double . valueOf ( bd . readLine ( ) . trim ( ) ) ;
Buggy code:
public abstract class WebApplication extends Application { private final Map bufferedResponses = new HashMap ( ) ; private IRequestCycleProcessor requestCycleProcessor ; private String sessionAttributePrefix ; private ISessionFactory sessionFactory = new ISessionFactory ( ) { private static final long serialVersionUID = 1L ; public Session newSession ( ) { } } ; private WicketServlet wicketServlet ; public WebApplication ( ) { } public final String getSessionAttributePrefix ( final WebRequest request ) { } public final WicketServlet getWicketServlet ( ) { } public final void mount ( String path , IRequestTargetUrlCodingStrategy encoder ) { } public final void mount ( String path , Package p ) { } public final void mount ( String path , PackageName packageName ) { } public final void mountBookmarkablePage ( String path , Class bookmarkablePageClass ) { } public final void mountBookmarkablePage ( String path , Class bookmarkablePageClass , String pageMapName ) { } public final void setSessionFactory ( final ISessionFactory sessionFactory ) { } public final void setWicketServlet ( final WicketServlet wicketServlet ) { } public final void unmount ( String path ) { } protected IRequestCycleFactory getDefaultRequestCycleFactory ( ) { } protected IRequestCycleProcessor getDefaultRequestCycleProcessor ( ) { } protected ISessionFactory getSessionFactory ( ) { } protected void init ( ) { } protected void internalDestroy ( ) { } protected void internalInit ( ) { } protected WebRequest newWebRequest ( final HttpServletRequest servletRequest ) { } protected WebResponse newWebResponse ( final HttpServletResponse servletResponse ) { <START_BUG> return getSettings ( ) . getBufferResponse ( ) ? new BufferedWebResponse ( servletResponse ) : new WebResponse ( servletResponse ) ; <END_BUG> } final void addBufferedResponse ( String sessionId , String bufferId , BufferedResponse renderedResponse ) { } final void clearBufferedResponses ( String sessionId ) { } final WebSession getSession ( final WebRequest request ) { } final BufferedResponse popBufferedResponse ( String sessionId , String bufferId ) { } private void checkMountPath ( String path ) { } }

Fix:
return getRequestCycleSettings ( ) . getBufferResponse ( ) ? new BufferedWebResponse ( servletResponse ) : new WebResponse ( servletResponse ) ;
Buggy code:
public final class CartItem { private final String barcode ; private Integer quantity ; private double currentPrice ; public CartItem ( String barcode , Integer quantity ) { } public String getBarcode ( ) { } public Integer getQuantity ( ) { } public double getCurrentPrice ( ) { } public void setCurrentPrice ( double currentPrice ) { } public final double subtotal ( ) { } public void applyPromotions ( List < PromotionStrategy > promotionStrategies ) { Comparator < PromotionStrategy > promotionStrategyComparator = new Comparator < PromotionStrategy > ( ) { @ Override public int compare ( PromotionStrategy ps1 , PromotionStrategy ps2 ) { <START_BUG> return ( ps1 . priority ( ) ) - ( ps2 . priority ( ) ) ; <END_BUG> } } ; Collections . sort ( promotionStrategies , promotionStrategyComparator ) ; for ( PromotionStrategy promotionStrategy : promotionStrategies ) { promotionStrategy . apply ( this ) ; } } }

Fix:
return ( ps2 . priority ( ) ) - ( ps1 . priority ( ) ) ;
Buggy code:
public class MarioCharacter extends CommonCharacter { Composite parent ; Display disp ; public MarioCharacter ( int realx , int realy ) { } public void setPerent ( Composite pap ) { } public void setDisplay ( Display D ) { } public void paint ( PaintEvent e , int Width , int Hight ) { e . gc . setForeground ( new Color ( null , 255 , 0 , 0 ) ) ; e . gc . setBackground ( new Color ( null , 255 , 0 , 0 ) ) ; e . gc . fillOval ( ( ( ( ( ( realx ) * 5 ) + 1 ) * Width ) // 4 ) , ( ( ( ( ( realy ) * 5 ) + 1 ) * Hight ) // 4 ) , Width , Hight ) ; System . out . println ( ( "ASADADS" + ( e . display ) ) ) ; <START_BUG> Image image = new Image ( e . display , getClass ( ) . getResourceAsStream ( "resources//images//MarioChar.png" ) ) ; <END_BUG> int width = image . getBounds ( ) . width ; int height = image . getBounds ( ) . height ; updated = false ; } }

Fix:
Image image = new Image ( e . display , "resources//images//MarioChar.png" ) ;