nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SuppressCodecs ( "Lucene3x" ) public class TestDocValuesIndexing extends LuceneTestCase { public void testAddIndexes ( ) throws IOException { } public void testMultiValuedDocValuesField ( ) throws Exception { } public void testDifferentTypedDocValuesField ( ) throws Exception { } public void testDifferentTypedDocValuesField2 ( ) throws Exception { } public void testLengthPrefixAcrossTwoPages ( ) throws Exception { Directory d = newDirectory ( ) ; IndexWriter w = new IndexWriter ( d , new IndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ) ; Document doc = new Document ( ) ; byte [ ] bytes = new byte [ 32764 ] ; BytesRef b = new BytesRef ( ) ; b . bytes = bytes ; b . length = bytes . length ; doc . add ( new org . apache . lucene . document . SortedDocValuesField ( "field" , b ) ) ; w . addDocument ( doc ) ; bytes [ 0 ] = 1 ; w . addDocument ( doc ) ; w . forceMerge ( 1 ) ; DirectoryReader r = w . getReader ( ) ; <START_BUG> BinaryDocValues s = DEFAULT . getTerms ( getOnlySegmentReader ( r ) , "field" ) ; <END_BUG> BytesRef bytes1 = new BytesRef ( ) ; s . get ( 0 , bytes1 ) ; assertEquals ( bytes . length , bytes1 . length ) ; bytes [ 0 ] = 0 ; assertEquals ( b , bytes1 ) ; s . get ( 1 , bytes1 ) ; assertEquals ( bytes . length , bytes1 . length ) ; bytes [ 0 ] = 1 ; assertEquals ( b , bytes1 ) ; r . close ( ) ; w . close ( ) ; d . close ( ) ; } public void testDocValuesUnstored ( ) throws IOException { } public void testMixedTypesSameDocument ( ) throws Exception { } public void testMixedTypesDifferentDocuments ( ) throws Exception { } public void testAddSortedTwice ( ) throws IOException { } public void testAddBinaryTwice ( ) throws IOException { } public void testAddNumericTwice ( ) throws IOException { } public void testTooLargeSortedBytes ( ) throws IOException { } public void testTooLargeTermSortedSetBytes ( ) throws IOException { } public void testMixedTypesDifferentSegments ( ) throws Exception { } public void testMixedTypesAfterDeleteAll ( ) throws Exception { } public void testMixedTypesAfterReopenCreate ( ) throws Exception { } public void testMixedTypesDifferentThreads ( ) throws Exception { } public void testMixedTypesViaAddIndexes ( ) throws Exception { } public void testIllegalTypeChange ( ) throws Exception { } public void testIllegalTypeChangeAcrossSegments ( ) throws Exception { } public void testTypeChangeAfterCloseAndDeleteAll ( ) throws Exception { } public void testTypeChangeAfterDeleteAll ( ) throws Exception { } public void testTypeChangeAfterCommitAndDeleteAll ( ) throws Exception { } public void testTypeChangeAfterOpenCreate ( ) throws Exception { } public void testTypeChangeViaAddIndexes ( ) throws Exception { } public void testTypeChangeViaAddIndexesIR ( ) throws Exception { } public void testTypeChangeViaAddIndexes2 ( ) throws Exception { } public void testTypeChangeViaAddIndexesIR2 ( ) throws Exception { } public void testDocsWithField ( ) throws Exception { } public void testSameFieldNameForPostingAndDocValue ( ) throws Exception { } }

Fix:
BinaryDocValues s = DEFAULT . getTerms ( getOnlySegmentReader ( r ) , "field" , false ) ;
Buggy code:
public class ParseUtils { public static Charset charsetUTF8 = Charset . forName ( "UTF-8" ) ; public static String readString ( ByteBuffer buffer , boolean utf8 ) { } public static String readStringUTF16 ( ByteBuffer buffer , int strLen ) { } private static int readLen ( ByteBuffer buffer ) { } private static int readLen16 ( ByteBuffer buffer ) { } public static StringPool readStringPool ( ByteBuffer buffer , StringPoolHeader stringPoolHeader ) { } public static String readRGBs ( ByteBuffer buffer , int strLen ) { } public static ResourceEntity readResValue ( ByteBuffer buffer , StringPool stringPool , boolean isStyle ) { ResValue resValue = new ResValue ( ) ; resValue . size = Buffers . readUShort ( buffer ) ; resValue . res0 = Buffers . readUByte ( buffer ) ; resValue . dataType = Buffers . readUByte ( buffer ) ; switch ( resValue . dataType ) { case ResType . INT_DEC : case ResType . INT_HEX : resValue . data = new ResourceEntity ( buffer . getInt ( ) ) ; break ; case ResType . STRING : int strRef = buffer . getInt ( ) ; <START_BUG> if ( strRef > 0 ) { <END_BUG> resValue . data = new ResourceEntity ( stringPool . get ( strRef ) ) ; } break ; case ResType . REFERENCE : long resourceId = Buffers . readUInt ( buffer ) ; resValue . data = new ResourceEntity ( resourceId , isStyle ) ; break ; case ResType . INT_BOOLEAN : resValue . data = new ResourceEntity ( ( ( buffer . getInt ( ) ) != 0 ) ) ; break ; case ResType . NULL : resValue . data = new ResourceEntity ( "" ) ; break ; case ResType . INT_COLOR_RGB8 : case ResType . INT_COLOR_RGB4 : resValue . data = new ResourceEntity ( ParseUtils . readRGBs ( buffer , 6 ) ) ; break ; case ResType . INT_COLOR_ARGB8 : case ResType . INT_COLOR_ARGB4 : resValue . data = new ResourceEntity ( ParseUtils . readRGBs ( buffer , 8 ) ) ; break ; case ResType . DIMENSION : resValue . data = new ResourceEntity ( ParseUtils . getDimension ( buffer ) ) ; break ; case ResType . FRACTION : resValue . data = new ResourceEntity ( ParseUtils . getFraction ( buffer ) ) ; break ; default : resValue . data = new ResourceEntity ( ( ( ( ( "{" + ( resValue . dataType ) ) + ":" ) + ( Buffers . readUInt ( buffer ) ) ) + "}" ) ) ; } return resValue . data ; } private static String getDimension ( ByteBuffer buffer ) { } private static String getFraction ( ByteBuffer buffer ) { } public static void checkChunkType ( int expected , int real ) { } public static String getResourceById ( long resourceId , boolean isStyle , ResourceTable resourceTable , Locale locale ) { } public static ResourceEntity readResValue ( ByteBuffer buffer , StringPool stringPool ) { } }

Fix:
if ( strRef >= 0 ) {
Buggy code:
public class SwitchFlowContext extends FlowContext { public Label breakLabel ; public UnconditionalFlowInfo initsOnBreak = FlowInfo . DEAD_END ; public SwitchFlowContext ( FlowContext parent , AstNode associatedNode , Label breakLabel ) { } public Label breakLabel ( ) { } public String individualToString ( ) { } public boolean isBreakable ( ) { } public void recordBreakFrom ( FlowInfo flowInfo ) { if ( ( initsOnBreak ) == ( FlowInfo . DEAD_END ) ) { initsOnBreak = flowInfo . copy ( ) . unconditionalInits ( ) ; } else { <START_BUG> initsOnBreak = initsOnBreak . mergedWith ( flowInfo . unconditionalInits ( ) ) ; <END_BUG> } } }

Fix:
initsOnBreak = initsOnBreak . mergedWith ( flowInfo . copy ( ) . unconditionalInits ( ) ) ;
Buggy code:
public class DisplayableImageButton extends DisplayableFileButton { private BufferedImage icon ; public boolean updateFile ( File file ) { } public void updateImage ( BufferedImage image ) { this . icon = image ; <START_BUG> setIcon ( new ImageIcon ( Util . resize ( getImage ( ) , getWidth ( ) , getHeight ( ) ) ) ) ; <END_BUG> } public BufferedImage getImage ( ) { } No newline ; at end ; of file ; }

Fix:
setIcon ( new ImageIcon ( Util . resizeImage ( getImage ( ) , getWidth ( ) , getHeight ( ) ) ) ) ;
Buggy code:
public final class BasicStatsTest extends MahoutTestCase { private Configuration conf ; @ Override @ Before public void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> conf = new Configuration ( ) ; <END_BUG> } @ Test public void testVar ( ) throws Exception { } @ Test public void testStdDev ( ) throws Exception { } @ Test public void testStdDevForGivenMean ( ) throws Exception { } private void produceTestData ( Path input ) throws Exception { } @ Test public void testStdDev2 ( ) throws Exception { } }

Fix:
conf = getConfiguration ( ) ;
Buggy code:
public abstract class Place { private Point mapLoc ; protected Coordinate location ; protected String name ; protected ArrayList < Link > neighbors ; protected HashMap < Place , Link > linkMap ; protected double rating ; protected HashMap < Place , Double > est ; public Place ( String pname , Coordinate location , double rating ) { } public boolean equals ( Object obj ) { <START_BUG> return name . equals ( ( ( Place ) ( obj ) ) . name ) ; <END_BUG> } public double getDEst ( Place p ) { } public double getTEst ( Place p ) { } public void fillEstTable ( ArrayList < Place > al ) { } private double convertDistance ( Coordinate f ) { } public Double getEst ( Place p ) { } public void setMapLocal ( ) { } public Point getMapLoc ( ) { } public Coordinate getLocation ( ) { } public String getName ( ) { } public ArrayList < Link > getNeighbors ( ) { } public double getRating ( ) { } public void addNeighbor ( Link n ) { } }

Fix:
return ( name . compareTo ( ( ( Place ) ( obj ) ) . name ) ) == 0 ;
Buggy code:
class DocCommentParser extends AbstractCommentParser { private Javadoc docComment ; private AST ast ; DocCommentParser ( AST ast , Scanner scanner , boolean check ) { } public Javadoc parse ( int [ ] positions ) { } public Javadoc parse ( int start , int length ) { this . source = this . scanner . source ; this . lineEnds = this . scanner . lineEnds ; this . docComment = this . ast . newJavadoc ( ) ; if ( this . checkDocComment ) { commentParse ( start , ( ( start + length ) - 1 ) ) ; } this . docComment . setSourceRange ( start , length ) ; <START_BUG> if ( ( this . ast . apiLevel ) == ( AST . JLS2 ) ) { <END_BUG> setComment ( start , length ) ; } return this . docComment ; } private void setComment ( int start , int length ) { } public String toString ( ) { } protected Object createArgumentReference ( char [ ] name , int dim , boolean isVarargs , Object typeRef , long [ ] dimPositions , long argNamePos ) throws InvalidInputException { } protected Object createFieldReference ( Object receiver ) throws InvalidInputException { } protected Object createMethodReference ( Object receiver , List arguments ) throws InvalidInputException { } protected void createTag ( ) { } protected Object createTypeReference ( int primitiveToken ) { } protected boolean parseReturn ( ) { } protected boolean parseTag ( int previousPosition ) throws InvalidInputException { } protected boolean pushParamName ( boolean isTypeParam ) { } protected boolean pushSeeRef ( Object statement ) { } protected void pushText ( int start , int end ) { } protected void refreshInlineTagPosition ( int previousPosition ) { } protected boolean pushThrowName ( Object typeRef ) { } protected void updateDocComment ( ) { } }

Fix:
if ( ( this . ast . apiLevel ) == ( AST . JLS2_INTERNAL ) ) {
Buggy code:
public class SourceFileScanner { protected Task task ; private FileUtils fileUtils ; public SourceFileScanner ( Task task ) { } public String [ ] restrict ( String [ ] files , File srcDir , File destDir , FileNameMapper mapper ) { long now = new Date ( ) . getTime ( ) ; StringBuffer targetList = new StringBuffer ( ) ; <START_BUG> if ( new Os ( "windows" ) . eval ( ) ) { <END_BUG> now += 2000 ; } Vector v = new Vector ( ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { String [ ] targets = mapper . mapFileName ( files [ i ] ) ; if ( ( targets == null ) || ( ( targets . length ) == 0 ) ) { task . log ( ( ( files [ i ] ) + "<seq2seq4repair_space>skipped<seq2seq4repair_space>-<seq2seq4repair_space>don\'t<seq2seq4repair_space>know<seq2seq4repair_space>how<seq2seq4repair_space>to<seq2seq4repair_space>handle<seq2seq4repair_space>it" ) , MSG_VERBOSE ) ; continue ; } File src = fileUtils . resolveFile ( srcDir , files [ i ] ) ; if ( ( src . lastModified ( ) ) > now ) { task . log ( ( ( "Warning:<seq2seq4repair_space>" + ( files [ i ] ) ) + "<seq2seq4repair_space>modified<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>future." ) , MSG_WARN ) ; } boolean added = false ; targetList . setLength ( 0 ) ; for ( int j = 0 ; ( ! added ) && ( j < ( targets . length ) ) ; j ++ ) { File dest = fileUtils . resolveFile ( destDir , targets [ j ] ) ; if ( ! ( dest . exists ( ) ) ) { task . log ( ( ( ( ( files [ i ] ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>exist." ) , MSG_VERBOSE ) ; v . addElement ( files [ i ] ) ; added = true ; } else if ( ( src . lastModified ( ) ) > ( dest . lastModified ( ) ) ) { task . log ( ( ( ( ( files [ i ] ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>outdated." ) , MSG_VERBOSE ) ; v . addElement ( files [ i ] ) ; added = true ; } else { if ( ( targetList . length ( ) ) > 0 ) { targetList . append ( ",<seq2seq4repair_space>" ) ; } targetList . append ( dest . getAbsolutePath ( ) ) ; } } if ( ! added ) { task . log ( ( ( ( ( ( files [ i ] ) + "<seq2seq4repair_space>omitted<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( targetList . toString ( ) ) ) + ( ( targets . length ) == 1 ? "<seq2seq4repair_space>is" : "<seq2seq4repair_space>are<seq2seq4repair_space>" ) ) + "<seq2seq4repair_space>up<seq2seq4repair_space>to<seq2seq4repair_space>date." ) , MSG_VERBOSE ) ; } } String [ ] result = new String [ v . size ( ) ] ; v . copyInto ( result ) ; return result ; } public File [ ] restrictAsFiles ( String [ ] files , File srcDir , File destDir , FileNameMapper mapper ) { } }

Fix:
if ( Os . isFamily ( "windows" ) ) {
Buggy code:
class IdentityJoinable implements Joinable { private final ClassMapping mapping ; public IdentityJoinable ( ClassMapping mapping ) { } public int getFieldIndex ( ) { } public Object getPrimaryKeyValue ( Result res , Column [ ] cols , ForeignKey fk , JDBCStore store , Joins joins ) throws SQLException { Column col = cols [ 0 ] ; if ( fk != null ) col = fk . getColumn ( col ) ; long id = res . getLong ( col ) ; if ( ( id == 0 ) && ( res . wasNull ( ) ) ) return null ; <START_BUG> return Numbers . valueOf ( id ) ; <END_BUG> } public Column [ ] getColumns ( ) { } public Object getJoinValue ( Object val , Column col , JDBCStore store ) { } public Object getJoinValue ( OpenJPAStateManager sm , Column col , JDBCStore store ) { } public void setAutoAssignedValue ( OpenJPAStateManager sm , JDBCStore store , Column col , Object autogen ) { } }

Fix:
return id ;
Buggy code:
public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemListener { LoopControlPanel loopPanel ; private VerticalPanel mainPanel ; private static final String THREAD_NAME = "Thread<seq2seq4repair_space>Field" ; private static final String RAMP_NAME = "Ramp<seq2seq4repair_space>Up<seq2seq4repair_space>Field" ; private JTextField threadInput ; private JTextField rampInput ; private JDateField start ; private JDateField end ; private JCheckBox scheduler ; private JTextField duration ; private JTextField delay ; private JRadioButton continueBox ; private JRadioButton stopThrdBox ; private JRadioButton stopTestBox ; public ThreadGroupGui ( ) { } public Collection getMenuCategories ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement tg ) { } private void setSampleErrorBoxes ( ThreadGroup te ) { } private String onSampleError ( ) { } public void configure ( TestElement tg ) { } public void itemStateChanged ( ItemEvent ie ) { } public JPopupMenu createPopupMenu ( ) { JPopupMenu pop = new JPopupMenu ( ) ; <START_BUG> pop . add ( MenuFactory . makeMenus ( new String [ ] { MenuFactory . CONTROLLERS , MenuFactory . LISTENERS , MenuFactory . SAMPLERS , MenuFactory . ASSERTIONS , MenuFactory . TIMERS , MenuFactory . CONFIG_ELEMENTS , MenuFactory . PRE_PROCESSORS , MenuFactory . POST_PROCESSORS } , JMeterUtils . getResString ( "Add" ) , "Add" ) ) ; <END_BUG> MenuFactory . addEditMenu ( pop , true ) ; MenuFactory . addFileMenu ( pop ) ; return pop ; } public JPanel createControllerPanel ( ) { } private JPanel createStartTimePanel ( ) { } private JPanel createEndTimePanel ( ) { } private JPanel createDurationPanel ( ) { } private JPanel createDelayPanel ( ) { } public String getLabelResource ( ) { } private JPanel createOnErrorPanel ( ) { } private void init ( ) { } public void setNode ( JMeterTreeNode node ) { } public Dimension getPreferredSize ( ) { } }

Fix:
pop . add ( MenuFactory . makeMenus ( new String [ ] { MenuFactory . CONTROLLERS , MenuFactory . LISTENERS , MenuFactory . SAMPLERS , MenuFactory . TIMERS , MenuFactory . CONFIG_ELEMENTS , MenuFactory . PRE_PROCESSORS , MenuFactory . POST_PROCESSORS } , JMeterUtils . getResString ( "Add" ) , "Add" ) ) ;
Buggy code:
public class AntPathMatcher implements PathMatcher { public static final String DEFAULT_PATH_SEPARATOR = "//" ; private String pathSeparator = AntPathMatcher . DEFAULT_PATH_SEPARATOR ; public void setPathSeparator ( String pathSeparator ) { } public boolean isPattern ( String path ) { } public boolean match ( String pattern , String path ) { } public boolean matchStart ( String pattern , String path ) { } protected boolean doMatch ( String pattern , String path , boolean fullMatch , Map < String , String > uriTemplateVariables ) { } private boolean matchStrings ( String pattern , String str , Map < String , String > uriTemplateVariables ) { <START_BUG> AntPatchStringMatcher matcher = new AntPatchStringMatcher ( pattern , str , uriTemplateVariables ) ; <END_BUG> return matcher . matchStrings ( ) ; } public String extractPathWithinPattern ( String pattern , String path ) { } public Map < String , String > extractUriTemplateVariables ( String pattern , String path ) { } public String combine ( String pattern1 , String pattern2 ) { } public Comparator < String > getPatternComparator ( String path ) { } private static class AntPatternComparator implements Comparator < String > { private final String path ; private AntPatternComparator ( String path ) { } public int compare ( String pattern1 , String pattern2 ) { } } }

Fix:
AntPathStringMatcher matcher = new AntPathStringMatcher ( pattern , str , uriTemplateVariables ) ;
Buggy code:
public class XSSFColorConverter implements ColorConverter { private String defaultBackgroundColor ; private String defaultColor ; private XSSFWorkbook workbook ; public XSSFColorConverter ( XSSFWorkbook workbook ) { } @ Override public void colorStyles ( CellStyle cellStyle , StringBuilder sb ) { } private XSSFColor getFillColor ( XSSFCellStyle cs ) { } @ Override public void colorBorder ( BorderSide borderSide , String attr , CellStyle cellStyle , StringBuilder sb ) { } private XSSFColor getBorderColor ( XSSFCellStyle cs , BorderSide borderSide ) { } private String styleColor ( XSSFColor color ) { } private String toRGBA ( byte [ ] argb ) { } private static byte applyTint ( int lum , double tint ) { } @ Override public void defaultColorStyles ( CellStyle cellStyle , StringBuilder sb ) { } @ Override public boolean hasBackgroundColor ( CellStyle cellStyle ) { } @ Override public String getBackgroundColorCSS ( ConditionalFormattingRule rule ) { } private CTDxf getXMLColorDataWithReflection ( XSSFConditionalFormattingRule rule ) { } @ Override public String getFontColorCSS ( ConditionalFormattingRule rule ) { XSSFConditionalFormattingRule r = ( ( XSSFConditionalFormattingRule ) ( rule ) ) ; CTDxf dxf = getXMLColorDataWithReflection ( r ) ; CTFont font = dxf . getFont ( ) ; <START_BUG> if ( ( ( font . getColorList ( ) ) == null ) && ( font . getColorList ( ) . isEmpty ( ) ) ) { <END_BUG> return null ; } CTColor ctColor = font . getColorList ( ) . get ( 0 ) ; byte [ ] rgb = ctColor . getRgb ( ) ; if ( rgb == null ) { return null ; } return toRGBA ( rgb ) ; } No newline ; at end ; of file ; }

Fix:
if ( ( ( font . getColorList ( ) ) == null ) || ( font . getColorList ( ) . isEmpty ( ) ) ) {
Buggy code:
class Initializer extends Member implements IInitializer { protected Initializer ( JavaElement parent , int count ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public int getElementType ( ) { } public String getHandleMemento ( ) { } protected char getHandleMementoDelimiter ( ) { } public int hashCode ( ) { } public String readableName ( ) { } public void rename ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public ISourceRange getNameRange ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { if ( checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( getAncestor ( IJavaElement . COMPILATION_UNIT ) ) ) ; <START_BUG> if ( ( cu . owner ) == ( DefaultWorkingCopyOwner . PRIMARY ) ) <END_BUG> return this ; } IJavaElement parent = fParent . getPrimaryElement ( false ) ; return ( ( IType ) ( parent ) ) . getInitializer ( this . occurrenceCount ) ; } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
if ( cu . isPrimary ( ) )
Buggy code:
public class JavaField extends JavaStatement implements Translatable { private JavaClass cls ; private boolean isFinal ; private boolean isStatic ; private List < String > names ; private JavaStatement parent ; private JavaType type ; private List < JavaExpression > values ; private JavaVisibility visibility ; public JavaField ( GNode n , JavaStatement parent , JavaScope scope ) { } public JavaField ( GNode n , JavaScope scope ) { } public List < String > getNames ( ) { } public JavaScope getScope ( ) { } public JavaType getType ( ) { } public boolean isInitialized ( ) { } public boolean isStatic ( ) { } public void checkNotNull ( ) { } public Printer translateDeclaration ( Printer out ) { } public Printer translateConstructor ( Printer out ) { int size = names . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { <START_BUG> if ( isStatic ) <END_BUG> continue ; out . indent ( ) . p ( "__this->" ) . p ( names . get ( i ) ) ; if ( null != ( values . get ( i ) ) ) { out . p ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; values . get ( i ) . translate ( out ) . pln ( ";" ) ; } else if ( ( null == ( parent ) ) && ( type . isPrimitive ( ) ) ) { out . pln ( "<seq2seq4repair_space>=<seq2seq4repair_space>0;" ) ; } else { out . pln ( ";" ) ; } } return out ; } public Printer translate ( Printer out ) { } }

Fix:
if ( ( isStatic ) || ( ( ! ( type . isPrimitive ( ) ) ) && ( null == ( values . get ( i ) ) ) ) )
Buggy code:
public class ReplaceDragHandler extends TabDragHandler { private final class DragCookie { int insertPosition ; public DragCookie ( int pos ) { } } private AbstractTabFolder tabFolder ; public ReplaceDragHandler ( AbstractTabFolder folder ) { } public StackDropResult dragOver ( Control currentControl , Point location , int dragStart ) { AbstractTabItem tabUnderPointer = tabFolder . getItem ( location ) ; if ( tabUnderPointer == null ) { Rectangle titleArea = tabFolder . getTabArea ( ) ; <START_BUG> if ( titleArea . contains ( location ) ) { <END_BUG> int dragOverIndex = tabFolder . getItemCount ( ) ; AbstractTabItem lastTab = tabFolder . getItem ( ( dragOverIndex - 1 ) ) ; if ( ! ( lastTab . isShowing ( ) ) ) { return null ; } Rectangle lastTabBounds = lastTab . getBounds ( ) ; if ( lastTabBounds . isEmpty ( ) ) { return null ; } if ( dragStart >= 0 ) { dragOverIndex -- ; return new StackDropResult ( lastTabBounds , new Integer ( dragOverIndex ) ) ; } Rectangle dropRectangle = titleArea ; dropRectangle . x = ( lastTabBounds . x ) + ( lastTabBounds . width ) ; dropRectangle . width = 3 * ( dropRectangle . height ) ; return new StackDropResult ( dropRectangle , new Integer ( dragOverIndex ) ) ; } else { Rectangle displayBounds = DragUtil . getDisplayBounds ( tabFolder . getControl ( ) ) ; int closestSide = Geometry . getClosestSide ( displayBounds , location ) ; if ( closestSide == ( tabFolder . getTabPosition ( ) ) ) { return new StackDropResult ( displayBounds , null ) ; } return null ; } } if ( ! ( tabUnderPointer . isShowing ( ) ) ) { return null ; } Rectangle tabBounds = tabUnderPointer . getBounds ( ) ; if ( tabBounds . isEmpty ( ) ) { return null ; } return new StackDropResult ( tabBounds , new ReplaceDragHandler . DragCookie ( tabFolder . indexOf ( tabUnderPointer ) ) ) ; } public int getInsertionPosition ( Object cookie ) { } }

Fix:
if ( ( titleArea . contains ( location ) ) && ( ( tabFolder . getItemCount ( ) ) > 0 ) ) {
Buggy code:
public class TestPatternReplaceCharFilter extends BaseTokenStreamTestCase { public void testFailingDot ( ) throws IOException { } public void testLongerReplacement ( ) throws IOException { } public void testShorterReplacement ( ) throws IOException { } private void checkOutput ( String input , String pattern , String replacement , String expectedOutput , String expectedIndexMatchedOutput ) throws IOException { } public void testNothingChange ( ) throws IOException { } public void testReplaceByEmpty ( ) throws IOException { } public void test1block1matchSameLength ( ) throws IOException { } public void test1block1matchLonger ( ) throws IOException { } public void test1block2matchLonger ( ) throws IOException { } public void test1block1matchShorter ( ) throws IOException { } public void test1blockMultiMatches ( ) throws IOException { } public void test2blocksMultiMatches ( ) throws IOException { } public void testChain ( ) throws IOException { } private Pattern pattern ( String p ) { } @ Ignore public void testNastyPattern ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { int numPatterns = 10 + ( random ( ) . nextInt ( 20 ) ) ; Random random = new Random ( random ( ) . nextLong ( ) ) ; for ( int i = 0 ; i < numPatterns ; i ++ ) { final Pattern p = _TestUtil . randomPattern ( random ( ) ) ; final String replacement = _TestUtil . randomSimpleString ( random ) ; Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , tokenizer ) ; } @ Override <START_BUG> protected Reader initReader ( Reader reader ) { <END_BUG> return new PatternReplaceCharFilter ( p , replacement , CharReader . get ( reader ) ) ; } } ; final int maxInputLength = 30 ; final boolean asciiOnly = true ; checkRandomData ( random , a , ( 250 * ( RANDOM_MULTIPLIER ) ) , maxInputLength , asciiOnly ) ; } } }

Fix:
protected Reader initReader ( String fieldName , Reader reader ) {
Buggy code:
public class Clipboard { private Display display ; static int GTKCLIPBOARD ; static int GTKPRIMARYCLIPBOARD ; private static int TARGET ; public Clipboard ( Display display ) { } protected void checkSubclass ( ) { } protected void checkWidget ( ) { } public void clearContents ( ) { } public void clearContents ( int clipboards ) { } public void dispose ( ) { } public Object getContents ( Transfer transfer ) { } public Object getContents ( Transfer transfer , int clipboards ) { checkWidget ( ) ; if ( transfer == null ) DND . error ( ERROR_NULL_ARGUMENT ) ; int selection_data = 0 ; int [ ] typeIds = transfer . getTypeIds ( ) ; for ( int i = 0 ; i < ( typeIds . length ) ; i ++ ) { if ( ( clipboards & ( DND . CLIPBOARD ) ) != 0 ) { selection_data = gtk_clipboard_wait_for_contents ( Clipboard . GTKCLIPBOARD , typeIds [ i ] ) ; } if ( selection_data != 0 ) break ; if ( ( clipboards & ( DND . SELECTION_CLIPBOARD ) ) != 0 ) { selection_data = gtk_clipboard_wait_for_contents ( Clipboard . GTKPRIMARYCLIPBOARD , typeIds [ i ] ) ; } } if ( selection_data == 0 ) return null ; GtkSelectionData gtkSelectionData = new GtkSelectionData ( ) ; OS . memmove ( gtkSelectionData , selection_data , sizeof ) ; TransferData tdata = new TransferData ( ) ; <START_BUG> tdata . type = gtkSelectionData . target ; <END_BUG> tdata . pValue = gtkSelectionData . data ; tdata . length = gtkSelectionData . length ; tdata . format = gtkSelectionData . format ; Object result = transfer . nativeToJava ( tdata ) ; OS . gtk_selection_data_free ( selection_data ) ; return result ; } public boolean isDisposed ( ) { } public void setContents ( Object [ ] data , Transfer [ ] dataTypes ) { } public void setContents ( Object [ ] data , Transfer [ ] dataTypes , int clipboards ) { } public TransferData [ ] getAvailableTypes ( ) { } public TransferData [ ] getAvailableTypes ( int clipboards ) { } public String [ ] getAvailableTypeNames ( ) { } private int [ ] getAvailablePrimaryTypes ( ) { } private int [ ] getAvailableClipboardTypes ( ) { } int gtk_clipboard_wait_for_contents ( int clipboard , int target ) { } }

Fix:
tdata . type = gtkSelectionData . type ;
Buggy code:
public class Galaxy { private static final Logger logger = LoggerFactory . getLogger ( Galaxy . class ) ; static final int MAX_WORM_HOLES = 6 ; static final int CLOSE_DISTANCE = 13 ; static final int MIN_DISTANCE = 6 ; static final int GALAXY_WIDTH = 150 ; static final int GALAXY_HEIGHT = 110 ; private final Game game ; protected final List < SolarSystem > systems ; public Galaxy ( Game game ) { } private void addScatteredSpecialEvents ( boolean scarabEndpointExists ) { } private void addExperimentQuest ( ) { } private void addGemulonInvasion ( ) { } private void addReactorQuest ( ) { } private boolean addArtifactDeliveryQuest ( ) { } private boolean addScarabWormhole ( ) { } private SolarSystem systemNamed ( SolarSystem . Name name ) { } private void addFixedSpecialEvents ( ) { } private void addMercenaries ( ) { } private void shuffleSystems ( ) { } private void addWormholes ( ) { SolarSystem initialSystem = getRandomSystem ( ) ; SolarSystem source = initialSystem ; SolarSystem destination ; for ( int i = 0 ; i < ( ( Galaxy . MAX_WORM_HOLES ) - 1 ) ; ++ i ) { do { destination = getRandomSystem ( ) ; <START_BUG> } while ( ( destination . hasWormhole ( ) ) && ( source == destination ) ) ; <END_BUG> source . setWormhole ( destination ) ; Galaxy . logger . debug ( ( ( ( "Pointed<seq2seq4repair_space>wormhole<seq2seq4repair_space>from<seq2seq4repair_space>" + ( source . getName ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destination . getName ( ) ) ) ) ; source = destination ; } source . setWormhole ( initialSystem ) ; Galaxy . logger . debug ( ( ( ( "Pointed<seq2seq4repair_space>wormhole<seq2seq4repair_space>from<seq2seq4repair_space>" + ( source . getName ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( initialSystem . getName ( ) ) ) ) ; } private void addSolarSystems ( ) { } private int nearestSystemDistance ( Vector2i point ) { } public SolarSystem getStartSystem ( int maxRange ) { } public SolarSystem getRandomSystem ( ) { } public int distanceBetween ( SolarSystem origin , SolarSystem destination ) { } public void shuffleStatuses ( ) { } public void changeTradeItemQuantities ( ) { } public boolean wormholeExistsBetween ( SolarSystem system , SolarSystem destination ) { } public List < SolarSystem > getSystems ( ) { } }

Fix:
} while ( ( destination . hasWormhole ( ) ) || ( source == destination ) ) ;
Buggy code:
class Initializer extends Member implements IInitializer { protected Initializer ( JavaElement parent , int count ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public int getElementType ( ) { } public String getHandleMemento ( ) { } protected char getHandleMementoDelimiter ( ) { } public int hashCode ( ) { } public String readableName ( ) { } public void rename ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public ISourceRange getNameRange ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { if ( checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( getAncestor ( IJavaElement . COMPILATION_UNIT ) ) ) ; <START_BUG> if ( cu . isPrimary ( ) ) <END_BUG> return this ; } IJavaElement parent = fParent . getPrimaryElement ( false ) ; return ( ( IType ) ( parent ) ) . getInitializer ( this . occurrenceCount ) ; } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
if ( ( cu == null ) || ( cu . isPrimary ( ) ) )
Buggy code:
public class JMXSubsystemTestCase extends AbstractSubsystemTest { private static final String LAUNCH_TYPE = "launch-type" ; private static final String TYPE_STANDALONE = "STANDALONE" ; public JMXSubsystemTestCase ( ) { } @ Test public void testParseEmptySubsystem ( ) throws Exception { } @ Test public void testParseSubsystemWithBadChild ( ) throws Exception { } @ Test public void testParseSubsystemWithBadAttribute ( ) throws Exception { } @ Test public void testParseSubsystemWithConnector ( ) throws Exception { <START_BUG> String subsystemXml = ( ( ( "<subsystem<seq2seq4repair_space>xmlns=\"" + ( CURRENT . getUriString ( ) ) ) + "\">" ) + "<seq2seq4repair_space><remoting-connector<seq2seq4repair_space>//>" ) + "<//subsystem>" ; <END_BUG> List < ModelNode > operations = super . parse ( subsystemXml ) ; Assert . assertEquals ( 2 , operations . size ( ) ) ; ModelNode addSubsystem = operations . get ( 0 ) ; Assert . assertEquals ( ADD , addSubsystem . get ( OP ) . asString ( ) ) ; assertJmxSubsystemAddress ( addSubsystem . get ( OP_ADDR ) ) ; ModelNode addConnector = operations . get ( 1 ) ; Assert . assertEquals ( ADD , addConnector . get ( OP ) . asString ( ) ) ; assertJmxConnectorAddress ( addConnector . get ( OP_ADDR ) ) ; } @ Test public void testParseSubsystemWithTwoConnectors ( ) throws Exception { } @ Test public void testParseSubsystemWithBadConnectorAttribute ( ) throws Exception { } @ Test public void testInstallIntoController ( ) throws Exception { } @ Test public void testParseAndMarshalModel1_0 ( ) throws Exception { } @ Test public void testParseAndMarshalModel1_1 ( ) throws Exception { } @ Test public void testParseAndMarshalModel1_1WithShowModel ( ) throws Exception { } @ Test public void testParseAndMarshalModelWithRemoteConnectorRef1_1 ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } private void assertJmxConnectorAddress ( ModelNode address ) { } private void assertJmxSubsystemAddress ( ModelNode address ) { } private static class BaseAdditionalInitalization extends AdditionalInitialization { @ Override protected void initializeExtraSubystemsAndModel ( ExtensionRegistry extensionRegistry , Resource rootResource , ManagementResourceRegistration rootRegistration ) { } @ Override protected void setupController ( ControllerInitializer controllerInitializer ) { } @ Override protected void addExtraServices ( final ServiceTarget target ) { } } }

Fix:
String subsystemXml = ( ( ( "<subsystem<seq2seq4repair_space>xmlns=\"" + ( CURRENT . getUriString ( ) ) ) + "\">" ) + "<seq2seq4repair_space><remoting-connector<seq2seq4repair_space>use-management-endpoint=\"false\"<seq2seq4repair_space>//>" ) + "<//subsystem>" ;
Buggy code:
public class TypeInstanceTask extends AbstractContainerTask implements Configurable { private static final Resources REZ = ResourceManager . getPackageResources ( TypeInstanceTask . class ) ; private String m_id ; private Object m_value ; public void configure ( final Configuration configuration ) throws ConfigurationException { final DefaultConfiguration newConfiguration = new DefaultConfiguration ( configuration . getName ( ) , configuration . getLocation ( ) ) ; final String [ ] attributes = configuration . getAttributeNames ( ) ; for ( int i = 0 ; i < ( attributes . length ) ; i ++ ) { final String name = attributes [ i ] ; final String value = configuration . getAttribute ( name ) ; if ( ( name . equals ( "id" ) ) || ( name . equals ( "local-scope" ) ) ) { configureAttribute ( this , name , value ) ; } else { newConfiguration . setAttribute ( name , value ) ; } } final Configuration [ ] children = configuration . getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { newConfiguration . addChild ( children [ i ] ) ; } try { <START_BUG> m_value = newInstance ( DataType . class , configuration . getName ( ) ) ; <END_BUG> } catch ( final Exception e ) { final String message = TypeInstanceTask . REZ . getString ( "type.no-create.error" ) ; throw new ConfigurationException ( message , e ) ; } configureElement ( m_value , newConfiguration ) ; } public void setId ( final String id ) { } public void execute ( ) throws TaskException { } }

Fix:
m_value = newInstance ( ROLE , configuration . getName ( ) ) ;
Buggy code:
public class ServletContextFacade implements ServletContext { private StringManager sm = StringManager . getManager ( "org.apache.tomcat.core" ) ; private ContextManager contextM ; private Context context ; ServletContextFacade ( ContextManager server , Context context ) { } public Context getRealContext ( ) { } public Object getAttribute ( String name ) { } public Enumeration getAttributeNames ( ) { } public void setAttribute ( String name , Object object ) { } public void removeAttribute ( String name ) { } public ServletContext getContext ( String path ) { } public int getMajorVersion ( ) { } public int getMinorVersion ( ) { } public String getMimeType ( String filename ) { } public String getRealPath ( String path ) { } public InputStream getResourceAsStream ( String path ) { } public URL getResource ( String path ) throws MalformedURLException { } public RequestDispatcher getRequestDispatcher ( String path ) { } public RequestDispatcher getNamedDispatcher ( String name ) { } public String getServerInfo ( ) { } public void log ( String msg ) { <START_BUG> context . logServlet ( msg ) ; <END_BUG> } public String getInitParameter ( String name ) { } public Enumeration getInitParameterNames ( ) { } public void log ( String msg , Throwable t ) { } public void log ( Exception e , String msg ) { } public Servlet getServlet ( String name ) throws ServletException { } public Enumeration getServlets ( ) { } public Enumeration getServletNames ( ) { } }

Fix:
context . logServlet ( msg , null ) ;
Buggy code:
public class AwtStandAloneApp extends JApplet { private static final Logger logger = LoggerFactory . getLogger ( AwtStandAloneApp . class ) ; private static int posX = 100 ; private static int posY = 100 ; private static Locale locale ; private static String xmlPath ; private static final long serialVersionUID = 1L ; private KeyBoardPopup fxKeyboardPopup ; private Transition transition ; public AwtStandAloneApp ( ) { } @ Override public void init ( ) { } public void createScene ( JFXPanel javafxPanel ) { Scene scene = new Scene ( new Group ( ) , 0 , 0 ) ; javafxPanel . setScene ( scene ) ; Path path = null ; try { if ( ( AwtStandAloneApp . xmlPath ) != null ) { path = Paths . get ( this . getClass ( ) . getResource ( AwtStandAloneApp . xmlPath ) . toURI ( ) ) ; } } catch ( Exception e ) { AwtStandAloneApp . logger . error ( e . getMessage ( ) , e ) ; } <START_BUG> fxKeyboardPopup = KeyBoardPopupBuilder . create ( ) . initLocale ( AwtStandAloneApp . locale ) . addIRobot ( RobotFactory . createNativeAsciiRobot ( ) ) . layerPath ( path ) . layer ( NUMBLOCK ) . build ( ) ; <END_BUG> fxKeyboardPopup . getKeyBoard ( ) . setOnKeyboardCloseButton ( ( e ) -> System . exit ( 0 ) ) ; fxKeyboardPopup . setOwner ( scene ) ; setKeyboardVisible ( true , new Point ( AwtStandAloneApp . posX , AwtStandAloneApp . posY ) ) ; } public void setKeyboardVisible ( boolean flag , Point point ) { } private static void showHelp ( ) { } private static void parseLocale ( String l ) throws Exception { } private static void parsePosition ( String p ) throws Exception { } public static void main ( String [ ] args ) { } }

Fix:
fxKeyboardPopup = KeyBoardPopupBuilder . create ( ) . initLocale ( AwtStandAloneApp . locale ) . addIRobot ( RobotFactory . createNativeAsciiRobot ( ) ) . layer ( NUMBLOCK ) . build ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class OrderedMap < K , V > implements Serializable , Map < K , V > { private final LinkedHashMap < K , V > _del ; public OrderedMap ( ) { } public OrderedMap ( boolean lru ) { } public int indexOf ( Object key ) { int i = 0 ; for ( K k : _del . keySet ( ) ) { <START_BUG> if ( key == k ) <END_BUG> return i ; i ++ ; } return - 1 ; } public void clear ( ) { } public boolean containsKey ( Object key ) { } public boolean containsValue ( Object value ) { } public Set < Map . Entry < K , V > > entrySet ( ) { } public V get ( Object key ) { } public boolean isEmpty ( ) { } public Set < K > keySet ( ) { } public V put ( K key , V value ) { } public void putAll ( Map < ? extends K , ? extends V > m ) { } public V remove ( Object key ) { } public int size ( ) { } public Collection < V > values ( ) { } }

Fix:
if ( key . equals ( k ) )
Buggy code:
public class MainActivity extends ActionBarActivity { public static EditText console ; public static EditText input ; public static Intent i ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static class PlaceholderFragment extends Fragment { public PlaceholderFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } } public static void submit ( View view ) { if ( ! ( MainActivity . input . getText ( ) . toString ( ) . equals ( "" ) ) ) { <START_BUG> CommandParser . parseInput ( MainActivity . input . getText ( ) . toString ( ) , MainActivity . console , view ) ; <END_BUG> MainActivity . input . setText ( "" ) ; } } }

Fix:
CommandParser . debug ( MainActivity . input . getText ( ) . toString ( ) , MainActivity . console , view ) ;
Buggy code:
public class Menu implements ActionListener { private final int numberOfIcons = 5 ; private final Image [ ] iconImages = new Image [ numberOfIcons ] ; private final Item [ ] menuItems = new Item [ numberOfMenuItems ] ; private final String [ ] tabsRightClickText = new String [ ] { "Close" , "Close<seq2seq4repair_space>All" , "Rename" , "Save" , "Save<seq2seq4repair_space>All" , "Delete" } ; private final JMenuItem [ ] tabsRightClickMenuItems = new JMenuItem [ tabsRightClickText . length ] ; private final JPopupMenu tabsRightClickMenu = new JPopupMenu ( ) ; public Menu ( ) { } public final int getSelectedItem ( Point point ) { } public final void selectTabAt ( Point point ) { } public final void scroll ( int amount ) { } public final void closeAllRightClickMenus ( ) { } public final void showTabRightClickMenu ( Point point ) { } public final void drawTabs ( ) { } public final void drawBottomMenu ( ) { } public final void drawSideManu ( ) { } @ Override public void actionPerformed ( ActionEvent ae ) { String command = ae . getActionCommand ( ) ; switch ( command ) { case "Close" : closeTab ( currentWorld ) ; break ; case "Close<seq2seq4repair_space>All" : closeAllTabs ( ) ; break ; case "Rename" : worlds . get ( currentWorld ) . rename ( ) ; break ; case "Save" : worlds . get ( currentWorld ) . save ( ) ; break ; case "Save<seq2seq4repair_space>All" : saveAll ( ) ; break ; case "Delete" : <START_BUG> removeWorld ( currentWorld ) ; <END_BUG> break ; default : return ; } ( ( JMenuItem ) ( ae . getSource ( ) ) ) . getParent ( ) . setVisible ( false ) ; } }

Fix:
removeCurrentWorld ( ) ;
Buggy code:
public class NoosaScript extends Script { public Uniform uCamera ; public Uniform uModel ; public Uniform uTex ; public Uniform uColorM ; public Uniform uColorA ; public Attribute aXY ; public Attribute aUV ; private Camera lastCamera ; public NoosaScript ( ) { } @ Override public void use ( ) { } public void drawElements ( FloatBuffer vertices , ShortBuffer indices , int size ) { } public void drawQuad ( FloatBuffer vertices ) { } public void drawQuadSet ( FloatBuffer vertices , int size ) { } public void lighting ( float rm , float gm , float bm , float am , float ra , float ga , float ba , float aa ) { } public void resetCamera ( ) { } public void camera ( Camera camera ) { if ( camera == null ) { camera = Camera . main ; } <START_BUG> if ( camera != ( lastCamera ) ) { <END_BUG> lastCamera = camera ; uCamera . valueM4 ( camera . matrix ) ; GLES20 . glScissor ( camera . x , ( ( ( Game . height ) - ( camera . screenHeight ) ) - ( camera . y ) ) , camera . screenWidth , camera . screenHeight ) ; } } public static NoosaScript get ( ) { } protected String shader ( ) { } private static final String SHADER = "uniform<seq2seq4repair_space>mat4<seq2seq4repair_space>uCamera;" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "uniform<seq2seq4repair_space>mat4<seq2seq4repair_space>uModel;" + "attribute<seq2seq4repair_space>vec4<seq2seq4repair_space>aXYZW;" ) + "attribute<seq2seq4repair_space>vec2<seq2seq4repair_space>aUV;" ) + "varying<seq2seq4repair_space>vec2<seq2seq4repair_space>vUV;" ) + "void<seq2seq4repair_space>main()<seq2seq4repair_space>{" ) + "<seq2seq4repair_space>gl_Position<seq2seq4repair_space>=<seq2seq4repair_space>uCamera<seq2seq4repair_space>*<seq2seq4repair_space>uModel<seq2seq4repair_space>*<seq2seq4repair_space>aXYZW;" ) + "<seq2seq4repair_space>vUV<seq2seq4repair_space>=<seq2seq4repair_space>aUV;" ) + "}" ) + "////\n" ) + "precision<seq2seq4repair_space>mediump<seq2seq4repair_space>float;" ) + "varying<seq2seq4repair_space>vec2<seq2seq4repair_space>vUV;" ) + "uniform<seq2seq4repair_space>sampler2D<seq2seq4repair_space>uTex;" ) + "uniform<seq2seq4repair_space>vec4<seq2seq4repair_space>uColorM;" ) + "uniform<seq2seq4repair_space>vec4<seq2seq4repair_space>uColorA;" ) + "void<seq2seq4repair_space>main()<seq2seq4repair_space>{" ) + "<seq2seq4repair_space>gl_FragColor<seq2seq4repair_space>=<seq2seq4repair_space>texture2D(<seq2seq4repair_space>uTex,<seq2seq4repair_space>vUV<seq2seq4repair_space>)<seq2seq4repair_space>*<seq2seq4repair_space>uColorM<seq2seq4repair_space>+<seq2seq4repair_space>uColorA;" ) + "}" ) ; }

Fix:
if ( ( camera != ( lastCamera ) ) && ( ( camera . matrix ) != null ) ) {
Buggy code:
public class DateTimeDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; int end = indexOf ( str , 0 , len , 'T' ) ; int dateEnd = getDate ( str , 0 , end , date ) ; getTime ( str , ( end + 1 ) , len , date ) ; if ( dateEnd != end ) { throw new RuntimeException ( ( ( str + "<seq2seq4repair_space>is<seq2seq4repair_space>an<seq2seq4repair_space>invalid<seq2seq4repair_space>dateTime<seq2seq4repair_space>dataype<seq2seq4repair_space>value.<seq2seq4repair_space>" ) + "Invalid<seq2seq4repair_space>character(s)<seq2seq4repair_space>seprating<seq2seq4repair_space>date<seq2seq4repair_space>and<seq2seq4repair_space>time<seq2seq4repair_space>values." ) ) ; } validateDateTime ( date ) ; if ( ( ( date . utc ) != 0 ) && ( ( date . utc ) != 'Z' ) ) { normalize ( date ) ; } return date ; } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class AddAnnotationToFieldTest extends AbstractAnnotationTest { @ Override public String getPackageName ( ) { } @ Override public String getClassName ( ) { } @ Override public String getClassContents ( ) { } @ Override public Annotation getAnnotation ( ) { } public void testAddAnnotationToField ( ) { try { assertNotNull ( annotation ) ; assertEquals ( WebServiceRef . class . getSimpleName ( ) , AnnotationUtils . getAnnotationName ( annotation ) ) ; IField field = source . findPrimaryType ( ) . getField ( "service" ) ; assertNotNull ( field ) ; <START_BUG> textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( field , WebServiceRef . class ) ) ; <END_BUG> textFileChange . addEdit ( AnnotationUtils . createAddAnnotationTextEdit ( field , annotation ) ) ; assertTrue ( executeChange ( new NullProgressMonitor ( ) , textFileChange ) ) ; assertTrue ( AnnotationUtils . isAnnotationPresent ( field , AnnotationUtils . getAnnotationName ( annotation ) ) ) ; assertTrue ( source . getImport ( WebServiceRef . class . getCanonicalName ( ) ) . exists ( ) ) ; } catch ( CoreException ce ) { fail ( ce . getLocalizedMessage ( ) ) ; } } }

Fix:
textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( field , WebServiceRef . class . getCanonicalName ( ) ) ) ;