nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WearableDataService extends WearableListenerService { private static final String TAG = "WearableDataService" ; private static final String SENSOR_DATA_PATH = "//current-sensor-data" ; private GoogleApiClient mGoogleApiClient ; @ Override public void onCreate ( ) { } @ Override public void onDataChanged ( DataEventBuffer dataEvents ) { Log . d ( WearableDataService . TAG , ( "onDataChanged:<seq2seq4repair_space>" + dataEvents ) ) ; final List < DataEvent > events = FreezableUtils . freezeIterable ( dataEvents ) ; dataEvents . close ( ) ; if ( ! ( mGoogleApiClient . isConnected ( ) ) ) { ConnectionResult connectionResult = mGoogleApiClient . blockingConnect ( 3 , TimeUnit . SECONDS ) ; if ( ! ( connectionResult . isSuccess ( ) ) ) { Log . e ( WearableDataService . TAG , "DataLayerListenerService<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>GoogleApiClient." ) ; return ; } } for ( DataEvent event : events ) { Uri uri = event . getDataItem ( ) . getUri ( ) ; String path = uri . getPath ( ) ; <START_BUG> if ( ( ( path . indexOf ( WearableDataService . SENSOR_DATA_PATH ) ) != ( - 1 ) ) && ( ( event . getType ( ) ) == ( DataEvent . TYPE_CHANGED ) ) ) { <END_BUG> byte [ ] rawData = event . getDataItem ( ) . getData ( ) ; DataMap sensorData = DataMap . fromByteArray ( rawData ) ; Log . d ( WearableDataService . TAG , ( "Recording<seq2seq4repair_space>new<seq2seq4repair_space>data<seq2seq4repair_space>item:<seq2seq4repair_space>" + path ) ) ; saveData ( sensorData ) ; } } } @ Override public void onMessageReceived ( MessageEvent messageEvent ) { } private JSONObject dataMapAsJSONObject ( DataMap data ) { } private void saveData ( DataMap data ) { } @ Override public void onPeerConnected ( Node peer ) { } @ Override public void onPeerDisconnected ( Node peer ) { } }

Fix:
if ( ( path . contains ( WearableDataService . SENSOR_DATA_PATH ) ) && ( ( event . getType ( ) ) == ( DataEvent . TYPE_CHANGED ) ) ) {
Buggy code:
public class DBGuestlistController extends DBControl { private static DBGuestlistController instance ; private DBGuestlistController ( ) { } public static synchronized DBGuestlistController getInstance ( ) { } public boolean addGuestToEvent ( Event e , User u , int status ) { } public boolean updateGuestEventStatus ( Event e , User u , int status ) { } public boolean deleteGuestFromGuestlist ( Event e , User u , int status ) { } public List < UserEventRelation > getInvitedUsers ( int id ) { Event ev = DBEventController . getInstance ( ) . getEventById ( id ) ; DataSource ds = getDataSource ( ) ; Connection c = DataSourceUtils . getConnection ( ds ) ; <START_BUG> ArrayList < UserEventRelation > gl = new ArrayList < UserEventRelation > ( ) ; <END_BUG> try { PreparedStatement preparedStatement = c . prepareStatement ( ( ( ( ( ( ( "SELECT<seq2seq4repair_space>" + ( GuestlistDBTabelle . COLUMN_GUEST ) ) + ",<seq2seq4repair_space>" ) + ( GuestlistDBTabelle . COLUMN_STATUS ) ) + "<seq2seq4repair_space>FROM<seq2seq4repair_space>guestlist<seq2seq4repair_space>WHERE<seq2seq4repair_space>" ) + ( GuestlistDBTabelle . COLUMN_EVENT ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>?;" ) ) ; preparedStatement . setInt ( 1 , id ) ; ResultSet resultSet = preparedStatement . executeQuery ( ) ; while ( resultSet . next ( ) ) { gl . add ( new UserEventRelation ( ev , UserFactory . create ( resultSet . getString ( COLUMN_GUEST ) ) , GuestlistDBTabelle . getAcceptedObjectForStatus ( resultSet . getInt ( COLUMN_STATUS ) ) ) ) ; } resultSet . close ( ) ; preparedStatement . close ( ) ; } catch ( SQLException ex ) { LOGGER . logException ( ex , "" ) ; } finally { releaseConnection ( ds , c ) ; } return gl ; } }

Fix:
List < UserEventRelation > gl = new ArrayList < > ( ) ;
Buggy code:
public class CliMain { public static final String HISTORYFILE = ".cassandra.history" ; private static TTransport transport_ = null ; private static Client thriftClient_ = null ; private static CliSessionState css_ = new CliSessionState ( ) ; private static CliClient cliClient_ ; private static CliCompleter completer_ = new CliCompleter ( ) ; public static void connect ( String server , int port ) { } public static void disconnect ( ) { } private static void printBanner ( ) { } public static boolean isConnected ( ) { } public static void updateCompletor ( Set < String > candidates ) { } private static void processCLIStmt ( String query ) { try { CliMain . cliClient_ . executeCLIStmt ( query ) ; } catch ( InvalidRequestException ire ) { CliMain . css_ . err . println ( ire . why ) ; if ( CliMain . css_ . debug ) ire . printStackTrace ( CliMain . css_ . err ) ; if ( CliMain . css_ . batch ) System . exit ( 4 ) ; <START_BUG> } catch ( Exception e ) { <END_BUG> CliMain . css_ . err . println ( ( ( e . getCause ( ) ) == null ? e . getMessage ( ) : e . getCause ( ) . getMessage ( ) ) ) ; if ( CliMain . css_ . debug ) e . printStackTrace ( CliMain . css_ . err ) ; if ( CliMain . css_ . batch ) System . exit ( 8 ) ; } } public static void main ( String [ ] args ) throws IOException { } }

Fix:
} catch ( Throwable e ) {
Buggy code:
public class TextFeedbackTest extends TestCase { OutputStream output ; TestRunner runner ; class TestResultPrinter extends ResultPrinter { TestResultPrinter ( PrintStream writer ) { } protected String elapsedTimeAsString ( long runTime ) { } } public static void main ( String [ ] args ) { } public void setUp ( ) { } public void testEmptySuite ( ) { } public void testOneTest ( ) { } public void testTwoTests ( ) { } public void testFailure ( ) { } public void testError ( ) { String expected = expected ( new String [ ] { ".E" , "Time:<seq2seq4repair_space>0" , "Errors<seq2seq4repair_space>here" , "" , "FAILURES!!!" , "Tests<seq2seq4repair_space>run:<seq2seq4repair_space>1,<seq2seq4repair_space>Failures:<seq2seq4repair_space>0,<seq2seq4repair_space>Errors:<seq2seq4repair_space>1" , "" } ) ; <START_BUG> ResultPrinter printer = new ResultPrinter ( new PrintStream ( output ) ) { <END_BUG> public void printErrors ( TestResult result ) { getWriter ( ) . println ( "Errors<seq2seq4repair_space>here" ) ; } } ; runner . setPrinter ( printer ) ; TestSuite suite = new TestSuite ( ) ; suite . addTest ( new TestCase ( ) { public void runTest ( ) throws Exception { throw new Exception ( ) ; } } ) ; runner . doRun ( suite ) ; assertEquals ( expected . toString ( ) , output . toString ( ) ) ; } public void testComparisonErrorMessage ( ) { } public void testComparisonErrorStartSame ( ) { } public void testComparisonErrorEndSame ( ) { } public void testComparisonErrorSame ( ) { } public void testComparisonErrorStartAndEndSame ( ) { } public void testComparisonErrorStartSameComplete ( ) { } public void testComparisonErrorEndSameComplete ( ) { } public void testComparisonErrorOverlapingMatches ( ) { } public void testComparisonErrorOverlapingMatches2 ( ) { } private String expected ( String [ ] lines ) { } }

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

Fix:
final SubsystemRegistration subsystem = context . registerSubsystem ( DependencySubsystemExtension . SUBSYSTEM_NAME , 1 , 0 , 0 ) ;
Buggy code:
final class SegmentMerger { private final Directory directory ; private final int termIndexInterval ; private final Codec codec ; private final IOContext context ; private final MergeState mergeState = new MergeState ( ) ; private final Builder fieldInfosBuilder ; SegmentMerger ( SegmentInfo segmentInfo , InfoStream infoStream , Directory dir , int termIndexInterval , MergeState . CheckAbort checkAbort , PayloadProcessorProvider payloadProcessorProvider , FieldInfos . FieldNumbers fieldNumbers , IOContext context ) { } final void add ( IndexReader reader ) { <START_BUG> for ( final AtomicReaderContext ctx : reader . getTopReaderContext ( ) . leaves ( ) ) { <END_BUG> final AtomicReader r = ctx . reader ( ) ; mergeState . readers . add ( r ) ; } } final void add ( SegmentReader reader ) { } final MergeState merge ( ) throws IOException { } private void setMatchingSegmentReaders ( ) { } private TypePromoter mergeDocValuesType ( TypePromoter previous , DocValues docValues ) { } public void mergeDocValuesAndNormsFieldInfos ( ) throws IOException { } protected void updatePromoted ( Map < FieldInfo , TypePromoter > infoAndPromoter , boolean norms ) { } private int mergeFields ( ) throws IOException { } private final int mergeVectors ( ) throws IOException { } private int setDocMaps ( ) throws IOException { } private final void mergeTerms ( SegmentWriteState segmentWriteState ) throws IOException { } private void mergePerDoc ( SegmentWriteState segmentWriteState ) throws IOException { } private void mergeNorms ( SegmentWriteState segmentWriteState ) throws IOException { } }

Fix:
for ( final AtomicReaderContext ctx : reader . leaves ( ) ) {
Buggy code:
public class TestCacheModeDisableSelective extends AbstractCacheModeTestCase { private static OpenJPAEntityManagerFactorySPI emf = null ; private static Cache cache = null ; private static List < String > sql = new ArrayList < String > ( ) ; private static JDBCListener listener ; private static Class < ? > [ ] expectedInCache = new Class < ? > [ ] { CacheableEntity . class , XmlCacheableEntity . class , NegatedUncacheableEntity . class , UnspecifiedEntity . class } ; private static Class < ? > [ ] expectedNotInCache = new Class < ? > [ ] { UncacheableEntity . class , XmlUncacheableEntity . class } ; @ Override public OpenJPAEntityManagerFactorySPI getEntityManagerFactory ( ) { if ( ( TestCacheModeDisableSelective . emf ) == null ) { <START_BUG> TestCacheModeDisableSelective . emf = createEntityManagerFactory ( "cache-mode-disable" ) ; <END_BUG> assertNotNull ( TestCacheModeDisableSelective . emf ) ; TestCacheModeDisableSelective . cache = TestCacheModeDisableSelective . emf . getCache ( ) ; assertNotNull ( TestCacheModeDisableSelective . cache ) ; } return TestCacheModeDisableSelective . emf ; } public JDBCListener getListener ( ) { } public List < String > getSql ( ) { } public void testCacheables ( ) { } public void testUncacheables ( ) { } public void testUnspecified ( ) { } @ Override protected Class < ? > [ ] getExpectedInCache ( ) { } @ Override protected Class < ? > [ ] getExpectedNotInCache ( ) { } }

Fix:
TestCacheModeDisableSelective . emf = createEntityManagerFactory ( "cache-mode-disable" , null ) ;
Buggy code:
public class VariableDeclarationStatement extends Statement { public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = new SimplePropertyDescriptor ( VariableDeclarationStatement . class , "modifiers" , int . class , ASTNode . MANDATORY ) ; public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = new ChildListPropertyDescriptor ( VariableDeclarationStatement . class , "modifiers" , IExtendedModifier . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor TYPE_PROPERTY = new ChildPropertyDescriptor ( VariableDeclarationStatement . class , "type" , Type . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor FRAGMENTS_PROPERTY = new ChildListPropertyDescriptor ( VariableDeclarationStatement . class , "fragments" , VariableDeclarationFragment . 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 ASTNode . NodeList modifiers = null ; private int modifierFlags = Modifier . NONE ; private Type baseType = null ; private ASTNode . NodeList variableDeclarationFragments = new ASTNode . NodeList ( VariableDeclarationStatement . FRAGMENTS_PROPERTY ) ; VariableDeclarationStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final int internalGetSetIntProperty ( SimplePropertyDescriptor property , boolean get , int value ) { } 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 List modifiers ( ) { } public int getModifiers ( ) { } public void setModifiers ( int modifiers ) { } public Type getType ( ) { if ( ( this . baseType ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . baseType ) == null ) { preLazyInit ( ) ; this . baseType = this . ast . newPrimitiveType ( PrimitiveType . INT ) ; postLazyInit ( this . baseType , VariableDeclarationStatement . TYPE_PROPERTY ) ; } } } return this . baseType ; } public void setType ( Type type ) { } public List fragments ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class TestTeeSinkTokenFilter extends BaseTokenStreamTestCase { protected StringBuilder buffer1 ; protected StringBuilder buffer2 ; protected String [ ] tokens1 ; protected String [ ] tokens2 ; @ Override public void setUp ( ) throws Exception { } static final SinkFilter theFilter = new TeeSinkTokenFilter . SinkFilter ( ) { @ Override public boolean accept ( AttributeSource a ) { } } ; static final SinkFilter dogFilter = new TeeSinkTokenFilter . SinkFilter ( ) { @ Override public boolean accept ( AttributeSource a ) { } } ; public void testEndOffsetPositionWithTeeSinkTokenFilter ( ) throws Exception { Directory dir = newDirectory ( ) ; Analyzer analyzer = new MockAnalyzer ( random ( ) , MockTokenizer . WHITESPACE , false ) ; IndexWriter w = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) ) ; Document doc = new Document ( ) ; TokenStream tokenStream = analyzer . tokenStream ( "field" , "abcd<seq2seq4repair_space>" ) ; TeeSinkTokenFilter tee = new TeeSinkTokenFilter ( tokenStream ) ; TokenStream sink = tee . newSinkTokenStream ( ) ; FieldType ft = new FieldType ( TextField . TYPE_NOT_STORED ) ; ft . setStoreTermVectors ( true ) ; ft . setStoreTermVectorOffsets ( true ) ; ft . setStoreTermVectorPositions ( true ) ; Field f1 = new Field ( "field" , tee , ft ) ; Field f2 = new Field ( "field" , sink , ft ) ; doc . add ( f1 ) ; doc . add ( f2 ) ; w . addDocument ( doc ) ; <START_BUG> w . close ( ) ; <END_BUG> IndexReader r = DirectoryReader . open ( dir ) ; Terms vector = r . getTermVectors ( 0 ) . terms ( "field" ) ; assertEquals ( 1 , vector . size ( ) ) ; TermsEnum termsEnum = vector . iterator ( null ) ; termsEnum . next ( ) ; assertEquals ( 2 , termsEnum . totalTermFreq ( ) ) ; DocsAndPositionsEnum positions = termsEnum . docsAndPositions ( null , null ) ; assertTrue ( ( ( positions . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) ) ; assertEquals ( 2 , positions . freq ( ) ) ; positions . nextPosition ( ) ; assertEquals ( 0 , positions . startOffset ( ) ) ; assertEquals ( 4 , positions . endOffset ( ) ) ; positions . nextPosition ( ) ; assertEquals ( 8 , positions . startOffset ( ) ) ; assertEquals ( 12 , positions . endOffset ( ) ) ; assertEquals ( NO_MORE_DOCS , positions . nextDoc ( ) ) ; r . close ( ) ; dir . close ( ) ; } public void testGeneral ( ) throws IOException { } public void testMultipleSources ( ) throws Exception { } private StandardTokenizer standardTokenizer ( StringBuilder builder ) throws IOException { } public void performance ( ) throws Exception { } class ModuloTokenFilter extends TokenFilter { int modCount ; ModuloTokenFilter ( TokenStream input , int mc ) { } int count = 0 ; @ Override public boolean incrementToken ( ) throws IOException { } } class ModuloSinkFilter extends TeeSinkTokenFilter . SinkFilter { int count = 0 ; int modCount ; ModuloSinkFilter ( int mc ) { } @ Override public boolean accept ( AttributeSource a ) { } } }

Fix:
w . shutdown ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class GetMessageListServlet extends HttpServlet { private static void writeMessage ( PrintWriter writer , Message message ) { <START_BUG> String text = message . getText ( ) . replaceAll ( "\"" , "\\\\\"" ) . replaceAll ( "\"" , "\\\\\"" ) . replaceAll ( "//" , "\\\\//" ) . replaceAll ( "\b" , "\\\\b" ) . replaceAll ( "\f" , "\\\\f" ) . replaceAll ( "\n" , "\\\\n" ) . replaceAll ( "\r" , "\\\\r" ) . replaceAll ( "\t" , "\\\\t" ) ; <END_BUG> writer . print ( "{<seq2seq4repair_space>\"nickname\":<seq2seq4repair_space>\"" ) ; writer . print ( message . getNickname ( ) ) ; writer . print ( "\",<seq2seq4repair_space>\"text\":<seq2seq4repair_space>\"" ) ; writer . print ( text ) ; writer . print ( "\"<seq2seq4repair_space>}" ) ; } private static void writeMessageList ( PrintWriter writer , List < Message > messageList ) { } public static void sendMessageList ( HttpServletRequest req , HttpServletResponse resp ) throws IOException { } @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } }

Fix:
String text = message . getText ( ) . replaceAll ( "\\\\" , "\\\\\\\\" ) . replaceAll ( "\"" , "\\\\\"" ) . replaceAll ( "//" , "\\\\//" ) . replaceAll ( "\b" , "\\\\b" ) . replaceAll ( "\f" , "\\\\f" ) . replaceAll ( "\n" , "\\\\n" ) . replaceAll ( "\r" , "\\\\r" ) . replaceAll ( "\t" , "\\\\t" ) ;
Buggy code:
public class SSTableReaderTest extends CleanupHelper { static Token t ( int i ) { } @ Test public void testGetPositionsForRanges ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testSpannedIndexPositions ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testPersistentStatistics ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testGetPositionsForRangesWithKeyCache ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testPersistentStatisticsWithSecondaryIndex ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testPersistentStatisticsFromOlderIndexedSSTable ( ) throws IOException , InterruptedException , ExecutionException { } private void assertIndexQueryWorks ( ColumnFamilyStore indexedCFS ) { assert "Indexed1" . equals ( indexedCFS . getColumnFamilyName ( ) ) ; indexedCFS . clearUnsafe ( ) ; for ( ColumnFamilyStore indexCfs : indexedCFS . indexManager . getIndexesBackedByCfs ( ) ) { indexCfs . clearUnsafe ( ) ; indexCfs . loadNewSSTables ( ) ; } indexedCFS . loadNewSSTables ( ) ; IndexExpression expr = new IndexExpression ( ByteBufferUtil . bytes ( "birthdate" ) , IndexOperator . EQ , ByteBufferUtil . bytes ( 1L ) ) ; IndexClause clause = new IndexClause ( Arrays . asList ( expr ) , ByteBufferUtil . EMPTY_BYTE_BUFFER , 100 ) ; IPartitioner p = StorageService . getPartitioner ( ) ; <START_BUG> Range range = new Range ( p . getMinimumToken ( ) , p . getMinimumToken ( ) ) ; <END_BUG> List < Row > rows = indexedCFS . search ( clause , range , new IdentityQueryFilter ( ) ) ; assert ( rows . size ( ) ) == 1 ; } private List < Range < Token > > makeRanges ( Token left , Token right ) { } private DecoratedKey k ( int i ) { } }

Fix:
Range < RowPosition > range = Util . range ( "" , "" ) ;
Buggy code:
abstract class Anchor { DisplayManager displayManager ; JEditTextArea textArea ; int physicalLine ; int scrollLine ; boolean callChanged ; boolean callReset ; Anchor ( DisplayManager displayManager , JEditTextArea textArea ) { } abstract void reset ( ) { } abstract void changed ( ) { } public String toString ( ) { } void contentInserted ( int startLine , int numLines ) { } void preContentRemoved ( int startLine , int numLines ) { if ( ( this . physicalLine ) >= startLine ) { if ( ( this . physicalLine ) == startLine ) this . callChanged = true ; else { int end = Math . min ( ( startLine + numLines ) , this . physicalLine ) ; for ( int i = startLine + 1 ; i <= end ; i ++ ) { <START_BUG> if ( displayManager . isLineVisible ( i ) ) { <END_BUG> this . scrollLine -= displayManager . screenLineMgr . getScreenLineCount ( i ) ; } } this . physicalLine -= end - startLine ; this . callChanged = true ; } } } }

Fix:
if ( displayManager . isLineVisible ( ( i - 1 ) ) ) {
Buggy code:
public class Trim extends AbstractVal { private final Val _val ; private final Val _trimChar ; private final Boolean _where ; private ClassMetaData _meta = null ; public Trim ( Val val , Val trimChar , Boolean where ) { } public Val getVal ( ) { } public Val getTrimChar ( ) { } public Boolean getWhere ( ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public Class getType ( ) { } public void setImplicitType ( Class type ) { } public ExpState initialize ( Select sel , ExpContext ctx , int flags ) { } private static class TrimExpState extends ExpState { public final ExpState valueState ; public final ExpState charState ; public TrimExpState ( Joins joins , ExpState valueState , ExpState charState ) { } } public void select ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void selectColumns ( Select sel , ExpContext ctx , ExpState state , boolean pks ) { } public void groupBy ( Select sel , ExpContext ctx , ExpState state ) { } public void orderBy ( Select sel , ExpContext ctx , ExpState state , boolean asc ) { <START_BUG> sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false ) ; <END_BUG> } private SQLBuffer newSQLBuffer ( Select sel , ExpContext ctx , ExpState state ) { } public Object load ( ExpContext ctx , ExpState state , Result res ) throws SQLException { } public void calculateValue ( Select sel , ExpContext ctx , ExpState state , Val other , ExpState otherState ) { } public int length ( Select sel , ExpContext ctx , ExpState state ) { } public void appendTo ( Select sel , ExpContext ctx , ExpState state , SQLBuffer sql , int index ) { } public void acceptVisit ( ExpressionVisitor visitor ) { } public int getId ( ) { } }

Fix:
sel . orderBy ( newSQLBuffer ( sel , ctx , state ) , asc , false , getSelectAs ( ) ) ;
Buggy code:
abstract class ExecutingLink extends IndicatingAjaxFallbackLink < Void > { @ SpringBean protected ProjectRepository repo ; @ SpringBean protected ScenarioExecutor executor ; protected final String projectKey ; private final OutputDialog dialog ; public ExecutingLink ( String id , String projectKey , OutputDialog dialog ) { } @ Override public void onClick ( AjaxRequestTarget target ) { } protected Index index ( ) { } protected Project project ( ) { } protected String contextKey ( ) { Project project = project ( ) ; String contextKey = WicketUtils . getContextKey ( getWebRequest ( ) , project ) ; if ( contextKey == null ) { <START_BUG> WicketUtils . addContextKey ( getWebRequest ( ) , ( ( WebResponse ) ( getResponse ( ) ) ) , project , project . getContexts ( ) . keySet ( ) . iterator ( ) . next ( ) ) ; <END_BUG> } return contextKey ; } protected abstract ExecutionKey execute ( ) { } No newline ; at end ; of file ; }

Fix:
WicketUtils . setContextKey ( getWebRequest ( ) , ( ( WebResponse ) ( getResponse ( ) ) ) , project , project . getContexts ( ) . keySet ( ) . iterator ( ) . next ( ) ) ;
Buggy code:
public final class Jdk12Interceptor extends BaseInterceptor { private ContextManager cm ; private int debug = 0 ; public Jdk12Interceptor ( ) { } public void preServletInit ( Context ctx , Handler sw ) throws TomcatException { } public int preInitCheck ( Request req , Handler sw ) throws TomcatException { <START_BUG> fixJDKContextClassLoader ( ctx ) ; <END_BUG> return 0 ; } public void preServletDestroy ( Context ctx , Handler sw ) throws TomcatException { } public void postServletDestroy ( Context ctx , Handler sw ) throws TomcatException { } public void postServletInit ( Context ctx , Handler sw ) throws TomcatException { } public int postInitCheck ( Request req , Handler sw ) throws TomcatException { } public int preService ( Request request , Response response ) { } public int postService ( Request request , Response response ) { } static Jdk11Compat jdk11Compat = Jdk11Compat . getJdkCompat ( ) ; private final void fixJDKContextClassLoader ( Context ctx ) { } }

Fix:
fixJDKContextClassLoader ( req . getContext ( ) ) ;
Buggy code:
public class Deck implements Serializable { private static final long serialVersionUID = 99L ; private ArrayList < Card > deck ; public Deck ( ) { } public int findCard ( String name ) { int index = - 1 ; int cpt = 0 ; for ( Card c : deck ) { <START_BUG> if ( c . name . equals ( name ) ) { <END_BUG> index = cpt ; break ; } cpt ++ ; } return index ; } public Card getCard ( int index ) { } private ArrayList < Card > findCardsByType ( CardType cardType ) { } private ArrayList < Card > findCardsByCollection ( String collection ) { } public void addCard ( Card c ) { } public void delCard ( int index ) { } public String displayCard ( int index ) { } public String displayDeck ( ) { } public String displayByType ( CardType cardType ) { } public String displayByCollection ( String collection ) { } }

Fix:
if ( c . name . toLowerCase ( ) . equals ( name . toLowerCase ( ) ) ) {
Buggy code:
public class IndexHelper { public static void skipBloomFilter ( FileDataInput in ) throws IOException { } public static void skipIndex ( FileDataInput file ) throws IOException { } public static ArrayList < IndexHelper . IndexInfo > deserializeIndex ( FileDataInput in ) throws IOException { } public static Filter defreezeBloomFilter ( FileDataInput file , boolean useOldBuffer ) throws IOException { int size = file . readInt ( ) ; ByteBuffer bytes = file . readBytes ( size ) ; DataInputStream stream = new DataInputStream ( ByteBufferUtil . inputStream ( bytes ) ) ; <START_BUG> return useOldBuffer ? LegacyBloomFilter . serializer ( ) . deserialize ( stream ) : BloomFilter . serializer ( ) . deserialize ( stream ) ; <END_BUG> } public static int indexFor ( ByteBuffer name , List < IndexHelper . IndexInfo > indexList , AbstractType comparator , boolean reversed ) { } public static Comparator < IndexHelper . IndexInfo > getComparator ( final AbstractType nameComparator ) { } public static class IndexInfo { public final long width ; public final ByteBuffer lastName ; public final ByteBuffer firstName ; public final long offset ; public IndexInfo ( ByteBuffer firstName , ByteBuffer lastName , long offset , long width ) { } public void serialize ( DataOutput dos ) throws IOException { } public int serializedSize ( ) { } public static IndexHelper . IndexInfo deserialize ( FileDataInput dis ) throws IOException { } } }

Fix:
return useOldBuffer ? LegacyBloomFilter . serializer ( ) . deserialize ( stream , 0 ) : BloomFilter . serializer ( ) . deserialize ( stream ) ;
Buggy code:
public class OptionalButtonClickedReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { ActivityManager am = ( ( ActivityManager ) ( context . getSystemService ( ACTIVITY_SERVICE ) ) ) ; List < ActivityManager . RecentTaskInfo > recentTaskList = am . getRecentTasks ( 5 , RECENT_WITH_EXCLUDED ) ; <START_BUG> for ( int j = 1 ; j < 4 ; j ++ ) { <END_BUG> RecentTaskInfo info = recentTaskList . get ( j ) ; Intent i = info . baseIntent ; String packageName = i . getComponent ( ) . getPackageName ( ) ; if ( ! ( "com.android.launcher" . equals ( packageName ) ) ) { try { context . startActivity ( info . baseIntent ) ; break ; } catch ( ActivityNotFoundException e ) { } catch ( SecurityException e ) { } } } } }

Fix:
for ( int j = 1 ; j < ( recentTaskList . size ( ) ) ; j ++ ) {
Buggy code:
public class Error extends Message { private String error ; public Error ( ) { } public Error ( String error ) { } @ Override public String toString ( ) { } @ Override public void decodeMessage ( String message ) { String [ ] s = message . split ( "<seq2seq4repair_space>" ) ; if ( ( s . length ) > 2 ) { int index = message . indexOf ( s [ 1 ] ) ; <START_BUG> this . error = message . substring ( ( index + ( s [ 1 ] . length ( ) ) ) ) ; <END_BUG> } } }

Fix:
this . error = message . substring ( ( ( 1 + index ) + ( s [ 1 ] . length ( ) ) ) ) ;
Buggy code:
public class AdminObjectAdd extends AbstractAddStepHandler implements DescriptionProvider { public static final AdminObjectAdd INSTANCE = new AdminObjectAdd ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode modelNode ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode recoveryEnvModel , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > serviceControllers ) throws OperationFailedException { final ModelNode address = operation . require ( OP_ADDR ) ; PathAddress path = PathAddress . pathAddress ( address ) ; final String archiveName = path . getElement ( ( ( path . size ( ) ) - 2 ) ) . getValue ( ) ; final String poolName = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; <START_BUG> final ModifiableAdminObject adminObjectValue = RaOperationUtil . buildAdminObjects ( operation , poolName ) ; <END_BUG> ServiceName serviceName = ServiceName . of ( RA_SERVICE , archiveName , poolName ) ; ServiceName raServiceName = ServiceName . of ( RA_SERVICE , archiveName ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final AdminObjectService service = new AdminObjectService ( adminObjectValue ) ; ServiceController < ? > controller = serviceTarget . addService ( serviceName , service ) . setInitialMode ( ACTIVE ) . addDependency ( raServiceName , ModifiableResourceAdapter . class , service . getRaInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; } }

Fix:
final ModifiableAdminObject adminObjectValue = RaOperationUtil . buildAdminObjects ( context , operation , poolName ) ;
Buggy code:
public class Issue extends BaseIssue implements Persistent { public String getUniqueId ( ) throws Exception { } public HashMap getModuleAttributeValuesMap ( ) throws Exception { Criteria crit = new Criteria ( 2 ) . add ( DELETED , false ) ; Attribute [ ] attributes = null ; HashMap siaValuesMap = null ; try { attributes = getModule ( ) . getAttributes ( crit ) ; siaValuesMap = getAttributeValuesMap ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } HashMap map = new HashMap ( ( ( int ) ( ( 1.25 * ( attributes . length ) ) + 1 ) ) ) ; for ( int i = 0 ; i < ( attributes . length ) ; i ++ ) { String key = attributes [ i ] . getName ( ) . toUpperCase ( ) ; if ( siaValuesMap . containsKey ( key ) ) { map . put ( key , siaValuesMap . get ( key ) ) ; } else { AttributeValue aval = AttributeValue . getNewInstance ( attributes [ i ] , this ) ; <START_BUG> addAttributeValues ( aval ) ; <END_BUG> map . put ( key , aval ) ; } } return map ; } public AttributeValue [ ] getOrderedModuleAttributeValues ( ) throws Exception { } public AttributeValue [ ] getOrderedAttributeValues ( ) throws Exception { } private AttributeValue [ ] orderAttributeValues ( Map values , Attribute [ ] attributes ) throws Exception { } public HashMap getAttributeValuesMap ( ) throws Exception { } public HashMap getAllAttributeValuesMap ( ) throws Exception { } public boolean containsMinimumAttributeValues ( ) throws Exception { } public void save ( ) throws Exception { } public static List searchKeywords ( String [ ] keywords , boolean useAnd ) throws Exception { } }

Fix:
addAttributeValue ( aval ) ;
Buggy code:
public class FunctionCompiler implements AstVisitor { private final Console console ; private final SymbolTable symbolTable ; private final FunctionPrototypeBuilder builder ; public FunctionCompiler ( Console console , SymbolTable symbolTable , FunctionPrototypeBuilder builder ) { } public FunctionPrototype getFunctionPrototype ( ) { } @ Override public void accept ( Ast node ) { } @ Override public void accept ( NodeFunctionDef node ) { if ( symbolTable . isSymbolDefined ( node . name ) ) { console . warning ( ( ( ( ( ( ( "(FunctionCompiler)<seq2seq4repair_space>line<seq2seq4repair_space>" + ( node . location . line ) ) + "<seq2seq4repair_space>(column<seq2seq4repair_space>" ) + ( node . location . column ) ) + "):<seq2seq4repair_space>symbol<seq2seq4repair_space>'" ) + ( node . name ) ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>defined." ) ) ; } else { symbolTable . addSymbol ( node . name ) ; } <START_BUG> FunctionPrototypeBuilder newBuilder = new FunctionPrototypeBuilder ( ) ; <END_BUG> for ( Identifier name : node . params ) { newBuilder . addParameter ( name ) ; } if ( node . isVariadic ) { newBuilder . setIsVariadic ( ) ; } symbolTable . beginScope ( ) ; FunctionCompiler newCompiler = new FunctionCompiler ( console , symbolTable , newBuilder ) ; node . body . visit ( newCompiler ) ; symbolTable . endScope ( ) ; FunctionPrototype newProto = newCompiler . getFunctionPrototype ( ) ; int newProtoIndex = builder . addNestedFunction ( newProto ) ; builder . addOpBuildClosure ( newProtoIndex ) ; Symbol fnSymbol = symbolTable . getSymbol ( node . name ) ; switch ( fnSymbol . type ) { case GLOBAL : { builder . addOpStoreGlobal ( fnSymbol . index ) ; break ; } case LOCAL : { builder . addOpStoreLocal ( fnSymbol . index ) ; break ; } } } @ Override public void accept ( NodeInfixExpression node ) { } @ Override public void accept ( NodePostfixExpression node ) { } @ Override public void accept ( NodeIdentifier node ) { } @ Override public void accept ( NodeFunctionCall node ) { } @ Override public void accept ( NodeStringLiteral node ) { } @ Override public void accept ( NodeExternDecl node ) { } @ Override public void accept ( NodeBlock node ) { } }

Fix:
FunctionPrototypeBuilder newBuilder = new FunctionPrototypeBuilder ( builder ) ;
Buggy code:
public class RundasMySqlConnectionFactory implements ConnectionFactory { @ Override public Connection buildConnection ( ) { Connection conn = null ; String DRIVER = "com.mysql.jdbc.Driver" ; <START_BUG> String URL = "jdbc:mysql:////localhost:8889//Rundas?user=rundas&password=Rundas1" ; <END_BUG> try { Class . forName ( DRIVER ) ; conn = DriverManager . getConnection ( URL ) ; } catch ( SQLException s ) { System . err . println ( "Sql<seq2seq4repair_space>issue:<seq2seq4repair_space>" ) ; System . err . println ( s . getMessage ( ) ) ; return null ; } catch ( ClassNotFoundException c ) { System . err . println ( "Problem<seq2seq4repair_space>finding<seq2seq4repair_space>JDBC<seq2seq4repair_space>driver" ) ; return null ; } return conn ; } }

Fix:
String URL = "jdbc:mysql:////localhost:3306//Rundas?user=rundas&password=Rundas1" ;
Buggy code:
public class ConsumerSessionFragment extends ChildFragment < ConsumerSession . Message > { private View userInputView ; private View userChooseView ; private View userConfirmView ; public ConsumerSessionFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void addViewByLastMessage ( ) { } @ Override public void setEmptyText ( CharSequence text ) { } private Message getLastMessage ( ) { } private void switchInputView ( View inputView ) { } @ Override protected void setItemView ( ConsumerSession . Message message , View convertView ) { } public void updateConsumerSessionMessage ( ) { <START_BUG> refreshList ( ) ; <END_BUG> addViewByLastMessage ( ) ; } }

Fix:
setData ( data ) ;
Buggy code:
public class EditProfileActivity extends Activity { private static final int SMS_NOTIFICATION = 1 ; private static final int EMAIL_NOTIFICATION = 2 ; private int notificationType = 0 ; private String notificationTypeString ; private LinearLayout updateMessages ; private HashMap < String , Integer > nationalitySpinner ; private HashMap < String , Integer > countrySpinner ; public void clearMessages ( ) { } public void putMessage ( String message ) { } public void doUpdateProfile ( View view ) { } public void onSMSNotificationClick ( View v ) { } public void onEmailNotificationClick ( View v ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_edit_profile ) ; <START_BUG> updateMessages = ( ( LinearLayout ) ( findViewById ( update_messages ) ) ) ; <END_BUG> nationalitySpinner = new HashMap < String , Integer > ( ) ; nationalitySpinner . put ( "Indonesian" , 1 ) ; nationalitySpinner . put ( "Singaporean" , 2 ) ; nationalitySpinner . put ( "Thailand" , 3 ) ; nationalitySpinner . put ( "Malaysian" , 4 ) ; nationalitySpinner . put ( "Vietnamese" , 5 ) ; countrySpinner = new HashMap < String , Integer > ( ) ; countrySpinner . put ( "Singapore" , 1 ) ; countrySpinner . put ( "Thailand" , 2 ) ; countrySpinner . put ( "Malaysia" , 3 ) ; User user = Global . getUserManager ( ) . getUser ( ) ; ( ( EditText ) ( findViewById ( passport_field ) ) ) . setText ( user . getPassportNumber ( ) ) ; ( ( TextView ) ( findViewById ( name_field ) ) ) . setText ( user . getFullName ( ) ) ; ( ( EditText ) ( findViewById ( address_field ) ) ) . setText ( user . getAddress ( ) ) ; ( ( EditText ) ( findViewById ( phone_number_field ) ) ) . setText ( user . getPhoneNumber ( ) ) ; ( ( TextView ) ( findViewById ( email_field ) ) ) . setText ( user . getEmail ( ) ) ; ( ( TextView ) ( findViewById ( dob_field ) ) ) . setText ( user . getDateOfBirth ( ) ) ; ( ( TextView ) ( findViewById ( gender_field ) ) ) . setText ( user . getGender ( ) ) ; ( ( Spinner ) ( findViewById ( nationality_field ) ) ) . setSelection ( nationalitySpinner . get ( user . getNationality ( ) ) ) ; ( ( Spinner ) ( findViewById ( country_field ) ) ) . setSelection ( countrySpinner . get ( user . getCountry ( ) ) ) ; String notification = user . getNotification ( ) ; if ( notification . equals ( "all" ) ) { notificationType = 3 ; } else if ( notification . equals ( "email" ) ) { notificationType = 2 ; } else if ( notification . equals ( "sms" ) ) { notificationType = 1 ; } else { notificationType = 0 ; } ( ( CheckBox ) ( findViewById ( email_notification_checkbox ) ) ) . setChecked ( ( ( user . getNotification ( ) . equals ( "all" ) ) || ( user . getNotification ( ) . equals ( "email" ) ) ) ) ; ( ( CheckBox ) ( findViewById ( sms_notification_checkbox ) ) ) . setChecked ( ( ( user . getNotification ( ) . equals ( "all" ) ) || ( user . getNotification ( ) . equals ( "sms" ) ) ) ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
updateMessages = ( ( LinearLayout ) ( findViewById ( LL_EditProfileMessages ) ) ) ;
Buggy code:
public class TapeDao extends BaseDao { public TapeDao ( RequestContext requestContext ) { } public List < Tape > getTapeList ( QueryBits query ) throws DatabaseException { } private List < Tape > getTapeList ( QueryHelper queryHelper ) throws DatabaseException { } public Tape getTape ( Integer tapeId ) throws DatabaseException , ObjectNotFoundException { } public int getCount ( QueryBits query ) throws DatabaseException { } public List < Tape > getLinkedTapeList ( QueryBits query , ObjectLink objectMap ) throws DatabaseException { } public ActionMessages addTape ( Tape tape ) throws DatabaseException { } public ActionMessages update ( Tape tape ) throws DatabaseException { } public ActionMessages delete ( Tape tape ) throws DatabaseException { } private Tape newTape ( ResultSet rs ) throws DatabaseException , SQLException { Tape tape = new Tape ( ) ; tape . setId ( rs . getInt ( "tape_id" ) ) ; tape . setTapeName ( rs . getString ( "tape_name" ) ) ; tape . setTapeSerialNumber ( StringUtils . replaceNull ( rs . getString ( "serial_number" ) ) ) ; <START_BUG> tape . setTapeSerialNumber ( StringUtils . replaceNull ( rs . getString ( "barcode_number" ) ) ) ; <END_BUG> return tape ; } }

Fix:
tape . setTapeBarcodeNumber ( StringUtils . replaceNull ( rs . getString ( "barcode_number" ) ) ) ;
Buggy code:
public class EncryptMessageAction extends CheckBoxAction { public EncryptMessageAction ( ComposerController composerController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> log . debug ( "start<seq2seq4repair_space>encryption..." ) ; <END_BUG> ComposerModel model = ( ( ComposerModel ) ( ( ( ComposerController ) ( getFrameMediator ( ) ) ) . getModel ( ) ) ) ; model . setEncryptMessage ( getCheckBoxMenuItem ( ) . isSelected ( ) ) ; } }

Fix:
log . info ( "start<seq2seq4repair_space>encryption..." ) ;
Buggy code:
public class SarStructureProcessor implements DeploymentUnitProcessor { private static final String SAR_EXTENSION = ".sar" ; private static final String JAR_EXTENSION = ".jar" ; private static final SuffixMatchFilter CHILD_ARCHIVE_FILTER = new SuffixMatchFilter ( SarStructureProcessor . JAR_EXTENSION , VisitorAttributes . RECURSE_LEAVES_ONLY ) ; private static Closeable NO_OP_CLOSEABLE = new Closeable ( ) { public void close ( ) throws IOException { } } ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot resourceRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; if ( resourceRoot == null ) { return ; } final VirtualFile deploymentRoot = resourceRoot . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) { return ; } final String deploymentRootName = deploymentRoot . getName ( ) . toLowerCase ( Locale . ENGLISH ) ; if ( ! ( deploymentRootName . endsWith ( SarStructureProcessor . SAR_EXTENSION ) ) ) { return ; } ModuleRootMarker . mark ( resourceRoot , true ) ; Map < String , MountedDeploymentOverlay > overlays = deploymentUnit . getAttachment ( DEPLOYMENT_OVERLAY_LOCATIONS ) ; try { final List < VirtualFile > childArchives = deploymentRoot . getChildren ( SarStructureProcessor . CHILD_ARCHIVE_FILTER ) ; for ( final VirtualFile child : childArchives ) { String relativeName = child . getPathNameRelativeTo ( deploymentRoot ) ; MountedDeploymentOverlay overlay = overlays . get ( relativeName ) ; Closeable closable = SarStructureProcessor . NO_OP_CLOSEABLE ; if ( overlay != null ) { overlay . remountAsZip ( false ) ; } else if ( child . isFile ( ) ) { closable = VFS . mountZip ( child , child , TempFileProviderService . provider ( ) ) ; } final MountHandle mountHandle = new MountHandle ( closable ) ; final ResourceRoot childResource = new ResourceRoot ( child , mountHandle ) ; ModuleRootMarker . mark ( childResource ) ; deploymentUnit . addToAttachmentList ( RESOURCE_ROOTS , childResource ) ; resourceRoot . addToAttachmentList ( INDEX_IGNORE_PATHS , child . getPathNameRelativeTo ( deploymentRoot ) ) ; } } catch ( IOException e ) { <START_BUG> MESSAGES . failedToProcessSarChild ( e , deploymentRoot ) ; <END_BUG> } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
throw MESSAGES . failedToProcessSarChild ( e , deploymentRoot ) ;
Buggy code:
public class Query extends org . tigris . scarab . om . BaseQuery implements Persistent { private static final String GET_R_QUERY_USER = "getRQueryUser" ; public ScarabModule getScarabModule ( ) { } public void setScarabModule ( ScarabModule module ) { } public void setModule ( Module me ) throws TorqueException { } public Module getModule ( ) throws TorqueException { } public static Query getInstance ( ) { } public boolean saveAndSendEmail ( ScarabUser user , Module module , TemplateContext context ) throws Exception { } public String getExecuteLink ( String link ) { } public String getEditLink ( String link ) { } public void subscribe ( ScarabUser user , String frequencyId ) throws Exception { } public void unSubscribe ( ScarabUser user ) throws Exception { } public RQueryUser getRQueryUser ( ScarabUser user ) throws Exception { } public void approve ( ScarabUser user , boolean approved ) throws Exception { Module module = getModule ( ) ; if ( user . hasPermission ( ITEM__APPROVE , module ) ) { setApproved ( true ) ; if ( approved ) { <START_BUG> setScopeId ( GLOBAL__PK ) ; <END_BUG> } save ( ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } public void delete ( ScarabUser user ) throws Exception { } public void copyQuery ( ScarabUser user ) throws Exception { } }

Fix:
setScopeId ( MODULE__PK ) ;
Buggy code:
public class ValidationController { private static ValidationController instance = null ; private int min_layover = ValidationConstants . MIN_LAYOVER_MINUTES ; private int max_layover = ValidationConstants . MAX_LAYOVER_MINUTES ; private int max_hops = ValidationConstants . MAX_HOPS ; public int verbose = 0 ; private void SetDefaultsFromConstants ( ) { } private void SetDefaults ( ) throws IOException { } private ValidationController ( ) { } public List < ? > GetAirportList ( ) { } public void PopulateAirplanes ( ) { } public Airplane GetAirplane ( String model ) { } public static ValidationController Instance ( ) { } public static int GetMaxLayoverMinutes ( ) { } public static int GetMinLayoverMinutes ( ) { } public static int GetMaxHops ( ) { } public int GetTimezoneOffset ( float Latitude , float Longitude ) throws DocumentException { } public boolean ConfirmTrip ( Trip trip ) { List < String > f_sequence = trip . ListFlightSequence ( ) ; if ( ( this . verbose ) > 2 ) { System . out . println ( "Reserving<seq2seq4repair_space>flights:" ) ; for ( int i = 0 ; i < ( f_sequence . size ( ) ) ; i ++ ) { System . out . println ( f_sequence . get ( i ) ) ; } } if ( ( this . verbose ) > 1 ) System . out . println ( "\nGenerating<seq2seq4repair_space>XML..." ) ; <START_BUG> String xml = ReserveXML . ReserveXML ( f_sequence ) ; <END_BUG> if ( ( this . verbose ) > 1 ) System . out . println ( xml ) ; if ( ( this . verbose ) > 1 ) System . out . println ( "\nSending<seq2seq4repair_space>to<seq2seq4repair_space>Server..." ) ; boolean result = ServerInterface . ReserveFlights ( xml ) ; if ( ( this . verbose ) > 0 ) System . out . println ( ( "Server<seq2seq4repair_space>returned<seq2seq4repair_space>" + ( result ? "Success" : "Failure" ) ) ) ; return result ; } public static void main ( String [ ] args ) throws IOException { } }

Fix:
String xml = ReserveXML . MakeXML ( f_sequence ) ;