nus-yam/ex-repair huggingface dataset:
Buggy code:
public class JGroupsSubsystemAdd implements ModelAddOperationHandler , DescriptionProvider { private static final Logger log = Logger . getLogger ( JGroupsSubsystemAdd . class . getPackage ( ) . getName ( ) ) ; static ModelNode createOperation ( ModelNode address , ModelNode existing ) { } private static void populate ( ModelNode source , ModelNode target ) { } @ Override public ModelNode getModelDescription ( final Locale locale ) { } @ Override public OperationResult execute ( OperationContext context , final ModelNode operation , final ResultHandler resultHandler ) throws OperationFailedException { JGroupsSubsystemAdd . log . info ( "Activating<seq2seq4repair_space>JGroups<seq2seq4repair_space>subsystem." ) ; JGroupsSubsystemAdd . populate ( operation , context . getSubModel ( ) ) ; RuntimeOperationContext runtime = context . getRuntimeContext ( ) ; if ( runtime != null ) { RuntimeTask task = new RuntimeTask ( ) { @ Override public void execute ( RuntimeTaskContext context ) throws OperationFailedException { ServiceTarget target = context . getServiceTarget ( ) ; target . addService ( SERVICE_NAME , new ProtocolDefaultsService ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; String stack = operation . require ( DEFAULT_STACK ) . asString ( ) ; InjectedValue < ChannelFactory > factory = new InjectedValue < ChannelFactory > ( ) ; ValueService < ChannelFactory > service = new ValueService < ChannelFactory > ( factory ) ; <START_BUG> target . addService ( ChannelFactoryService . getServiceName ( ) , service ) . addDependency ( ChannelFactoryService . getServiceName ( stack ) , ChannelFactory . class , factory ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> } } ; runtime . setRuntimeTask ( task ) ; } BasicOperationResult operationResult = new BasicOperationResult ( Util . getResourceRemoveOperation ( operation . require ( OP_ADDR ) ) ) ; resultHandler . handleResultComplete ( ) ; return operationResult ; } }

Fix:
target . addService ( ChannelFactoryService . getServiceName ( null ) , service ) . addDependency ( ChannelFactoryService . getServiceName ( stack ) , ChannelFactory . class , factory ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
public class GoToLineThread extends Thread { private EditorAdapter editorAdapter = null ; private int lineNumber = 0 ; private String fileToSeekTo = "" ; private boolean finished = false ; public boolean isFinished ( ) { } public boolean needsRetry ( ) { } public GoToLineThread ( String fileToSeekTo , int lineNumber , EditorAdapter editorAdapter ) { } public void run ( ) { } private void shortPause ( ) { try { <START_BUG> this . sleep ( 100 ) ; <END_BUG> } catch ( InterruptedException e ) { throw new RuntimeException ( e . getMessage ( ) ) ; } } }

Fix:
Thread . sleep ( 100 ) ;
Buggy code:
public class VerticalLayout implements ILayout { private List < GuiComponent > list = Lists . newArrayList ( ) ; @ Override public void addComponent ( GuiComponent comp , Object constraints ) { } @ Override public void removeComponent ( GuiComponent comp ) { } @ Override public void layoutComponents ( GuiPanel parent ) { } @ Override public Dimension getLayoutSize ( ) { int width = 0 ; int height = 0 ; for ( GuiComponent comp : list ) { <START_BUG> width = Math . max ( width , comp . getMinimumSize ( ) . width ) ; <END_BUG> height += comp . getMinimumSize ( ) . height ; } return new Dimension ( width , height ) ; } }

Fix:
width = Math . max ( width , comp . getBounds ( ) . width ) ;
Buggy code:
public class BayesThetaNormalizerMapper extends MapReduceBase implements Mapper < StringTuple , DoubleWritable , StringTuple , DoubleWritable > { private static final Logger log = LoggerFactory . getLogger ( BayesThetaNormalizerMapper . class ) ; private final OpenObjectDoubleHashMap < String > labelWeightSum = new OpenObjectDoubleHashMap < String > ( ) ; private double sigmaJSigmaK ; private double vocabCount ; private double alphaI = 1.0 ; @ Override public void map ( StringTuple key , DoubleWritable value , OutputCollector < StringTuple , DoubleWritable > output , Reporter reporter ) throws IOException { } @ Override public void configure ( JobConf job ) { try { labelWeightSum . clear ( ) ; Map < String , Double > labelWeightSumTemp = new HashMap < String , Double > ( ) ; DefaultStringifier < Map < String , Double > > mapStringifier = new DefaultStringifier < Map < String , Double > > ( job , GenericsUtil . getClass ( labelWeightSumTemp ) ) ; String labelWeightSumString = job . get ( "cnaivebayes.sigma_k" , mapStringifier . toString ( labelWeightSumTemp ) ) ; labelWeightSumTemp = mapStringifier . fromString ( labelWeightSumString ) ; for ( Map . Entry < String , Double > stringDoubleEntry : labelWeightSumTemp . entrySet ( ) ) { this . labelWeightSum . put ( stringDoubleEntry . getKey ( ) , stringDoubleEntry . getValue ( ) ) ; } DefaultStringifier < Double > stringifier = new DefaultStringifier < Double > ( job , GenericsUtil . getClass ( sigmaJSigmaK ) ) ; String sigmaJSigmaKString = job . get ( "cnaivebayes.sigma_jSigma_k" , stringifier . toString ( sigmaJSigmaK ) ) ; sigmaJSigmaK = stringifier . fromString ( sigmaJSigmaKString ) ; String vocabCountString = stringifier . toString ( vocabCount ) ; vocabCountString = job . get ( "cnaivebayes.vocabCount" , vocabCountString ) ; vocabCount = stringifier . fromString ( vocabCountString ) ; <START_BUG> Parameters params = Parameters . fromString ( job . get ( "bayes.parameters" , "" ) ) ; <END_BUG> alphaI = Double . valueOf ( params . get ( "alpha_i" , "1.0" ) ) ; } catch ( IOException ex ) { BayesThetaNormalizerMapper . log . warn ( ex . toString ( ) , ex ) ; } } }

Fix:
Parameters params = new Parameters ( job . get ( "bayes.parameters" , "" ) ) ;
Buggy code:
public class SharedObjectContainerFactory implements ISharedObjectContainerFactory { private static Trace debug = Trace . create ( "sharedobjectcontainerfactory" ) ; protected static ISharedObjectContainerFactory instance = null ; protected SharedObjectContainerFactory ( ) { } public static ISharedObjectContainerFactory getDefault ( ) { } private static void trace ( String msg ) { } public ISharedObjectContainer makeSharedObjectContainer ( ContainerDescription desc , String [ ] argTypes , Object [ ] args ) throws ContainerInstantiationException { SharedObjectContainerFactory . trace ( ( ( ( ( ( ( "makeSharedObjectContainer(" + desc ) + "," ) + ( Trace . convertStringAToString ( argTypes ) ) ) + "," ) + ( Trace . convertObjectAToString ( args ) ) ) + ")" ) ) ; if ( desc == null ) throw new ContainerInstantiationException ( "ContainerDescription<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; IContainer newContainer = ContainerFactory . getDefault ( ) . makeContainer ( desc , argTypes , args ) ; ISharedObjectContainer soContainer = ( ( ISharedObjectContainer ) ( newContainer . getAdapter ( ISharedObjectContainer . class ) ) ) ; if ( soContainer == null ) { <START_BUG> newContainer . dispose ( ( - 1L ) ) ; <END_BUG> throw new ContainerInstantiationException ( "new<seq2seq4repair_space>container<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>shared<seq2seq4repair_space>object<seq2seq4repair_space>container" ) ; } return soContainer ; } public ISharedObjectContainer makeSharedObjectContainer ( String descriptionName ) throws ContainerInstantiationException { } public ISharedObjectContainer makeSharedObjectContainer ( String descriptionName , Object [ ] args ) throws ContainerInstantiationException { } public ISharedObjectContainer makeSharedObjectContainer ( String descriptionName , String [ ] argsTypes , Object [ ] args ) throws ContainerInstantiationException { } }

Fix:
newContainer . dispose ( ) ;
Buggy code:
public interface IPostNewBeer { @ Headers ( { "Content-Type:<seq2seq4repair_space>application//json" } ) <START_BUG> @ POST ( "//backend//?action=addDrink" ) <END_BUG> Drink post ( @ Body Beer newBeer ) ; }

Fix:
@ POST ( "//backend//?action=addBeer" )
Buggy code:
@ Controller public class UserController { @ Get ( "//users//user_search.json" ) public Response userSearch ( Http http ) { } @ Get ( "//users//login.rk" ) public Response loginGet ( Http http ) { } @ Get ( "//users//logout.rk" ) public void logout ( Http http ) { } @ Get ( "//users//register.rk" ) public Response register ( Http http ) { } @ Post ( "//users//login.rk" ) public Response login ( Http http ) { } @ Post ( "//users//register.rk" ) public Response signup ( Http http ) { } @ Post ( "//users//checkid.rk" ) public Response checkId ( Http http ) { } @ Get ( "//users//modify.rk" ) public Response modify ( Http http ) { } @ Post ( "//users//modify.rk" ) public Response modifyId ( Http http ) { User user = http . getSessionAttribute ( User . class , "user" ) ; User usermod = http . getJsonObject ( User . class , "user" ) ; user . update ( usermod ) ; QueryExecuter qe = new QueryExecuter ( ) ; ExecuteQuery eq = new ExecuteQuery ( "update<seq2seq4repair_space>user<seq2seq4repair_space>set<seq2seq4repair_space>email=?,<seq2seq4repair_space>password=HEX(AES_ENCRYPT(?,<seq2seq4repair_space>?)),<seq2seq4repair_space>nickname=?,<seq2seq4repair_space>gender=?,<seq2seq4repair_space>birthday=?<seq2seq4repair_space>where<seq2seq4repair_space>id=?" , user . getEmail ( ) , user . getPassword ( ) , user . getPassword ( ) , user . getNickname ( ) , user . getGender ( ) , user . getBirthday ( ) , user . getId ( ) ) ; boolean result = qe . execute ( eq ) ; qe . close ( ) ; <START_BUG> if ( result ) { <END_BUG> return new easymapping . response . Json ( new Result ( false , null ) ) ; } return new easymapping . response . Json ( new Result ( true , null ) ) ; } void increaseGameCount ( QueryExecuter qe , User user ) { } }

Fix:
if ( ! result ) {
Buggy code:
public class TestTransactions extends ButtercoinAPITest { @ Test public void testTransactions ( ) throws Exception { Transactions transactions = buttercoin . getTransactions ( Funded ) . get ( ) ; <START_BUG> assertThat ( transactions . getTransactions ( ) . size ( ) ) . isGreaterThan ( 2 ) ; <END_BUG> } }

Fix:
assertThat ( transactions . getTransactions ( ) . size ( ) ) . isGreaterThan ( 0 ) ;
Buggy code:
public class ImportController extends SubController { @ FXML private ListView < GroupListItem > groupListView ; @ FXML private ListView < ColumnListItem > columnListView ; @ FXML private ListView < FileListItem > fileListView ; @ FXML private TextArea filePreview ; @ FXML private ComboBox < String > keyBox ; private ObservableList < String > keyListItems = FXCollections . observableArrayList ( ) ; private ObservableList < GroupListItem > groupList = FXCollections . observableArrayList ( ) ; private ObservableList < String > delimiterStringList = FXCollections . observableArrayList ( ) ; public static String [ ] delims = new String [ ] { "," , "\t" , "<seq2seq4repair_space>" , ";" , ":" , "?" } ; public static String [ ] delimNames = new String [ ] { "Comma<seq2seq4repair_space>delimiter" , "Tab<seq2seq4repair_space>delimiter" , "Space<seq2seq4repair_space>delimiter" , "Semicolon<seq2seq4repair_space>delimiter" , "Colon<seq2seq4repair_space>delimiter" , "Excel<seq2seq4repair_space>file<seq2seq4repair_space>(.xls,<seq2seq4repair_space>.xlsx)" } ; private int pipelineNumber = 1 ; public ImportController ( ) { } @ Override protected void initialize ( ) { } private void setKeyboxItems ( ) { } private void selectGroup ( GroupListItem gli ) { } @ FXML public void addGroupListItem ( ) { } @ FXML public void addColumnListItem ( ) { } @ FXML private void selectFiles ( ) { } public void addFiles ( List < File > files ) { } private void addColumns ( File file ) { } private void dectectColumnsInLine ( String readLine ) { GroupListItem gli = groupListView . getSelectionModel ( ) . getSelectedItem ( ) ; String delimiter = ImportController . delims [ gli . box . getSelectionModel ( ) . getSelectedIndex ( ) ] ; <START_BUG> String [ ] splitted = readLine . split ( delimiter ) ; <END_BUG> int difference = ( splitted . length ) - ( groupListView . getSelectionModel ( ) . getSelectedItem ( ) . columnList . size ( ) ) ; if ( difference < 0 ) { mainApp . showNotification ( "There<seq2seq4repair_space>are<seq2seq4repair_space>less<seq2seq4repair_space>columns<seq2seq4repair_space>detected,<seq2seq4repair_space>than<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>entered." , INFO ) ; } for ( int i = 0 ; i < difference ; i ++ ) { addColumnListItem ( ) ; } } protected int countLinesOfFile ( File file ) throws IOException { } public ArrayList < Group > getGroups ( ) { } @ Override public boolean validateInput ( boolean showPopup ) { } @ FXML public File saveConfiguration ( ) { } @ FXML public File chooseConfiguration ( ) { } public void openConfiguration ( File file ) { } private void addGroupFromXML ( Group group ) { } @ Override public Object getData ( ) { } @ Override public void setData ( Object o ) { } public static String findName ( String substring ) { } @ Override protected int getPipelineNumber ( ) { } public void reset ( ) { } }

Fix:
String [ ] splitted = readLine . split ( ( "\\" + delimiter ) , ( - 1 ) ) ;
Buggy code:
public class RPlayerListener extends PlayerListener { private Research plugin ; public RPlayerListener ( Research plugin ) { } @ Override public void onPlayerJoin ( PlayerJoinEvent event ) { if ( event . getPlayer ( ) . hasPermission ( "research" ) ) { Player player = event . getPlayer ( ) ; Tech t = TechManager . getCurrentResearch ( player ) ; if ( t == null ) { t = new Tech ( ) ; t . name = "None" ; } <START_BUG> event . getPlayer ( ) . sendMessage ( ( ( ( ( ( "You<seq2seq4repair_space>currently<seq2seq4repair_space>know<seq2seq4repair_space>" + ( TechManager . getAvailableTech ( event . getPlayer ( ) ) . size ( ) ) ) + "technologies" ) + "<seq2seq4repair_space>and<seq2seq4repair_space>are<seq2seq4repair_space>currently<seq2seq4repair_space>researching<seq2seq4repair_space>" ) + ( t . name ) ) + "." ) ) ; <END_BUG> } } }

Fix:
event . getPlayer ( ) . sendMessage ( ( ( ( ( ( "You<seq2seq4repair_space>currently<seq2seq4repair_space>know<seq2seq4repair_space>" + ( TechManager . getResearched ( event . getPlayer ( ) ) . size ( ) ) ) + "<seq2seq4repair_space>technologies" ) + "<seq2seq4repair_space>and<seq2seq4repair_space>are<seq2seq4repair_space>currently<seq2seq4repair_space>researching<seq2seq4repair_space>" ) + ( t . name ) ) + "." ) ) ;
Buggy code:
public class XmlStreamReaderUtilitiesCompatibilityTest extends XmlStreamReaderUtilitiesTest { @ Override protected String calculateRawEncoding ( final String bomEnc , final String xmlGuessEnc , final String xmlEnc , final String defaultEncoding ) throws IOException { } @ Override protected String calculateHttpEncoding ( final String httpContentType , final String bomEnc , final String xmlGuessEnc , final String xmlEnc , final boolean lenient , final String defaultEncoding ) throws IOException { final XmlStreamReaderUtilitiesCompatibilityTest . MockXmlStreamReader mock = new XmlStreamReaderUtilitiesCompatibilityTest . MockXmlStreamReader ( defaultEncoding ) ; <START_BUG> String enc = mock . calculateHttpEncoding ( XmlStreamReader . getContentTypeMime ( httpContentType ) , XmlStreamReader . getContentTypeEncoding ( httpContentType ) , bomEnc , xmlGuessEnc , xmlEnc , null , lenient ) ; <END_BUG> mock . close ( ) ; return enc ; } private static class MockXmlStreamReader extends XmlStreamReader { MockXmlStreamReader ( final String defaultEncoding ) throws IOException { } } }

Fix:
final String enc = mock . calculateHttpEncoding ( XmlStreamReader . getContentTypeMime ( httpContentType ) , XmlStreamReader . getContentTypeEncoding ( httpContentType ) , bomEnc , xmlGuessEnc , xmlEnc , null , lenient ) ;
Buggy code:
public class TSScannerTest extends TestCase { @ Test public void testLineComment ( ) { } @ Test public void testMultiLineComment ( ) { } @ Test public void testProperty ( ) { } @ Test public void testExampleFile ( ) throws Exception { } @ Test public void testEqualsInValue ( ) { TokenSequence < ? > ts = TSLexerTestUtils . seqForText ( "page.10.marks.TEST.select.where<seq2seq4repair_space>=<seq2seq4repair_space>colPos=0\npage.typeNum=0" , TSTokenId . getLanguage ( ) ) ; TSLexerTestUtils . next ( ts , TS_KEYWORD2 , "page" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; TSLexerTestUtils . next ( ts , TS_NUMBER , "10" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; TSLexerTestUtils . next ( ts , TS_KEYWORD2 , "marks" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; TSLexerTestUtils . next ( ts , TS_PROPERTY , "TEST" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; <START_BUG> TSLexerTestUtils . next ( ts , TS_KEYWORD2 , "select" ) ; <END_BUG> TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; TSLexerTestUtils . next ( ts , TS_RESERVED , "where" ) ; TSLexerTestUtils . next ( ts , WHITESPACE , "<seq2seq4repair_space>" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "=" ) ; TSLexerTestUtils . next ( ts , WHITESPACE , "<seq2seq4repair_space>" ) ; TSLexerTestUtils . next ( ts , TS_VALUE , "colPos" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "=" ) ; TSLexerTestUtils . next ( ts , TS_NUMBER , "0" ) ; TSLexerTestUtils . next ( ts , TS_NL , "\n" ) ; TSLexerTestUtils . next ( ts , TS_KEYWORD2 , "page" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "." ) ; TSLexerTestUtils . next ( ts , TS_RESERVED , "typeNum" ) ; TSLexerTestUtils . next ( ts , TS_OPERATOR , "=" ) ; TSLexerTestUtils . next ( ts , TS_NUMBER , "0" ) ; } public void testOpeningCurly ( ) { } }

Fix:
TSLexerTestUtils . next ( ts , TS_FUNCTION , "select" ) ;
Buggy code:
public class TestRun { private static void p ( String msg , Object ... args ) { } public static void main ( String [ ] args ) throws FindFailed , IOException { Debug . test ( "SikuliX<seq2seq4repair_space>2014<seq2seq4repair_space>TestRun:<seq2seq4repair_space>hello" ) ; Debug . setDebugLevel ( 3 ) ; Screen s = Sikulix . init ( ) ; ImagePath . add ( "com.sikulix.testrun.TestRun//images//images.sikuli" ) ; <START_BUG> s . wait ( "nightly.PNG" , 30 ) ; <END_BUG> Sikulix . popup ( "returned<seq2seq4repair_space>from<seq2seq4repair_space>wait" ) ; System . exit ( 1 ) ; } public void loggerCallBack ( String msg ) { } private static void testListText ( Screen s ) { } private static void testImageInJar ( ) { } public static void testVNC ( String [ ] args ) throws FindFailed { } }

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

Fix:
Parameters params = new Parameters ( job . get ( "bayes.parameters" , "" ) ) ;
Buggy code:
final class InjectionAnnotations { static Optional < AnnotationMirror > getScopeAnnotation ( Element e ) { } static Optional < AnnotationMirror > getQualifier ( Element e ) { Preconditions . checkNotNull ( e ) ; ImmutableSet < ? extends AnnotationMirror > qualifierAnnotations = InjectionAnnotations . getQualifiers ( e ) ; switch ( qualifierAnnotations . size ( ) ) { case 0 : return Optional . absent ( ) ; case 1 : return Optional . < AnnotationMirror > of ( qualifierAnnotations . iterator ( ) . next ( ) ) ; default : <START_BUG> throw new IllegalArgumentException ( ( e + "<seq2seq4repair_space>was<seq2seq4repair_space>annotated<seq2seq4repair_space>with<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>@Scope<seq2seq4repair_space>annotation" ) ) ; <END_BUG> } } static ImmutableSet < ? extends AnnotationMirror > getQualifiers ( Element element ) { } static ImmutableSet < ? extends AnnotationMirror > getScopes ( Element element ) { } private InjectionAnnotations ( ) { } }

Fix:
throw new IllegalArgumentException ( ( e + "<seq2seq4repair_space>was<seq2seq4repair_space>annotated<seq2seq4repair_space>with<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>@Qualifier<seq2seq4repair_space>annotation" ) ) ;
Buggy code:
public abstract class AbstractPageAuthorizationStrategy implements IAuthorizationStrategy { public boolean isActionAuthorized ( final Component component , final Action action ) { } @ SuppressWarnings ( "unchecked" ) public final < T extends IRequestableComponent > boolean isInstantiationAuthorized ( final Class < T > componentClass ) { } protected boolean instanceOf ( final Class < ? > type , final Class < ? > superType ) { <START_BUG> return superType . isAssignableFrom ( type ) ; <END_BUG> } protected < T extends Page > boolean isPageAuthorized ( Class < T > pageClass ) { } }

Fix:
return ( superType != null ) && ( superType . isAssignableFrom ( type ) ) ;
Buggy code:
public class CrosscuttingMembers { private ResolvedType inAspect ; private World world ; private PerClause perClause ; private List shadowMungers = new ArrayList ( 4 ) ; private List typeMungers = new ArrayList ( 4 ) ; private List lateTypeMungers = new ArrayList ( 0 ) ; private List declareParents = new ArrayList ( 4 ) ; private List declareSofts = new ArrayList ( 0 ) ; private List declareDominates = new ArrayList ( 4 ) ; private List declareAnnotationsOnType = new ArrayList ( ) ; private List declareAnnotationsOnField = new ArrayList ( ) ; private List declareAnnotationsOnMethods = new ArrayList ( ) ; public CrosscuttingMembers ( ResolvedType inAspect ) { } public void addConcreteShadowMunger ( ShadowMunger m ) { } public void addShadowMungers ( Collection c ) { } private void addShadowMunger ( ShadowMunger m ) { } public void addTypeMungers ( Collection c ) { } public void addTypeMunger ( ConcreteTypeMunger m ) { } public void addLateTypeMungers ( Collection c ) { } public void addLateTypeMunger ( ConcreteTypeMunger m ) { } public void addDeclares ( Collection c ) { } public void addDeclare ( Declare declare ) { } public void exposeTypes ( Collection typesToExpose ) { } public void exposeType ( UnresolvedType typeToExpose ) { if ( typeToExpose == ( ResolvedType . MISSING ) ) return ; if ( ( typeToExpose . isParameterizedType ( ) ) || ( typeToExpose . isRawType ( ) ) ) { if ( typeToExpose instanceof ResolvedType ) { typeToExpose = ( ( ResolvedType ) ( typeToExpose ) ) . getGenericType ( ) ; } else { <START_BUG> typeToExpose = UnresolvedType . forSignature ( typeToExpose . getRawTypeSignature ( ) ) ; <END_BUG> } } ResolvedMember member = new ResolvedMember ( Member . STATIC_INITIALIZATION , typeToExpose , 0 , ResolvedType . VOID , "" , UnresolvedType . NONE ) ; addTypeMunger ( world . concreteTypeMunger ( new PrivilegedAccessMunger ( member ) , inAspect ) ) ; } public void addPrivilegedAccesses ( Collection accessedMembers ) { } private void addPrivilegedAccess ( ResolvedMember member ) { } public Collection getCflowEntries ( ) { } public boolean replaceWith ( CrosscuttingMembers other ) { } public PerClause getPerClause ( ) { } public void setPerClause ( PerClause perClause ) { } public List getDeclareDominates ( ) { } public List getDeclareParents ( ) { } public List getDeclareSofts ( ) { } public List getShadowMungers ( ) { } public List getTypeMungers ( ) { } public List getLateTypeMungers ( ) { } public List getDeclareAnnotationOnTypes ( ) { } public List getDeclareAnnotationOnFields ( ) { } public List getDeclareAnnotationOnMethods ( ) { } }

Fix:
typeToExpose = UnresolvedType . forSignature ( typeToExpose . getErasureSignature ( ) ) ;
Buggy code:
public class CryptoMapperTest extends AbstractMapperTest { private static final String ENCRYPTED_URL = "SnPh82L4Kl4//SnPe4//4Sn8e//nPh75//h8211" ; private static final Url EXPECTED_URL = Url . parse ( "a//b//c//d" ) ; private CryptoMapper mapper ; private WicketTester tester ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testEncrypt ( ) { } public void testDecrypt ( ) { } public void testPageParameters ( ) { <START_BUG> String expectedEncrypted = "ywKWg-Qpk7YQBiYCmj9MaAJSIV1gtssNinjiALijtet62VMQc2-sMK_RchttkidUpYM_cplXKeZSfGxBkvWzH_E_zWv4Ii7MNSm5nXKno7o//ywK6c//MK_c0//nji3c//Qpk1b//XKnba//c2-cd?namedKey1=namedValue1&namedKey2=namedValue2" ; <END_BUG> PageParameters expectedParameters = new PageParameters ( ) ; expectedParameters . add ( "namedKey1" , "namedValue1" ) ; expectedParameters . add ( "namedKey2" , "namedValue2" ) ; expectedParameters . set ( 0 , "indexedValue1" ) ; expectedParameters . set ( 1 , "indexedValue2" ) ; RenderPageRequestHandler renderPageRequestHandler = new RenderPageRequestHandler ( new org . apache . wicket . request . handler . PageProvider ( DummyHomePage . class , expectedParameters ) ) ; Url url = mapper . mapHandler ( renderPageRequestHandler ) ; assertEquals ( expectedEncrypted , url . toString ( ) ) ; Request request = getRequest ( url ) ; IRequestHandler requestHandler = mapper . mapRequest ( request ) ; assertTrue ( ( requestHandler instanceof RenderPageRequestHandler ) ) ; RenderPageRequestHandler handler = ( ( RenderPageRequestHandler ) ( requestHandler ) ) ; assertEquals ( DummyHomePage . class , handler . getPageClass ( ) ) ; PageParameters actualParameters = handler . getPageParameters ( ) ; assertEquals ( expectedParameters , actualParameters ) ; } }

Fix:
String expectedEncrypted = "ywKWg-Qpk7YQBiYCmj9MaAJSIV1gtssNinjiALijtet62VMQc2-sMK_RchttkidUpYM_cplXKeZSfGxBkvWzH_E_zWv4Ii7MNSm5nXKno7o//ywK6c//MK_c0//nji3c//Qpk1b//XKnba//c2-cd" ;
Buggy code:
class AccessLogService implements Service < AccessLogService > { protected final InjectedValue < XnioWorker > worker = new InjectedValue ( ) ; private final String pattern ; private final File directory ; private final String filePrefix ; private final String fileSuffix ; private volatile AccessLogReceiver logReceiver ; AccessLogService ( String pattern , File directory , String filePrefix , String fileSuffix ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public AccessLogService getValue ( ) throws IllegalArgumentException , IllegalStateException { } InjectedValue < XnioWorker > getWorker ( ) { } protected AccessLogHandler configureAccessLogHandler ( HttpHandler handler ) { <START_BUG> return new AccessLogHandler ( handler , logReceiver , pattern , AccessLogHandler . class . getClassLoader ( ) ) ; <END_BUG> } }

Fix:
return new AccessLogHandler ( handler , logReceiver , pattern , AccessLogService . class . getClassLoader ( ) ) ;
Buggy code:
@ Repository public class CycleOnlineTestDaoImpl extends AbstractBaseDaoImpl < CycleOnlineTest > implements CycleOnlineTestDao { @ Override public List < CycleOnlineTestDto > fetchTestByCycle ( final Long cycleId ) throws UserException { try { DetachedCriteria criteria = criteria ( ) ; criteria . createAlias ( "cycleMasterData" , "cycleMasterData" ) ; criteria . add ( Restrictions . eq ( "cycleMasterData.id" , cycleId ) ) ; criteria . add ( Restrictions . eq ( "active" , true ) ) ; <START_BUG> criteria . addOrder ( Order . desc ( "id" ) ) ; <END_BUG> ProjectionList columns = Projections . projectionList ( ) . add ( Projections . property ( "id" ) . as ( "objId" ) ) . add ( Projections . property ( "cycleMasterData.id" ) . as ( "cycleId" ) ) . add ( Projections . property ( "testName" ) . as ( "testName" ) ) . add ( Projections . property ( "active" ) . as ( "active" ) ) . add ( Projections . property ( "englishTestUrl" ) . as ( "englishTestUrl" ) ) . add ( Projections . property ( "russianTestUrl" ) . as ( "russianTestUrl" ) ) . add ( Projections . property ( "germanTestUrl" ) . as ( "germanTestUrl" ) ) ; criteria . setProjection ( columns ) ; criteria . setResultTransformer ( Transformers . aliasToBean ( CycleOnlineTestDto . class ) ) ; return find ( criteria ) ; } catch ( Exception e ) { logger . error ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>retrieving<seq2seq4repair_space>cycle<seq2seq4repair_space>details" , e ) ; throw new UserException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>retrieving<seq2seq4repair_space>cycle<seq2seq4repair_space>details<seq2seq4repair_space>" , e ) ; } } @ Override public List < CycleOnlineTestReminderDto > getTestDetailsForReminderEmail ( ) throws UserException { } @ Override public List < CycleOnlineTest > getTestConfigForCycle ( final Long cycleId ) throws UserException { } }

Fix:
criteria . addOrder ( Order . asc ( "sequenceNumber" ) ) ;
Buggy code:
public class MethodInvocation extends Expression { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( MethodInvocation . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( MethodInvocation . class , "typeArguments" , Type . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( MethodInvocation . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( MethodInvocation . class , "arguments" , Expression . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private Expression optionalExpression = null ; private ASTNode . NodeList typeArguments = null ; private SimpleName methodName = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( MethodInvocation . ARGUMENTS_PROPERTY ) ; MethodInvocation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List typeArguments ( ) { } public SimpleName getName ( ) { if ( ( this . methodName ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . methodName ) == null ) { preLazyInit ( ) ; this . methodName = new SimpleName ( this . ast ) ; postLazyInit ( this . methodName , MethodInvocation . NAME_PROPERTY ) ; } } } return this . methodName ; } public void setName ( SimpleName name ) { } public List arguments ( ) { } public IMethodBinding resolveMethodBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
@ Deprecated public class Path implements Dictionary < String > , ServletProcessorContextAware { private ServletProcessorContext context ; public void setServletProcessorContext ( ServletProcessorContext context ) { } @ Override public String toString ( ) { <START_BUG> return ServletContextContainer . getInstance ( ) . getRealPath ( context . getRequestURI ( ) ) ; <END_BUG> } public String get ( String name ) { } No newline ; at end ; of file ; }

Fix:
return ServletContextContainer . getInstance ( ) . getRealPath ( context . getContextPath ( context . getRequestURI ( ) ) ) ;
Buggy code:
public class TestClient { public static void main ( String [ ] args ) { <START_BUG> Client client = new Client ( "10.1.13.11" , 3520 , "Anvandaren" ) ; <END_BUG> client . addListener ( new ClientListener ( ) { @ Override public void onConnected ( ) { } @ Override public void onClientsUpdated ( String [ ] clients ) { System . out . println ( "Got<seq2seq4repair_space>clients:<seq2seq4repair_space>" ) ; for ( String client : clients ) { System . out . println ( client ) ; } } @ Override public void onMessageReceived ( Message message ) { } @ Override public void onDisconnected ( ) { } } ) ; } }

Fix:
Client client = new Client ( "localhost" , 3520 , "B" ) ;
Buggy code:
public class SharedObjectContainerUI { public static final String JOIN_TIME_FORMAT = "hh:mm:ss<seq2seq4repair_space>a<seq2seq4repair_space>z" ; public static final String FILE_DIRECTORY = "received_files" ; public static final String ECFDIRECTORY = ( "ECF_" + ( SharedObjectContainerUI . FILE_DIRECTORY ) ) + "//" ; public static final String COLLAB_SHARED_OBJECT_ID = "chat" ; ISharedObjectContainer soc = null ; CollabClient collabclient = null ; public SharedObjectContainerUI ( CollabClient client , ISharedObjectContainer soc ) { } protected String getSharedFileDirectoryForProject ( IResource proj ) { } protected User getUserData ( String containerType , ID clientID , String usernick , IResource project ) { } void addObjectToClient ( ISharedObjectContainer soContainer , ClientEntry client , String username , IResource proj ) throws Exception { } public void setup ( final ISharedObjectContainer soContainer , final ClientEntry newClientEntry , final IResource resource , String username ) throws Exception { addObjectToClient ( soContainer , newClientEntry , username , resource ) ; soc . addListener ( new IContainerListener ( ) { public void handleEvent ( IContainerEvent evt ) { if ( evt instanceof IContainerDisconnectedEvent ) { IContainerDisconnectedEvent cd = ( ( IContainerDisconnectedEvent ) ( evt ) ) ; final ID departedContainerID = cd . getTargetID ( ) ; ID connectedID = newClientEntry . getConnectedID ( ) ; if ( ( connectedID == null ) || ( connectedID . equals ( departedContainerID ) ) ) { if ( ! ( newClientEntry . isDisposed ( ) ) ) { collabclient . disposeClient ( resource , newClientEntry ) ; } } } else if ( evt instanceof IContainerEjectedEvent ) { IContainerEjectedEvent ce = ( ( IContainerEjectedEvent ) ( evt ) ) ; <START_BUG> final ID departedContainerID = ce . getGroupID ( ) ; <END_BUG> ID connectedID = newClientEntry . getConnectedID ( ) ; if ( ( connectedID == null ) || ( connectedID . equals ( departedContainerID ) ) ) { if ( ! ( newClientEntry . isDisposed ( ) ) ) { collabclient . disposeClient ( resource , newClientEntry ) ; } } } } } , "" ) ; } protected void createAndAddSharedObject ( final ISharedObjectContainer soContainer , final ClientEntry client , final IResource proj , User user , String fileDir ) throws Exception { } }

Fix:
final ID departedContainerID = ce . getTargetID ( ) ;
Buggy code:
public class SectionsPagerAdapter extends FragmentPagerAdapter { protected Context mContext ; public SectionsPagerAdapter ( Context context , FragmentManager fm ) { } @ Override public Fragment getItem ( int position ) { switch ( position ) { case 0 : return new InboxFragment ( ) ; case 1 : return new FriendsFragment ( ) ; } <START_BUG> return new InboxFragment ( ) ; <END_BUG> } @ Override public int getCount ( ) { } @ Override public CharSequence getPageTitle ( int position ) { } }

Fix:
return null ;
Buggy code:
public class MatchingNodeSet { SimpleLookupTable matchingNodes = new SimpleLookupTable ( 3 ) ; private HashtableOfLong matchingNodesKeys = new HashtableOfLong ( 3 ) ; static Integer EXACT_MATCH = new Integer ( SearchMatch . A_ACCURATE ) ; static Integer POTENTIAL_MATCH = new Integer ( SearchMatch . A_INACCURATE ) ; static Integer ERASURE_MATCH = new Integer ( SearchPattern . R_ERASURE_MATCH ) ; public boolean mustResolve ; SimpleSet possibleMatchingNodesSet = new SimpleSet ( 7 ) ; private HashtableOfLong possibleMatchingNodesKeys = new HashtableOfLong ( 7 ) ; public MatchingNodeSet ( boolean mustResolvePattern ) { } public int addMatch ( ASTNode node , int matchLevel ) { <START_BUG> switch ( matchLevel ) { <END_BUG> case PatternLocator . INACCURATE_MATCH : addTrustedMatch ( node , MatchingNodeSet . POTENTIAL_MATCH ) ; break ; case PatternLocator . POSSIBLE_MATCH : addPossibleMatch ( node ) ; break ; case PatternLocator . ERASURE_MATCH : addTrustedMatch ( node , MatchingNodeSet . ERASURE_MATCH ) ; break ; case PatternLocator . ACCURATE_MATCH : addTrustedMatch ( node , MatchingNodeSet . EXACT_MATCH ) ; } return matchLevel ; } public void addPossibleMatch ( ASTNode node ) { } public void addTrustedMatch ( ASTNode node , boolean isExact ) { } void addTrustedMatch ( ASTNode node , Integer level ) { } protected boolean hasPossibleNodes ( int start , int end ) { } protected ASTNode [ ] matchingNodes ( int start , int end ) { } public Object removePossibleMatch ( ASTNode node ) { } public Object removeTrustedMatch ( ASTNode node ) { } public String toString ( ) { } }

Fix:
switch ( matchLevel & ( NODE_SET_MASK ) ) {
Buggy code:
@ RunWith ( Parameterized . class ) public class InfinispanSubsystemTestCase extends ClusteringSubsystemTest { String xmlFile = null ; int operations = 0 ; public InfinispanSubsystemTestCase ( String xmlFile , int operations ) { } @ Parameters public static Collection < Object [ ] > data ( ) { <START_BUG> Object [ ] [ ] data = new Object [ ] [ ] { new Object [ ] { "subsystem-infinispan_1_0.xml" , 33 } , new Object [ ] { "subsystem-infinispan_1_1.xml" , 33 } , new Object [ ] { "subsystem-infinispan_1_2.xml" , 37 } , new Object [ ] { "subsystem-infinispan_1_3.xml" , 37 } , new Object [ ] { "subsystem-infinispan_1_4.xml" , 75 } , new Object [ ] { "subsystem-infinispan_2_0.xml" , 78 } } ; <END_BUG> return Arrays . asList ( data ) ; } @ Override protected ValidationConfiguration getModelValidationConfiguration ( ) { } @ Test public void testParseSubsystem ( ) throws Exception { } @ Test public void testInstallIntoController ( ) throws Exception { } @ Test public void testParseAndMarshalModel ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } }

Fix:
Object [ ] [ ] data = new Object [ ] [ ] { new Object [ ] { "subsystem-infinispan_1_0.xml" , 33 } , new Object [ ] { "subsystem-infinispan_1_1.xml" , 33 } , new Object [ ] { "subsystem-infinispan_1_2.xml" , 37 } , new Object [ ] { "subsystem-infinispan_1_3.xml" , 37 } , new Object [ ] { "subsystem-infinispan_1_4.xml" , 75 } , new Object [ ] { "subsystem-infinispan_2_0.xml" , 79 } } ;
Buggy code:
public class NotificationHelper { private static int LIVEOKE_REMOTE_NOTIFICATION_ID = 0 ; private static int LIVEOKE_REMOTE_CHAT_NOTIFICATION_ID = 1 ; private MainActivity context ; public static String LIVEOKE_NOTIFICATION_PLAY = "Notification-Play" ; public static String LIVEOKE_NOTIFICATION_PAUSE = "Notification-Pause" ; public static String LIVEOKE_NOTIFICATION_NEXT = "Notification-Next" ; public static String LIVEOKE_NOTIFICATION_MIC_ON = "Notification-Mic-On" ; public static String LIVEOKE_NOTIFICATION_MIC_OFF = "Notification-Mic-Off" ; public static String LIVEOKE_NOTIFICATION_APP = "Notification-App" ; public boolean pause = true ; public boolean micOn = true ; public String nowPlayingStr = "Happy<seq2seq4repair_space>Singing!" ; public String nowPlayingTitle ; public int totalRsvp = 0 ; public HashMap < String , ArrayList < String > > chatMap ; public NotificationHelper ( Context context ) { } public void chatNotification ( String name , String message ) { ArrayList < String > msgList = new ArrayList < > ( ) ; if ( chatMap . containsKey ( name ) ) { msgList = chatMap . get ( name ) ; msgList . add ( message ) ; } else { msgList . add ( message ) ; chatMap . put ( name , msgList ) ; } PendingIntent dismissIntent = DismissNotificationActivity . getDismissIntent ( NotificationHelper . LIVEOKE_REMOTE_CHAT_NOTIFICATION_ID , context ) ; Intent notificationIntent = new Intent ( context , MainActivity . class ) ; notificationIntent . putExtra ( "reply-chat" , "yes" ) ; notificationIntent . putExtra ( "chat-user" , name ) ; PendingIntent contentIntent = PendingIntent . getActivity ( context , 0 , notificationIntent , FLAG_UPDATE_CURRENT ) ; NotificationCompat . Builder notificationBuilder = new NotificationCompat . Builder ( context ) . setPriority ( PRIORITY_MAX ) . setDefaults ( DEFAULT_ALL ) . setSmallIcon ( microphone_icon ) . setAutoCancel ( false ) . setContentTitle ( ( name + "<seq2seq4repair_space>says" ) ) . setContentText ( message ) . setContentIntent ( contentIntent ) . setColor ( context . getResources ( ) . getColor ( primary ) ) . setVibrate ( null ) . addAction ( ic_clear_white_18dp , "DISMISS" , dismissIntent ) . addAction ( ic_reply_white_18dp , "REPLY" , contentIntent ) ; NotificationCompat . InboxStyle inboxStyle = new NotificationCompat . InboxStyle ( ) ; inboxStyle . setBigContentTitle ( ( name + "<seq2seq4repair_space>says" ) ) ; <START_BUG> inboxStyle . setSummaryText ( "LiveOke<seq2seq4repair_space>Remote<seq2seq4repair_space>Chat" ) ; <END_BUG> for ( String msg : msgList ) { inboxStyle . addLine ( msg ) ; } notificationBuilder . setStyle ( inboxStyle ) ; NotificationManager manager = ( ( NotificationManager ) ( context . getSystemService ( NOTIFICATION_SERVICE ) ) ) ; manager . notify ( NotificationHelper . LIVEOKE_REMOTE_CHAT_NOTIFICATION_ID , notificationBuilder . build ( ) ) ; } public void addNotification ( ) { } public void removeNotification ( ) { } public void removeChatNotification ( ) { } }

Fix:
inboxStyle . setSummaryText ( ( ( context . getResources ( ) . getString ( app_name ) ) + "<seq2seq4repair_space>Chat" ) ) ;
Buggy code:
public class ServletWebResponse extends WebResponse { private final HttpServletResponse httpServletResponse ; private final ServletWebRequest webRequest ; public ServletWebResponse ( ServletWebRequest webRequest , HttpServletResponse httpServletResponse ) { } public final HttpServletResponse getHttpServletResponse ( ) { } @ Override public void addCookie ( Cookie cookie ) { } @ Override public void clearCookie ( Cookie cookie ) { } @ Override public void setContentLength ( long length ) { } @ Override public void setContentType ( String mimeType ) { } @ Override public void setDateHeader ( String name , long date ) { } @ Override public void setHeader ( String name , String value ) { } @ Override public void write ( CharSequence sequence ) { } @ Override public void write ( byte [ ] array ) { } @ Override public void setStatus ( int sc ) { } @ Override public void sendError ( int sc , String msg ) { } @ Override public String encodeURL ( CharSequence url ) { } private String getAbsolutePrefix ( ) { } private String getAbsoluteURL ( String url ) { } private boolean redirect = false ; @ Override public void sendRedirect ( String url ) { try { redirect = true ; url = getAbsoluteURL ( url ) ; url = httpServletResponse . encodeRedirectURL ( url ) ; disableCaching ( ) ; if ( webRequest . isAjax ( ) ) { httpServletResponse . addHeader ( "Ajax-Location" , url ) ; <START_BUG> httpServletResponse . getWriter ( ) . write ( ( ( "<ajax-response><redirect>" + url ) + "<//redirect><//ajax-response>" ) ) ; <END_BUG> setContentType ( ( "text//xml;charset=" + ( webRequest . getHttpServletRequest ( ) . getCharacterEncoding ( ) ) ) ) ; } else { httpServletResponse . sendRedirect ( url ) ; } } catch ( IOException e ) { throw new WicketRuntimeException ( e ) ; } } @ Override public boolean isRedirect ( ) { } @ Override public void flush ( ) { } @ Override public void reset ( ) { } }

Fix:
httpServletResponse . getWriter ( ) . write ( ( ( "<ajax-response><redirect><![CDATA[" + url ) + "]]><//redirect><//ajax-response>" ) ) ;
Buggy code:
public class FireController extends AbstractDevice { boolean FireState = false ; Indicator fireI = null ; public static void main ( String [ ] args ) { } @ Override public void InitDevice ( ) { } @ Override public void FunctionBeforeRead ( ) { } @ Override public void HandleMessage ( Message msg ) { if ( ( msg . GetMessageId ( ) ) == 1 ) { float temp = Float . valueOf ( msg . GetMessage ( ) ) . floatValue ( ) ; <START_BUG> if ( temp < 30 ) { <END_BUG> FireState = false ; } else { FireState = true ; } } } @ Override public void FunctionAfterRead ( ) { } }

Fix:
if ( temp < 200 ) {
Buggy code:
public class SimpleDBBaseTest { static Thread serverThread ; static Driver mainDriver ; static Connection mainConnection ; protected Statement stmt ; @ BeforeClass public static void setUpBeforeClass ( ) throws Exception { try { LocateRegistry . createRegistry ( 1099 ) ; } catch ( Exception ex ) { } SimpleDBBaseTest . serverThread = new Thread ( new Runnable ( ) { @ Override public void run ( ) { try { SimpleDB . init ( "studentdb" ) ; System . out . println ( "finished<seq2seq4repair_space>init<seq2seq4repair_space>of<seq2seq4repair_space>SimpleDB" ) ; RemoteDriver d = new RemoteDriverImpl ( ) ; Naming . rebind ( "simpledb" , d ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } ) ; SimpleDBBaseTest . serverThread . start ( ) ; SimpleDBBaseTest . mainDriver = new SimpleDriver ( ) ; String connURL = "jdbc:simpledb:////localhost" ; boolean b = true ; while ( b ) { try { SimpleDBBaseTest . mainConnection = SimpleDBBaseTest . mainDriver . connect ( connURL , null ) ; b = false ; } catch ( Exception ex ) { continue ; } } Statement stmt = SimpleDBBaseTest . mainConnection . createStatement ( ) ; try { stmt . executeQuery ( "select<seq2seq4repair_space>a51<seq2seq4repair_space>from<seq2seq4repair_space>test5;" ) ; } catch ( SQLException ex ) { <START_BUG> CreateTestTables . createTestTables ( 100000 , SimpleDBBaseTest . mainConnection , false ) ; <END_BUG> } } @ AfterClass public static void tearDownAfterClass ( ) throws Exception { } @ Before public void setUp ( ) throws Exception { } }

Fix:
CreateTestTables . createTestTables ( 1000 , SimpleDBBaseTest . mainConnection , false ) ;
Buggy code:
public class UrlRenderer { private static Map < String , Integer > PROTO_TO_PORT = new HashMap < String , Integer > ( ) ; private final Request request ; private Url baseUrl ; public UrlRenderer ( final Request request ) { } public Url setBaseUrl ( final Url base ) { } public Url getBaseUrl ( ) { } public String renderUrl ( final Url url ) { } public String renderFullUrl ( final Url url ) { } protected Integer resolvePort ( final Url url ) { } protected String resolveHost ( final Url url ) { } protected String resolveProtocol ( final Url url ) { } public String renderRelativeUrl ( final Url url ) { Args . notNull ( url , "url" ) ; if ( url . isAbsolute ( ) ) { return url . toString ( ) ; } else { List < String > baseUrlSegments = getBaseUrl ( ) . getSegments ( ) ; List < String > urlSegments = new ArrayList < String > ( url . getSegments ( ) ) ; List < String > newSegments = new ArrayList < String > ( ) ; int common = 0 ; String last = null ; for ( String s : baseUrlSegments ) { if ( ( ! ( urlSegments . isEmpty ( ) ) ) && ( s . equals ( urlSegments . get ( 0 ) ) ) ) { ++ common ; last = urlSegments . remove ( 0 ) ; } else { break ; } } if ( ( last != null ) && ( ( urlSegments . isEmpty ( ) ) || ( ( baseUrlSegments . size ( ) ) == common ) ) ) { -- common ; urlSegments . add ( 0 , last ) ; } int baseUrlSize = baseUrlSegments . size ( ) ; <START_BUG> if ( ( common + 1 ) == baseUrlSize ) { <END_BUG> newSegments . add ( "." ) ; } else { for ( int i = common + 1 ; i < baseUrlSize ; ++ i ) { newSegments . add ( ".." ) ; } } newSegments . addAll ( urlSegments ) ; return new Url ( newSegments , url . getQueryParameters ( ) ) . toString ( ) ; } } protected boolean shouldRenderAsFull ( final Url url ) { } public String renderContextPathRelativeUrl ( String url ) { } private static String choose ( String value , final String fallback1 , final String fallback2 ) { } private static Integer choose ( Integer value , final Integer fallback1 , final Integer fallback2 ) { } }

Fix:
if ( ( ( common + 1 ) == baseUrlSize ) && ( urlSegments . isEmpty ( ) ) ) {