nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TimeSortTest extends CleanupHelper { @ Test public void testMixedSources ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testTimeSort ( ) throws IOException , InterruptedException , ExecutionException { Table table = Table . open ( "Keyspace1" ) ; ColumnFamilyStore cfStore = table . getColumnFamilyStore ( "StandardLong1" ) ; for ( int i = 900 ; i < 1000 ; ++ i ) { <START_BUG> RowMutation rm = new RowMutation ( "Keyspace1" , ByteBuffer . wrap ( Integer . toString ( i ) . getBytes ( ) ) ) ; <END_BUG> for ( int j = 0 ; j < 8 ; ++ j ) { rm . add ( new QueryPath ( "StandardLong1" , null , Util . getBytes ( ( j * 2 ) ) ) , ByteBufferUtil . bytes ( "a" ) , ( j * 2 ) ) ; } rm . apply ( ) ; } validateTimeSort ( table ) ; cfStore . forceBlockingFlush ( ) ; validateTimeSort ( table ) ; DecoratedKey key = Util . dk ( "900" ) ; RowMutation rm = new RowMutation ( "Keyspace1" , key . key ) ; for ( int j = 0 ; j < 4 ; ++ j ) { rm . add ( new QueryPath ( "StandardLong1" , null , Util . getBytes ( ( ( j * 2 ) + 1 ) ) ) , ByteBufferUtil . bytes ( "b" ) , ( ( j * 2 ) + 1 ) ) ; } rm . apply ( ) ; rm = new RowMutation ( "Keyspace1" , key . key ) ; rm . add ( new QueryPath ( "StandardLong1" , null , Util . getBytes ( 0 ) ) , ByteBufferUtil . bytes ( "c" ) , 100 ) ; rm . add ( new QueryPath ( "StandardLong1" , null , Util . getBytes ( 10 ) ) , ByteBufferUtil . bytes ( "c" ) , 100 ) ; rm . apply ( ) ; ColumnFamily cf = cfStore . getColumnFamily ( key , new QueryPath ( "StandardLong1" ) , Util . getBytes ( 0 ) , EMPTY_BYTE_BUFFER , false , 1000 ) ; Collection < IColumn > columns = cf . getSortedColumns ( ) ; assertEquals ( 12 , columns . size ( ) ) ; Iterator < IColumn > iter = columns . iterator ( ) ; IColumn column ; for ( int j = 0 ; j < 8 ; j ++ ) { column = iter . next ( ) ; assert column . name ( ) . equals ( Util . getBytes ( j ) ) ; } TreeSet < ByteBuffer > columnNames = new TreeSet < ByteBuffer > ( LongType . instance ) ; columnNames . add ( Util . getBytes ( 10 ) ) ; columnNames . add ( Util . getBytes ( 0 ) ) ; cf = cfStore . getColumnFamily ( QueryFilter . getNamesFilter ( Util . dk ( "900" ) , new QueryPath ( "StandardLong1" ) , columnNames ) ) ; assert "c" . equals ( new String ( cf . getColumn ( Util . getBytes ( 0 ) ) . value ( ) . array ( ) ) ) ; assert "c" . equals ( new String ( cf . getColumn ( Util . getBytes ( 10 ) ) . value ( ) . array ( ) ) ) ; } private void validateTimeSort ( Table table ) throws IOException { } }

Fix:
RowMutation rm = new RowMutation ( "Keyspace1" , ByteBufferUtil . bytes ( Integer . toString ( i ) ) ) ;
Buggy code:
public class RootSubsystemOperationsTestCase extends AbstractOperationsTestCase { private final String msg = "Test<seq2seq4repair_space>message<seq2seq4repair_space>" ; @ Before public void clearLogDir ( ) { } @ Override protected void standardSubsystemTest ( final String configId ) throws Exception { } @ Override protected AdditionalInitialization createAdditionalInitialization ( ) { <START_BUG> return LoggingTestEnvironment . getManagementInstance ( ) ; <END_BUG> } @ Override protected String getSubsystemXml ( ) throws IOException { } @ Test public void testListLogFiles ( ) throws Exception { } @ Test public void testReadLogFile ( ) throws Exception { } private void checkLogLines ( final List < String > logLines , final int start ) { } private Logger getLogger ( ) { } static void deleteRecursively ( final File dir ) { } }

Fix:
return LoggingTestEnvironment . get ( ) ;
Buggy code:
public interface InternalNucleusUser extends NucleusUser { void setLastLogin ( Instant login ) { } void removeLocationOnLogin ( ) { } void setLastLogout ( Instant logout ) { } List < MailData > getMail ( ) { } void addMail ( MailData mailData ) { } <START_BUG> void clearMail ( ) ; <END_BUG> boolean isFlyingSafe ( ) { } void setJailData ( JailData data ) { } void removeJailData ( ) { } void setOnLogout ( ) { } Optional < Location < World > > getLocationOnLogin ( ) { } void sendToLocationOnLogin ( Location < World > worldLocation ) { } boolean jailOnNextLogin ( ) { } void setJailOnNextLogin ( boolean set ) { } Map < String , Instant > getKitLastUsedTime ( ) { } void addKitLastUsedTime ( String kitName , Instant lastTime ) { } void removeKitLastUsedTime ( String kitName ) { } Map < String , List < String > > getPowertools ( ) { } void setPowertool ( ItemType type , List < String > commands ) { } void clearPowertool ( ItemType type ) { } void clearPowertool ( String type ) { } Optional < MuteData > getMuteData ( ) { } void setMuteData ( MuteData data ) { } void removeMuteData ( ) { } boolean isSocialSpy ( ) { } boolean setSocialSpy ( boolean socialSpy ) { } }

Fix:
boolean clearMail ( ) ;
Buggy code:
public class SignatureView extends ViewPart { private TableViewer viewer ; public static final String ID = "org.eclipse.wst.xml.security.ui.SignatureView" ; private Clipboard clipboard = null ; public void setInput ( final ArrayList < VerificationResult > results ) { } public void dispose ( ) { } public void createPartControl ( final Composite parent ) { } private void initCopyAndPaste ( ) { } private boolean setClipboardData ( ) { } private VerificationResult getSelectedItem ( ) { } private void initContextMenu ( ) { } private void contributeToActionBars ( ) { } private void hookDoubleClickAction ( ) { viewer . addDoubleClickListener ( new IDoubleClickListener ( ) { public void doubleClick ( final DoubleClickEvent event ) { VerificationResult result = getSelectedItem ( ) ; if ( result != null ) { <START_BUG> Verification . showVerificationResult ( result , getSite ( ) . getShell ( ) ) ; <END_BUG> } } } ) ; } public void setFocus ( ) { } private void updateViewInfo ( final ArrayList < VerificationResult > results ) { } public TableViewer getSignaturesViewer ( ) { } }

Fix:
Verification . showVerificationResult ( result ) ;
Buggy code:
@ Entity @ Table ( name = "passanger" , schema = "srt" , catalog = "" ) public class PassangerEntity { private int idPassanger ; private String firstname ; private String lastname ; private Date birthday ; public PassangerEntity ( ) { } public PassangerEntity ( String firstname , String lastname , Date birthday ) { } @ Id @ GeneratedValue ( strategy = GenerationType . IDENTITY ) @ Column ( name = "idPassanger" ) public int getIdPassanger ( ) { } public void setIdPassanger ( int idPassanger ) { } @ Basic @ Column ( name = "firstname" ) public String getFirstname ( ) { } public void setFirstname ( String firstname ) { } @ Basic @ Column ( name = "lastname" ) public String getLastname ( ) { } public void setLastname ( String lastname ) { } @ Temporal ( TemporalType . DATE ) @ Column ( name = "birthday" ) public Date getBirthday ( ) { } public void setBirthday ( Date birthday ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( "\nPassangerEntity{" + "idPassanger=" ) + ( idPassanger ) ) + ",<seq2seq4repair_space>firstname='" ) + ( firstname ) ) + '\'' ) + ",<seq2seq4repair_space>lastname='" ) + ( lastname ) ) + '\'' ) + ",<seq2seq4repair_space>birthday=" ) + ( birthday ) ) + '}' ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( ( ( ( "PassangerEntity{" + "idPassanger=" ) + ( idPassanger ) ) + ",<seq2seq4repair_space>firstname='" ) + ( firstname ) ) + '\'' ) + ",<seq2seq4repair_space>lastname='" ) + ( lastname ) ) + '\'' ) + ",<seq2seq4repair_space>birthday=" ) + ( birthday ) ) + '}' ;
Buggy code:
public class CppStylePerfPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { private FileFieldEditor clangFormatPath = null ; private FileFieldEditor cpplintPath = null ; private BooleanFieldEditor enableCpplintOnSave = null ; private BooleanFieldEditor enableClangFormatOnSave = null ; public CppStylePerfPage ( ) { } public void createFieldEditors ( ) { <START_BUG> clangFormatPath = new FileFieldEditor ( CppStyleConstants . CLANG_FORMAT_PATH , "Chang-format<seq2seq4repair_space>path:" , getFieldEditorParent ( ) ) ; <END_BUG> addField ( clangFormatPath ) ; cpplintPath = new FileFieldEditor ( CppStyleConstants . CPPLINT_PATH , "Cpplint<seq2seq4repair_space>path:" , getFieldEditorParent ( ) ) ; addField ( cpplintPath ) ; enableCpplintOnSave = new BooleanFieldEditor ( CppStyleConstants . ENABLE_CPPLINT_ON_SAVE , CppStyleConstants . ENABLE_CPPLINT_TEXT , getFieldEditorParent ( ) ) ; if ( ! ( checkPathExist ( CppCodeFormatter . getCpplintPath ( ) ) ) ) { enableCpplintOnSave . setEnabled ( false , getFieldEditorParent ( ) ) ; } addField ( enableCpplintOnSave ) ; enableClangFormatOnSave = new BooleanFieldEditor ( CppStyleConstants . ENABLE_CLANGFORMAT_ON_SAVE , CppStyleConstants . ENABLE_CLANGFORMAT_TEXT , getFieldEditorParent ( ) ) ; if ( ! ( checkPathExist ( CppCodeFormatter . getClangFormatPath ( ) ) ) ) { enableClangFormatOnSave . setEnabled ( false , getFieldEditorParent ( ) ) ; } addField ( enableClangFormatOnSave ) ; } public void init ( IWorkbench workbench ) { } @ Override public void propertyChange ( PropertyChangeEvent event ) { } private boolean checkPathExist ( String path ) { } private void clangFormatPathChange ( String newPath ) { } private void cpplintPathChange ( String newPath ) { } No newline ; at end ; of file ; }

Fix:
clangFormatPath = new FileFieldEditor ( CppStyleConstants . CLANG_FORMAT_PATH , "Clang-format<seq2seq4repair_space>path:" , getFieldEditorParent ( ) ) ;
Buggy code:
public class AnalyzeMessageAction extends AbstractColumbaAction implements SelectionListener { public AnalyzeMessageAction ( FrameMediator frameMediator ) { } public void selectionChanged ( SelectionChangedEvent e ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new AnalyzeMessageCommand ( r ) ) ; } }

Fix:
FolderCommandReference r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class ManifestAttachmentProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnitContext = phaseContext . getDeploymentUnit ( ) ; Manifest manifest = deploymentUnitContext . getAttachment ( MANIFEST ) ; if ( manifest != null ) return ; <START_BUG> final VirtualFile deploymentRoot = deploymentUnitContext . getAttachment ( DEPLOYMENT_ROOT ) ; <END_BUG> try { manifest = VFSUtils . getManifest ( deploymentRoot ) ; if ( manifest != null ) deploymentUnitContext . putAttachment ( MANIFEST , manifest ) ; } catch ( IOException e ) { throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>manifest<seq2seq4repair_space>for<seq2seq4repair_space>deployment<seq2seq4repair_space>" + deploymentRoot ) , e ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final VirtualFile deploymentRoot = deploymentUnitContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
public final class BookmarkablePageLink extends Link { private static final long serialVersionUID = 2396751463296314926L ; private final Class pageClass ; private final PageParameters parameters ; public BookmarkablePageLink ( final String id , final Class pageClass ) { } public BookmarkablePageLink ( final String id , final Class pageClass , final PageParameters parameters ) { } public boolean linksTo ( final Page page ) { } public void onClick ( ) { } public BookmarkablePageLink setParameter ( final String property , final int value ) { } public BookmarkablePageLink setParameter ( final String property , final long value ) { } public BookmarkablePageLink setParameter ( final String property , final String value ) { } protected String getURL ( ) { <START_BUG> return getRequestCycle ( ) . urlFor ( pageClass , parameters ) ; <END_BUG> } }

Fix:
return getPage ( ) . urlFor ( pageClass , parameters ) ;
Buggy code:
public class ParallelMethodTest { public static class Example { @ Test public void one ( ) throws InterruptedException { } @ Test public void two ( ) throws InterruptedException { } } @ Test public void testsRunInParallel ( ) { long start = System . currentTimeMillis ( ) ; <START_BUG> Result result = JUnitCore . runClasses ( ParallelExecutioner . methods ( ) , ParallelMethodTest . Example . class ) ; <END_BUG> Assert . assertTrue ( result . wasSuccessful ( ) ) ; long end = System . currentTimeMillis ( ) ; Assert . assertThat ( ( end - start ) , greaterThan ( 1000 ) ) ; } private Matcher < Long > greaterThan ( final long l ) { } }

Fix:
Result result = JUnitCore . runClasses ( ParallelComputer . methods ( ) , ParallelMethodTest . Example . class ) ;
Buggy code:
public class RaiseToteToMiddleLvl extends Command { public RaiseToteToMiddleLvl ( ) { } @ Override protected void initialize ( ) { } @ Override protected void execute ( ) { <START_BUG> toteLift . liftTote ( ) ; <END_BUG> } @ Override protected boolean isFinished ( ) { } @ Override protected void end ( ) { } @ Override protected void interrupted ( ) { } }

Fix:
toteLift . raiseTote ( ) ;
Buggy code:
@ XStreamAlias ( "Period" ) public class Period extends AbstractPersistable implements Labeled { private Day day ; private Timeslot timeslot ; public Day getDay ( ) { } public void setDay ( Day day ) { } public Timeslot getTimeslot ( ) { } public void setTimeslot ( Timeslot timeslot ) { } public String getLabel ( ) { <START_BUG> return ( ( day . getLabel ( ) ) + "-" ) + ( timeslot . getLabel ( ) ) ; <END_BUG> } @ Override public String toString ( ) { } }

Fix:
return ( ( day . getLabel ( ) ) + "<seq2seq4repair_space>" ) + ( timeslot . getLabel ( ) ) ;
Buggy code:
public class RecoveredBlock extends RecoveredStatement implements BaseTypes , CompilerModifiers , TerminalTokens { public Block blockDeclaration ; public RecoveredStatement [ ] statements ; public int statementCount ; public boolean preserveContent = false ; public RecoveredLocalVariable pendingArgument ; public RecoveredBlock ( Block block , RecoveredElement parent , int bracketBalance ) { } public RecoveredElement add ( Block nestedBlockDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( LocalDeclaration localDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( LocalDeclaration localDeclaration , int bracketBalanceValue , boolean delegatedByParent ) { } public RecoveredElement add ( Statement stmt , int bracketBalanceValue ) { } public RecoveredElement add ( Statement stmt , int bracketBalanceValue , boolean delegatedByParent ) { } public RecoveredElement add ( TypeDeclaration typeDeclaration , int bracketBalanceValue ) { } public RecoveredElement add ( TypeDeclaration typeDeclaration , int bracketBalanceValue , boolean delegatedByParent ) { } void attach ( RecoveredStatement recoveredStatement ) { } public AstNode parseTree ( ) { } public String toString ( int tab ) { StringBuffer result = new StringBuffer ( tabString ( tab ) ) ; result . append ( "Recovered<seq2seq4repair_space>block:\n" ) ; <START_BUG> result . append ( blockDeclaration . toString ( ( tab + 1 ) ) ) ; <END_BUG> if ( ( this . statements ) != null ) { for ( int i = 0 ; i < ( this . statementCount ) ; i ++ ) { result . append ( "\n" ) ; result . append ( this . statements [ i ] . toString ( ( tab + 1 ) ) ) ; } } return result . toString ( ) ; } public Block updatedBlock ( ) { } public Statement updatedStatement ( ) { } public RecoveredElement updateOnClosingBrace ( int braceStart , int braceEnd ) { } public RecoveredElement updateOnOpeningBrace ( int currentPosition ) { } public void updateParseTree ( ) { } public Statement updateStatement ( ) { } public RecoveredElement add ( FieldDeclaration fieldDeclaration , int bracketBalanceValue ) { } }

Fix:
blockDeclaration . print ( ( tab + 1 ) , result ) ;
Buggy code:
public abstract class AjaxLazyLoadPanel extends Panel { private static final String LAZY_LOAD_COMPONENT_ID = "content" ; private static final long serialVersionUID = 1L ; private byte state = 0 ; public AjaxLazyLoadPanel ( final String id ) { } public AjaxLazyLoadPanel ( final String id , final IModel < ? > model ) { } protected void handleCallbackScript ( final IHeaderResponse response , final String callbackScript ) { } @ Override protected void onBeforeRender ( ) { } private void setState ( byte state ) { } public abstract Component getLazyLoadComponent ( String markupId ) { } public Component getLoadingComponent ( final String markupId ) { IRequestHandler handler = new org . apache . wicket . request . handler . resource . ResourceReferenceRequestHandler ( AbstractDefaultAjaxBehavior . INDICATOR ) ; <START_BUG> return new org . apache . wicket . markup . html . basic . Label ( markupId , ( ( "<img<seq2seq4repair_space>src=\"" + ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . renderUrlFor ( handler ) ) ) + "\"//>" ) ) . setEscapeModelStrings ( false ) ; <END_BUG> } }

Fix:
return new org . apache . wicket . markup . html . basic . Label ( markupId , ( ( "<img<seq2seq4repair_space>alt=\"Loading...\"<seq2seq4repair_space>src=\"" + ( org . apache . wicket . request . cycle . RequestCycle . get ( ) . renderUrlFor ( handler ) ) ) + "\"//>" ) ) . setEscapeModelStrings ( false ) ;
Buggy code:
public class MapDyads extends CommandLineTool { private static final Logger log = Logger . getLogger ( MapDyads . class ) ; @ Parameter ( names = { "-i" , "--input" } , description = "Input<seq2seq4repair_space>file<seq2seq4repair_space>(reads)" , required = true ) public IntervalFile < ? extends Interval > inputFile ; @ Parameter ( names = { "-s" , "--size" } , description = "Mononucleosome<seq2seq4repair_space>length<seq2seq4repair_space>(default:<seq2seq4repair_space>read<seq2seq4repair_space>length)" ) public Integer nucleosomeSize ; @ Parameter ( names = { "-a" , "--assembly" } , description = "Genome<seq2seq4repair_space>assembly" , required = true ) public Assembly assembly ; @ Parameter ( names = { "-o" , "--output" } , description = "Output<seq2seq4repair_space>file<seq2seq4repair_space>(Wig)" , required = true ) public Path outputFile ; @ Override public void run ( ) throws IOException { MapDyads . log . debug ( "Initializing<seq2seq4repair_space>output<seq2seq4repair_space>file" ) ; int mapped = 0 ; try ( BufferedWriter writer = Files . newBufferedWriter ( outputFile , Charset . defaultCharset ( ) ) ) { TrackHeader header = new TrackHeader ( "wiggle_0" ) ; header . setName ( ( "Converted<seq2seq4repair_space>" + ( inputFile . getPath ( ) . getFileName ( ) ) ) ) ; header . setDescription ( ( "Converted<seq2seq4repair_space>" + ( inputFile . getPath ( ) . getFileName ( ) ) ) ) ; writer . write ( header . toString ( ) ) ; writer . newLine ( ) ; for ( String chr : assembly ) { MapDyads . log . debug ( ( "Processing<seq2seq4repair_space>chromosome<seq2seq4repair_space>" + chr ) ) ; writer . write ( ( ( "fixedStep<seq2seq4repair_space>chrom=" + chr ) + "<seq2seq4repair_space>start=1<seq2seq4repair_space>step=1<seq2seq4repair_space>span=1" ) ) ; writer . newLine ( ) ; int start = 1 ; while ( start < ( assembly . getChrLength ( chr ) ) ) { int stop = Math . min ( ( ( start + ( DEFAULT_CHUNK_SIZE ) ) - 1 ) , assembly . getChrLength ( chr ) ) ; int length = ( stop - start ) + 1 ; int [ ] count = new int [ length ] ; Iterator < ? extends Interval > it = inputFile . query ( chr , start , stop ) ; while ( it . hasNext ( ) ) { Interval entry = it . next ( ) ; int center ; if ( ( ( nucleosomeSize ) == null ) || ( ( nucleosomeSize ) == ( - 1 ) ) ) { center = ( entry . center ( ) ) - start ; } else { center = ( ( entry . getStart ( ) ) + ( nucleosomeSize ) ) - start ; } if ( ( start <= center ) && ( center <= stop ) ) { <START_BUG> ( count [ center ] ) ++ ; <END_BUG> mapped ++ ; } } for ( int i = 0 ; i < ( count . length ) ; i ++ ) { writer . write ( Integer . toString ( count [ i ] ) ) ; writer . newLine ( ) ; } start = stop + 1 ; } } } MapDyads . log . info ( ( ( "Mapped<seq2seq4repair_space>" + mapped ) + "<seq2seq4repair_space>reads" ) ) ; } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
( count [ ( center - start ) ] ) ++ ;
Buggy code:
class test { public static void main ( String [ ] a ) { <START_BUG> System . out . println ( 1 ) ; <END_BUG> } }

Fix:
System . out . println ( 10 ) ;
Buggy code:
public class OvalComposite extends Composite implements PaintListener { static final int [ ] TOP_LEFT_CORNER = new int [ ] { 0 , 2 , 1 , 1 , 2 , 0 } ; private int orientation ; private Color interiorColor ; public OvalComposite ( Composite parent , int orientation ) { } public void setOrientation ( int orientation ) { } public void paintControl ( PaintEvent e ) { GC gc = e . gc ; Color color = e . display . getSystemColor ( COLOR_WIDGET_NORMAL_SHADOW ) ; gc . setForeground ( color ) ; if ( ( interiorColor ) != null ) { gc . setBackground ( interiorColor ) ; } Shape shape = new Shape ( ( ( OvalComposite . TOP_LEFT_CORNER . length ) + 2 ) ) ; IntAffineMatrix rotation = IntAffineMatrix . getRotation ( orientation ) ; rotation = rotation . multiply ( ROT_180 ) ; Point size = getSize ( ) ; if ( ! ( Geometry . isHorizontal ( orientation ) ) ) { Geometry . flipXY ( size ) ; } shape . add ( 0 , size . y ) ; shape . add ( new Shape ( OvalComposite . TOP_LEFT_CORNER ) ) ; shape . add ( IntAffineMatrix . translation ( ( ( size . x ) - 3 ) , 0 ) . multiply ( FLIP_YAXIS ) , shape . reverse ( ) ) ; Point rawSize = getSize ( ) ; Point adjust = new Point ( 0 , 0 ) ; switch ( orientation ) { case SWT . TOP : adjust = rawSize ; break ; case SWT . LEFT : adjust = new Point ( ( ( rawSize . x ) - 1 ) , 0 ) ; break ; case SWT . RIGHT : adjust = new Point ( 0 , ( ( rawSize . y ) - 3 ) ) ; break ; } Shape targetShape = IntAffineMatrix . translation ( adjust . x , adjust . y ) . multiply ( rotation ) . transform ( shape ) ; int [ ] shapeArray = targetShape . getData ( ) ; if ( ( interiorColor ) != null ) { gc . fillPolygon ( shapeArray ) ; } <START_BUG> gc . drawPolygon ( shapeArray ) ; <END_BUG> } public Rectangle getClientArea ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public Color getInteriorColor ( ) { } public void setInteriorColor ( Color interiorColor ) { } }

Fix:
gc . drawPolyline ( shapeArray ) ;
Buggy code:
public class MParse extends Task { private Path classpath = null ; private Path sourcepath = null ; private File metahome = null ; private File target = null ; private boolean verbose = false ; private boolean debugparser = false ; private boolean debugscanner = false ; private boolean cleanup = false ; private CommandlineJava cmdl = new CommandlineJava ( ) ; private File optionsFile = null ; public MParse ( ) { } protected static final File createTmpFile ( ) { } public void setCleanup ( boolean value ) { } public void setDebugparser ( boolean flag ) { } public void setDebugscanner ( boolean flag ) { } public void setMaxmemory ( String max ) { } public void setMetamatahome ( File metamatahome ) { } public void setTarget ( File target ) { } public void setVerbose ( boolean flag ) { } public Path createClasspath ( ) { } public Argument createJvmarg ( ) { } public Path createSourcepath ( ) { } public void execute ( ) throws TaskException { } protected void setUp ( ) throws TaskException { } protected File [ ] getMetamataLibs ( ) { } protected String [ ] getOptions ( ) { } protected void _execute ( ExecuteStreamHandler handler ) throws TaskException { String pathname = target . getAbsolutePath ( ) ; int pos = ( pathname . length ( ) ) - ( ".jj" . length ( ) ) ; pathname = ( pathname . substring ( 0 , pos ) ) + ".java" ; File javaFile = new File ( pathname ) ; if ( ( javaFile . exists ( ) ) && ( ( target . lastModified ( ) ) < ( javaFile . lastModified ( ) ) ) ) { getLogger ( ) . info ( ( ( "Target<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>build<seq2seq4repair_space>-<seq2seq4repair_space>skipping<seq2seq4repair_space>(" + ( target ) ) + ")" ) ) ; return ; } final Execute process = new Execute ( handler ) ; <START_BUG> log ( cmdl . toString ( ) , MSG_VERBOSE ) ; <END_BUG> process . setCommandline ( cmdl . getCommandline ( ) ) ; try { if ( ( process . execute ( ) ) != 0 ) { throw new TaskException ( "Metamata<seq2seq4repair_space>task<seq2seq4repair_space>failed." ) ; } } catch ( IOException e ) { throw new TaskException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>launch<seq2seq4repair_space>Metamata<seq2seq4repair_space>task:<seq2seq4repair_space>" + e ) ) ; } } protected void checkOptions ( ) throws TaskException { } protected void cleanUp ( ) { } protected ExecuteStreamHandler createStreamHandler ( ) { } protected void generateOptionsFile ( File tofile , String [ ] options ) throws TaskException { } }

Fix:
getLogger ( ) . debug ( cmdl . toString ( ) ) ;
Buggy code:
public class CanReadFileFilter extends AbstractFileFilter implements Serializable { public static final IOFileFilter CAN_READ = new CanReadFileFilter ( ) ; public static final IOFileFilter CANNOT_READ = new NotFileFilter ( CanReadFileFilter . CAN_READ ) ; public static final IOFileFilter READ_ONLY = new AndFileFilter ( CanReadFileFilter . CAN_READ , CanWriteFileFilter . CANNOT_WRITE ) ; protected CanReadFileFilter ( ) { } @ Override <START_BUG> public boolean accept ( File file ) { <END_BUG> return file . canRead ( ) ; } }

Fix:
public boolean accept ( final File file ) {
Buggy code:
public class DnsActivity extends BaseDnsActivity { String [ ] openingHoursHouse = new String [ ] { "10.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "10.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "10.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "10.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "10.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "12.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "12.00<seq2seq4repair_space>-<seq2seq4repair_space>20.00" } ; String [ ] openingHoursGB = new String [ ] { "13.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "13.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "13.00<seq2seq4repair_space>-<seq2seq4repair_space>01.00" , "13.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "13.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "16.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "Stengt" } ; String [ ] openingHoursBC = new String [ ] { "19.00<seq2seq4repair_space>-<seq2seq4repair_space>00.00" , "19.00<seq2seq4repair_space>-<seq2seq4repair_space>00.00" , "19.00<seq2seq4repair_space>-<seq2seq4repair_space>00.00" , "19.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "19.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "20.00<seq2seq4repair_space>-<seq2seq4repair_space>03.00" , "Stengt" } ; @ Override public void onCreate ( Bundle savedInstanceState ) { } public void setupFocus ( ) { } public void programButton ( View v ) { Intent intent = new Intent ( ) ; intent . setFlags ( ( ( Intent . FLAG_ACTIVITY_REORDER_TO_FRONT ) | ( Intent . FLAG_ACTIVITY_SINGLE_TOP ) ) ) ; <START_BUG> intent . setClass ( this , ProgramListActivity . class ) ; <END_BUG> startActivity ( intent ) ; } public void ticketButton ( View v ) { } public void newsButton ( View v ) { } public void joinButton ( View v ) { } No newline ; at end ; of file ; }

Fix:
intent . setClass ( this , EventListActivity . class ) ;
Buggy code:
public class GameBoardGUI extends JPanel { public HandGUI P1 ; public HandGUI P2 ; public HandGUI P3 ; public HandGUI P4 ; public JPanel decks = new JPanel ( ) ; public CardGUI MainDeck ; public CardGUI DicardedDeck ; private boolean P1hasDrawnCard = false ; public GameBoardGUI ( ) throws IOException { } private void initUI ( ) throws IOException { setLayout ( new BorderLayout ( ) ) ; CardGUI card ; P1 = new HandGUI ( true ) ; for ( int i = 0 ; i < 6 ; i ++ ) { card = new CardGUI ( null , true ) ; P1 . add ( card ) ; } P3 = new HandGUI ( true ) ; for ( int i = 0 ; i < 6 ; i ++ ) { card = new CardGUI ( null , true ) ; P3 . add ( card ) ; } P2 = new HandGUI ( false ) ; for ( int i = 0 ; i < 6 ; i ++ ) { card = new CardGUI ( null , false ) ; P2 . add ( card ) ; } P4 = new HandGUI ( false ) ; for ( int i = 0 ; i < 6 ; i ++ ) { card = new CardGUI ( null , false ) ; P4 . add ( card ) ; } decks = new JPanel ( ) ; decks . setLayout ( new GridBagLayout ( ) ) ; MainDeck = new CardGUI ( null , true ) ; decks . add ( MainDeck ) ; <START_BUG> DicardedDeck = new CardGUI ( new _3_2Game . Card ( suits . diamonds , ranks . _10 ) , true ) ; <END_BUG> decks . add ( DicardedDeck ) ; decks . setOpaque ( false ) ; this . add ( P1 , BorderLayout . SOUTH ) ; this . add ( P3 , BorderLayout . NORTH ) ; this . add ( P2 , BorderLayout . WEST ) ; this . add ( P4 , BorderLayout . EAST ) ; this . add ( decks , BorderLayout . CENTER ) ; setMinimumSize ( new Dimension ( 430 , 430 ) ) ; setBackground ( Color . orange ) ; } public void setEventListener ( Game gm ) { } public static void main ( String [ ] args ) { } void setEventListener ( Player_Client player ) { } }

Fix:
DicardedDeck = new CardGUI ( null , true ) ;
Buggy code:
public class ResultEvaluator { private String originalText ; private String finalText ; private final boolean debug = false ; private int fp ; private int fn ; private int tp ; private int tn ; private int originalTextIndex ; private int finalTextIndex ; private boolean calculated ; public ResultEvaluator ( String originalText , String newText ) { } public ResultEvaluator ( ) { } public void evaluate ( ) throws IOException { } private void calculate ( ) { } public double getPrecision ( ) { if ( ! ( calculated ) ) calculate ( ) ; <START_BUG> return ( ( tp ) * 1.0 ) // ( ( fp ) + ( fn ) ) ; <END_BUG> } public double getRecall ( ) { } public static void main ( String [ ] args ) throws IOException { } }

Fix:
return ( ( tp ) * 1.0 ) // ( ( tp ) + ( fp ) ) ;
Buggy code:
@ RunWith ( MockitoJUnitRunner . class ) public class DailyMSTUpdaterTest { private static final String ALL_CURRENCIES = ResourceManager . allCurrencies ( ) ; private static final List < String > FULL_LIST_OF_CURRENCIES = ResourceManager . toList ( DailyMSTUpdaterTest . ALL_CURRENCIES ) ; @ Mock private RESTClient client ; @ Mock private MSTService mstService ; @ Mock private JsonUtils utils ; @ InjectMocks private DailyMSTUpdater mstUpdater ; @ Mock private CalculatedGraphs calculatedGraphs ; @ Test public void checkIfRESTClientIsProperlyCalled ( ) { mstUpdater . run ( ) ; <START_BUG> verify ( client ) . sendGetRequest ( eq ( ( "http:////front-comparator.rhcloud.com//rest//mst?type=ask&range=1&currencies=" + ( DailyMSTUpdaterTest . ALL_CURRENCIES ) ) ) ) ; <END_BUG> } @ Test public void checkIfMSTisCreatedBasedOnReceivedData ( ) throws IOException { } @ Test public void checkIfCalculatedGraphIsPutToCache ( ) { } private JsonArray timeSeries ( ) { } No newline ; at end ; of file ; }

Fix:
verify ( client ) . sendGetRequest ( eq ( ( "http:////cc-comparator.rhcloud.com//rest//mst?type=ask&range=1&currencies=" + ( DailyMSTUpdaterTest . ALL_CURRENCIES ) ) ) ) ;
Buggy code:
public class Pose implements Transmittable { public Pose ( ) { } public Pose ( float x , float y , float heading ) { } public void rotateUpdate ( float angle ) { } public void moveUpdate ( float distance ) { } public void translate ( float dx , float dy ) { } public void arcUpdate ( float distance , float turnAngle ) { } public float angleTo ( Point destination ) { } public float relativeBearing ( Point destination ) { } public float distanceTo ( Point destination ) { } public Point pointAt ( float distance , float bearing ) { } public float getHeading ( ) { } public float getX ( ) { } public float getY ( ) { } public Point getLocation ( ) { } public void setLocation ( Point p ) { } public void setLocation ( float x , float y ) { } public void setHeading ( float heading ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( "X" + ( _location . x ) ) + "<seq2seq4repair_space>Y" ) + ( _location . y ) ) + "<seq2seq4repair_space>H" ) + ( _heading ) ; <END_BUG> } public void dumpObject ( DataOutputStream dos ) throws IOException { } public void loadObject ( DataInputStream dis ) throws IOException { } protected Point _location ; protected float _heading ; }

Fix:
return ( ( ( ( "X:" + ( _location . x ) ) + "<seq2seq4repair_space>Y:" ) + ( _location . y ) ) + "<seq2seq4repair_space>H:" ) + ( _heading ) ;
Buggy code:
@ RestController ( "//api" ) public class TempCodeRestController { private static Log LOG = LogFactory . getLog ( TempCodeRestController . class ) ; @ Autowired private TempCodeService tempCodeService ; @ RequestMapping ( value = "//codes//{game}//temp//all" , produces = "application//json" , method = RequestMethod . GET ) public Map < String , Object > allTemps ( @ PathVariable ( "game" ) String game ) { Map < String , Object > model = this . createModelFromTempCodeList ( tempCodeService . findAllTempCodes ( ) ) ; <START_BUG> model . put ( "game" . game ) ; <END_BUG> return model ; } @ RequestMapping ( value = "//codes//temp//all" , produces = "application//json" ) public Map < String , Object > allTemps ( ) { } @ RequestMapping ( value = "//codes//temp//valid" , produces = "application//json" ) public Map < String , Object > validTemps ( ) { } private Map < String , Object > createModelFromTempCodeList ( List < TempCode > tempCodes ) { } private static class Code { public String code ; public long expiresMillis ; public String expiresFormatted ; } @ RequestMapping ( value = "//codes//temp//add" , consumes = "application//json" , method = { RequestMethod . POST , RequestMethod . PUT } ) @ ResponseStatus ( HttpStatus . CREATED ) public ResponseEntity < ? > twUkTempCodeWebHook ( @ RequestBody LinkedHashMap < String , Object > inputMap ) { } public static DateTime combineDateAndTime ( String dateStr , String timeStr ) { } private static DateTime determineDate ( String dateStr ) { } private static DateTime determineTime ( String timeStr ) { } No newline ; at end ; of file ; }

Fix:
model . put ( "game" , game ) ;
Buggy code:
public class SimpleSubsystemExtension implements Extension { public static final String NAMESPACE = "urn:mycompany:mysubsystem:1.0" ; public static final String SUBSYSTEM_NAME = "mysubsystem" ; private final SimpleSubsystemExtension . SubsystemParser parser = new SimpleSubsystemExtension . SubsystemParser ( ) ; @ Override public void initializeParsers ( ExtensionParsingContext context ) { } @ Override public void initialize ( ExtensionContext context ) { <START_BUG> final SubsystemRegistration subsystem = context . registerSubsystem ( SimpleSubsystemExtension . SUBSYSTEM_NAME , 1 , 0 ) ; <END_BUG> final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( SUBSYSTEM ) ; registration . registerOperationHandler ( ADD , INSTANCE , SUBSYSTEM_ADD , false ) ; registration . registerOperationHandler ( DESCRIBE , SimpleSubsystemExtension . SubsystemDescribeHandler . INSTANCE , SimpleSubsystemExtension . SubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; registration . registerOperationHandler ( REMOVE , SimpleSubsystemRemove . INSTANCE , SUBSYSTEM_REMOVE , false ) ; subsystem . registerXMLElementWriter ( parser ) ; } private static ModelNode createAddSubsystemOperation ( ) { } private static class SubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } } private static class SubsystemDescribeHandler implements OperationStepHandler , DescriptionProvider { static final SimpleSubsystemExtension . SubsystemDescribeHandler INSTANCE = new SimpleSubsystemExtension . SubsystemDescribeHandler ( ) ; public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } } }

Fix:
final SubsystemRegistration subsystem = context . registerSubsystem ( SimpleSubsystemExtension . SUBSYSTEM_NAME , 1 , 0 , 0 ) ;
Buggy code:
public class IssueManager extends BaseIssueManager implements CacheListener { private static final String ISSUE = "Issue" ; protected static final String GET_ISSUE_BY_ID = "getIssueById" ; public IssueManager ( ) throws TorqueException { } public static Issue getIssueById ( String id , String defaultCode ) { } public static Issue getIssueById ( String id ) { } public static Issue getIssueById ( Issue . FederatedId fid ) { <START_BUG> return getManager ( ) . getIssueByIdImpl ( fid ) ; <END_BUG> } public static Issue getIssueByIdImpl ( Issue . FederatedId fid ) { } protected Persistent putInstanceImpl ( Persistent om ) throws TorqueException { } protected void registerAsListener ( ) { } public void addedObject ( Persistent om ) { } public void refreshedObject ( Persistent om ) { } public List getInterestedFields ( ) { } }

Fix:
return IssueManager . getIssueByIdImpl ( fid ) ;
Buggy code:
public class SearchWithSortTask extends ReadTask { private boolean doScore = true ; private boolean doMaxScore = true ; private Sort sort ; public SearchWithSortTask ( PerfRunData runData ) { } @ Override public void setParams ( String sortField ) { super . setParams ( sortField ) ; String [ ] fields = sortField . split ( "," ) ; SortField [ ] sortFields = new SortField [ fields . length ] ; int upto = 0 ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { String field = fields [ i ] ; SortField sortField0 ; if ( field . equals ( "doc" ) ) { sortField0 = SortField . FIELD_DOC ; <START_BUG> } <END_BUG> if ( field . equals ( "score" ) ) { sortField0 = SortField . FIELD_SCORE ; } else if ( field . equals ( "noscore" ) ) { doScore = false ; continue ; } else if ( field . equals ( "nomaxscore" ) ) { doMaxScore = false ; continue ; } else { int index = field . lastIndexOf ( ":" ) ; String fieldName ; String typeString ; if ( index != ( - 1 ) ) { fieldName = field . substring ( 0 , index ) ; typeString = field . substring ( ( 1 + index ) , field . length ( ) ) ; } else { throw new RuntimeException ( "You<seq2seq4repair_space>must<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>sort<seq2seq4repair_space>type<seq2seq4repair_space>ie<seq2seq4repair_space>page:int,subject:string" ) ; } int type = getType ( typeString ) ; sortField0 = new SortField ( fieldName , type ) ; } sortFields [ ( upto ++ ) ] = sortField0 ; } if ( upto < ( sortFields . length ) ) { SortField [ ] newSortFields = new SortField [ upto ] ; System . arraycopy ( sortFields , 0 , newSortFields , 0 , upto ) ; sortFields = newSortFields ; } this . sort = new Sort ( sortFields ) ; } private int getType ( String typeString ) { } @ Override public boolean supportsParams ( ) { } @ Override public QueryMaker getQueryMaker ( ) { } @ Override public boolean withRetrieve ( ) { } @ Override public boolean withSearch ( ) { } @ Override public boolean withTraverse ( ) { } @ Override public boolean withWarm ( ) { } @ Override public boolean withScore ( ) { } @ Override public boolean withMaxScore ( ) { } @ Override public Sort getSort ( ) { } }

Fix:
} else
Buggy code:
public class Literal { private Variable var ; public Variable getVar ( ) { } private boolean negated ; public boolean isSat ( ) { <START_BUG> return ( var . getValue ( ) ) != ( negated ) ; <END_BUG> } public String toString ( ) { } public Literal ( Variable var , boolean negated ) { } }

Fix:
return ( var . getIsTrue ( ) ) != ( negated ) ;
Buggy code:
public class ReadVerbHandler implements IVerbHandler { protected static class ReadContext { protected ByteArrayInputStream bufIn_ ; protected DataOutputBuffer bufOut_ = new DataOutputBuffer ( ) ; } private static Logger logger_ = Logger . getLogger ( ReadVerbHandler . class ) ; private static ThreadLocal < ReadVerbHandler . ReadContext > tls_ = new InheritableThreadLocal < ReadVerbHandler . ReadContext > ( ) ; protected static ReadVerbHandler . ReadContext getCurrentReadContext ( ) { } protected static void setCurrentReadContext ( ReadVerbHandler . ReadContext readContext ) { } public void doVerb ( Message message ) { byte [ ] body = message . getMessageBody ( ) ; ReadVerbHandler . ReadContext readCtx = ReadVerbHandler . tls_ . get ( ) ; if ( readCtx == null ) { readCtx = new ReadVerbHandler . ReadContext ( ) ; ReadVerbHandler . tls_ . set ( readCtx ) ; } readCtx . bufIn_ = new ByteArrayInputStream ( body ) ; try { if ( instance . isBootstrapMode ( ) ) { throw new RuntimeException ( "Cannot<seq2seq4repair_space>service<seq2seq4repair_space>reads<seq2seq4repair_space>while<seq2seq4repair_space>bootstrapping!" ) ; } ReadCommand command = ReadCommand . serializer ( ) . deserialize ( new DataInputStream ( readCtx . bufIn_ ) ) ; Table table = Table . open ( command . table ) ; Row row = command . getRow ( table ) ; ReadResponse readResponse ; if ( command . isDigestQuery ( ) ) { if ( ReadVerbHandler . logger_ . isDebugEnabled ( ) ) ReadVerbHandler . logger_ . debug ( ( "digest<seq2seq4repair_space>is<seq2seq4repair_space>" + ( FBUtilities . bytesToHex ( ColumnFamily . digest ( row . cf ) ) ) ) ) ; readResponse = new ReadResponse ( ColumnFamily . digest ( row . cf ) ) ; } else { readResponse = new ReadResponse ( row ) ; } readResponse . setIsDigestQuery ( command . isDigestQuery ( ) ) ; readCtx . bufOut_ . reset ( ) ; ReadResponse . serializer ( ) . serialize ( readResponse , readCtx . bufOut_ ) ; byte [ ] bytes = new byte [ readCtx . bufOut_ . getLength ( ) ] ; System . arraycopy ( readCtx . bufOut_ . getData ( ) , 0 , bytes , 0 , bytes . length ) ; Message response = message . getReply ( FBUtilities . getLocalAddress ( ) , bytes ) ; if ( ReadVerbHandler . logger_ . isDebugEnabled ( ) ) ReadVerbHandler . logger_ . debug ( ( ( ( ( ( "Read<seq2seq4repair_space>key<seq2seq4repair_space>" + ( command . key ) ) + ";<seq2seq4repair_space>sending<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( message . getMessageId ( ) ) ) + "@" ) + ( message . getFrom ( ) ) ) ) ; MessagingService . instance . sendOneWay ( response , message . getFrom ( ) ) ; if ( ( message . getHeader ( DO_REPAIR ) ) != null ) { <START_BUG> List < InetAddress > endpoints = instance . getLiveNaturalEndpoints ( command . key ) ; <END_BUG> endpoints . remove ( FBUtilities . getLocalAddress ( ) ) ; if ( ( ( endpoints . size ( ) ) > 0 ) && ( DatabaseDescriptor . getConsistencyCheck ( ) ) ) instance . doConsistencyCheck ( row , endpoints , command ) ; } } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } } }

Fix:
List < InetAddress > endpoints = instance . getLiveNaturalEndpoints ( command . table , command . key ) ;
Buggy code:
public class ManifestTask extends Task { public final String VALID_ATTRIBUTE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345679-_" ; private Manifest nestedManifest = new Manifest ( ) ; private File manifestFile ; private ManifestTask . Mode mode ; private String encoding ; public static class Mode extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public ManifestTask ( ) { } public void addConfiguredSection ( Manifest . Section section ) throws ManifestException { } public void addConfiguredAttribute ( Manifest . Attribute attribute ) throws ManifestException { } private void checkAttribute ( Manifest . Attribute attribute ) throws BuildException { String name = attribute . getName ( ) ; char ch = name . charAt ( 0 ) ; if ( ( ch == '-' ) || ( ch == '_' ) ) { <START_BUG> throw new BuildException ( ( ( "Manifest<seq2seq4repair_space>attribute<seq2seq4repair_space>names<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>'" + ch ) + "'<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>begin." ) ) ; <END_BUG> } for ( int i = 0 ; i < ( name . length ( ) ) ; i ++ ) { ch = name . charAt ( i ) ; if ( ( VALID_ATTRIBUTE_CHARS . indexOf ( ch ) ) < 0 ) { throw new BuildException ( ( ( "Manifest<seq2seq4repair_space>attribute<seq2seq4repair_space>names<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>'" + ch ) + "'" ) ) ; } } } public void setFile ( File f ) { } public void setEncoding ( String encoding ) { } public void setMode ( ManifestTask . Mode m ) { } public void execute ( ) throws BuildException { } }

Fix:
throw new BuildException ( ( ( "Manifest<seq2seq4repair_space>attribute<seq2seq4repair_space>names<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>start<seq2seq4repair_space>with<seq2seq4repair_space>'" + ch ) + "'." ) ) ;
Buggy code:
public abstract class AbstractTestObject extends BulkTest { public static final int COLLECTIONS_MAJOR_VERSION = 3 ; public AbstractTestObject ( String testName ) { } public abstract Object makeObject ( ) { } public boolean supportsEmptyCollections ( ) { } public boolean supportsFullCollections ( ) { } public boolean isTestSerialization ( ) { } public boolean isEqualsCheckable ( ) { } public void testObjectEqualsSelf ( ) { } public void testEqualsNull ( ) { } public void testObjectHashCodeEqualsSelfHashCode ( ) { } public void testObjectHashCodeEqualsContract ( ) { } protected Object serializeDeserialize ( Object obj ) throws Exception { } public void testSerializeDeserializeThenCompare ( ) throws Exception { } public void testSimpleSerialization ( ) throws Exception { Object o = makeObject ( ) ; if ( ( o instanceof Serializable ) && ( isTestSerialization ( ) ) ) { byte [ ] objekt = writeExternalFormToBytes ( ( ( Serializable ) ( o ) ) ) ; <START_BUG> Object p = readExternalFormFromBytes ( objekt ) ; <END_BUG> } } public void testCanonicalEmptyCollectionExists ( ) { } public void testCanonicalFullCollectionExists ( ) { } public String getCompatibilityVersion ( ) { } protected String getCanonicalEmptyCollectionName ( Object object ) { } protected String getCanonicalFullCollectionName ( Object object ) { } protected void writeExternalFormToDisk ( Serializable o , String path ) throws IOException { } protected byte [ ] writeExternalFormToBytes ( Serializable o ) throws IOException { } protected Object readExternalFormFromDisk ( String path ) throws IOException , ClassNotFoundException { } protected Object readExternalFormFromBytes ( byte [ ] b ) throws IOException , ClassNotFoundException { } protected boolean skipSerializedCanonicalTests ( ) { } private Object readExternalFormFromStream ( InputStream stream ) throws IOException , ClassNotFoundException { } private void writeExternalFormToStream ( Serializable o , OutputStream stream ) throws IOException { } }

Fix:
readExternalFormFromBytes ( objekt ) ;
Buggy code:
public class TestDetachmentOneMany extends TestCase { private OpenJPAEntityManagerFactory emf ; @ SuppressWarnings ( "unchecked" ) public void setUp ( ) { String types = ( ( DetachmentOneManyParent . class . getName ( ) ) + ";" ) + ( DetachmentOneManyChild . class . getName ( ) ) ; <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + types ) + ")" ) ) ; emf = ( ( OpenJPAEntityManagerFactory ) ( Persistence . createEntityManagerFactory ( "test" , props ) ) ) ; } public void tearDown ( ) { } public void testDetachment ( ) { } public void testFetchWithDetach ( ) { } public void testFetchWithDetachForToOneRelationship ( ) { } private long createParentAndChildren ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;