nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class Response { private String defaultEncoding ; public void close ( ) { } public CharSequence encodeURL ( final CharSequence url ) { } public final AppendingStringBuffer filter ( AppendingStringBuffer responseBuffer ) { } public String getCharacterEncoding ( ) { } public abstract OutputStream getOutputStream ( ) { } public boolean isRedirect ( ) { } public void redirect ( final String url ) { } public void setCharacterEncoding ( final String encoding ) { } public void setContentLength ( final long length ) { } public void setContentType ( final String mimeType ) { } public void setLastModifiedTime ( Time time ) { } public void setLocale ( final Locale locale ) { } public final void write ( final ComponentTag tag ) { } public abstract void write ( final CharSequence string ) { } <START_BUG> public final void println ( final String string ) { <END_BUG> write ( string ) ; write ( LINE_SEPARATOR ) ; } }

Fix:
public final void println ( final CharSequence string ) {
Buggy code:
public final class SimpleBundleInfo implements BundleInfo { private Content _contentName ; private Version _version ; private Attributes _attributes ; private Set < Content > _exportPackages = null ; private Set < Content > _importPackages = null ; private Set < Content > _exportServices = null ; private Set < Content > _importServices = null ; private Set < Content > _requireBundle = null ; private String _location ; public SimpleBundleInfo ( BundleManifest bm , String location ) { } public Set < Content > getExportPackage ( ) { } public Set < Content > getExportService ( ) { if ( ( _exportServices ) == null ) { _exportServices = getContentSetFromHeader ( _attributes , Constants . EXPORT_SERVICE ) ; } <START_BUG> return _exportPackages ; <END_BUG> } public Map < String , String > getHeaders ( ) { } public Set < Content > getImportPackage ( ) { } public Set < Content > getImportService ( ) { } public String getLocation ( ) { } public String getSymbolicName ( ) { } public Version getVersion ( ) { } private Set < Content > getContentSetFromHeader ( Attributes attributes , String key ) { } public Map < String , String > getBundleAttributes ( ) { } public Map < String , String > getBundleDirectives ( ) { } public Set < Content > getRequireBundle ( ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public String toString ( ) { } public Attributes getRawAttributes ( ) { } }

Fix:
return _exportServices ;
Buggy code:
public class WordGeneratorTest extends TestCase { private static final Log log = LogFactory . getLog ( WordGeneratorTest . class ) ; public WordGeneratorTest ( String message ) { } public void testWordGenerator ( ) throws Exception { WordGenerator wg = new WordGenerator ( ) ; int wordCount = wg . size ( ) ; <START_BUG> Set words = new HashSet ( ) ; <END_BUG> WordGeneratorTest . log . info ( "First<seq2seq4repair_space>iteration..." ) ; for ( int i = 0 ; i < wordCount ; i ++ ) { Word word = wg . next ( ) ; WordGeneratorTest . log . info ( ( "Word<seq2seq4repair_space>found:<seq2seq4repair_space>" + word ) ) ; Assert . assertFalse ( "Word<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>returned<seq2seq4repair_space>twice" , words . contains ( word ) ) ; words . add ( word ) ; } WordGeneratorTest . log . info ( "Second<seq2seq4repair_space>iteration..." ) ; for ( int i = 0 ; i < wordCount ; i ++ ) { Word word = wg . next ( ) ; WordGeneratorTest . log . info ( ( "Word<seq2seq4repair_space>found:<seq2seq4repair_space>" + word ) ) ; Assert . assertTrue ( ( ( "Word<seq2seq4repair_space>" + word ) + "<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>returned<seq2seq4repair_space>only<seq2seq4repair_space>once" ) , words . remove ( word ) ) ; } Assert . assertTrue ( "All<seq2seq4repair_space>words<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>returned<seq2seq4repair_space>twice" , words . isEmpty ( ) ) ; } public void testSuppliedWordConstructor ( ) throws Exception { } }

Fix:
Set < Word > words = new HashSet < Word > ( ) ;
Buggy code:
public class PCC { public static boolean errorCheck ( List < String > data ) { } public static boolean errorCheck ( String data ) { try { <START_BUG> PCC . errorCheck ( data ) ; <END_BUG> return false ; } catch ( BgoException e ) { PromptDialog . showError ( e . getMessage ( ) ) ; return true ; } } public static String addProcedure ( String cptIEN , String narrative , String qty , String mod1 , String mod2 , String principal ) { } public static boolean deleteProcedure ( String vfIEN ) { } public static String addProvider ( String provIEN , boolean primary , boolean forcePrimary ) { } public static String addPOV ( String icdIEN , String narrative , String onset ) { } public static boolean deletePOV ( String visitIEN , String povIEN , String icdIEN ) { } private static void deletePatientEd ( String visitIEN , String icdIEN ) { } public static String addProblem ( String sICDIEN , String narrative , String onset ) { } public static int compareProblemIDs ( String id1 , String id2 ) { } public static void loadModifiers ( Combobox cbo , String cptCode , String refDate ) { } private static void addModifier ( Combobox cbo , String modifier ) { } private PCC ( ) { } }

Fix:
BgoUtil . errorCheck ( data ) ;
Buggy code:
public class TestHTTPFileArgs extends TestCase { public TestHTTPFileArgs ( String name ) { } public void testConstructors ( ) throws Exception { } public void testAdding ( ) throws Exception { } public void testSetHTTPFileArgs ( ) throws Exception { <START_BUG> List newHTTPFileArgs = new LinkedList ( ) ; <END_BUG> newHTTPFileArgs . add ( new HTTPFileArg ( "hede" ) ) ; HTTPFileArgs files = new HTTPFileArgs ( ) ; files . setHTTPFileArgs ( newHTTPFileArgs ) ; assertEquals ( 1 , files . getHTTPFileArgCount ( ) ) ; assertEquals ( "hede" , ( ( HTTPFileArg ) ( files . iterator ( ) . next ( ) . getObjectValue ( ) ) ) . getPath ( ) ) ; } public void testRemoving ( ) throws Exception { } public void testToString ( ) throws Exception { } }

Fix:
List < HTTPFileArg > newHTTPFileArgs = new LinkedList < HTTPFileArg > ( ) ;
Buggy code:
public interface ReviewService { public List < LatestReviewDTO > getLatestReviews ( Long categoryID ) { } public List < ReviewDTO > getAggregatedReviews ( Long categoryID ) { } <START_BUG> public List < ReviewDTO > getIndividualReview ( Long productID ) ; <END_BUG> public List < ReviewDTO > getSortedReviews ( Long categoryID , String featureName ) { } }

Fix:
public List < ReviewDTO > getIndividualReview ( String productID ) ;
Buggy code:
public class Shirt { static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat ( "yyyy-MM-dd" ) ; static final long DEFAULT_DIFFERENCE = ( ( ( 7 * 24 ) * 60 ) * 60 ) * 1000 ; static final String TAG = "Shirt.class" ; static final int PEAK_RATING = 5 ; private static final long MS_IN_DAY = 86400000 ; static ShirtsHelper shirtsHelper ; static SQLiteDatabase db ; static Context CONTEXT ; int id ; String description ; Date lastWorn ; int rating ; public Shirt ( int id , String description , String lastWorn , int rating , boolean inDB ) { } public Shirt ( int id , String description , String lastWorn , int rating ) throws Exception { } public Shirt ( int id , String description , Date lastWorn , int rating , boolean inDB ) { } public static void setDatabase ( ShirtsHelper helper ) { } public static void setContext ( Context ctx ) { } public void edit ( String description , String lastWorn , int rating ) { } public void wearToday ( ) { this . lastWorn = new Date ( ) ; ContentValues newValues = new ContentValues ( ) ; <START_BUG> newValues . put ( DATE , this . lastWorn . getSeconds ( ) ) ; <END_BUG> Shirt . db . update ( DATABASE_NAME , newValues , "_id=?" , new String [ ] { String . valueOf ( this . id ) } ) ; } public void delete ( ) { } public int daysAgoWorn ( ) { } @ Override public String toString ( ) { } }

Fix:
newValues . put ( DATE , this . lastWorn . getTime ( ) ) ;
Buggy code:
public abstract class SystemProperties { public static final SystemProperties CONFIG ; protected abstract Boolean getBooleanOrNull ( String key ) { } protected abstract Integer getIntegerOrNull ( String key ) { } protected abstract String getStringOrNull ( String key ) { } protected abstract String getCoerceToStringOrNull ( String key ) { } private void logClassCastError ( String key , String expectedType , ClassCastException ick ) { } private static class WithWithout { String with ; String without ( ) { } WithWithout ( String key ) { } } private Boolean mbPrefixGetBooleanOrNull ( String key ) { } private Integer mbPrefixGetIntegerOrNull ( String key ) { } private String mbPrefixGetStringOrNull ( String key ) { } private String mbPrefixGetCoerceToStringOrNull ( String key ) { } private boolean getBoolean ( String key ) { } private int getInt ( String key ) { } private String getString ( String key ) { } private String getCoerceToString ( String key ) { } public String activePeerIP ( ) { } public int activePeerPort ( ) { } public boolean blockChainOnly ( ) { } public String coinbaseSecret ( ) { } public String databaseDir ( ) { } public boolean databaseReset ( ) { } public int dumpBlock ( ) { } public boolean dumpCleanOnRestart ( ) { } public String dumpDir ( ) { } public boolean dumpFull ( ) { } public String dumpStyle ( ) { } public String helloPhrase ( ) { } public int listenPort ( ) { } public int maxBlocksAsk ( ) { } public int maxBlocksQueued ( ) { } public int maxHashesAsk ( ) { } public int peerChannelReadTimeout ( ) { } public boolean peerDiscoveryEnabled ( ) { } public String peerDiscoveryIPList ( ) { } public int peerDiscoveryWorkers ( ) { } public boolean playVM ( ) { } public String projectVersion ( ) { } public boolean recordBlocks ( ) { } public String samplesDir ( ) { } public int transactionApproveTimeout ( ) { } public int traceStartBlock ( ) { } public boolean vmTrace ( ) { } public String vmTraceDir ( ) { } public boolean vmTestLoadLocal ( ) { } public String getKeyValueDataSource ( ) { } public String rootHashStart ( ) { } public List < String > peerCapabilities ( ) { } public int peerConnectionTimeout ( ) { } interface LinePrinter { public void print ( String key , Object value ) { } } private static String kvline ( String key , Object value ) { <START_BUG> return ( ( "<seq2seq4repair_space>" + key ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + value ; <END_BUG> } private SystemProperties . LinePrinter infoPrinter = new SystemProperties . LinePrinter ( ) { public void print ( String key , Object value ) { } } ; private SystemProperties . LinePrinter debugPrinter = new SystemProperties . LinePrinter ( ) { public void print ( String key , Object value ) { } } ; private void print ( SystemProperties . LinePrinter lp ) { } public void debugPrint ( ) { } public void infoPrint ( ) { } public void print ( ) { } public static void main ( String [ ] args ) { } }

Fix:
return String . format ( ( ( "<seq2seq4repair_space>%-" + ( MAX_KEY_LEN ) ) + "s<seq2seq4repair_space>-><seq2seq4repair_space>%s" ) , key , value ) ;
Buggy code:
public class Example1 extends AbstractSampler implements TestBean { private static final long serialVersionUID = 240L ; public SampleResult sample ( Entry e ) { SampleResult res = new SampleResult ( ) ; res . setSampleLabel ( getName ( ) ) ; res . setSamplerData ( myStringProperty ) ; res . sampleStart ( ) ; <START_BUG> res . setResponseData ( myStringProperty . toUpperCase ( ) . getBytes ( ) ) ; <END_BUG> res . setDataType ( TEXT ) ; res . sampleEnd ( ) ; res . setSuccessful ( true ) ; return res ; } private String myStringProperty ; public void setMyStringProperty ( String s ) { } public String getMyStringProperty ( ) { } }

Fix:
res . setResponseData ( myStringProperty . toUpperCase ( ) , null ) ;
Buggy code:
public class ClassFile extends Openable implements IClassFile { protected BinaryType fBinaryType = null ; protected ClassFile ( IPackageFragment parent , String name ) { } public void codeComplete ( int offset , ICompletionRequestor requestor ) throws JavaModelException { } public IJavaElement [ ] codeSelect ( int offset , int length ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } protected IJavaElement findElement ( IJavaElement elt , int position , SourceMapper mapper ) { } protected boolean generateInfos ( OpenableElementInfo info , IProgressMonitor pm , Map newElements , IResource underlyingResource ) throws JavaModelException { } private IBinaryType getBinaryTypeInfo ( IFile file ) throws JavaModelException { } public IBuffer getBuffer ( ) throws JavaModelException { } public IClassFile getClassFile ( ) { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public IJavaElement getElementAt ( int position ) throws JavaModelException { } protected char getHandleMementoDelimiter ( ) { } public String getSource ( ) throws JavaModelException { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public IType getType ( ) throws JavaModelException { } public WorkingCopy getWorkingCopy ( ) { String name = getElementName ( ) ; name = name . substring ( 0 , ( ( name . length ( ) ) - 6 ) ) ; name = name + ".java" ; <START_BUG> return new WorkingCopy ( ( ( IPackageFragment ) ( getParent ( ) ) ) , name ) ; <END_BUG> } protected boolean hasBuffer ( ) { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } protected IBuffer openBuffer ( IProgressMonitor pm ) throws JavaModelException { } public IJavaElement rootedAt ( IJavaProject project ) { } static char [ ] simpleName ( char [ ] className ) { } public static char [ ] translatedName ( char [ ] name ) { } static char [ ] [ ] translatedNames ( char [ ] [ ] names ) { } static char [ ] unqualifiedName ( char [ ] className ) { } public void codeComplete ( int offset , final ICodeCompletionRequestor requestor ) throws JavaModelException { } }

Fix:
return new WorkingCopy ( ( ( IPackageFragment ) ( getParent ( ) ) ) , name , null ) ;
Buggy code:
public class WicketLinkTagHandler extends AbstractMarkupFilter { public static final String AUTOLINK_ID = "_autolink_" ; private ArrayListStack autolinkStatus ; private boolean autolinking = true ; public WicketLinkTagHandler ( ) { } public void setAutomaticLinking ( final boolean enable ) { } public final MarkupElement nextTag ( ) throws ParseException { final ComponentTag tag = ( ( ComponentTag ) ( getParent ( ) . nextTag ( ) ) ) ; if ( tag == null ) { return tag ; } if ( ( ( autolinking ) == true ) && ( ( analyzeAutolinkCondition ( tag ) ) == true ) ) { tag . enableAutolink ( true ) ; tag . setId ( WicketLinkTagHandler . AUTOLINK_ID ) ; tag . setAutoComponentTag ( true ) ; tag . setModified ( true ) ; return tag ; } if ( tag instanceof WicketTag ) { final WicketTag wtag = ( ( WicketTag ) ( tag ) ) ; if ( wtag . isLinkTag ( ) ) { if ( ( tag . isOpen ( ) ) || ( tag . isOpenClose ( ) ) ) { if ( tag . isOpen ( ) ) { if ( ( autolinkStatus ) == null ) { autolinkStatus = new ArrayListStack ( ) ; } <START_BUG> autolinkStatus . push ( new Boolean ( autolinking ) ) ; <END_BUG> } final String autolink = tag . getAttributes ( ) . getString ( "autolink" ) ; try { autolinking = ( Strings . isEmpty ( autolink ) ) || ( Strings . isTrue ( autolink ) ) ; } catch ( StringValueConversionException e ) { throw new WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>autolink<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>\"" + autolink ) + "\"" ) ) ; } } else if ( tag . isClose ( ) ) { autolinking = ( ( Boolean ) ( autolinkStatus . pop ( ) ) ) . booleanValue ( ) ; } return wtag ; } } return tag ; } protected boolean analyzeAutolinkCondition ( final ComponentTag tag ) { } private final boolean checkRef ( String ref ) { } }

Fix:
autolinkStatus . push ( Boolean . valueOf ( autolinking ) ) ;
Buggy code:
public class CompletionOnMemberValueName extends MemberValuePair { public CompletionOnMemberValueName ( char [ ] token , int sourceStart , int sourceEnd ) { } public StringBuffer print ( int indent , StringBuffer output ) { output . append ( "<CompleteOnAttributeName:" ) ; <START_BUG> output . append ( name ) ; <END_BUG> output . append ( '>' ) ; return output ; } }

Fix:
output . append ( this . name ) ;
Buggy code:
public class DatabaseRealmMapping implements RealmMapping { public Principal getPrincipal ( Principal principal ) { } public boolean doesUserHaveRole ( Principal principal , Set roleNames ) { Connection con = null ; if ( roleNames == null ) return false ; try { InitialContext initial = new InitialContext ( ) ; <START_BUG> DataSource ds = ( ( DataSource ) ( initial . lookup ( "SecurityDS" ) ) ) ; <END_BUG> con = ds . getConnection ( ) ; PreparedStatement statement = con . prepareStatement ( "select<seq2seq4repair_space>rolename<seq2seq4repair_space>from<seq2seq4repair_space>sec_roles<seq2seq4repair_space>where<seq2seq4repair_space>principal=?<seq2seq4repair_space>and<seq2seq4repair_space>setname=?" ) ; statement . setString ( 1 , principal . getName ( ) ) ; statement . setString ( 2 , "basic" ) ; ResultSet rs = statement . executeQuery ( ) ; boolean hasRole = false ; while ( ( rs . next ( ) ) && ( ! hasRole ) ) { String roleName = rs . getString ( 1 ) . trim ( ) ; if ( roleNames . contains ( roleName ) ) hasRole = true ; } rs . close ( ) ; statement . close ( ) ; return hasRole ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new EJBException ( e ) ; } finally { try { if ( con != null ) con . close ( ) ; } catch ( Exception e ) { } } } }

Fix:
DataSource ds = ( ( DataSource ) ( initial . lookup ( "java://SecurityDS" ) ) ) ;
Buggy code:
public class PluginService extends BaseModuleService { @ Override protected Class getActivityClass ( ) { } @ Override protected BaseModule newModule ( Notification notification ) { <START_BUG> return new PluginAudioModule ( notification , 1 , 2 ) ; <END_BUG> } @ Override protected String getModuleName ( ) { } }

Fix:
return new PluginAudioModule ( notification , 2 , 2 ) ;
Buggy code:
public class BayesThetaNormalizerReducer extends MapReduceBase implements Reducer < StringTuple , DoubleWritable , StringTuple , DoubleWritable > { private static final Logger log = LoggerFactory . getLogger ( BayesThetaNormalizerReducer . class ) ; private HTable table ; private boolean useHbase ; @ Override public void reduce ( StringTuple key , Iterator < DoubleWritable > values , OutputCollector < StringTuple , DoubleWritable > output , Reporter reporter ) throws IOException { } @ Override public void configure ( JobConf job ) { try { <START_BUG> Parameters params = Parameters . fromString ( job . get ( "bayes.parameters" , "" ) ) ; <END_BUG> if ( params . get ( "dataSource" ) . equals ( "hbase" ) ) { useHbase = true ; } else { return ; } HBaseConfiguration hBconf = new HBaseConfiguration ( job ) ; table = new HTable ( hBconf , job . get ( "output.table" ) ) ; } catch ( IOException e ) { BayesThetaNormalizerReducer . log . error ( "Unexpected<seq2seq4repair_space>error<seq2seq4repair_space>during<seq2seq4repair_space>configuration" , e ) ; } } @ Override public void close ( ) throws IOException { } }

Fix:
Parameters params = new Parameters ( job . get ( "bayes.parameters" , "" ) ) ;
Buggy code:
public class PlaybackBlockChannel implements KeyListener { protected static final float XOFFSET = - 0.025F ; protected static final float STONEWIDTH = 0.05F ; protected static final float [ ] relLocs = new float [ ] { 1.0F // 16 , 2.0F // 16 , 3.0F // 16 , 5.0F // 16 , 6.0F // 16 , 7.0F // 16 , 9.0F // 16 , 10.0F // 16 , 11.0F // 16 , 13.0F // 16 , 14.0F // 16 , 15.0F // 16 } ; protected static final float CAPHEIGHT = 7.0F // 1080 ; public static final float FINALY = 0.8F ; protected static final int FUDGEFRAMES = 20 ; protected float blockScrollRate ; protected boolean [ ] playing ; protected Keyboard curKeys ; protected boolean [ ] curKeyState ; protected List < List < Long > > startFrames ; protected List < List < Long > > endFrames ; protected int [ ] instruments ; protected long curFrame ; protected int [ ] nextEvent ; protected float [ ] currentPoints ; protected boolean [ ] currentlyHitting ; protected int [ ] currentFrames ; protected int [ ] missedFirst ; protected BufferedImage [ ] redImgs ; protected BufferedImage [ ] yelImgs ; protected BufferedImage [ ] bluImgs ; protected BufferedImage [ ] purImgs ; protected BufferedImage [ ] graImgs ; protected BufferedImage [ ] [ ] colImgs ; protected Score [ ] playerScores ; public PlaybackBlockChannel ( float blockScrollRate , boolean [ ] playing , Keyboard curKeys , List < List < Long > > startFrames , List < List < Long > > endFrames , int [ ] instruments , Score [ ] playerScores ) throws IOException { } public void update ( long curFrame ) { } protected boolean startEvent ( int lane ) { } protected void endEvent ( int lane ) { if ( currentlyHitting [ lane ] ) { try { AudioEventPlayer . endNote ( instruments [ ( lane // 3 ) ] , ( lane % 3 ) ) ; } catch ( MidiUnavailableException | InvalidMidiDataException e ) { } long actualEnd = endFrames . get ( lane ) . get ( nextEvent [ lane ] ) . longValue ( ) ; long offset = Math . abs ( ( actualEnd - ( curFrame ) ) ) ; if ( offset < ( PlaybackBlockChannel . FUDGEFRAMES ) ) { ( currentFrames [ lane ] ) ++ ; float multiplier = ( 10 * ( 1 - ( ( offset * 1.0F ) // ( PlaybackBlockChannel . FUDGEFRAMES ) ) ) ) * ( 1 - ( ( ( missedFirst [ lane ] ) * 1.0F ) // ( PlaybackBlockChannel . FUDGEFRAMES ) ) ) ; currentPoints [ lane ] += ( currentFrames [ lane ] ) * multiplier ; <START_BUG> playerScores [ ( lane // 3 ) ] . setScore ( ( ( int ) ( ( ( currentPoints [ ( lane // 3 ) ] ) + ( currentPoints [ ( ( lane // 3 ) + 1 ) ] ) ) + ( currentPoints [ ( ( lane // 3 ) + 2 ) ] ) ) ) ) ; <END_BUG> } currentlyHitting [ lane ] = false ; ( nextEvent [ lane ] ) ++ ; } } public void keyPressed ( KeyEvent e ) { } public void keyReleased ( KeyEvent e ) { } public void keyTyped ( KeyEvent e ) { } public void paintComponent ( Graphics g , int width , int height ) { } No newline ; at end ; of file ; }

Fix:
playerScores [ ( lane // 3 ) ] . setScore ( ( ( int ) ( ( ( currentPoints [ ( 3 * ( lane // 3 ) ) ] ) + ( currentPoints [ ( ( 3 * ( lane // 3 ) ) + 1 ) ] ) ) + ( currentPoints [ ( ( 3 * ( lane // 3 ) ) + 2 ) ] ) ) ) ) ;
Buggy code:
public class MutablePair < L , R > extends Pair < L , R > { private static final long serialVersionUID = 4954918890077093841L ; public L left ; public R right ; public static < L , R > MutablePair < L , R > of ( final L left , final R right ) { } public MutablePair ( ) { } public MutablePair ( final L left , final R right ) { } @ Override public L getLeft ( ) { } public void setLeft ( final L left ) { } @ Override public R getRight ( ) { } public void setRight ( final R right ) { } @ Override public R setValue ( final R value ) { <START_BUG> R result = getRight ( ) ; <END_BUG> setRight ( value ) ; return result ; } }

Fix:
final R result = getRight ( ) ;
Buggy code:
public class TestUmlModelElement extends GenericObjectTestFixture { public TestUmlModelElement ( String arg0 ) { } public void testModelElement ( ) { <START_BUG> Object me = getFactory ( ) . create ( OBJECT ) ; <END_BUG> assertNotNull ( "Didn't<seq2seq4repair_space>create<seq2seq4repair_space>object" , me ) ; assertTrue ( "Should<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>base" , ModelFacade . isABase ( me ) ) ; assertTrue ( "Should<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>model<seq2seq4repair_space>element" , ModelFacade . isAModelElement ( me ) ) ; } protected void initializeTruth ( ) { } }

Fix:
Object me = ModelFacade . getFacade ( ) . create ( OBJECT ) ;
Buggy code:
public class Author { private int id ; private String name ; public Author ( String name ) { } public String getName ( ) { } public int getId ( ) { } @ Override public boolean equals ( Object otherAuthor ) { } public static List < Author > all ( ) { } public void save ( ) { } public static Author find ( int id ) { } public void updateName ( String newName ) { } public void delete ( ) { } public List < Book > getBooks ( ) { try ( Connection con = sql2o . open ( ) ) { <START_BUG> String sql = "SELECT<seq2seq4repair_space>books.id,<seq2seq4repair_space>books.title,<seq2seq4repair_space>books.isCheckedOut<seq2seq4repair_space>FROM<seq2seq4repair_space>books<seq2seq4repair_space>JOIN<seq2seq4repair_space>authors_books<seq2seq4repair_space>ON<seq2seq4repair_space>(books.id<seq2seq4repair_space>=<seq2seq4repair_space>authors_books.book_id)<seq2seq4repair_space>JOIN<seq2seq4repair_space>authors<seq2seq4repair_space>ON<seq2seq4repair_space>(authors_books.author_id<seq2seq4repair_space>=<seq2seq4repair_space>authors.id)<seq2seq4repair_space>WHERE<seq2seq4repair_space>authors.id<seq2seq4repair_space>=<seq2seq4repair_space>:author_id;" ; <END_BUG> List < Book > books = con . createQuery ( sql ) . addParameter ( "author_id" , this . getId ( ) ) . executeAndFetch ( Book . class ) ; return books ; } } }

Fix:
String sql = "SELECT<seq2seq4repair_space>books.id,<seq2seq4repair_space>books.title<seq2seq4repair_space>FROM<seq2seq4repair_space>books<seq2seq4repair_space>JOIN<seq2seq4repair_space>authors_books<seq2seq4repair_space>ON<seq2seq4repair_space>(books.id<seq2seq4repair_space>=<seq2seq4repair_space>authors_books.book_id)<seq2seq4repair_space>JOIN<seq2seq4repair_space>authors<seq2seq4repair_space>ON<seq2seq4repair_space>(authors_books.author_id<seq2seq4repair_space>=<seq2seq4repair_space>authors.id)<seq2seq4repair_space>WHERE<seq2seq4repair_space>authors.id<seq2seq4repair_space>=<seq2seq4repair_space>:author_id;" ;
Buggy code:
public class BlockedJobsDialog extends IconAndMessageDialog { private ProgressTreeViewer viewer ; private String blockedTaskName = null ; private Button cancelSelected ; private Cursor arrowCursor ; private Cursor waitCursor ; private IProgressMonitor blockingMonitor ; private JobTreeElement blockedElement = new BlockedJobsDialog . BlockedUIElement ( ) ; private class BlockedUIElement extends JobTreeElement { Object [ ] getChildren ( ) { } String getDisplayString ( ) { } public Image getDisplayImage ( ) { } Object getParent ( ) { } boolean hasChildren ( ) { } boolean isActive ( ) { } boolean isJobInfo ( ) { } public void cancel ( ) { } public boolean isCancellable ( ) { } } public BlockedJobsDialog ( Shell parentShell , IProgressMonitor blocking , IStatus blockingStatus ) { } protected Control createDialogArea ( Composite parent ) { } void showJobDetails ( Composite parent ) { } private ProgressTreeContentProvider getContentProvider ( ) { } protected Control createButtonBar ( Composite parent ) { } private Button createButton ( Composite parent , String text , SelectionListener listener ) { } private void clearCursors ( ) { } private void clearCursor ( Control control ) { } protected void configureShell ( Shell shell ) { } private void setMessage ( String messageString ) { } protected Image getImage ( ) { <START_BUG> return JFaceResources . getImageRegistry ( ) . get ( DLG_IMG_LOCKED ) ; <END_BUG> } public boolean close ( ) { } public void setBlockedTaskName ( String taskName ) { } }

Fix:
return JFaceResources . getImageRegistry ( ) . get ( DLG_IMG_INFO ) ;
Buggy code:
public class PasswordInputTag extends InputTag { private boolean showPassword = false ; public boolean isShowPassword ( ) { } public void setShowPassword ( boolean showPassword ) { } @ Override protected String getType ( ) { } @ Override protected void writeValue ( TagWriter tagWriter ) throws JspException { if ( this . showPassword ) { super . writeValue ( tagWriter ) ; } else { <START_BUG> tagWriter . writeAttribute ( "value" , "" ) ; <END_BUG> } } }

Fix:
tagWriter . writeAttribute ( "value" , processFieldValue ( getName ( ) , "" , getType ( ) ) ) ;
Buggy code:
public class XWalkWebChromeClient { private Context mContext ; private View mCustomXWalkView ; private XWalkViewInternal mXWalkView ; private XWalkWebChromeClient . CustomViewCallback mCustomViewCallback ; private XWalkContentsClient mContentsClient = null ; private long XWALK_MAX_QUOTA = ( 1024 * 1024 ) * 100 ; private final int INVALID_ORIENTATION = - 2 ; private int mPreOrientation = INVALID_ORIENTATION ; public XWalkWebChromeClient ( XWalkViewInternal view ) { } void setContentsClient ( XWalkContentsClient client ) { } public void onReceivedIcon ( XWalkViewInternal view , Bitmap icon ) { } public interface CustomViewCallback { public void onCustomViewHidden ( ) { } } private Activity addContentView ( View view , XWalkWebChromeClient . CustomViewCallback callback ) { } public void onShowCustomView ( View view , XWalkWebChromeClient . CustomViewCallback callback ) { } public void onShowCustomView ( View view , int requestedOrientation , XWalkWebChromeClient . CustomViewCallback callback ) { } public void onHideCustomView ( ) { Activity activity = mXWalkView . getActivity ( ) ; if ( ( ( mCustomXWalkView ) == null ) || ( activity == null ) ) return ; if ( ( mContentsClient ) != null ) { <START_BUG> mContentsClient . onToggleFullscreen ( true ) ; <END_BUG> } FrameLayout decor = ( ( FrameLayout ) ( activity . getWindow ( ) . getDecorView ( ) ) ) ; decor . removeView ( mCustomXWalkView ) ; mCustomViewCallback . onCustomViewHidden ( ) ; if ( ( ( ( mPreOrientation ) != ( INVALID_ORIENTATION ) ) && ( ( mPreOrientation ) >= ( ActivityInfo . SCREEN_ORIENTATION_UNSPECIFIED ) ) ) && ( ( mPreOrientation ) <= ( ActivityInfo . SCREEN_ORIENTATION_LOCKED ) ) ) { activity . setRequestedOrientation ( mPreOrientation ) ; mPreOrientation = INVALID_ORIENTATION ; } mCustomXWalkView = null ; mCustomViewCallback = null ; } @ SuppressWarnings ( "deprecation" ) public void onExceededDatabaseQuota ( String url , String databaseIdentifier , long quota , long estimatedDatabaseSize , long totalQuota , WebStorage . QuotaUpdater quotaUpdater ) { } @ SuppressWarnings ( "deprecation" ) public void onReachedMaxAppCacheSize ( long requiredStorage , long quota , WebStorage . QuotaUpdater quotaUpdater ) { } public void onGeolocationPermissionsShowPrompt ( String origin , XWalkGeolocationPermissions . Callback callback ) { } public void onGeolocationPermissionsHidePrompt ( ) { } public boolean onJsTimeout ( ) { } @ Deprecated public void onConsoleMessage ( String message , int lineNumber , String sourceID ) { } public boolean onConsoleMessage ( ConsoleMessage consoleMessage ) { } public void getVisitedHistory ( ValueCallback < String [ ] > callback ) { } public void setInstallableWebApp ( ) { } public void setupAutoFill ( Message msg ) { } }

Fix:
mContentsClient . onToggleFullscreen ( false ) ;
Buggy code:
public class StaticServiceModule extends AbstractModule { @ Override protected void configure ( ) { requestStaticInjection ( References . class ) ; requestStaticInjection ( ApplicationInstanceDto . References . class ) ; requestStaticInjection ( CloudDto . References . class ) ; requestStaticInjection ( CloudCredentialDto . References . class ) ; requestStaticInjection ( CommunicationDto . References . class ) ; requestStaticInjection ( CommunicationChannelDto . References . class ) ; requestStaticInjection ( LoginDto . References . class ) ; requestStaticInjection ( FrontendGroupDto . References . class ) ; requestStaticInjection ( HardwareDto . References . class ) ; requestStaticInjection ( ImageDto . References . class ) ; requestStaticInjection ( InstanceDto . References . class ) ; requestStaticInjection ( IpAddressDto . References . class ) ; requestStaticInjection ( LocationDto . References . class ) ; requestStaticInjection ( VirtualMachineDto . References . class ) ; <START_BUG> requestStaticInjection ( VirtualMachineDto . References . class ) ; <END_BUG> requestInjection ( SecuredToken . References . class ) ; requestStaticInjection ( SecuredSessionOrToken . References . class ) ; } }

Fix:
requestStaticInjection ( VirtualMachineTemplateDto . References . class ) ;
Buggy code:
public class CyclicBarrierMain { public static void main ( String [ ] args ) throws InterruptedException { final Random r = new Random ( ) ; <START_BUG> final kushCyclicBarrier barrier = new kushCyclicBarrier ( 4 ) ; <END_BUG> ArrayList < Thread > threads = new ArrayList < Thread > ( ) ; for ( int i = 0 ; i < 16 ; i ++ ) { Thread t = new Thread ( new Runnable ( ) { @ Override public void run ( ) { System . out . println ( "starting..." ) ; try { Thread . sleep ( r . nextInt ( 20 ) ) ; System . out . println ( barrier . await ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } System . out . println ( "got<seq2seq4repair_space>it" ) ; } } ) ; threads . add ( t ) ; } for ( Thread t : threads ) { Thread . sleep ( r . nextInt ( 20 ) ) ; t . start ( ) ; } } }

Fix:
final CyclicBarrier barrier = new CyclicBarrier ( 4 ) ;
Buggy code:
@ JsonIgnoreProperties ( ignoreUnknown = true ) public class MessageListAdapter extends FirebaseListAdapter < MessagesModel > { private static final String LOG = "MListAdapter" ; private static final String FIREBASE_URL = "https:////crackling-heat-9656.firebaseio.com//" ; private Context mContext ; public MessageListAdapter ( Context context , Query ref , Activity activity , int layout ) { } @ Override protected void populateView ( View view , final MessagesModel messageObj , final int i ) { final TextView friendIdText = ( ( TextView ) ( view . findViewById ( messageSender ) ) ) ; TextView messageIdText = ( ( TextView ) ( view . findViewById ( message ) ) ) ; if ( ( messageObj . getFriend ( ) ) != null ) { <START_BUG> String friendName = messageObj . getFriend ( ) . getDisplayName ( ) ; <END_BUG> friendIdText . setText ( ( "From:<seq2seq4repair_space>" + friendName ) ) ; String message = messageObj . getMessage ( ) ; messageIdText . setText ( ( "Message:<seq2seq4repair_space>" + message ) ) ; Log . v ( MessageListAdapter . LOG , ( ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>sender's<seq2seq4repair_space>name:<seq2seq4repair_space>" + friendName ) + "<seq2seq4repair_space>message:<seq2seq4repair_space>" ) + message ) ) ; } } }

Fix:
String friendName = messageObj . getSenderName ( ) ;
Buggy code:
public class RelationRelationMapTableFieldStrategy extends MapTableFieldStrategy { private static final Localizer _loc = Localizer . forPackage ( RelationRelationMapTableFieldStrategy . class ) ; private String _keyRelationName = null ; public Column [ ] getKeyColumns ( ClassMapping cls ) { } public Column [ ] getValueColumns ( ClassMapping cls ) { } public void selectKey ( Select sel , ClassMapping key , OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Joins joins ) { } public void selectValue ( Select sel , ClassMapping val , OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Joins joins ) { } public Result [ ] getResults ( final OpenJPAStateManager sm , final JDBCStore store , final JDBCFetchConfiguration fetch , final int eagerMode , final Joins [ ] resJoins , boolean lrs ) throws SQLException { } public Object loadKey ( OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Result res , Joins joins ) throws SQLException { } public Object loadValue ( OpenJPAStateManager sm , JDBCStore store , JDBCFetchConfiguration fetch , Result res , Joins joins ) throws SQLException { } public Joins joinKeyRelation ( Joins joins , ClassMapping key ) { } public Joins joinValueRelation ( Joins joins , ClassMapping val ) { } public void map ( boolean adapt ) { super . map ( adapt ) ; ValueMapping key = field . getKeyMapping ( ) ; if ( ( ( key . getTypeCode ( ) ) != ( JavaTypes . PC ) ) || ( key . isEmbeddedPC ( ) ) ) throw new MetaDataException ( RelationRelationMapTableFieldStrategy . _loc . get ( "not-relation" , key ) ) ; ValueMapping val = field . getElementMapping ( ) ; if ( ( ( val . getTypeCode ( ) ) != ( JavaTypes . PC ) ) || ( val . isEmbeddedPC ( ) ) ) throw new MetaDataException ( RelationRelationMapTableFieldStrategy . _loc . get ( "not-relation" , val ) ) ; FieldMapping mapped = field . getMappedByMapping ( ) ; DBDictionary dict = field . getMappingRepository ( ) . getDBDictionary ( ) ; String keyName = null ; if ( mapped != null ) { <START_BUG> handleMappedBy ( adapt ) ; <END_BUG> keyName = dict . getValidColumnName ( "vkey" , field . getTable ( ) ) ; } else { field . mapJoin ( adapt , true ) ; mapTypeJoin ( val , "value" , adapt ) ; keyName = dict . getValidColumnName ( "key" , field . getTable ( ) ) ; } mapTypeJoin ( key , keyName , adapt ) ; field . mapPrimaryKey ( adapt ) ; } private void mapTypeJoin ( ValueMapping vm , String name , boolean adapt ) { } public void initialize ( ) { } public void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } private void insert ( OpenJPAStateManager sm , RowManager rm , Map map , JDBCStore store ) throws SQLException { } public void update ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public Joins joinRelation ( Joins joins , boolean forceOuter , boolean traverse ) { } public Joins joinKeyRelation ( Joins joins , boolean forceOuter , boolean traverse ) { } public Object toDataStoreValue ( Object val , JDBCStore store ) { } public Object toKeyDataStoreValue ( Object val , JDBCStore store ) { } }

Fix:
handleMappedByForeignKey ( adapt ) ;
Buggy code:
public class PrimitiveDeserializer { public static Latitude parseLatitude ( ListIterator < String > tokens ) { } public static Longitude parseLongitude ( ListIterator < String > tokens ) { } public static CoordinatesDelta getOrigin ( CoordinatesWorld reference , CoordinatesDelta deltaStart , CoordinatesDelta deltaEnd , double distanceOrigin ) { double halfdistance = ( deltaStart . calculateDistance ( deltaEnd ) ) // 2.0 ; Angle bearing = deltaStart . calculateBearing ( deltaEnd ) ; CoordinatesDelta midPoint = deltaStart . calculateTarget ( bearing , halfdistance ) ; Angle angleToOrigin ; if ( distanceOrigin < 0 ) angleToOrigin = bearing . subtract ( ANGLE_090 ) ; else angleToOrigin = bearing . add ( ANGLE_090 ) ; <START_BUG> double positiveDistance = ( distanceOrigin * distanceOrigin ) // distanceOrigin ; <END_BUG> return midPoint . calculateTarget ( angleToOrigin , positiveDistance ) ; } public static boolean isNextLatitudeLongitude ( ListIterator < String > tokens ) { } public static boolean isNextCoordinatesWorld ( ListIterator < String > tokens ) { } public static CoordinatesWorld parseCoordinatesWorld ( ListIterator < String > tokens ) { } public static CoordinatesDelta parseCoordinatesDelta ( ListIterator < String > tokens ) { } public static boolean isNextAngle ( ListIterator < String > tokens ) { } public static Angle parseAngle ( ListIterator < String > tokens ) { } public static TrackLocator parseTrackLocator ( ListIterator < String > tokens ) { } public static PointLocator parsePointLocator ( ListIterator < String > tokens , A_ParserHelper ph ) { } public static CoordinatesWorld parseReference ( ListIterator < String > tokens , A_ParserHelper ph ) { } public static List < String > parserIDList ( ListIterator < String > tokens ) { } }

Fix:
double positiveDistance = Math . abs ( distanceOrigin ) ;
Buggy code:
public class HttpShardHandlerFactory extends ShardHandlerFactory implements PluginInfoInitialized { protected static Logger log = LoggerFactory . getLogger ( HttpShardHandlerFactory . class ) ; ThreadPoolExecutor commExecutor = new ThreadPoolExecutor ( 0 , Integer . MAX_VALUE , 5 , TimeUnit . SECONDS , new SynchronousQueue < Runnable > ( ) , new DefaultSolrThreadFactory ( "httpShardExecutor" ) ) ; private HttpClient defaultClient ; LBHttpSolrServer loadbalancer ; int soTimeout = 0 ; int connectionTimeout = 0 ; int maxConnectionsPerHost = 20 ; int corePoolSize = 0 ; int maximumPoolSize = Integer . MAX_VALUE ; int keepAliveTime = 5 ; int queueSize = - 1 ; boolean accessPolicy = false ; public String scheme = "http:////" ; final Random r = new Random ( ) ; static final String INIT_URL_SCHEME = "urlScheme" ; static final String INIT_CORE_POOL_SIZE = "corePoolSize" ; static final String INIT_MAX_POOL_SIZE = "maximumPoolSize" ; static final String MAX_THREAD_IDLE_TIME = "maxThreadIdleTime" ; static final String INIT_SIZE_OF_QUEUE = "sizeOfQueue" ; static final String INIT_FAIRNESS_POLICY = "fairnessPolicy" ; public ShardHandler getShardHandler ( ) { } public ShardHandler getShardHandler ( final HttpClient httpClient ) { } public void init ( PluginInfo info ) { } private < T > T getParameter ( NamedList initArgs , String configKey , T defaultValue ) { } @ Override public void close ( ) { try { defaultClient . getConnectionManager ( ) . shutdown ( ) ; } catch ( Throwable e ) { SolrException . log ( HttpShardHandlerFactory . log , e ) ; } try { loadbalancer . shutdown ( ) ; } catch ( Throwable e ) { SolrException . log ( HttpShardHandlerFactory . log , e ) ; } try { <START_BUG> ExecutorUtil . shutdownAndAwaitTermination ( commExecutor ) ; <END_BUG> } catch ( Throwable e ) { SolrException . log ( HttpShardHandlerFactory . log , e ) ; } } }

Fix:
ExecutorUtil . shutdownNowAndAwaitTermination ( commExecutor ) ;
Buggy code:
if ( value != null ) return value ; if ( ( ! ( flattening ) ) && ( ! ( key . startsWith ( "@" ) ) ) ) <START_BUG> domain . warning ( "No<seq2seq4repair_space>translation<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>macro:<seq2seq4repair_space>%s,<seq2seq4repair_space>in<seq2seq4repair_space>%s" , key , domain ) ; <END_BUG>

Fix:
domain . warning ( "No<seq2seq4repair_space>translation<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>macro:<seq2seq4repair_space>%s" , key ) ;
Buggy code:
public class ExecuteJava { private Commandline javaCommand = null ; private Path classpath = null ; private SysProperties sysProperties = null ; public void setClasspath ( Path p ) { } public void setJavaCommand ( Commandline javaCommand ) { } public void setSystemProperties ( CommandlineJava . SysProperties s ) { } public void execute ( Project project ) throws TaskException { final String classname = javaCommand . getExecutable ( ) ; final Object [ ] argument = new Object [ ] { javaCommand . getArguments ( ) } ; AntClassLoader loader = null ; try { if ( ( sysProperties ) != null ) { sysProperties . setSystem ( ) ; } final Class [ ] param = new Class [ ] { Class . forName ( "[Ljava.lang.String;" ) } ; Class target = null ; if ( ( classpath ) == null ) { target = Class . forName ( classname ) ; } else { <START_BUG> loader = new AntClassLoader ( project . getCoreLoader ( ) , project , classpath , false ) ; <END_BUG> loader . setIsolated ( true ) ; loader . setThreadContextLoader ( ) ; target = loader . forceLoadClass ( classname ) ; AntClassLoader . initializeClass ( target ) ; } final Method main = target . getMethod ( "main" , param ) ; main . invoke ( null , argument ) ; } catch ( NullPointerException e ) { throw new TaskException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>main()<seq2seq4repair_space>method<seq2seq4repair_space>in<seq2seq4repair_space>" + classname ) ) ; } catch ( ClassNotFoundException e ) { throw new TaskException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>" + classname ) + ".<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>it<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>classpath" ) ) ; } catch ( InvocationTargetException e ) { Throwable t = e . getTargetException ( ) ; if ( ! ( t instanceof SecurityException ) ) { throw new TaskException ( "Error" , t ) ; } else { throw ( ( SecurityException ) ( t ) ) ; } } catch ( Exception e ) { throw new TaskException ( "Error" , e ) ; } finally { if ( loader != null ) { loader . resetThreadContextLoader ( ) ; loader . cleanup ( ) ; } if ( ( sysProperties ) != null ) { sysProperties . restoreSystem ( ) ; } } } }

Fix:
loader = new AntClassLoader ( Project . class . getClassLoader ( ) , project , classpath , false ) ;
Buggy code:
public class CombinedChartActivity extends DemoBase { private CombinedChart mChart ; private final int itemcount = 12 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; getWindow ( ) . setFlags ( FLAG_FULLSCREEN , FLAG_FULLSCREEN ) ; setContentView ( activity_combined ) ; mChart = ( ( CombinedChart ) ( findViewById ( chart1 ) ) ) ; mChart . setDescription ( "" ) ; mChart . setDrawGridBackground ( false ) ; mChart . setDrawBarShadow ( false ) ; <START_BUG> mChart . setDrawOrder ( new DrawOrder [ ] { DrawOrder . BAR , DrawOrder . LINE , DrawOrder . CANDLE } ) ; <END_BUG> YAxis rightAxis = mChart . getAxisRight ( ) ; rightAxis . setDrawGridLines ( false ) ; YAxis leftAxis = mChart . getAxisLeft ( ) ; leftAxis . setDrawGridLines ( false ) ; XAxis xAxis = mChart . getXAxis ( ) ; xAxis . setPosition ( BOTH_SIDED ) ; CombinedData data = new CombinedData ( mMonths ) ; data . setData ( generateLineData ( ) ) ; data . setData ( generateBarData ( ) ) ; mChart . setData ( data ) ; mChart . invalidate ( ) ; } private LineData generateLineData ( ) { } private BarData generateBarData ( ) { } protected ScatterData generateScatterData ( ) { } protected CandleData generateCandleData ( ) { } private float getRandom ( float range , float startsfrom ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
mChart . setDrawOrder ( new DrawOrder [ ] { DrawOrder . BAR , DrawOrder . LINE } ) ;
Buggy code:
public class SnapshotDeleteHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "delete-snapshot" ; private final ConfigurationPersister persister ; public SnapshotDeleteHandler ( ConfigurationPersister persister ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { String name = operation . require ( NAME ) . asString ( ) ; try { persister . deleteSnapshot ( name ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } catch ( Exception e ) { throw new OperationFailedException ( e . getMessage ( ) , new ModelNode ( ) . set ( e . getMessage ( ) ) ) ; } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class XPathAssertionGui extends AbstractAssertionGui { private XPathPanel xpath ; private XMLConfPanel xml ; public XPathAssertionGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public String getXPathAttributesTitle ( ) { } public void configure ( TestElement el ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; JPanel sizePanel = new JPanel ( new BorderLayout ( ) ) ; sizePanel . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 10 , 10 ) ) ; sizePanel . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , getXPathAttributesTitle ( ) ) ) ; xpath = new XPathPanel ( ) ; sizePanel . add ( xpath ) ; xml = new XMLConfPanel ( ) ; xml . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , JMeterUtils . getResString ( "xpath_assertion_option" ) ) ) ; add ( xml ) ; add ( sizePanel ) ; } public void modifyTestElement ( TestElement el ) { } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;