nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SequenceFileToImageMapper extends Mapper < Text , BytesWritable , Text , Text > { private static int reducerNumber = 0 ; private static int numReducers ; private static int count ; private static Log logger = LogFactory . getLog ( SequenceFileToImageMapper . class ) ; protected void setup ( Context context ) { } protected void cleanup ( Context context ) { } public void map ( Text k , BytesWritable v , Context contex ) throws IOException , InterruptedException { SequenceFileToImageMapper . logger . info ( ( ( "map<seq2seq4repair_space>method<seq2seq4repair_space>called..<seq2seq4repair_space>" + ( k . toString ( ) ) ) + "\n" ) ) ; ( SequenceFileToImageMapper . count ) ++ ; SequenceFileToImageMapper . logger . info ( ( "Total<seq2seq4repair_space>count<seq2seq4repair_space>received:<seq2seq4repair_space>" + ( SequenceFileToImageMapper . count ) ) ) ; Text t1 = new Text ( ) ; Text t2 = new Text ( ) ; String r = Integer . toString ( ( ( SequenceFileToImageMapper . reducerNumber ) % ( SequenceFileToImageMapper . numReducers ) ) ) ; ( SequenceFileToImageMapper . reducerNumber ) ++ ; t1 . set ( ( ( ( k . toString ( ) . split ( "_r_" ) [ 0 ] ) + "_r_" ) + r ) ) ; byte [ ] data = v . copyBytes ( ) ; InputStream is = new ByteArrayInputStream ( data ) ; BufferedImage img = ImageIO . read ( is ) ; int h1 = img . getHeight ( ) ; int w1 = img . getWidth ( ) ; float Bpp = ( ( float ) ( data . length ) ) // ( h1 * w1 ) ; SequenceFileToImageMapper . logger . info ( ( ( ( ( ( ( ( ( ( ( "\n" + ( img . getType ( ) ) ) + "\t" ) + ( data . length ) ) + "\t" ) + Bpp ) + "<seq2seq4repair_space>BytesPerPixel" ) + "\t" ) + h1 ) + "<seq2seq4repair_space>X<seq2seq4repair_space>" ) + w1 ) ) ; GrayScaleFilter gsf = new GrayScaleFilter ( img ) ; BufferedImage grayImage = gsf . convertToGrayScale ( ) ; LTrPFeatureExtractor lfe = new LTrPFeatureExtractor ( grayImage ) ; lfe . extractFeature ( ) ; <START_BUG> int [ ] featureVector = lfe . getFeatureVector ( ) ; <END_BUG> String s = "" ; for ( int i = 0 ; i < ( featureVector . length ) ; i ++ ) { s += ( featureVector [ i ] ) + "_" ; } s += "42" ; t2 . set ( s ) ; contex . write ( t1 , t2 ) ; } String getfilename ( String k ) { } int getHeightFromKey ( String k ) { } int getWidthFromKey ( String k ) { } No newline ; at end ; of file ; }

Fix:
double [ ] featureVector = lfe . getFeatureVector ( ) ;
Buggy code:
public class ChatWindow extends ApplicationWindow implements IIMMessageListener { private static final long FLASH_INTERVAL = 600 ; private String initText ; private TextChatComposite chat ; private Image image ; private Image blank ; private String titleBarText ; protected ViewPart view ; protected IUser localUser ; protected IUser remoteUser ; protected boolean disposed = false ; public IUser getLocalUser ( ) { } protected IUser getRemoteUser ( ) { } private UIJob flasher ; public ChatWindow ( ViewPart view , String titleBarText , String initOutputText , IUser localUser , IUser remoteUser ) { } public void setStatus ( final String status ) { } protected String getShellName ( ) { } protected void configureShell ( final Shell newShell ) { } protected Point getInitialSize ( ) { } protected Control createContents ( Composite parent ) { if ( ( view ) == null ) throw new NullPointerException ( "view<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; ILocalInputHandler inputHandler = null ; Object obj = view . getAdapter ( ILocalInputHandler . class ) ; if ( obj == null ) throw new NullPointerException ( ( ( "view<seq2seq4repair_space>" + ( view ) ) + "<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>provide<seq2seq4repair_space>ILocalInputHandler<seq2seq4repair_space>adapter" ) ) ; else if ( obj instanceof ILocalInputHandler ) { inputHandler = ( ( ILocalInputHandler ) ( obj ) ) ; } <START_BUG> chat = new TextChatComposite ( parent , SWT . NORMAL , initText , inputHandler , getLocalUser ( ) , getRemoteUser ( ) ) ; <END_BUG> chat . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; chat . setFont ( parent . getFont ( ) ) ; return chat ; } public void setLocalUser ( IUser localUser ) { } public void setRemoteUser ( IUser remoteUser ) { } protected TextChatComposite getTextChatComposite ( ) { } private boolean hasFocus = false ; private int openResult = 0 ; public int open ( ) { } public void create ( ) { } public boolean hasFocus ( ) { } private boolean hasFocus ( Composite composite ) { } public void flash ( ) { } private void stopFlashing ( ) { } public void setDisposed ( final String message ) { } public void openAndFlash ( ) { } protected void handleShellCloseEvent ( ) { } public void handleMessageEvent ( IIMMessageEvent messageEvent ) { } }

Fix:
chat = new TextChatComposite ( view , parent , SWT . NORMAL , initText , inputHandler , getLocalUser ( ) , getRemoteUser ( ) ) ;
Buggy code:
public class WicketFilterTest extends TestCase { private static WebApplication application ; private final DateFormat headerDateFormat = new SimpleDateFormat ( "EEE,<seq2seq4repair_space>d<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyy<seq2seq4repair_space>HH:mm:ss<seq2seq4repair_space>z" , Locale . UK ) ; @ Override protected void tearDown ( ) throws Exception { } public void testFilterPath1 ( ) { } public void testFilterPath2 ( ) { } public void testNotModifiedResponseIncludesExpiresHeader ( ) throws IOException , ParseException , ServletException { } private void setIfModifiedSinceToNextWeek ( MockHttpServletRequest request ) { } private String getFilterPath ( String string , InputStream in ) { try { <START_BUG> return new WebXmlFile ( ) . getFilterPath ( string , in ) ; <END_BUG> } catch ( ParserConfigurationException ex ) { throw new RuntimeException ( ex ) ; } catch ( SAXException ex ) { throw new RuntimeException ( ex ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } } private static class FilterTestingConfig implements FilterConfig { private final Map < String , String > initParameters = new HashMap < String , String > ( ) ; public FilterTestingConfig ( ) { } public String getFilterName ( ) { } public ServletContext getServletContext ( ) { } public String getInitParameter ( String s ) { } public Enumeration < String > getInitParameterNames ( ) { } } public static class FilterTestingApplicationFactory implements IWebApplicationFactory { public WebApplication createApplication ( WicketFilter filter ) { } public void destroy ( ) { } } public void testCheckRedirect_1 ( ) { } }

Fix:
return new WebXmlFile ( ) . getFilterPath ( false , string , in ) ;
Buggy code:
public abstract class AbstractMailCheckingAction extends AbstractColumbaAction { private static final int ONE_SECOND = 1000 ; private AccountItem accountItem ; private Timer timer ; public AbstractMailCheckingAction ( AccountItem accountItem ) { } private void createName ( ) { } public void restartTimer ( ) { createName ( ) ; DefaultItem item = null ; if ( accountItem . isPopAccount ( ) ) { XmlElement e = accountItem . getRoot ( ) . getElement ( "popserver" ) ; item = new DefaultItem ( e ) ; } else { XmlElement e = accountItem . getRoot ( ) . getElement ( "imapserver" ) ; item = new DefaultItem ( e ) ; } if ( item . getBoolean ( "enable_mailcheck" ) ) { <START_BUG> int interval = item . getInteger ( "mailcheck_interval" ) ; <END_BUG> timer = new Timer ( ( ( ( AbstractMailCheckingAction . ONE_SECOND ) * interval ) * 60 ) , this ) ; timer . restart ( ) ; } else { if ( ( timer ) != null ) { timer . stop ( ) ; timer = null ; } } } public void actionPerformed ( ActionEvent arg0 ) { } public abstract void check ( ) { } public AccountItem getAccountItem ( ) { } public abstract boolean isCheckAll ( ) { } }

Fix:
int interval = item . getInteger ( "mailcheck_interval" , 10 ) ;
Buggy code:
public class DebugPostProcessor extends AbstractTestElement implements PostProcessor , TestBean { public void process ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( 100 ) ; <END_BUG> JMeterContext threadContext = getThreadContext ( ) ; PropertyIterator i = threadContext . getCurrentSampler ( ) . propertyIterator ( ) ; while ( i . hasNext ( ) ) { JMeterProperty prop = i . next ( ) ; sb . append ( prop . getName ( ) ) ; sb . append ( "=" ) ; sb . append ( prop . getStringValue ( ) ) ; sb . append ( "\n" ) ; } SampleResult sr = new SampleResult ( ) ; sr . setResponseData ( sb . toString ( ) . getBytes ( ) ) ; sr . setDataType ( TEXT ) ; sr . setSampleLabel ( getName ( ) ) ; sr . setSuccessful ( true ) ; sr . setSamplerData ( "SamplerPropertyValues" ) ; threadContext . getPreviousResult ( ) . addSubResult ( sr ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( 100 ) ;
Buggy code:
public class TupleImpl implements Tuple { private static final Localizer _loc = Localizer . forPackage ( TupleImpl . class ) ; List < TupleElement < ? > > elements = new ArrayList < TupleElement < ? > > ( ) ; public < X > X get ( TupleElement < X > tupleElement ) { } @ SuppressWarnings ( "unchecked" ) public < X > X get ( String alias , Class < X > type ) { } public Object get ( String alias ) { } @ SuppressWarnings ( "unchecked" ) public < X > X get ( int i , Class < X > type ) { } public Object get ( int i ) { } public Object [ ] toArray ( ) { } public List < TupleElement < ? > > getElements ( ) { } @ SuppressWarnings ( "unchecked" ) public void put ( Object key , Object value ) { <START_BUG> TupleElementImpl < ? > element = new TupleElementImpl ( value . getClass ( ) ) ; <END_BUG> element . setAlias ( ( ( String ) ( key ) ) ) ; element . setValue ( value ) ; elements . add ( element ) ; } }

Fix:
TupleElementImpl < ? > element = new TupleElementImpl ( ( value == null ? Object . class : value . getClass ( ) ) ) ;
Buggy code:
public class Project implements ISerializable { private List < Scene > scenes ; private int currentSceneIdx ; private String projectDir ; private String projectName ; public Project ( String dir , String name ) { } public Project ( String path ) { } public List < Scene > getScenes ( ) { } public void addScene ( Scene scene ) { } public Scene getScene ( int idx ) { } public Scene getCurrentScene ( ) { } public int getCurrentSceneIdx ( ) { } public void setCurrentScene ( String name ) { } public void setCurrentScene ( int idx ) { } public String getPath ( ) { } public String getProjectDir ( ) { } public String getNameWithoutExt ( ) { } public void loadProject ( ) throws IOException { } public void saveProject ( ) throws IOException { } public void loadCurrentScene ( ) { } public void loadScene ( int idx ) { } private void loadScene ( Scene scene ) { } @ Override public void load ( FullBufferedReader fr ) throws IOException { } @ Override public void save ( FullBufferedWriter fw ) throws IOException { } public boolean containsSceneWithName ( String name ) { } public void build ( int startScene , FileHandle sceneFileOut , FileHandle assetsFileOut , BuildProgressUpdateListener listener ) throws IOException { StringWriter sceneStrWriter = new StringWriter ( ) ; StringWriter assetsStrWriter = new StringWriter ( ) ; XmlWriter sceneXmlWriter = new XmlWriter ( sceneStrWriter ) ; XmlWriter assetsXmlWriter = new XmlWriter ( assetsStrWriter ) ; sceneXmlWriter . element ( "project" ) . attribute ( "name" , projectName ) . attribute ( "startScene" , startScene ) ; assetsXmlWriter . element ( "assets" ) ; for ( int i = 0 ; i < ( scenes . size ( ) ) ; ++ i ) { Scene scene = scenes . get ( i ) ; <START_BUG> scene . build ( sceneXmlWriter , assetsXmlWriter ) ; <END_BUG> sceneXmlWriter . pop ( ) ; listener . onBuildProgressUpdate ( scene , i , scenes . size ( ) ) ; } sceneXmlWriter . pop ( ) ; assetsXmlWriter . pop ( ) ; sceneFileOut . writeString ( sceneStrWriter . toString ( ) , false ) ; assetsFileOut . writeString ( assetsStrWriter . toString ( ) , false ) ; listener . onProjectCompiled ( ) ; } public String getTempDir ( ) { } public boolean ensureTempDir ( ) { } }

Fix:
scene . build ( sceneXmlWriter , assetsXmlWriter , scene . getName ( ) ) ;
Buggy code:
public class MainForm extends JFrame { private String accountID = null ; private String [ ] labels = new String [ ] { "AccountID" } ; private int numLabel = labels . length ; private JLabel label ; private char [ ] password ; private JTextField textBox ; private JButton submitButton ; private JPanel pane ; private boolean submitted = false ; private boolean accepted = true ; private JPasswordField passwordField ; private JLabel passwordLabel ; public MainForm ( ) { } private synchronized void submitButton_Click ( ) { } public void setAccepted ( boolean acc ) { this . accepted = acc ; if ( accepted ) JOptionPane . showMessageDialog ( null , "Login<seq2seq4repair_space>success!" ) ; else <START_BUG> JOptionPane . showMessageDialog ( null , "Invalid<seq2seq4repair_space>account<seq2seq4repair_space>ID<seq2seq4repair_space>or<seq2seq4repair_space>password" ) ; <END_BUG> } public char [ ] getPassword ( ) { } public void setPassword ( char [ ] password ) { } public void setAccountID ( String accountID ) { } public String getAccountID ( ) { } public void setSubmitted ( boolean submitted ) { } public boolean getSubmitted ( ) { } }

Fix:
JOptionPane . showMessageDialog ( null , "Invalid<seq2seq4repair_space>account<seq2seq4repair_space>ID<seq2seq4repair_space>or<seq2seq4repair_space>password!" , "" , JOptionPane . ERROR_MESSAGE ) ;
Buggy code:
public class BaseUPSTestCase extends AbstractTestCaseWithTestApp { protected static final Logger log = Logger . getLogger ( BaseUPSTestCase . class ) ; protected static final String BASEPATH = "push" ; static final String ADMIN_PATH = ( ( "//" + ( ZeroExtension . APPLICATION_ID ) ) + "//applications//testApp//resources//" ) + ( BaseUPSTestCase . BASEPATH ) ; protected static DB db ; protected static Mongo mongoClient ; @ BeforeClass public static void loadExtensions ( ) throws Exception { String database = System . getProperty ( "mongo.db" , "MONGOInternalTest" ) ; Integer port = new Integer ( System . getProperty ( "mongo.port" , "27017" ) ) ; String host = System . getProperty ( "mongo.host" , "localhost" ) ; BaseUPSTestCase . log . debug ( ( ( ( ( ( "UPS<seq2seq4repair_space>Module<seq2seq4repair_space>Tests<seq2seq4repair_space>using<seq2seq4repair_space>Mongo<seq2seq4repair_space>on<seq2seq4repair_space>" + host ) + ":" ) + port ) + ",<seq2seq4repair_space>database:<seq2seq4repair_space>" ) + database ) ) ; System . setProperty ( "mongo.db" , database ) ; System . setProperty ( "mongo.host" , host ) ; System . setProperty ( "mongo.port" , ( "" + port ) ) ; ObjectNode config = JsonNodeFactory . instance . objectNode ( ) ; config . put ( "db" , "MongoInternalTest" ) ; ObjectNode server = JsonNodeFactory . instance . objectNode ( ) ; server . put ( "host" , host ) ; server . put ( "port" , port ) ; config . putArray ( "servers" ) . add ( server ) ; <START_BUG> loadExtension ( "mongo" , new MongoExtension ( ) , JsonNodeFactory . instance . objectNode ( ) ) ; <END_BUG> loadExtension ( "mongo-internal" , new MongoInternalExtension ( ) , config ) ; try { BaseUPSTestCase . mongoClient = new MongoClient ( host , port ) ; BaseUPSTestCase . db = BaseUPSTestCase . mongoClient . getDB ( database ) ; BaseUPSTestCase . db . setWriteConcern ( ACKNOWLEDGED ) ; BaseUPSTestCase . db . dropDatabase ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } loadExtension ( "ups" , new UPSExtension ( ) ) ; installTestAppResource ( "ups" , BaseUPSTestCase . BASEPATH , BaseUPSTestCase . createConfig ( ) ) ; } public static ResourceState createConfig ( ) { } }

Fix:
loadExtension ( "mongo" , new MongoExtension ( ) , JsonNodeFactory . instance . objectNode ( ) . put ( "name" , "default" ) ) ;
Buggy code:
public class IndexSelector { IJavaSearchScope searchScope ; IJavaElement focus ; IndexManager indexManager ; IIndex [ ] indexes ; public IndexSelector ( IJavaSearchScope searchScope , IJavaElement focus , IndexManager indexManager ) { } private boolean canSeeFocus ( IPath projectOrJarPath ) { } private void computeIndexes ( ) { ArrayList indexesInScope = new ArrayList ( ) ; IPath [ ] projectsAndJars = this . searchScope . enclosingProjectsAndJars ( ) ; IWorkspaceRoot root = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) ; for ( int i = 0 ; i < ( projectsAndJars . length ) ; i ++ ) { IPath location ; IPath path = projectsAndJars [ i ] ; if ( ( ( ( ! ( root . getProject ( path . lastSegment ( ) ) . exists ( ) ) ) && ( ( path . segmentCount ( ) ) > 1 ) ) && ( ( ( location = root . getFile ( path ) . getLocation ( ) ) == null ) || ( ! ( new File ( location . toOSString ( ) ) . exists ( ) ) ) ) ) && ( ! ( new File ( path . toOSString ( ) ) . exists ( ) ) ) ) { continue ; } if ( ( ( this . focus ) == null ) || ( this . canSeeFocus ( path ) ) ) { <START_BUG> IIndex index = this . indexManager . getIndex ( path , false ) ; <END_BUG> if ( ( index != null ) && ( ( indexesInScope . indexOf ( index ) ) == ( - 1 ) ) ) { indexesInScope . add ( index ) ; } } } this . indexes = new IIndex [ indexesInScope . size ( ) ] ; indexesInScope . toArray ( this . indexes ) ; } public IIndex [ ] getIndexes ( ) { } private IJavaProject getJavaProject ( IPath path , IJavaModel model ) { } private boolean haveSameParent ( IPath jarPath1 , IPath jarPath2 , IJavaModel model ) { } }

Fix:
IIndex index = this . indexManager . getIndex ( path , true , false ) ;
Buggy code:
@ WebServlet ( "//GetTopicTweets" ) public class GetTopicTweets extends HttpServlet { private static final long serialVersionUID = 1L ; public GetTopicTweets ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { int size = 5 ; String str = "2011-05-09<seq2seq4repair_space>11:49:45" ; Timestamp time = new Timestamp ( System . currentTimeMillis ( ) ) ; time = Timestamp . valueOf ( str ) ; int topicId = 8 ; String s = "2015-01-01<seq2seq4repair_space>0:0:0" ; String e = "2015-01-30<seq2seq4repair_space>0:0:0" ; Timestamp start = new Timestamp ( System . currentTimeMillis ( ) ) ; start = Timestamp . valueOf ( s ) ; Timestamp end = new Timestamp ( System . currentTimeMillis ( ) ) ; end = Timestamp . valueOf ( e ) ; JSONObject backEndData = new JSONObject ( ) ; TopicHelper topichelper = new TopicHelper ( ) ; JSONArray tags = new JSONArray ( ) ; List < Topic > topicList = topichelper . getTopic ( time , size ) ; long total = 0 ; for ( Topic topic : topicList ) { total += topic . getVolume ( ) ; } System . out . println ( total ) ; for ( Topic topic : topicList ) { JSONObject jsonObject = JSONObject . fromObject ( topic ) ; String proportion = getPercent ( topic . getVolume ( ) , total ) ; proportion = proportion . substring ( 0 , ( ( proportion . length ( ) ) - 1 ) ) ; jsonObject . element ( "proportion" , proportion ) ; tags . add ( jsonObject ) ; } TweetHelper tweethelper = new TweetHelper ( ) ; JSONArray data = new JSONArray ( ) ; for ( int i = 0 ; i < ( tags . size ( ) ) ; i ++ ) { JSONObject o = new JSONObject ( ) ; JSONObject tag = tags . getJSONObject ( i ) ; o . element ( "tag" , tag . get ( "name" ) ) ; o . element ( "proportion" , tag . get ( "proportion" ) ) ; JSONArray tweets = new JSONArray ( ) ; <START_BUG> List < Tweet > tweetList = tweethelper . getTweet ( start , end , topicId ) ; <END_BUG> tweets = JSONArray . fromObject ( tweetList ) ; o . element ( "tweets" , tweets ) ; data . add ( o ) ; } backEndData . element ( "tags" , tags ) ; backEndData . element ( "data" , data ) ; response . setContentType ( "text//json" ) ; response . setCharacterEncoding ( "UTF-8" ) ; response . setHeader ( "Cache-Control" , "no-cache" ) ; response . getWriter ( ) . write ( backEndData . toString ( ) ) ; } public String getPercent ( int x , long total ) { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
List < Tweet > tweetList = tweethelper . getTweet ( start , end , Integer . parseInt ( tag . getString ( "id" ) ) ) ;
Buggy code:
public class Test_org_eclipse_swt_custom_StyledTextContent extends SwtTestCase { int XINSET = 0 ; class ContentImplementation implements StyledTextContent { String textContent = "" ; public void addTextChangeListener ( TextChangeListener listener ) { } public int getCharCount ( ) { } public String getLine ( int lineIndex ) { } public int getLineAtOffset ( int offset ) { } public int getLineCount ( ) { } public String getLineDelimiter ( ) { } public int getOffsetAtLine ( int lineIndex ) { } public String getTextRange ( int start , int length ) { } public void removeTextChangeListener ( TextChangeListener listener ) { } public void replaceTextRange ( int start , int replaceLength , String text ) { } public void setText ( String text ) { } } StyledTextContent content = new Test_org_eclipse_swt_custom_StyledTextContent . ContentImplementation ( ) ; Shell shell ; StyledText styledText ; public Test_org_eclipse_swt_custom_StyledTextContent ( String name ) { } public static void main ( String [ ] args ) { } private boolean isBidi ( ) { } protected void setUp ( ) { if ( isBidi ( ) ) <START_BUG> XINSET = 3 ; <END_BUG> else XINSET = 0 ; shell = new Shell ( ) ; styledText = new StyledText ( shell , SWT . NULL ) ; styledText . setContent ( content ) ; } protected void tearDown ( ) { } public void test_addTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener ( ) { } public void test_getCharCount ( ) { } public void test_getLineAtOffsetI ( ) { } public void test_getLineCount ( ) { } public void test_getLineDelimiter ( ) { } public void test_getLineI ( ) { } public void test_getOffsetAtLineI ( ) { } public void test_getTextRangeII ( ) { } public void test_removeTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener ( ) { } public void test_replaceTextRangeIILjava_lang_String ( ) { } public void test_setTextLjava_lang_String ( ) { } public static Test suite ( ) { } public static Vector methodNames ( ) { } protected void runTest ( ) throws Throwable { } }

Fix:
XINSET = 2 ;
Buggy code:
public class ArcadeDrive extends Command { public ArcadeDrive ( ) { } protected void initialize ( ) { } public void setSpeeds ( double speed , double angle ) { <START_BUG> driveTrain . setPower ( ( speed + ( angle // 2 ) ) , ( ( - 1 ) * ( speed - ( angle // 2 ) ) ) ) ; <END_BUG> } public void setLeftSpeed ( double speed ) { } public void setRightSpeed ( double speed ) { } public void shift ( ) { } protected void execute ( ) { } protected boolean isFinished ( ) { } protected void end ( ) { } protected void interrupted ( ) { } }

Fix:
driveTrain . setPower ( ( speed + angle ) , ( ( - 1 ) * ( speed - angle ) ) ) ;
Buggy code:
public class BlueToothLoService extends Service implements ConstDefine { private Context mContext ; public static BluetoothManager mBluetoothManager ; public BluetoothAdapter mBtAdapter ; private BluetoothGatt mGatt ; private BluetoothGattCharacteristic mBGCnotify ; private BluetoothGattCharacteristic mBGCwrite ; private BluetoothGattCharacteristic mBGCread ; public BlueToothLoService ( ) { } @ Override public void onCreate ( ) { } @ Override public IBinder onBind ( Intent intent ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { LogUtil . d ( ( "onStartCommand<seq2seq4repair_space>:" + ( intent . getAction ( ) ) ) ) ; if ( null != intent ) { String action = intent . getAction ( ) ; if ( ! ( TextUtils . isEmpty ( action ) ) ) { <START_BUG> String address = intent . getStringExtra ( BLE_ADDRESS ) ; <END_BUG> if ( ACTION_CONNECTED_CMD . equals ( action ) ) { LogUtil . d ( ( "onStartCommand<seq2seq4repair_space>address:" + address ) ) ; connectDevice ( address ) ; } else if ( ACTION_READ_CMD . equals ( action ) ) { LogUtil . d ( ( "ACTION_READ_CMD:" + address ) ) ; readDataFromDevice ( address ) ; } } } return super . onStartCommand ( intent , flags , startId ) ; } public boolean connectDevice ( final String address ) { } private final BluetoothGattCallback gattCallback = new BluetoothGattCallback ( ) { @ Override public void onConnectionStateChange ( BluetoothGatt gatt , int status , int newState ) { } @ Override public void onServicesDiscovered ( BluetoothGatt gatt , int status ) { } @ Override public void onCharacteristicRead ( BluetoothGatt gatt , BluetoothGattCharacteristic characteristic , int status ) { } } ; private void dicoveredSetSerCha ( final BluetoothGatt gatt ) { } private void readDataFromDevice ( String address ) { } public void requestCharacteristicValue ( BluetoothGattCharacteristic ch , BluetoothGatt mBluetoothGattTag ) { } @ Override public void onDestroy ( ) { } }

Fix:
String address = intent . getStringExtra ( BLE_ADDRESS_PREF ) ;
Buggy code:
public class NewMethodTypeMunger extends ResolvedTypeMunger { public NewMethodTypeMunger ( ResolvedMember signature , Set superMethodsCalled ) { } public ResolvedMember getDispatchMethod ( TypeX aspectType ) { } public void write ( DataOutputStream s ) throws IOException { } public static ResolvedTypeMunger readMethod ( DataInputStream s , ISourceContext context ) throws IOException { } public ResolvedMember getMatchingSyntheticMember ( Member member , ResolvedTypeX aspectType ) { ResolvedMember ret = AjcMemberMaker . interMethodDispatcher ( getSignature ( ) , aspectType ) ; if ( ResolvedTypeX . matches ( ret , member ) ) return getSignature ( ) ; <START_BUG> return null ; <END_BUG> } }

Fix:
return super . getMatchingSyntheticMember ( member , aspectType ) ;
Buggy code:
public abstract class AbstractRuntimeMetricsHandler extends AbstractRuntimeOnlyHandler { private static ServiceName componentServiceName ( final ModelNode operation ) { } protected abstract void executeReadMetricStep ( final OperationContext context , final ModelNode operation , final EJBComponent component ) throws OperationFailedException { } @ Override protected void executeRuntimeStep ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ServiceName componentServiceName = AbstractRuntimeMetricsHandler . componentServiceName ( operation ) ; final EJBComponent component = ( ( EJBComponent ) ( context . getServiceRegistry ( false ) . getRequiredService ( componentServiceName ) . getValue ( ) ) ) ; executeReadMetricStep ( context , operation , component ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class ConfigurationViewer extends JTextPane { private static final char SPACE = '<seq2seq4repair_space>' ; public ConfigurationViewer ( String title , Map < String , Object > config ) { } String toString ( Object value ) { } private int getMaxLength ( Set < String > keys ) { } private String pad ( int n ) { <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < n ; i ++ ) buf . append ( ConfigurationViewer . SPACE ) ; return buf . toString ( ) ; } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class MultiKey < K > implements Serializable { private static final long serialVersionUID = 4465448607415788805L ; private final K [ ] keys ; private transient int hashCode ; @ SuppressWarnings ( "unchecked" ) public MultiKey ( final K key1 , final K key2 ) { } @ SuppressWarnings ( "unchecked" ) public MultiKey ( final K key1 , final K key2 , final K key3 ) { } @ SuppressWarnings ( "unchecked" ) public MultiKey ( final K key1 , final K key2 , final K key3 , final K key4 ) { } @ SuppressWarnings ( "unchecked" ) public MultiKey ( final K key1 , final K key2 , final K key3 , final K key4 , final K key5 ) { } public MultiKey ( final K [ ] keys ) { } public MultiKey ( final K [ ] keys , final boolean makeClone ) { } public K [ ] getKeys ( ) { } public K getKey ( final int index ) { } public int size ( ) { } @ Override public boolean equals ( final Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> return "MultiKey" + ( Arrays . asList ( keys ) . toString ( ) ) ; <END_BUG> } private void calculateHashCode ( final Object [ ] keys ) { } private Object readResolve ( ) { } }

Fix:
return "MultiKey" + ( Arrays . toString ( keys ) ) ;
Buggy code:
class RemoveFromIndex extends IndexRequest { String resourceName ; public RemoveFromIndex ( String resourceName , IPath indexPath , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { <START_BUG> if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) <END_BUG> return true ; IIndex index = manager . getIndex ( this . indexPath , true , false ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterWrite ( ) ; index . remove ( resourceName ) ; } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . resourceName ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitWrite ( ) ; } return true ; } public String toString ( ) { } }

Fix:
if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) )
Buggy code:
public class ActionLoadModelFromDB extends UMLAction { public static ActionLoadModelFromDB SINGLETON = new ActionLoadModelFromDB ( ) ; protected ActionLoadModelFromDB ( ) { } public void actionPerformed ( ActionEvent e ) { String modelName = JOptionPane . showInputDialog ( "What<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>model?" ) ; if ( ( modelName == null ) || ( modelName . equals ( "" ) ) ) return ; DBLoader loader = new DBLoader ( ) ; if ( loader . hasConnection ( ) ) { MModel newModel = loader . read ( modelName ) ; <START_BUG> TheInstance . setProject ( new Project ( newModel ) ) ; <END_BUG> } } public boolean shouldBeEnabled ( ) { } }

Fix:
ProjectManager . getManager ( ) . setCurrentProject ( new Project ( newModel ) ) ;
Buggy code:
public class SwtPerformanceTestCase extends TestCase { public static boolean verbose = false ; public static String [ ] imageFormats = new String [ ] { "bmp" , "jpg" , "gif" , "png" } ; public static String [ ] imageFilenames = new String [ ] { "folder" , "folderOpen" , "target" } ; public static String [ ] transparentImageFilenames = new String [ ] { "transparent.png" } ; public SwtPerformanceTestCase ( String name ) { } protected PerformanceMeter createMeter ( ) { } protected PerformanceMeter createMeter ( String id ) { Performance performance = Performance . getDefault ( ) ; String scenarioId = performance . getDefaultScenarioId ( this ) ; if ( id != null ) scenarioId += ":<seq2seq4repair_space>" + id ; PerformanceMeter meter = performance . createPerformanceMeter ( scenarioId ) ; <START_BUG> performance . tagAsSummary ( meter , id , CPU_TIME ) ; <END_BUG> return meter ; } protected void disposeMeter ( PerformanceMeter meter ) { } protected String getPath ( String fileName ) { } protected boolean isJ2ME ( ) { } }

Fix:
performance . tagAsSummary ( meter , scenarioId , CPU_TIME ) ;
Buggy code:
public class VarArgsExpression extends ExpressionImpl { private final Expression [ ] _values ; public VarArgsExpression ( Expression [ ] values ) { } @ Override public String asExpression ( AliasContext ctx ) { <START_BUG> StringBuffer tmp = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < ( _values . length ) ; i ++ ) { Visitable v = ( ( Visitable ) ( _values [ i ] ) ) ; tmp . append ( v . asExpression ( ctx ) ) . append ( ( i == ( ( _values . length ) - 1 ) ? "" : ",<seq2seq4repair_space>" ) ) ; } return tmp . toString ( ) ; } @ Override public String asProjection ( AliasContext ctx ) { } }

Fix:
StringBuilder tmp = new StringBuilder ( ) ;
Buggy code:
public class ApiInvoker { private static ApiInvoker INSTANCE = new ApiInvoker ( ) ; private Map < String , String > defaultHeaderMap = new HashMap < String , String > ( ) ; private HttpClient client = null ; private boolean ignoreSSLCertificates = false ; private ClientConnectionManager ignoreSSLConnectionManager ; public static final ContentType TEXT_PLAIN_UTF8 = ContentType . create ( "text//plain" , UTF_8 ) ; public static final SimpleDateFormat DATE_TIME_FORMAT = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) ; public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat ( "yyyy-MM-dd" ) ; public static void setUserAgent ( String userAgent ) { } public static Date parseDateTime ( String str ) { } public static Date parseDate ( String str ) { } public static String formatDateTime ( Date datetime ) { } public static String formatDate ( Date date ) { } public static String parameterToString ( Object param ) { } public static List < Pair > parameterToPairs ( String collectionFormat , String name , Object value ) { } public ApiInvoker ( ) { } public static ApiInvoker getInstance ( ) { } public void ignoreSSLCertificates ( boolean ignoreSSLCertificates ) { } public void addDefaultHeader ( String key , String value ) { } public String escapeString ( String str ) { } public static Object deserialize ( String json , String containerType , Class cls ) throws ApiException { try { if ( ( "list" . equalsIgnoreCase ( containerType ) ) || ( "array" . equalsIgnoreCase ( containerType ) ) ) { return JsonUtil . deserializeToList ( json , cls ) ; } else if ( String . class . equals ( cls ) ) { if ( ( ( ( json != null ) && ( json . startsWith ( "\"" ) ) ) && ( json . endsWith ( "\"" ) ) ) && ( ( json . length ( ) ) > 1 ) ) <START_BUG> return json . substring ( 1 , ( ( json . length ( ) ) - 2 ) ) ; <END_BUG> else return json ; } else { return JsonUtil . deserializeToObject ( json , cls ) ; } } catch ( JsonParseException e ) { throw new ApiException ( 500 , e . getMessage ( ) ) ; } } public static String serialize ( Object obj ) throws ApiException { } public String invokeAPI ( String host , String path , String method , List < Pair > queryParams , Object body , Map < String , String > headerParams , Map < String , String > formParams , String contentType ) throws ApiException { } private HttpClient getClient ( String host ) { } private void initConnectionManager ( ) { } }

Fix:
return json . substring ( 1 , ( ( json . length ( ) ) - 1 ) ) ;
Buggy code:
public final class Printer extends Device { static PrinterData [ ] printerList ; PrinterData data ; int printer ; int printJob ; int settings ; int pageSetup ; int surface ; int cairo ; boolean isGCCreated = false ; Font systemFont ; byte [ ] settingsData ; int start ; int end ; public static PrinterData [ ] getPrinterList ( ) { } static int GtkPrinterFunc_List ( int printer , int user_data ) { } public static PrinterData getDefaultPrinterData ( ) { Printer . printerList = new PrinterData [ 1 ] ; if ( ( OS . GTK_VERSION ) < ( OS . VERSION ( 2 , 10 , 0 ) ) ) { <START_BUG> return Printer . printerList [ 0 ] ; <END_BUG> } Callback printerCallback = new Callback ( Printer . class , "GtkPrinterFunc_Default" , 2 ) ; int GtkPrinterFunc_Default = printerCallback . getAddress ( ) ; if ( GtkPrinterFunc_Default == 0 ) SWT . error ( ERROR_NO_MORE_CALLBACKS ) ; OS . gtk_enumerate_printers ( GtkPrinterFunc_Default , 0 , 0 , true ) ; printerCallback . dispose ( ) ; return Printer . printerList [ 0 ] ; } static int GtkPrinterFunc_Default ( int printer , int user_data ) { } int gtkPrinterFromPrinterData ( ) { } int GtkPrinterFunc_FindNamedPrinter ( int printer , int user_data ) { } static PrinterData printerDataFromGtkPrinter ( int printer ) { } static void setScope ( int settings , int scope , int startPage , int endPage ) { } static DeviceData checkNull ( PrinterData data ) { } public Printer ( ) { } public Printer ( PrinterData data ) { } int restoreInt ( String key ) { } double restoreDouble ( String key ) { } boolean restoreBoolean ( String key ) { } byte [ ] restoreBytes ( String key , boolean nullTerminate ) { } public Font getSystemFont ( ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int gdkGC , GCData data ) { } protected void release ( ) { } public boolean startJob ( String jobName ) { } protected void destroy ( ) { } public void endJob ( ) { } public void cancelJob ( ) { } public boolean startPage ( ) { } public void endPage ( ) { } public Point getDPI ( ) { } public Rectangle getBounds ( ) { } public Rectangle getClientArea ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } protected void create ( DeviceData deviceData ) { } protected void init ( ) { } public PrinterData getPrinterData ( ) { } }

Fix:
return null ;
Buggy code:
public class SelectStep < S , E > extends MapStep < S , Map < String , E > > implements EngineDependent , FunctionHolder < Object , Object > { protected FunctionRing < Object , Object > functionRing ; private final List < String > selectLabels ; private final boolean wasEmpty ; private boolean requiresPaths = false ; protected Function < Traverser < S > , Map < String , E > > selectFunction ; public SelectStep ( final Traversal traversal , final String ... selectLabels ) { } @ Override public void reset ( ) { } public boolean hasStepFunctions ( ) { } @ Override public void onEngine ( final TraversalEngine traversalEngine ) { <START_BUG> this . requiresPaths = ( traversalEngine . equals ( COMPUTER ) ) ? TraversalHelper . getLabelsUpTo ( this , this . traversal . asAdmin ( ) ) . stream ( ) . filter ( this . selectLabels :: contains ) . findAny ( ) . isPresent ( ) : TraversalHelper . getStepsUpTo ( this , this . traversal . asAdmin ( ) ) . stream ( ) . filter ( ( step ) -> step instanceof Barrier ) . filter ( ( step ) -> TraversalHelper . getLabelsUpTo ( step , this . traversal . asAdmin ( ) ) . stream ( ) . filter ( this . selectLabels :: contains ) . findAny ( ) . isPresent ( ) ) . findAny ( ) . isPresent ( ) ; <END_BUG> } @ Override public String toString ( ) { } @ Override public SelectStep < S , E > clone ( ) throws CloneNotSupportedException { } @ Override public void addFunction ( final Function < Object , Object > function ) { } @ Override public List < Function < Object , Object > > getFunctions ( ) { } @ Override public Set < TraverserRequirement > getRequirements ( ) { } private static final < S , E > void generateFunction ( final SelectStep < S , E > selectStep ) { } }

Fix:
this . requiresPaths = ( traversalEngine . equals ( COMPUTER ) ) ? TraversalHelper . getLabelsUpTo ( this , this . traversal . asAdmin ( ) ) . stream ( ) . filter ( this . selectLabels :: contains ) . findAny ( ) . isPresent ( ) : TraversalHelper . getStepsUpTo ( this , this . traversal . asAdmin ( ) ) . stream ( ) . filter ( ( step ) -> step instanceof Barrier ) . findAny ( ) . isPresent ( ) ;
Buggy code:
public class OpenSessionInViewFilter extends OncePerRequestFilter { public static final String DEFAULT_SESSION_FACTORY_BEAN_NAME = "sessionFactory" ; private String sessionFactoryBeanName = OpenSessionInViewFilter . DEFAULT_SESSION_FACTORY_BEAN_NAME ; public void setSessionFactoryBeanName ( String sessionFactoryBeanName ) { } protected String getSessionFactoryBeanName ( ) { } @ Override protected void doFilterInternal ( HttpServletRequest request , HttpServletResponse response , FilterChain filterChain ) throws IOException , ServletException { } protected SessionFactory lookupSessionFactory ( HttpServletRequest request ) { } protected SessionFactory lookupSessionFactory ( ) { } protected Session openSession ( SessionFactory sessionFactory ) throws DataAccessResourceFailureException { try { <START_BUG> Session session = sessionFactory . openSession ( ) ; <END_BUG> session . setFlushMode ( MANUAL ) ; return session ; } catch ( HibernateException ex ) { throw new DataAccessResourceFailureException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>open<seq2seq4repair_space>Hibernate<seq2seq4repair_space>Session" , ex ) ; } } }

Fix:
Session session = SessionFactoryUtils . openSession ( sessionFactory ) ;
Buggy code:
public class Location implements ListingSource { private long locationID ; private String locationName ; private City city ; private ListingFromLocation listing ; public Location ( long locationID , String locationName , City city ) { } public long getLocationID ( ) { } public String getLocationName ( ) { } public City getCity ( ) { } public LocationData getLocationData ( ) { } @ Override public Predicate < Post > getFilter ( ) { } @ Override public ListingFromLocation getListing ( ) { if ( ( listing ) == null ) { <START_BUG> Listing listing = new ListingFromLocation ( this ) ; <END_BUG> } return listing ; } @ Override public DatabaseRequest getDatabaseRequest ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
listing = new ListingFromLocation ( this ) ;
Buggy code:
public class InformatieFragment extends Fragment { public String ip ; public int port ; public static String servicenaam ; private String informatie ; View rootview ; public static Fragment fragmenthome = new HomeFragment ( ) ; public static Fragment fragmentservice = new ServiceFragment ( ) ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { rootview = inflater . inflate ( informatie_layout , container , false ) ; ip = HomeFragment . serverIp ; port = HomeFragment . serverPort ; InformatieFragment . servicenaam = HomeFragment . servicenaam ; <START_BUG> getActivity ( ) . setTitle ( InformatieFragment . servicenaam ) ; <END_BUG> getServiceInformatie ( ) ; TextView infoServiceNaam = ( ( TextView ) ( rootview . findViewById ( infoServiceNaam ) ) ) ; infoServiceNaam . setText ( InformatieFragment . servicenaam ) ; TextView InfoVeld = ( ( TextView ) ( rootview . findViewById ( infoVeld ) ) ) ; InfoVeld . setText ( informatie ) ; Log . d ( "Servicenaam" , InformatieFragment . servicenaam ) ; buttonHandler ( ) ; return rootview ; } public void getServiceInformatie ( ) { } public void buttonHandler ( ) { } No newline ; at end ; of file ; }

Fix:
getActivity ( ) . setTitle ( ( "Informatie<seq2seq4repair_space>over<seq2seq4repair_space>" + ( InformatieFragment . servicenaam ) ) ) ;
Buggy code:
public class PathSummary implements Estimation { private final PathIndex index ; private final Summary summary ; public PathSummary ( PathIndex index , Summary summary ) { } public PathIndex getIndex ( ) { } public Summary getSummary ( ) { } @ Override public double getPrecision ( ) { } @ Override public int getTuples ( ) { } @ Override public int [ ] getQuery ( ) { <START_BUG> return index . getPathAsArray ( ) ; <END_BUG> } }

Fix:
return index . getPathAsIntArray ( ) ;
Buggy code:
public class PartSite implements IWorkbenchPartSite { private IWorkbenchPart part ; private IWorkbenchPage page ; private PartPane pane ; private IConfigurationElement configElement ; private String extensionID ; private String pluginID ; private String extensionName ; private ISelectionProvider selectionProvider ; private SubActionBars actionBars ; private KeyBindingService keyBindingService ; public PartSite ( IWorkbenchPart part , IWorkbenchPage page ) { } public void dispose ( ) { } public IActionBars getActionBars ( ) { } public IConfigurationElement getConfigurationElement ( ) { } public String getId ( ) { } public IWorkbenchPage getPage ( ) { } public PartPane getPane ( ) { } public IWorkbenchPart getPart ( ) { } public String getPluginId ( ) { } public String getRegisteredName ( ) { } public ISelectionProvider getSelectionProvider ( ) { } public Shell getShell ( ) { } public IWorkbenchWindow getWorkbenchWindow ( ) { } public void registerContextMenu ( String menuID , MenuManager menuMgr , ISelectionProvider selProvider ) { } public void registerContextMenu ( MenuManager menuMgr , ISelectionProvider selProvider ) { } public void setActionBars ( SubActionBars bars ) { } public void setConfigurationElement ( IConfigurationElement configElement ) { } public void setPane ( PartPane pane ) { } public void setPart ( IWorkbenchPart newPart ) { } public void setSelectionProvider ( ISelectionProvider provider ) { } public IKeyBindingService getKeyBindingService ( ) { } protected String getInitialScopeId ( ) { <START_BUG> return "org.eclipse.ui.globalScope" ; <END_BUG> } }

Fix:
return IWorkbenchConstants . DEFAULT_ACCELERATOR_SCOPE_ID ;
Buggy code:
public class CovReport extends Task { private File home = null ; private String format = null ; private File tofile = null ; private String type = null ; private Integer percent = null ; private String filters = null ; private File snapshot = null ; private Path sourcePath = null ; private boolean includeSource = true ; private Path coveragePath = null ; private CovReport . Reference reference = null ; public void setHome ( File value ) { } public static class ReportFormat extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setFormat ( CovReport . ReportFormat value ) { } public static class ReportType extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setType ( CovReport . ReportType value ) { } public void setIncludesource ( boolean value ) { } public void setPercent ( Integer value ) { } public void setFilters ( String values ) { } public Path createSourcepath ( ) { } public void setSnapshot ( File value ) { } public void setTofile ( File value ) { } public Path createCoveragepath ( ) { } public CovReport . Reference createReference ( ) { } public CovReport ( ) { } protected void checkOptions ( ) throws BuildException { } public void execute ( ) throws BuildException { } protected String [ ] getParameters ( ) { } public class Reference { protected Path classPath ; protected ReportFilters filters ; public Path createClasspath ( ) { if ( ( classPath ) == null ) { <START_BUG> classPath = new Path ( CovReport . this . project ) ; <END_BUG> } return classPath . createPath ( ) ; } public ReportFilters createFilters ( ) { } protected void createEnhancedXMLReport ( ) throws BuildException { } } }

Fix:
classPath = new Path ( CovReport . this . getProject ( ) ) ;
Buggy code:
public class AntTag extends TagSupport { public AntTag ( ) { } public int doStartTag ( ) throws JspException { try { args . clear ( ) ; <START_BUG> targets . clear ( ) ; <END_BUG> pageContext . setAttribute ( "antProperties" , args ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } return EVAL_BODY_INCLUDE ; } public int doEndTag ( ) throws JspException { } Properties args = new Properties ( ) ; Vector targets = new Vector ( ) ; public void setProperty ( String name , String value ) { } public String getProperty ( String name ) { } public void addTarget ( String n ) { } public void setTestFile ( String s ) { } public void setTarget ( String s ) { } public void setDebug ( String s ) { } private void runTest ( ) throws JspException { } }

Fix:
targets . removeAllElements ( ) ;
Buggy code:
public class PlayerListener implements Listener { private SEconomy plugin ; public PlayerListener ( SEconomy plugin ) { } @ EventHandler public void onPlayerDeath ( PlayerDeathEvent event ) { if ( ( event . getEntity ( ) ) instanceof Player ) { Player player = event . getEntity ( ) ; <START_BUG> player . sendMessage ( MessageFormat . format ( String . valueOf ( plugin . getLangData ( ) . get ( "41" ) ) , plugin . getAccountList ( ) . get ( player . getName ( ) ) . getCoinpurseValue ( ) , String . valueOf ( plugin . getLangData ( ) . get ( "currSymbol" ) ) ) ) ; <END_BUG> plugin . resetCoinpurse ( player ) ; } } @ EventHandler public void onPlayerJoin ( PlayerJoinEvent event ) { } @ SuppressWarnings ( "deprecation" ) @ EventHandler public void onPlayerInteract ( PlayerInteractEvent event ) { } }

Fix:
player . sendMessage ( MessageFormat . format ( String . valueOf ( plugin . getLangData ( ) . get ( "41" ) ) , plugin . getAccountList ( ) . get ( player . getUniqueId ( ) ) . getCoinpurseValue ( ) , String . valueOf ( plugin . getLangData ( ) . get ( "currSymbol" ) ) ) ) ;