nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ModuleResolvePhaseService implements Service < ModuleResolvePhaseService > { public static final ServiceName SERVICE_NAME = JBOSS . append ( "module" , "resolve" , "phase" ) ; private final ModuleIdentifier moduleIdentifier ; private final Set < ModuleIdentifier > alreadyResolvedModules ; private final int phaseNumber ; private final Set < ModuleDefinition > moduleSpecs = Collections . synchronizedSet ( new HashSet < ModuleDefinition > ( ) ) ; public ModuleResolvePhaseService ( final ModuleIdentifier moduleIdentifier , final Set < ModuleIdentifier > alreadyResolvedModules , final int phaseNumber ) { } public ModuleResolvePhaseService ( final ModuleIdentifier moduleIdentifier ) { } @ Override public void start ( final StartContext startContext ) throws StartException { } public static void installService ( final ServiceTarget serviceTarget , final ModuleDefinition moduleDefinition ) { } private static void installService ( final ServiceTarget serviceTarget , final ModuleIdentifier moduleIdentifier , int phaseNumber , final Set < ModuleDependency > nextPhaseIdentifiers , final Set < ModuleIdentifier > nextAlreadySeen ) { } @ Override public void stop ( final StopContext stopContext ) { } @ Override public ModuleResolvePhaseService getValue ( ) throws IllegalArgumentException , IllegalStateException { } public Set < ModuleDefinition > getModuleSpecs ( ) { } public static ServiceName moduleSpecServiceName ( ModuleIdentifier identifier , int phase ) { if ( ! ( ServiceModuleLoader . isDynamicModule ( identifier ) ) ) { <START_BUG> MESSAGES . missingModulePrefix ( identifier , MODULE_PREFIX ) ; <END_BUG> } return ModuleResolvePhaseService . SERVICE_NAME . append ( identifier . getName ( ) ) . append ( identifier . getSlot ( ) ) . append ( ( "" + phase ) ) ; } }

Fix:
throw MESSAGES . missingModulePrefix ( identifier , MODULE_PREFIX ) ;
Buggy code:
public class SwitchToHardwareWalletUseCase extends AbstractFestUseCase { public SwitchToHardwareWalletUseCase ( FrameFixture window ) { } @ Override public void execute ( Map < String , Object > parameters ) { <START_BUG> HardwareWalletEventFixtures . newAttachUseCase ( ) ; <END_BUG> HardwareWalletEventFixtures . fireNextEvent ( ) ; Uninterruptibles . sleepUninterruptibly ( 1 , TimeUnit . SECONDS ) ; assertLabelContainsValue ( "alert_message_label" , STANDARD_LABEL ) ; window . button ( YES . getKey ( ) ) . click ( ) ; pauseForWalletSwitch ( ) ; window . label ( TREZOR_UNLOCK_TITLE . getKey ( ) ) . requireVisible ( ) ; } }

Fix:
HardwareWalletEventFixtures . prepareAttachUseCaseEvents ( ) ;
Buggy code:
public class TestPropertiesMethods extends SingleEMFTestCase { OpenJPAEntityManager em ; public void setUp ( ) throws Exception { } public void testEMGetProperties ( ) { Map < String , Object > emProperties = em . getProperties ( ) ; String autoClear = ( ( String ) ( emProperties . get ( "openjpa.AutoClear" ) ) ) ; assertEquals ( String . valueOf ( CLEAR_DATASTORE ) , autoClear ) ; <START_BUG> String javaxConnectionDriver = ( ( String ) ( emProperties . get ( "javax.persistence.jdbc.driver" ) ) ) ; <END_BUG> assertNotNull ( javaxConnectionDriver ) ; String openjpaConnectionURL = ( ( String ) ( emProperties . get ( "openjpa.ConnectionURL" ) ) ) ; assertNotNull ( openjpaConnectionURL ) ; boolean javaxUserNameExists = emProperties . containsKey ( "javax.persistence.jdbc.user" ) ; assertTrue ( javaxUserNameExists ) ; boolean openjpaUserNameExists = emProperties . containsKey ( "openjpaConnectionUserName" ) ; assertFalse ( openjpaUserNameExists ) ; em . setAutoClear ( ALL ) ; emProperties = em . getProperties ( ) ; autoClear = ( ( String ) ( emProperties . get ( "openjpa.AutoClear" ) ) ) ; assertEquals ( String . valueOf ( CLEAR_ALL ) , autoClear ) ; boolean javaxPasswordExists = emProperties . containsKey ( "javax.persistence.jdbc.password" ) ; assertFalse ( javaxPasswordExists ) ; boolean openjpaPasswordExists = emProperties . containsKey ( "openjpa.ConnectionPassword" ) ; assertFalse ( openjpaPasswordExists ) ; Value autoClearValue = emf . getConfiguration ( ) . getValue ( "AutoClear" ) ; assertNotNull ( autoClearValue ) ; autoClearValue . addEquivalentKey ( "javax.persistence.AutoClear" ) ; emProperties = em . getProperties ( ) ; assertFalse ( emProperties . containsKey ( "openjpa.AutoClear" ) ) ; assertTrue ( emProperties . containsKey ( "javax.persistence.AutoClear" ) ) ; } public void testEMFGetProperties ( ) { } public void testEMFGetSupportedProperties ( ) { } public void testEMGetSupportedProperties ( ) { } }

Fix:
String javaxConnectionDriver = ( ( String ) ( emProperties . get ( "openjpa.ConnectionDriverName" ) ) ) ;
Buggy code:
public class Test_org_eclipse_swt_widgets_DirectoryDialog extends Test_org_eclipse_swt_widgets_Dialog { public Test_org_eclipse_swt_widgets_DirectoryDialog ( String name ) { } public static void main ( String [ ] args ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test_ConstructorLorg_eclipse_swt_widgets_Shell ( ) { <START_BUG> DirectoryDialog dd = new DirectoryDialog ( shell ) ; <END_BUG> try { new DirectoryDialog ( null ) ; fail ( "No<seq2seq4repair_space>exception<seq2seq4repair_space>thrown<seq2seq4repair_space>for<seq2seq4repair_space>null<seq2seq4repair_space>parent" ) ; } catch ( IllegalArgumentException e ) { } } public void test_ConstructorLorg_eclipse_swt_widgets_ShellI ( ) { } public void test_getFilterPath ( ) { } public void test_getMessage ( ) { } public void test_open ( ) { } public void test_setFilterPathLjava_lang_String ( ) { } public void test_setMessageLjava_lang_String ( ) { } public static Test suite ( ) { } public static Vector methodNames ( ) { } protected void runTest ( ) throws Throwable { } DirectoryDialog dirDialog ; }

Fix:
new DirectoryDialog ( shell ) ;
Buggy code:
@ ActionID ( category = "File" , id = "org.desert.core.actions.NewRTFile" ) @ ActionRegistration ( iconBase = "org//desert//core//images//NewFile.png" , displayName = "#CTL_NewRTFile" ) @ ActionReferences ( { @ ActionReference ( path = "Menu//File" , position = 5 ) , @ ActionReference ( path = "Toolbars//File" , position = 5 ) } ) @ Messages ( "CTL_NewRTFile=New<seq2seq4repair_space>RT<seq2seq4repair_space>File" ) public final class NewRTFile implements ActionListener { public NewRTFile ( AllClosedCookie context ) { } @ Override public void actionPerformed ( ActionEvent ev ) { RTFileFilter rtFF = new RTFileFilter ( ) ; <START_BUG> File toAdd = FileOperationsHelper . openFileDialog ( rtFF ) ; <END_BUG> if ( toAdd != null ) { if ( ! ( rtFF . accept ( toAdd ) ) ) { toAdd = new File ( ( ( toAdd . getAbsolutePath ( ) ) + ".rt" ) ) ; } try { FileObject fO = FileUtil . createData ( toAdd ) ; DataObject . find ( fO ) . getLookup ( ) . lookup ( OpenCookie . class ) . open ( ) ; } catch ( DataObjectNotFoundException ex ) { Exceptions . printStackTrace ( ex ) ; } catch ( IOException ex ) { Exceptions . printStackTrace ( ex ) ; } } } }

Fix:
File toAdd = FileOperationsHelper . saveFileDialog ( rtFF ) ;
Buggy code:
public class TestMain { private static final String TAG = "JParserUtil.TestMain" ; public static void main ( String [ ] args ) { <START_BUG> String dir = "test" ; <END_BUG> JavaFileScanner fileScanner = new JavaFileScanner ( dir ) ; try { CodeInfo codeInfo = fileScanner . scanAllJavaSources ( ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; Log . e ( TestMain . TAG , e . getMessage ( ) ) ; } } }

Fix:
String dir = "testsource" ;
Buggy code:
public class Player { private final Texture tex = new Texture ( "player.png" ) ; private final Sprite player = new Sprite ( tex ) ; private int x = 0 ; private final int y = 35 ; private int score = 0 ; private short lives = 3 ; private Bullet bullet = null ; private final int screenMiddle ; public Player ( int screenMiddle ) { } public void setX ( int direction ) { } public void reset ( ) { } public boolean kill ( ) { } public void fire ( ) { if ( ( bullet ) == null ) { <START_BUG> bullet = new Bullet ( x , y ) ; <END_BUG> } } public void updateScore ( int award ) { } public int getScore ( ) { } public void draw ( Batch b ) { } public Bullet getBullet ( ) { } }

Fix:
bullet = new Bullet ( ( ( x ) + 16 ) , y ) ;
Buggy code:
public abstract class BaseSecurityIntegrationTest extends BaseContainerTest { protected final String port = System . getProperty ( "containerPort" ) ; protected final String appEndpoint = System . getProperty ( "appEndpoint" ) ; protected final String appWarPath = System . getProperty ( "appWarPath" ) ; protected final String mockOauthServerWarPath = System . getProperty ( "mockOauthServerWarPath" ) ; protected final String mockOauthKey = "123" ; protected final String mockOauthSecret = "456" ; protected final String mockSfdcEndpoint = ( "localhost:" + ( port ) ) + "//force-mock-oauth-server-app" ; protected final String forceUrlPropName = "integrationserver.url" ; protected final String mockAuthCode = "789" ; protected final String useMockApi = "mockapi" ; protected String sfdcEndpoint ; public String username ; public String password ; protected String oauthKey ; protected String oauthSecret ; @ Override @ BeforeSuite public void suiteSetup ( ) throws Exception { } @ BeforeClass public void classSetup ( ) throws IOException { } @ Override public String getZipInstallerUrl ( ) { <START_BUG> return "http:////www.gtlib.gatech.edu//pub//apache//tomcat//tomcat-6//v6.0.33//bin//apache-tomcat-6.0.33.zip" ; <END_BUG> } @ Override public String getContainerId ( ) { } public String getJMockitPath ( ) { } @ Override public Map < String , String > getConfigProps ( ) { } @ Override public Map < String , String > getContainerProps ( ) throws IOException { } protected void loadProps ( ) throws IOException { } public void assertResponseStatus ( HttpResponse response , int status , String description ) { } public Map < String , String > convertUrlParamsToMap ( String url ) { } }

Fix:
return "http:////dbdotcom-sdk-test.s3.amazonaws.com//apache-tomcat-6.0.35.zip" ;
Buggy code:
public class BatchRemoveLineHandler extends CommandHandlerWithHelp { public BatchRemoveLineHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandFormatException { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch." ) ; return ; } Batch batch = batchManager . getActiveBatch ( ) ; final int batchSize = batch . size ( ) ; if ( batchSize == 0 ) { ctx . printLine ( "The<seq2seq4repair_space>batch<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; return ; } <START_BUG> List < String > arguments = ctx . getParsedArguments ( ) . getOtherProperties ( ) ; <END_BUG> if ( arguments . isEmpty ( ) ) { ctx . printLine ( "Missing<seq2seq4repair_space>line<seq2seq4repair_space>number." ) ; return ; } if ( ( arguments . size ( ) ) != 1 ) { ctx . printLine ( ( "Expected<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>argument<seq2seq4repair_space>-<seq2seq4repair_space>the<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>but<seq2seq4repair_space>received:<seq2seq4repair_space>" + arguments ) ) ; return ; } String intStr = arguments . get ( 0 ) ; int lineNumber ; try { lineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( lineNumber < 1 ) || ( lineNumber > batchSize ) ) { ctx . printLine ( ( ( ( lineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } batch . remove ( ( lineNumber - 1 ) ) ; } @ Override public boolean hasArgument ( int index ) { } }

Fix:
List < String > arguments = ctx . getParsedCommandLine ( ) . getOtherProperties ( ) ;
Buggy code:
class InvocationCancellationMessageHandler extends AbstractMessageHandler { private static final Logger logger = Logger . getLogger ( InvocationCancellationMessageHandler . class ) ; private final RemoteAsyncInvocationCancelStatusService remoteAsyncInvocationCancelStatus ; InvocationCancellationMessageHandler ( final RemoteAsyncInvocationCancelStatusService asyncInvocationCancelStatus ) { } @ Override public void processMessage ( ChannelAssociation channelAssociation , InputStream inputStream ) throws IOException { final DataInputStream input = new DataInputStream ( inputStream ) ; final short invocationToCancel = input . readShort ( ) ; final CancellationFlag cancellationFlag = this . remoteAsyncInvocationCancelStatus . getCancelStatus ( invocationToCancel ) ; if ( cancellationFlag == null ) { return ; } cancellationFlag . set ( true ) ; <START_BUG> InvocationCancellationMessageHandler . logger . debug ( ( ( "Invocation<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>" + invocationToCancel ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>cancelled,<seq2seq4repair_space>as<seq2seq4repair_space>requested" ) ) ; <END_BUG> } }

Fix:
InvocationCancellationMessageHandler . logger . debugf ( "Invocation<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>%s<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>cancelled,<seq2seq4repair_space>as<seq2seq4repair_space>requested" , invocationToCancel ) ;
Buggy code:
public class PrintMessageCommand extends Command { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.command" ) ; private cPrintObject mailHeader ; private cPrintObject mailFooter ; private DateFormat mailDateFormat ; private String [ ] headerKeys = new String [ ] { "From" , "To" , "Date" , "Subject" } ; private String dateHeaderKey = "Date" ; private String attHeaderKey = "attachment" ; private Charset charset ; private MimeHeader bodyHeader ; private InputStream bodyStream ; public PrintMessageCommand ( ICommandReference reference , Charset charset ) { } public cPrintObject getMailHeader ( ) { } public cPrintObject getMailFooter ( ) { } public String [ ] getHeaderKeys ( ) { } public DateFormat getMailDateFormat ( ) { } public void updatedGUI ( ) throws Exception { } public void execute ( WorkerStatusController worker ) throws Exception { } private cPrintObject getPlainBodyPrintObject ( ) throws IOException { } protected boolean isScalingAllowed ( ) { } private cPrintObject getHTMLBodyPrintObject ( ) throws IOException { } private String getDecodedMessageBody ( ) throws IOException { int encoding = bodyHeader . getContentTransferEncoding ( ) ; switch ( encoding ) { case MimeHeader . QUOTED_PRINTABLE : { bodyStream = new QuotedPrintableDecoderInputStream ( bodyStream ) ; break ; } case MimeHeader . BASE64 : { bodyStream = new Base64DecoderInputStream ( bodyStream ) ; break ; } } if ( ( charset ) == null ) { try { charset = Charset . forName ( bodyHeader . getContentParameter ( "charset" ) ) ; } catch ( Exception ex ) { charset = Charset . forName ( System . getProperty ( "file.encoding" ) ) ; } } bodyStream = new CharsetDecoderInputStream ( bodyStream , charset ) ; <START_BUG> return StreamUtils . readInString ( bodyStream ) . toString ( ) ; <END_BUG> } private void setupMessageBodyPart ( Object uid , AbstractMessageFolder srcFolder , WorkerStatusController worker ) throws Exception { } }

Fix:
return StreamUtils . readCharacterStream ( bodyStream ) . toString ( ) ;
Buggy code:
public class SolveControl { public static void startSolve ( ArrayList < EquationNode > list ) { int length = list . size ( ) ; int fractionCount = MathOperations . countFractions ( list ) ; SolvedEquation solvedEquation ; long startTime = System . currentTimeMillis ( ) ; if ( fractionCount == length ) solvedEquation = FractionSolver . startFractionSolver ( list ) ; else if ( fractionCount > 0 ) solvedEquation = PolynomialSolver . startPolynomialSolverWithFractions ( list ) ; else solvedEquation = PolynomialSolver . startPolynomialSolver ( list ) ; long endTime = System . currentTimeMillis ( ) ; <START_BUG> if ( ( solvedEquation . getSolutionSet ( ) . size ( ) ) != 0 ) { <END_BUG> SolveControl . printSolutionSet ( solvedEquation ) ; System . out . println ( ) ; System . out . println ( ( ( "It<seq2seq4repair_space>took<seq2seq4repair_space>" + ( endTime - startTime ) ) + "<seq2seq4repair_space>milliseconds<seq2seq4repair_space>to<seq2seq4repair_space>solve" ) ) ; System . out . println ( ) ; } else { System . out . println ( "No<seq2seq4repair_space>solution<seq2seq4repair_space>found,<seq2seq4repair_space>or<seq2seq4repair_space>no<seq2seq4repair_space>solution<seq2seq4repair_space>exists" ) ; System . out . println ( ) ; } } public static void printSolutionSet ( SolvedEquation solvedEquation ) { } }

Fix:
if ( ( ( solvedEquation . getSolutionSet ( ) . size ( ) ) != 0 ) && ( ( MathOperations . countNominalsWithVars ( list ) ) > 0 ) ) {
Buggy code:
public class DataConnect { public static Connection getConnection ( ) { try { Class . forName ( "com.mysql.jdbc.Driver" ) ; <START_BUG> Connection con = DriverManager . getConnection ( "jdbc:mysql:////localhost:3306//mybike" , "root" , "hujia1995" ) ; <END_BUG> return con ; } catch ( Exception ex ) { System . out . println ( ( "Database.getConnection()<seq2seq4repair_space>Error<seq2seq4repair_space>-->" + ( ex . getMessage ( ) ) ) ) ; return null ; } } public static void close ( Connection con ) { } No newline ; at end ; of file ; }

Fix:
Connection con = DriverManager . getConnection ( "jdbc:mysql:////localhost:3306//mybike" , "root" , "giantgiant" ) ;
Buggy code:
public class HTMLLayout extends Layout { protected final int BUF_SIZE = 256 ; protected final int MAX_CAPACITY = 1024 ; private StringBuffer sbuf = new StringBuffer ( BUF_SIZE ) ; public static final String LOCATION_INFO_OPTION = "LocationInfo" ; boolean locationInfo = false ; public void activateOptions ( ) { } public String format ( LoggingEvent event ) { if ( ( sbuf . capacity ( ) ) > ( MAX_CAPACITY ) ) { sbuf = new StringBuffer ( BUF_SIZE ) ; } else { sbuf . setLength ( 0 ) ; } sbuf . append ( "\r\n\r\n<tr>" ) ; sbuf . append ( "<td>" ) ; sbuf . append ( ( ( event . timeStamp ) - ( event . getStartTime ( ) ) ) ) ; sbuf . append ( "<//td>\r\n" ) ; sbuf . append ( "<td>" ) ; sbuf . append ( event . getThreadName ( ) ) ; sbuf . append ( "<//td>\r\n" ) ; sbuf . append ( "<td>" ) ; if ( event . priority . isGreaterOrEqual ( Priority . WARN ) ) { sbuf . append ( "<font<seq2seq4repair_space>color=\"#FF0000\">" ) ; sbuf . append ( event . priority ) ; sbuf . append ( "<//font>" ) ; } else { sbuf . append ( event . priority ) ; } sbuf . append ( "<//td>\r\n" ) ; sbuf . append ( "<td>" ) ; sbuf . append ( event . categoryName ) ; sbuf . append ( "<//td>\r\n" ) ; sbuf . append ( "<td>" ) ; sbuf . append ( event . getNDC ( ) ) ; sbuf . append ( "<//td>\r\n" ) ; if ( locationInfo ) { LocationInfo locInfo = event . getLocationInformation ( ) ; sbuf . append ( "<td>" ) ; sbuf . append ( locInfo . getFileName ( ) ) ; sbuf . append ( ':' ) ; sbuf . append ( locInfo . getLineNumber ( ) ) ; sbuf . append ( "<//td>\r\n" ) ; } sbuf . append ( "<td>" ) ; <START_BUG> sbuf . append ( event . message ) ; <END_BUG> sbuf . append ( "<//td>\r\n" ) ; sbuf . append ( "<//tr>" ) ; Throwable t = event . throwable ; if ( t != null ) { sbuf . append ( "\r\n<tr><td<seq2seq4repair_space>colspan=\"7\">" ) ; sbuf . append ( getThrowableAsHTML ( t ) ) ; sbuf . append ( "<//td><//tr>" ) ; } return sbuf . toString ( ) ; } public String getContentType ( ) { } public String getHeader ( ) { } public String getFooter ( ) { } public String [ ] getOptionStrings ( ) { } String getThrowableAsHTML ( Throwable throwable ) { } public boolean ignoresThrowable ( ) { } public void setOption ( String key , String value ) { } static class HTMLPrintWriter extends PrintWriter { static String TRACE_PREFIX = "<br>&nbsp;&nbsp;&nbsp;&nbsp;" ; public HTMLPrintWriter ( Writer writer ) { } public void println ( char [ ] c ) { } public void println ( String s ) { } } }

Fix:
sbuf . append ( event . getRenderedMessage ( ) ) ;
Buggy code:
public class AjaxTabbedPanel extends TabbedPanel { private static final long serialVersionUID = 1L ; public AjaxTabbedPanel ( String id , List tabs ) { } protected Link newLink ( String linkId , final int index ) { return new AjaxFallbackLink ( linkId ) { private static final long serialVersionUID = 1L ; <START_BUG> protected void onClick ( AjaxRequestTarget target ) { <END_BUG> setSelectedTab ( index ) ; if ( target != null ) { target . addComponent ( AjaxTabbedPanel . this ) ; } } } ; } }

Fix:
public void onClick ( AjaxRequestTarget target ) {
Buggy code:
public class Rectangle { public final double minLat ; public final double minLon ; public final double maxLat ; public final double maxLon ; public Rectangle ( double minLat , double maxLat , double minLon , double maxLon ) { } @ Override public String toString ( ) { StringBuilder b = new StringBuilder ( ) ; <START_BUG> b . append ( "GeoRect(lat=" ) ; <END_BUG> b . append ( minLat ) ; b . append ( "<seq2seq4repair_space>TO<seq2seq4repair_space>" ) ; b . append ( maxLat ) ; b . append ( "<seq2seq4repair_space>lon=" ) ; b . append ( minLon ) ; b . append ( "<seq2seq4repair_space>TO<seq2seq4repair_space>" ) ; b . append ( maxLon ) ; if ( ( maxLon ) < ( minLon ) ) { b . append ( "<seq2seq4repair_space>[crosses<seq2seq4repair_space>dateline!]" ) ; } b . append ( ")" ) ; return b . toString ( ) ; } public boolean crossesDateline ( ) { } public static Rectangle fromPointDistance ( final double centerLat , final double centerLon , final double radiusMeters ) { } public static final double AXISLAT_ERROR = ( 0.1 // ( GeoUtils . EARTH_MEAN_RADIUS_METERS ) ) * ( TO_DEGREES ) ; public static double axisLat ( double centerLat , double radiusMeters ) { } public static Rectangle fromPolygon ( Polygon [ ] polygons ) { } }

Fix:
b . append ( "Rectangle(lat=" ) ;
Buggy code:
@ ThreadLeakScope ( Scope . NONE ) public class HdfsLockFactoryTest extends SolrTestCaseJ4 { private static MiniDFSCluster dfsCluster ; @ BeforeClass public static void beforeClass ( ) throws Exception { } @ AfterClass public static void afterClass ( ) throws Exception { } @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testBasic ( ) throws IOException { URI uri = HdfsLockFactoryTest . dfsCluster . getURI ( ) ; <START_BUG> Path lockPath = new Path ( uri . toString ( ) , "//lock" ) ; <END_BUG> HdfsLockFactory lockFactory = new HdfsLockFactory ( lockPath , new Configuration ( ) ) ; Lock lock = lockFactory . makeLock ( "testlock" ) ; boolean success = lock . obtain ( ) ; assertTrue ( "We<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>lock<seq2seq4repair_space>when<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>available" , success ) ; success = lock . obtain ( ) ; assertFalse ( "We<seq2seq4repair_space>got<seq2seq4repair_space>the<seq2seq4repair_space>lock<seq2seq4repair_space>but<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unavailble" , success ) ; lock . release ( ) ; success = lock . obtain ( ) ; assertTrue ( "We<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>lock<seq2seq4repair_space>when<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>available" , success ) ; success = lock . obtain ( ) ; assertFalse ( "We<seq2seq4repair_space>got<seq2seq4repair_space>the<seq2seq4repair_space>lock<seq2seq4repair_space>but<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>unavailble" , success ) ; } }

Fix:
Path lockPath = new Path ( uri . toString ( ) , "//basedir//lock" ) ;
Buggy code:
public class FilterPreferencesAction extends AbstractColumbaAction implements SelectionListener { public FilterPreferencesAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( frameMediator . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; MessageFolder folder = ( ( MessageFolder ) ( r [ 0 ] . getFolder ( ) ) ) ; if ( folder == null ) { return ; } <START_BUG> FolderItem item = folder . getFolderItem ( ) ; <END_BUG> if ( item == null ) { return ; } if ( folder instanceof VirtualFolder ) { new SearchFrame ( ( ( AbstractMailFrameController ) ( frameMediator ) ) , ( ( VirtualFolder ) ( folder ) ) ) ; } else { new org . columba . mail . gui . config . filter . ConfigFrame ( folder ) ; } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderItem item = folder . getConfiguration ( ) ;
Buggy code:
public class ProvTrail implements Comparable < ProvTrail > { private URI [ ] uris ; public ProvTrail ( URI ... uris ) { } public ProvTrail ( List < URI > uris ) { } public int getLength ( ) { } public URI getUri ( int position ) { } @ Override public int compareTo ( ProvTrail other ) { if ( ( this . getLength ( ) ) != ( other . getLength ( ) ) ) { return ( this . getLength ( ) ) - ( other . getLength ( ) ) ; } int i = this . getLength ( ) ; while ( i > 0 ) { i -- ; <START_BUG> int c = other . getUri ( i ) . toString ( ) . compareTo ( this . getUri ( i ) . toString ( ) ) ; <END_BUG> if ( c != 0 ) return c ; } return 0 ; } @ Override public String toString ( ) { } }

Fix:
int c = this . getUri ( i ) . toString ( ) . compareTo ( other . getUri ( i ) . toString ( ) ) ;
Buggy code:
public class ShortConverter extends AbstractIntegerConverter < Short > { private static final long serialVersionUID = 1L ; public static final IConverter < Short > INSTANCE = new ShortConverter ( ) ; public Short convertToObject ( final String value , Locale locale ) { final Number number = parse ( value , Short . MIN_VALUE , Short . MAX_VALUE , locale ) ; if ( number == null ) { return null ; } <START_BUG> return new Short ( number . shortValue ( ) ) ; <END_BUG> } @ Override protected Class < Short > getTargetType ( ) { } }

Fix:
return number . shortValue ( ) ;
Buggy code:
public class XLSLoader { public static void loadSkilift ( String file ) { if ( ( find . all ( ) . size ( ) ) != 0 ) return ; file = ( file == null ) ? "Aufstiegshilfen.xls" : file ; String name = null ; String city = null ; String closed = null ; String type = null ; FileInputStream fis = null ; Workbook wb = null ; HSSFCell cell = null ; try { fis = new FileInputStream ( file ) ; wb = new HSSFWorkbook ( fis ) ; Sheet sheet = wb . getSheetAt ( 0 ) ; Iterator < Row > rows = sheet . rowIterator ( ) ; while ( rows . hasNext ( ) ) { HSSFRow row = ( ( HSSFRow ) ( rows . next ( ) ) ) ; cell = row . getCell ( 0 ) ; if ( ( cell . getCellType ( ) ) == ( Cell . CELL_TYPE_STRING ) ) { name = cell . getStringCellValue ( ) ; } cell = row . getCell ( 3 ) ; if ( ( cell . getCellType ( ) ) == ( Cell . CELL_TYPE_STRING ) ) { city = cell . getStringCellValue ( ) ; } cell = row . getCell ( 8 ) ; if ( cell == null ) continue ; if ( ( cell . getCellType ( ) ) == ( Cell . CELL_TYPE_STRING ) ) { closed = cell . getStringCellValue ( ) ; } cell = row . getCell ( 10 ) ; if ( ( cell . getCellType ( ) ) == ( Cell . CELL_TYPE_STRING ) ) { type = cell . getStringCellValue ( ) ; } <START_BUG> if ( ( closed . compareToIgnoreCase ( "ja" ) ) != 0 ) { <END_BUG> new Skilift ( city , name , type ) . save ( ) ; } } } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
if ( ( closed . compareToIgnoreCase ( "nein" ) ) == 0 ) {
Buggy code:
public class DepRFW_Loop extends TSO_Test { @ Before public void setUp ( ) throws Exception { } @ Test public final void testCreateReachibilityGraph ( ) { assertEquals ( diag . getLocations ( ) . size ( ) , 14 ) ; assertEquals ( diag . getTransitions ( ) . size ( ) , 18 ) ; List < ControlFlowLocation > locs = diag . getLocations ( ) ; List < ControlFlowLocation > nonEmptyBuffers = new ArrayList < ControlFlowLocation > ( ) ; for ( ControlFlowLocation l : locs ) { if ( ! ( l . getBuffer ( ) . getAddressValuePairs ( ) . isEmpty ( ) ) ) { nonEmptyBuffers . add ( l ) ; } } assertEquals ( nonEmptyBuffers . size ( ) , 5 ) ; for ( ControlFlowLocation l : nonEmptyBuffers ) { String buffer = GraphUtility . bufferToString ( l , TSO ) ; <START_BUG> boolean isValidBuffer = buffer . equals ( ( ( "L" + ( l . getPc ( ) ) ) + "<seq2seq4repair_space><(r1:<seq2seq4repair_space>0Copy)>" ) ) ; <END_BUG> assertTrue ( isValidBuffer ) ; } } }

Fix:
boolean isValidBuffer = buffer . equals ( ( ( ( ( "L" + ( l . getPc ( ) ) ) + "<seq2seq4repair_space><(r1:<seq2seq4repair_space>v0" ) + ( CFGConstants . WDC_SUFFIX ) ) + ")>" ) ) ;
Buggy code:
public class NameSortTest extends CleanupHelper { @ Test public void testNameSort1 ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testNameSort10 ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testNameSort100 ( ) throws IOException , InterruptedException , ExecutionException { } private void testNameSort ( int N ) throws IOException , InterruptedException , ExecutionException { } private void validateNameSort ( Table table , int N ) throws IOException { for ( int i = 0 ; i < N ; ++ i ) { DecoratedKey key = Util . dk ( Integer . toString ( i ) ) ; ColumnFamily cf ; cf = Util . getColumnFamily ( table , key , "Standard1" ) ; Collection < IColumn > columns = cf . getSortedColumns ( ) ; for ( IColumn column : columns ) { String name = ByteBufferUtil . string ( column . name ( ) ) ; int j = Integer . valueOf ( name . substring ( ( ( name . length ( ) ) - 1 ) ) ) ; byte [ ] bytes = ( ( j % 2 ) == 0 ) ? "a" . getBytes ( ) : "b" . getBytes ( ) ; Assert . assertEquals ( new String ( bytes ) , ByteBufferUtil . string ( column . value ( ) ) ) ; } cf = Util . getColumnFamily ( table , key , "Super1" ) ; assert cf != null : ( "key<seq2seq4repair_space>" + key ) + "<seq2seq4repair_space>is<seq2seq4repair_space>missing!" ; Collection < IColumn > superColumns = cf . getSortedColumns ( ) ; assert ( superColumns . size ( ) ) == 8 : cf ; for ( IColumn superColumn : superColumns ) { int j = Integer . valueOf ( ByteBufferUtil . string ( superColumn . name ( ) ) . split ( "-" ) [ 1 ] ) ; Collection < IColumn > subColumns = superColumn . getSubColumns ( ) ; assert ( subColumns . size ( ) ) == 4 ; for ( IColumn subColumn : subColumns ) { <START_BUG> long k = subColumn . name ( ) . getLong ( ( ( subColumn . name ( ) . position ( ) ) + ( subColumn . name ( ) . arrayOffset ( ) ) ) ) ; <END_BUG> byte [ ] bytes = ( ( ( j + k ) % 2 ) == 0 ) ? "a" . getBytes ( ) : "b" . getBytes ( ) ; Assert . assertEquals ( new String ( bytes ) , ByteBufferUtil . string ( subColumn . value ( ) ) ) ; } } } } }

Fix:
long k = subColumn . name ( ) . getLong ( subColumn . name ( ) . position ( ) ) ;
Buggy code:
public class WorkbenchPreview implements IThemePreview { private IPreferenceStore store = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; private IPreferenceStore apiStore = PrefUtil . getAPIPreferenceStore ( ) ; private boolean disposed = false ; private CTabFolder folder ; private ITheme theme ; private ToolBar toolBar ; private CLabel viewMessage ; private ViewForm viewForm ; private IPropertyChangeListener fontAndColorListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; private IPropertyChangeListener preferenceListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; public void createControl ( Composite parent , ITheme currentTheme ) { this . theme = currentTheme ; folder = new CTabFolder ( parent , SWT . BORDER ) ; folder . setUnselectedCloseVisible ( false ) ; folder . setEnabled ( false ) ; folder . setMaximizeVisible ( true ) ; folder . setMinimizeVisible ( true ) ; viewForm = new ViewForm ( folder , SWT . NONE ) ; viewForm . marginHeight = 0 ; viewForm . marginWidth = 0 ; viewForm . verticalSpacing = 0 ; viewForm . setBorderVisible ( false ) ; toolBar = new ToolBar ( viewForm , ( ( SWT . FLAT ) | ( SWT . WRAP ) ) ) ; ToolItem toolItem = new ToolItem ( toolBar , SWT . PUSH ) ; <START_BUG> Image hoverImage = WorkbenchImages . getImage ( IMG_LCL_VIEW_MENU_HOVER ) ; <END_BUG> toolItem . setImage ( hoverImage ) ; viewForm . setTopRight ( toolBar ) ; viewMessage = new CLabel ( viewForm , SWT . NONE ) ; viewMessage . setText ( "Etu?" ) ; viewForm . setTopLeft ( viewMessage ) ; CTabItem item = new CTabItem ( folder , SWT . CLOSE ) ; item . setText ( "Lorem" ) ; Label text = new Label ( viewForm , SWT . NONE ) ; viewForm . setContent ( text ) ; text . setText ( "Lorem<seq2seq4repair_space>ipsum<seq2seq4repair_space>dolor<seq2seq4repair_space>sit<seq2seq4repair_space>amet" ) ; text . setBackground ( parent . getDisplay ( ) . getSystemColor ( COLOR_WHITE ) ) ; item = new CTabItem ( folder , SWT . CLOSE ) ; item . setText ( "Ipsum" ) ; item . setControl ( viewForm ) ; item . setImage ( WorkbenchImages . getImage ( IMG_TOOL_COPY ) ) ; folder . setSelection ( item ) ; item = new CTabItem ( folder , SWT . CLOSE ) ; item . setText ( "Dolor" ) ; item = new CTabItem ( folder , SWT . CLOSE ) ; item . setText ( "Sit" ) ; currentTheme . addPropertyChangeListener ( fontAndColorListener ) ; store . addPropertyChangeListener ( preferenceListener ) ; apiStore . addPropertyChangeListener ( preferenceListener ) ; setColorsAndFonts ( ) ; setTabPosition ( ) ; setTabStyle ( ) ; } protected void setTabStyle ( ) { } protected void setTabPosition ( ) { } private void setColorsAndFonts ( ) { } public void dispose ( ) { } }

Fix:
Image hoverImage = WorkbenchImages . getImage ( IMG_LCL_VIEW_MENU ) ;
Buggy code:
public class CodeSnippetFieldReference extends FieldReference implements ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetFieldReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { receiverType = receiver . resolveType ( scope ) ; if ( ( receiverType ) == null ) { constant = NotAConstant ; return null ; } this . codegenBinding = this . binding = scope . getField ( receiverType , token , this ) ; FieldBinding firstAttempt = binding ; boolean isNotVisible = false ; if ( ! ( binding . isValidBinding ( ) ) ) { if ( ( ( binding ) instanceof ProblemFieldBinding ) && ( ( ( ( ProblemFieldBinding ) ( binding ) ) . problemId ( ) ) == ( ProblemReasons . NotVisible ) ) ) { isNotVisible = true ; if ( ( this . evaluationContext . declaringTypeName ) != null ) { delegateThis = scope . getField ( scope . enclosingSourceType ( ) , EvaluationConstants . DELEGATE_THIS , this ) ; if ( ( delegateThis ) == null ) { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } } else { constant = NotAConstant ; scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } CodeSnippetScope localScope = new CodeSnippetScope ( scope ) ; this . codegenBinding = this . binding = localScope . getFieldForCodeSnippet ( delegateThis . type , token , this ) ; } } if ( ! ( binding . isValidBinding ( ) ) ) { constant = NotAConstant ; if ( isNotVisible ) { this . codegenBinding = this . binding = firstAttempt ; } scope . problemReporter ( ) . invalidField ( this , receiverType ) ; return null ; } if ( isFieldUseDeprecated ( binding , scope ) ) scope . problemReporter ( ) . deprecatedField ( binding , this ) ; <START_BUG> constant = FieldReference . getConstantFor ( binding , receiver . isImplicitThis ( ) , this , scope , 0 ) ; <END_BUG> if ( ! ( receiver . isThis ( ) ) ) constant = NotAConstant ; return this . resolvedType = binding . type ; } }

Fix:
constant = FieldReference . getConstantFor ( binding , this , receiver . isImplicitThis ( ) , scope ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//*//pets//{petId}//edit" ) @ SessionAttributes ( "pet" ) public class EditPetForm { private final Clinic clinic ; @ Autowired public EditPetForm ( Clinic clinic ) { } @ ModelAttribute ( "types" ) public Collection < PetType > populatePetTypes ( ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( @ PathVariable ( "petId" ) int petId , Model model ) { } @ RequestMapping ( method = { RequestMethod . PUT , RequestMethod . POST } ) public String processSubmit ( @ ModelAttribute ( "pet" ) Pet pet , BindingResult result , SessionStatus status ) { } @ RequestMapping ( method = RequestMethod . DELETE ) public String deletePet ( @ PathVariable int petId ) { } }

Fix:
dataBinder . setDisallowedFields ( "id" ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//{ownerId}//pets//new" ) @ SessionAttributes ( "pet" ) public class AddPetForm { private final Clinic clinic ; @ Autowired public AddPetForm ( Clinic clinic ) { } @ ModelAttribute ( "types" ) public Collection < PetType > populatePetTypes ( ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( "id" ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( @ PathVariable ( "ownerId" ) int ownerId , Model model ) { } @ RequestMapping ( method = RequestMethod . POST ) public String processSubmit ( @ ModelAttribute ( "pet" ) Pet pet , BindingResult result , SessionStatus status ) { } }

Fix:
dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ;
Buggy code:
public class SQLExceptionFactory40 extends SQLExceptionFactory { public SQLException getSQLException ( String message , String messageId , SQLException next , int severity , Throwable t , Object [ ] args ) { String sqlState = StandardException . getSQLStateFromIdentifier ( messageId ) ; t = wrapArgsForTransportAcrossDRDA ( message , messageId , next , severity , t , args ) ; final SQLException ex ; if ( sqlState . startsWith ( CONNECTIVITY_PREFIX ) ) { ex = new SQLTransientConnectionException ( message , sqlState , severity , t ) ; } else if ( sqlState . startsWith ( SQL_DATA_PREFIX ) ) { ex = new SQLDataException ( message , sqlState , severity , t ) ; } else if ( sqlState . startsWith ( INTEGRITY_VIOLATION_PREFIX ) ) { ex = new SQLIntegrityConstraintViolationException ( message , sqlState , severity , t ) ; } else <START_BUG> if ( sqlState . startsWith ( AUTHORIZATION_PREFIX ) ) { <END_BUG> ex = new SQLInvalidAuthorizationSpecException ( message , sqlState , severity , t ) ; } else if ( sqlState . startsWith ( TRANSACTION_PREFIX ) ) { ex = new SQLTransactionRollbackException ( message , sqlState , severity , t ) ; } else if ( sqlState . startsWith ( LSE_COMPILATION_PREFIX ) ) { ex = new SQLSyntaxErrorException ( message , sqlState , severity , t ) ; } else if ( sqlState . startsWith ( UNSUPPORTED_PREFIX ) ) { ex = new SQLFeatureNotSupportedException ( message , sqlState , severity , t ) ; } else { ex = new SQLException ( message , sqlState , severity , t ) ; } if ( next != null ) { ex . setNextException ( next ) ; } return ex ; } public SQLException getArgumentFerry ( SQLException se ) { } private SQLException wrapArgsForTransportAcrossDRDA ( String message , String messageId , SQLException next , int severity , Throwable t , Object [ ] args ) { } }

Fix:
if ( sqlState . startsWith ( AUTHORIZATION_SPEC_PREFIX ) ) {
Buggy code:
public class ReadRepairVerbHandler implements IVerbHandler { private static Logger logger_ = LoggerFactory . getLogger ( ReadRepairVerbHandler . class ) ; public void doVerb ( Message message ) { byte [ ] body = message . getMessageBody ( ) ; ByteArrayInputStream buffer = new ByteArrayInputStream ( body ) ; try { <START_BUG> RowMutation rm = RowMutation . serializer ( ) . deserialize ( new DataInputStream ( buffer ) ) ; <END_BUG> rm . apply ( ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } } }

Fix:
RowMutation rm = RowMutation . serializer ( ) . deserialize ( new DataInputStream ( buffer ) , message . getVersion ( ) ) ;
Buggy code:
public class Depend extends MatchingTask { private static final String CACHE_FILE_NAME = "dependencies.txt" ; private static final String CLASSNAME_PREPEND = "||:" ; private boolean closure = false ; private boolean dump = false ; private Hashtable affectedClassMap ; private File cache ; private Hashtable classFileInfoMap ; private Hashtable classpathDependencies ; private Path dependClasspath ; private Path destPath ; private Hashtable outOfDateClasses ; private Path srcPath ; public void setCache ( File cache ) { } public void setClasspath ( Path classpath ) throws TaskException { } public void setClasspathRef ( Reference r ) throws TaskException { } public void setClosure ( boolean closure ) { } public void setDestDir ( Path destPath ) { } public void setDump ( boolean dump ) { } public void setSrcdir ( Path srcPath ) { } public Path getClasspath ( ) { } public Path createClasspath ( ) throws TaskException { if ( ( dependClasspath ) == null ) { <START_BUG> dependClasspath = new Path ( getProject ( ) ) ; <END_BUG> } return dependClasspath . createPath ( ) ; } public void execute ( ) throws TaskException { } protected void scanDir ( File srcDir , String [ ] files ) { } private ArrayList getClassFiles ( Path classLocations ) throws TaskException { } private void addClassFiles ( ArrayList classFileList , File dir , File root ) { } private int deleteAffectedFiles ( String className ) { } private int deleteAllAffectedFiles ( ) { } private void determineDependencies ( ) throws IOException , TaskException { } private Hashtable readCachedDependencies ( ) throws IOException { } private void writeCachedDependencies ( Hashtable dependencyMap ) throws IOException { } private static class ClassFileInfo { public File absoluteFile ; public String className ; public String relativeName ; } }

Fix:
dependClasspath = new Path ( ) ;
Buggy code:
public class FreeConnectionsHealthCheck implements HealthCheckFactory { @ Override public HealthCheck create ( final ServiceContext context ) { return new HealthCheck ( "Available<seq2seq4repair_space>Database<seq2seq4repair_space>Connections" ) { @ Override protected Result check ( ) throws Exception { Stats stats ; try { stats = new Stats ( context ) ; int free = ( stats . maxActive ) - ( stats . numActive ) ; double fivePercent = Math . max ( 2.0 , ( ( ( double ) ( stats . maxActive ) ) * 0.01 ) ) ; if ( free < fivePercent ) { <START_BUG> Result . unhealthy ( ( ( ( "There<seq2seq4repair_space>are<seq2seq4repair_space>insufficient<seq2seq4repair_space>free<seq2seq4repair_space>connections<seq2seq4repair_space>on<seq2seq4repair_space>database" + ( Res . MAIN_DB ) ) + ".<seq2seq4repair_space>Connections<seq2seq4repair_space>free:" ) + free ) ) ; <END_BUG> } return Result . healthy ( ) ; } catch ( Exception e ) { return Result . unhealthy ( e ) ; } } } ; } }

Fix:
return Result . unhealthy ( ( ( ( "There<seq2seq4repair_space>are<seq2seq4repair_space>insufficient<seq2seq4repair_space>free<seq2seq4repair_space>connections<seq2seq4repair_space>on<seq2seq4repair_space>database" + ( Res . MAIN_DB ) ) + ".<seq2seq4repair_space>Connections<seq2seq4repair_space>free:" ) + free ) ) ;
Buggy code:
public class DataCacheStoreManager extends DelegatingStoreManager { private Collection _inserts = null ; private Map _updates = null ; private Collection _deletes = null ; private StoreContext _ctx = null ; private PCDataGenerator _gen = null ; public DataCacheStoreManager ( StoreManager sm ) { } public void setContext ( StoreContext ctx ) { } public void begin ( ) { } public void commit ( ) { } public void rollback ( ) { } private void evictTypes ( Collection classes ) { } private void updateCaches ( ) { } private void transformToVersionSafePCDatas ( DataCache cache , List holders ) { } private static DataCacheStoreManager . Modifications getModifications ( Map modMap , DataCache cache ) { } public boolean exists ( OpenJPAStateManager sm , Object edata ) { } public boolean syncVersion ( OpenJPAStateManager sm , Object edata ) { } public boolean initialize ( OpenJPAStateManager sm , PCState state , FetchConfiguration fetch , Object edata ) { } public boolean load ( OpenJPAStateManager sm , BitSet fields , FetchConfiguration fetch , int lockLevel , Object edata ) { } public Collection loadAll ( Collection sms , PCState state , int load , FetchConfiguration fetch , Object edata ) { } private static Map addUnloaded ( OpenJPAStateManager sm , BitSet fields , Map unloaded ) { } public Collection flush ( Collection states ) { } private void evictOptimisticLockFailure ( OptimisticException e ) { } public StoreQuery newQuery ( String language ) { } private DataCachePCData newPCData ( OpenJPAStateManager sm ) { ClassMetaData meta = sm . getMetaData ( ) ; if ( ( _gen ) != null ) return ( ( DataCachePCData ) ( _gen . generatePCData ( sm . getObjectId ( ) , meta ) ) ) ; <START_BUG> return new DataCachePCDataImpl ( sm . getObjectId ( ) , meta ) ; <END_BUG> } private boolean isLocking ( FetchConfiguration fetch ) { } private static class Modifications { public final List additions = new ArrayList ( ) ; public final List newUpdates = new ArrayList ( ) ; public final List existingUpdates = new ArrayList ( ) ; public final List deletes = new ArrayList ( ) ; } private static class PCDataHolder { public final DataCachePCData pcdata ; public final OpenJPAStateManager sm ; public PCDataHolder ( DataCachePCData pcdata , OpenJPAStateManager sm ) { } } }

Fix:
return new DataCachePCDataImpl ( sm . fetchObjectId ( ) , meta ) ;
Buggy code:
public class JavaHelloworld { public static void main ( String [ ] args ) { System . out . println ( "Hello<seq2seq4repair_space>world" ) ; <START_BUG> System . out . pringln ( "Hello<seq2seq4repair_space>again" ) ; <END_BUG> } }

Fix:
System . out . println ( "Hello<seq2seq4repair_space>again" ) ;
Buggy code:
public class IntLiteral extends NumberLiteral { public int value ; public static final IntLiteral One = new IntLiteral ( new char [ ] { '1' } , 0 , 0 , 1 ) ; static final Constant FORMAT_ERROR = new DoubleConstant ( ( 1.0 // 0.0 ) ) ; public IntLiteral ( char [ ] token , int s , int e ) { } public IntLiteral ( char [ ] token , int s , int e , int value ) { } public IntLiteral ( int intValue ) { } public void computeConstant ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( valueRequired ) if ( ( ( implicitConversion ) > > 4 ) == ( TypeIds . T_int ) ) codeStream . generateInlinedValue ( value ) ; else codeStream . generateConstant ( constant , implicitConversion ) ; <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public TypeBinding literalType ( BlockScope scope ) { } public final boolean mayRepresentMIN_VALUE ( ) { } public TypeBinding resolveType ( BlockScope scope ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;