nus-yam/ex-repair huggingface dataset:
Buggy code:
<START_BUG> public class HTTPAcceptorAdd extends TransportConfigOperationHandlers . BasicTransportConfigAdd { <END_BUG> public static final HTTPAcceptorAdd INSTANCE = new HTTPAcceptorAdd ( ) ; private HTTPAcceptorAdd ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { super . performRuntime ( context , operation , model , verificationHandler , newControllers ) ; PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; String hornetqServerName = address . getElement ( ( ( address . size ( ) ) - 2 ) ) . getValue ( ) ; String acceptorName = address . getLastElement ( ) . getValue ( ) ; final ModelNode fullModel = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; launchServices ( context , hornetqServerName , acceptorName , fullModel , verificationHandler , newControllers ) ; } void launchServices ( OperationContext context , String hornetqServerName , String acceptorName , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } }

Fix:
public class HTTPAcceptorAdd extends HornetQReloadRequiredHandlers . AddStepHandler {
Buggy code:
public class StandardWebSocketSession extends AbstractWebSocketSession < Session > { private final HttpHeaders handshakeHeaders ; private final InetSocketAddress localAddress ; private final InetSocketAddress remoteAddress ; private Principal user ; private String acceptedProtocol ; private List < WebSocketExtension > extensions ; public StandardWebSocketSession ( HttpHeaders headers , Map < String , Object > attributes , InetSocketAddress localAddress , InetSocketAddress remoteAddress ) { } public StandardWebSocketSession ( HttpHeaders headers , Map < String , Object > attributes , InetSocketAddress localAddress , InetSocketAddress remoteAddress , Principal user ) { } @ Override public String getId ( ) { } @ Override public URI getUri ( ) { } @ Override public HttpHeaders getHandshakeHeaders ( ) { } @ Override public Principal getPrincipal ( ) { if ( ( this . user ) != null ) { return this . user ; } checkNativeSessionInitialized ( ) ; <START_BUG> return getNativeSession ( ) . getUserPrincipal ( ) ; <END_BUG> } @ Override public InetSocketAddress getLocalAddress ( ) { } @ Override public InetSocketAddress getRemoteAddress ( ) { } @ Override public String getAcceptedProtocol ( ) { } @ Override public void setTextMessageSizeLimit ( int messageSizeLimit ) { } @ Override public int getTextMessageSizeLimit ( ) { } @ Override public void setBinaryMessageSizeLimit ( int messageSizeLimit ) { } @ Override public int getBinaryMessageSizeLimit ( ) { } @ Override public List < WebSocketExtension > getExtensions ( ) { } @ Override public boolean isOpen ( ) { } @ Override public void initializeNativeSession ( Session session ) { } @ Override protected void sendTextMessage ( TextMessage message ) throws IOException { } @ Override protected void sendBinaryMessage ( BinaryMessage message ) throws IOException { } @ Override protected void sendPingMessage ( PingMessage message ) throws IOException { } @ Override protected void sendPongMessage ( PongMessage message ) throws IOException { } @ Override protected void closeInternal ( CloseStatus status ) throws IOException { } }

Fix:
return isOpen ( ) ? getNativeSession ( ) . getUserPrincipal ( ) : null ;
Buggy code:
public class SplitOutputHandle { private final Path fq1path ; private final Path anchorpath ; private BufferedWriter fq1 ; private final SAMFileWriterFactory anchor = new SAMFileWriterFactory ( ) ; private final SAMRecordFactory recordCreator = new DefaultSAMRecordFactory ( ) ; private SAMFileWriter anchorOut ; private final SAMFileHeader header ; private boolean fileopen = false ; private final TextCigarCodec cd = TextCigarCodec . getSingleton ( ) ; public SplitOutputHandle ( String file , String file2 , SAMFileHeader sam ) { } public synchronized void AddAnchor ( String [ ] segs ) { } public synchronized void AddAnchor ( SAMRecord s ) { } public synchronized void AddSplit ( String [ ] segs ) { } private int firstSplitSeg ( String cigar , int readlen ) { } public void OpenFQHandle ( ) { try { <START_BUG> fq1 = Files . newBufferedWriter ( fq1path , Charset . defaultCharset ( ) , StandardOpenOption . APPEND ) ; <END_BUG> } catch ( IOException ex ) { ex . printStackTrace ( ) ; } } public void CloseFQHandle ( ) { } public void OpenAnchorHandle ( ) { } public void CloseAnchorHandle ( ) { } public boolean fileIsOpen ( ) { } public String fq1File ( ) { } public String getAnchorFileStr ( ) { } }

Fix:
fq1 = Files . newBufferedWriter ( fq1path , Charset . defaultCharset ( ) ) ;
Buggy code:
public final class App { private static final Log log = Log . logger ( App . class ) ; private State state ; private PrintWriter out ; public App ( ) { } void find ( OptionSet opts , boolean inLoop ) { } long filterPaths ( Stream < Path > stream , OptionSet opts ) { } long collectExtensions ( Stream < Path > stream , OptionSet opts ) { } long filterPathsAndLines ( Stream < Path > stream , OptionSet opts ) { } private Predicate < Path > integratedFilter ( OptionSet opts ) { List < FileFilter > a = new ArrayList < > ( ) ; a . addAll ( FileFilterFactory . nameFilters ( opts ) ) ; <START_BUG> a . addAll ( FileFilterFactory . extensionFilters ( opts ) ) ; <END_BUG> a . addAll ( FileFilterFactory . exclusionFilters ( opts ) ) ; a . addAll ( FileFilterFactory . pathFilters ( opts ) ) ; a . addAll ( FileFilterFactory . fileTypeFilters ( opts ) ) ; a . addAll ( FileFilterFactory . fileSizeFilters ( opts ) ) ; a . addAll ( FileFilterFactory . ctimeFilters ( opts ) ) ; a . addAll ( FileFilterFactory . mtimeFilters ( opts ) ) ; a . addAll ( FileFilterFactory . atimeFilters ( opts ) ) ; return ( x ) -> { if ( x == null ) return false ; File f = x . toFile ( ) ; for ( FileFilter filter : a ) if ( ! ( filter . accept ( f ) ) ) return false ; return true ; } ; } Stream < Path > createStream ( OptionSet opts , boolean inLoop , LongAdder count ) { } static String version ( ) { } void loop ( ) { } public static void main ( String [ ] args ) { } }

Fix:
FileFilterFactory . extensionFilters ( opts ) . ifPresent ( a :: add ) ;
Buggy code:
public class WebResponse extends Response { private static final Log log = LogFactory . getLog ( WebResponse . class ) ; protected boolean redirect ; private final HttpServletResponse httpServletResponse ; WebResponse ( ) { } WebResponse ( final HttpServletResponse httpServletResponse ) throws IOException { } public void close ( ) { } public final String encodeURL ( final String url ) { } public final HttpServletResponse getHttpServletResponse ( ) { } public OutputStream getOutputStream ( ) { } public final boolean isRedirect ( ) { } public void redirect ( final String url ) { } public final void setContentType ( final String mimeType ) { } public void setContentLength ( long length ) { } public void setLastModifiedTime ( Time time ) { if ( time != null ) { <START_BUG> httpServletResponse . setDateHeader ( "Expires" , ( ( ( time . getMilliseconds ( ) ) * 1000 ) + 3600 ) ) ; <END_BUG> httpServletResponse . setHeader ( "Cache-Control" , ( "max-age=" + 3600 ) ) ; httpServletResponse . setDateHeader ( "Last-Modified" , time . getMilliseconds ( ) ) ; } } public final void setLocale ( final Locale locale ) { } public void write ( final String string ) { } }

Fix:
httpServletResponse . setDateHeader ( "Expires" , ( ( time . getMilliseconds ( ) ) + ( 3600 * 1000 ) ) ) ;
Buggy code:
public class GradeShape extends Rectangle { private Line line ; private Text text ; private Grade grade ; private ContextMenu menu ; private final double WIDTH = 30 ; private final double HEIGHT = 30 ; private final double ROUNDNESS = 20 ; private final double FONT_SCALE = 1.5 ; private final double CLOSENESS_THRESHOLD = 3 ; private final double EXPANED_SLIDER_X = ( Histogram . SQUARE_START ) + ( ( WIDTH ) * 1.5 ) ; public GradeShape ( double y , Grade grade ) { } private EventHandler < MouseEvent > getDragHandler ( ) { } private EventHandler < MouseEvent > getReleaseHandler ( ) { } private EventHandler < MouseEvent > getClickHandler ( ) { } public Collection < Node > get ( ) { } private void move ( double y ) { <START_BUG> if ( ( ( y % ( Histogram . BAR_WIDTH ) ) == 0 ) && ( moveValid ( ( y + ( ( getHeight ( ) ) // 2 ) ) ) ) ) { <END_BUG> setY ( ( y - ( getHeight ( ) ) ) ) ; setX ( ( closeToOtherSlider ( ) ? EXPANED_SLIDER_X : Histogram . SQUARE_START ) ) ; moveLineAndText ( ) ; Grader . getCurve ( ) . adjust ( grade , getScoreFromLocation ( ) ) ; } } private void moveLineAndText ( ) { } private boolean closeToOtherSlider ( ) { } private boolean moveValid ( double y ) { } private double getLowestPossibleScore ( ) { } private double getHighestPossibleScore ( ) { } private double getScoreFromLocation ( ) { } public boolean equals ( Object other ) { } }

Fix:
if ( ( ( y % ( Histogram . BAR_WIDTH ) ) == 0 ) && ( moveValid ( ( y - ( ( getHeight ( ) ) // 2 ) ) ) ) ) {
Buggy code:
public class ServerStartHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "start" ; private final ServerInventory serverInventory ; public ServerStartHandler ( final ServerInventory serverInventory ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . getRunningMode ( ) ) == ( RunningMode . ADMIN_ONLY ) ) { throw new OperationFailedException ( new ModelNode ( HostControllerMessages . MESSAGES . cannotStartServersInvalidMode ( context . getRunningMode ( ) ) ) ) ; } final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final PathElement element = address . getLastElement ( ) ; final String serverName = element . getValue ( ) ; final boolean blocking = operation . get ( "blocking" ) . asBoolean ( false ) ; final ModelNode model = Tools . readModel ( context . readResourceFromRoot ( EMPTY_ADDRESS , true ) ) ; context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServerStatus origStatus = serverInventory . determineServerStatus ( serverName ) ; if ( ( origStatus != ( ServerStatus . STARTED ) ) && ( origStatus != ( ServerStatus . STARTING ) ) ) { final ServerStatus status = serverInventory . startServer ( serverName , model , blocking ) ; context . getResult ( ) . set ( status . toString ( ) ) ; } else { context . getResult ( ) . set ( origStatus . toString ( ) ) ; } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { if ( ( origStatus != ( ServerStatus . STARTED ) ) && ( origStatus != ( ServerStatus . STARTING ) ) ) { serverInventory . stopServer ( serverName , ( - 1 ) ) ; } } } ) ; } } , RUNTIME ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( final Locale locale ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { public static final String APP_TAG = MainActivity . class . getSimpleName ( ) ; private static final int RESULT_LOAD_IMG = 100 ; TextView txtUserLoggedIn ; TextView txtUserLoggedInEmail ; ImageView mUserPicture ; String imgPathDecode ; FrameLayout mDrawerTop ; private DrawerLayout mDrawerLayout ; private ListView mDrawerList ; private ActionBarDrawerToggle mDrawerToggle ; private CharSequence mDrawerTitle ; private CharSequence mTitle ; private LinearLayout mGroupView ; private List < DrawerItem > mDataList ; private UserItem userItem ; private UserLoggedPreference prefs ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } public void showDrawerTop ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int id = item . getItemId ( ) ; if ( id == ( id . action_log_out ) ) { final UserLoggedPreference prefs = new UserLoggedPreference ( this ) ; <START_BUG> new AlertDialog . Builder ( this ) . setTitle ( "Exit<seq2seq4repair_space>applicationExit<seq2seq4repair_space>application" ) . setMessage ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>logout?" ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) { <END_BUG> public void onClick ( DialogInterface dialog , int which ) { prefs . logOut ( ) ; startActivity ( new Intent ( MainActivity . this , ActivityIntro . class ) ) ; MainActivity . this . finish ( ) ; } } ) . setNegativeButton ( no , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { } } ) . setIcon ( ic_warning_grey600_36dp ) . show ( ) ; return true ; } return mDrawerToggle . onOptionsItemSelected ( item ) ; } public void selectItem ( int position ) { } @ Override public void setTitle ( CharSequence title ) { } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } public void setUserPicture ( View view ) { } protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private class DrawerItemClickListener implements ListView . OnItemClickListener { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { } } }

Fix:
new AlertDialog . Builder ( this ) . setTitle ( "Exit<seq2seq4repair_space>application" ) . setMessage ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>logout?" ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) {
Buggy code:
public class CovReport extends Task { private File home = null ; private String format = null ; private File tofile = null ; private String type = null ; private Integer percent = null ; private String filters = null ; private File snapshot = null ; private Path sourcePath = null ; private boolean includeSource = true ; private Path coveragePath = null ; private CovReport . Reference reference = null ; public void setHome ( File value ) { } public static class ReportFormat extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setFormat ( CovReport . ReportFormat value ) { } public static class ReportType extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setType ( CovReport . ReportType value ) { } public void setIncludesource ( boolean value ) { } public void setPercent ( Integer value ) { } public void setFilters ( String values ) { } public Path createSourcepath ( ) { } public void setSnapshot ( File value ) { } public void setTofile ( File value ) { } public Path createCoveragepath ( ) { } public CovReport . Reference createReference ( ) { } public CovReport ( ) { } protected void checkOptions ( ) throws BuildException { if ( ( tofile ) == null ) { throw new BuildException ( "'tofile'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set." ) ; } if ( ( snapshot ) == null ) { throw new BuildException ( "'snapshot'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set." ) ; } if ( ( home ) == null ) { throw new BuildException ( "'home'<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>JProbe<seq2seq4repair_space>home<seq2seq4repair_space>directory" ) ; } <START_BUG> home = new File ( home , "Coverage" ) ; <END_BUG> File jar = new File ( home , "coverage.jar" ) ; if ( ! ( jar . exists ( ) ) ) { throw new BuildException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>Coverage<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( home ) ) ) ; } if ( ( ( reference ) != null ) && ( ! ( "xml" . equals ( format ) ) ) ) { log ( "Ignored<seq2seq4repair_space>reference.<seq2seq4repair_space>It<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>non<seq2seq4repair_space>XML<seq2seq4repair_space>report." ) ; reference = null ; } } public void execute ( ) throws BuildException { } protected String [ ] getParameters ( ) { } public class Reference { protected Path classPath ; protected ReportFilters filters ; public Path createClasspath ( ) { } public ReportFilters createFilters ( ) { } protected void createEnhancedXMLReport ( ) throws BuildException { } } }

Fix:
home = new File ( home , "coverage" ) ;
Buggy code:
public final class Image implements Drawable { public int type ; public int handle ; Device device ; int transparentPixel = - 1 ; GC memGC ; static final int DEFAULT_SCANLINE_PAD = 4 ; Image ( ) { } public Image ( Device device , int width , int height ) { } public Image ( Device device , Image srcImage , int flag ) { } public Image ( Device device , Rectangle bounds ) { } public Image ( Device device , ImageData data ) { } public Image ( Device device , ImageData source , ImageData mask ) { } public Image ( Device device , InputStream stream ) { } public Image ( Device device , String filename ) { } public void dispose ( ) { } public boolean equals ( Object object ) { } public Color getBackground ( ) { } public Rectangle getBounds ( ) { } public ImageData getImageData ( ) { } public int hashCode ( ) { } void init ( Device device , int width , int height ) { <START_BUG> if ( ( width <= 0 ) | ( height <= 0 ) ) { <END_BUG> SWT . error ( ERROR_INVALID_ARGUMENT ) ; } this . device = device ; this . type = SWT . BITMAP ; handle = OS . PhCreateImage ( null , ( ( short ) ( width ) ) , ( ( short ) ( height ) ) , Pg_IMAGE_DIRECT_888 , 0 , 0 , 0 ) ; if ( ( handle ) == 0 ) SWT . error ( ERROR_NO_HANDLES ) ; } void init ( Device device , ImageData i ) { } public int internal_new_GC ( GCData data ) { } public void internal_dispose_GC ( int pmMC , GCData data ) { } public boolean isDisposed ( ) { } public void setBackground ( Color color ) { } static void destroyImage ( int image ) { } public static Image photon_new ( Device device , int type , int handle ) { } public String toString ( ) { } }

Fix:
if ( ( width <= 0 ) || ( height <= 0 ) ) {
Buggy code:
public class TermQueryPrefixTreeStrategy extends PrefixTreeStrategy { public TermQueryPrefixTreeStrategy ( SpatialPrefixTree grid , String fieldName ) { } @ Override public Filter makeFilter ( SpatialArgs args ) { final SpatialOperation op = args . getOperation ( ) ; if ( ! ( SpatialOperation . is ( op , IsWithin , Intersects , BBoxWithin , BBoxIntersects ) ) ) throw new org . apache . lucene . spatial . query . UnsupportedSpatialOperation ( op ) ; Shape shape = args . getShape ( ) ; <START_BUG> int detailLevel = grid . getMaxLevelForPrecision ( shape , args . getDistPrecision ( ) ) ; <END_BUG> List < Node > cells = grid . getNodes ( shape , detailLevel , false ) ; TermsFilter filter = new TermsFilter ( ) ; for ( Node cell : cells ) { filter . addTerm ( new org . apache . lucene . index . Term ( getFieldName ( ) , cell . getTokenString ( ) ) ) ; } return filter ; } }

Fix:
int detailLevel = grid . getLevelForDistance ( args . resolveDistErr ( ctx , distErrPct ) ) ;
Buggy code:
public class RootUtils implements Constants { public static RootUtils . SU su ; public enum SELINUX_STATUS { NOSELINUX , DISABLED , PERMISSIVE , ENFORCING ; } public static RootUtils . SELINUX_STATUS getSelinux ( ) { } public static boolean rooted ( ) { } public static boolean rootAccess ( ) { RootUtils . SU su = RootUtils . getSU ( ) ; <START_BUG> su . runCommand ( "mount" ) ; <END_BUG> return ! ( su . denied ) ; } public static boolean busyboxInstalled ( ) { } private static boolean existBinary ( String binary ) { } public static void mount ( boolean writeable , String mountpoint ) { } public static void closeSU ( ) { } public static String runCommand ( String command ) { } private static RootUtils . SU getSU ( ) { } public static class SU { private Process process ; private BufferedWriter bufferedWriter ; private BufferedReader bufferedReader ; private boolean closed ; private boolean denied ; public SU ( ) { } public synchronized String runCommand ( final String command ) { } public void close ( ) { } } }

Fix:
su . runCommand ( "echo<seq2seq4repair_space>//testRoot//" ) ;
Buggy code:
public abstract class ValueSource { public abstract FunctionValues getValues ( Map context , AtomicReaderContext readerContext ) throws IOException { } @ Override public abstract boolean equals ( Object o ) { } @ Override public abstract int hashCode ( ) { } public abstract String description ( ) { } @ Override public String toString ( ) { } public void createWeight ( Map context , IndexSearcher searcher ) throws IOException { } public static Map newContext ( IndexSearcher searcher ) { } public SortField getSortField ( boolean reverse ) throws IOException { } class ValueSourceSortField extends SortField { public ValueSourceSortField ( boolean reverse ) { } @ Override public SortField rewrite ( IndexSearcher searcher ) throws IOException { } } class ValueSourceComparatorSource extends FieldComparatorSource { private final Map context ; public ValueSourceComparatorSource ( Map context ) { } @ Override public FieldComparator < Double > newComparator ( String fieldname , int numHits , int sortPos , boolean reversed ) throws IOException { } } class ValueSourceComparator extends FieldComparator < Double > { private final double [ ] values ; private FunctionValues docVals ; private double bottom ; private final Map fcontext ; ValueSourceComparator ( Map fcontext , int numHits ) { } @ Override public int compare ( int slot1 , int slot2 ) { } @ Override public int compareBottom ( int doc ) { } @ Override public void copy ( int slot , int doc ) { } @ Override public FieldComparator setNextReader ( AtomicReaderContext context ) throws IOException { } @ Override public void setBottom ( final int bottom ) { } @ Override public Double value ( int slot ) { } @ Override public int compareDocToValue ( int doc , Double valueObj ) { final double value = valueObj ; final double docValue = docVals . doubleVal ( doc ) ; if ( docValue < value ) { return - 1 ; } else if ( docValue > value ) { <START_BUG> return - 1 ; <END_BUG> } else { return 0 ; } } } }

Fix:
return 1 ;
Buggy code:
public class ContainerBase < T > extends Container { protected final InventoryPlayer inventoryPlayer ; protected final T inventory ; private boolean canShift = true ; public ContainerBase ( InventoryPlayer inventoryPlayer , T inventory ) { } public ContainerBase setCanShift ( boolean canShift ) { } protected void addPlayerInventory ( int x , int y ) { } @ Override public ItemStack transferStackInSlot ( EntityPlayer player , int slotIndex ) { } private boolean tryShiftItem ( ItemStack stackToShift , int numSlots ) { } private boolean shiftItemStack ( ItemStack stackToShift , int start , int end ) { } private static boolean canStacksMerge ( ItemStack stack1 , ItemStack stack2 ) { } @ Override public boolean canInteractWith ( EntityPlayer player ) { } @ Override public ItemStack slotClick ( int slotNum , int mouseButton , int modifier , EntityPlayer player ) { if ( ( slotNum < 0 ) || ( slotNum >= ( inventorySlots . size ( ) ) ) ) <START_BUG> return super . slotClick ( slotNum , mouseButton , modifier , player ) ; <END_BUG> Slot slot = ( ( Slot ) ( inventorySlots . get ( slotNum ) ) ) ; if ( slot instanceof SlotPhantom ) return ( ( SlotPhantom ) ( slot ) ) . onClick ( mouseButton , player ) ; return super . slotClick ( slotNum , mouseButton , modifier , player ) ; } }

Fix:
return null ;
Buggy code:
public class Assert { protected Assert ( ) { } String message ; boolean condition ; boolean condition ; public static void assertTrue ( String message , boolean condition ) { } public static void assertTrue ( boolean condition ) { } public static void assertFalse ( String message , boolean condition ) { } public static void assertFalse ( boolean condition ) { } public static void fail ( String message ) { } public static void fail ( ) { } public static void assertEquals ( String message , Object expected , Object actual ) { } public static void assertEquals ( Object expected , Object actual ) { } public static void assertEquals ( String message , double expected , double actual , double delta ) { } public static void assertEquals ( double expected , double actual , double delta ) { } public static void assertEquals ( String message , float expected , float actual , float delta ) { } public static void assertEquals ( float expected , float actual , float delta ) { } public static void assertEquals ( String message , long expected , long actual ) { } public static void assertEquals ( long expected , long actual ) { } public static void assertEquals ( String message , boolean expected , boolean actual ) { } public static void assertEquals ( boolean expected , boolean actual ) { } public static void assertEquals ( String message , byte expected , byte actual ) { } public static void assertEquals ( byte expected , byte actual ) { } public static void assertEquals ( String message , char expected , char actual ) { } public static void assertEquals ( char expected , char actual ) { } public static void assertEquals ( String message , short expected , short actual ) { } public static void assertEquals ( short expected , short actual ) { } public static void assertEquals ( String message , int expected , int actual ) { } public static void assertEquals ( int expected , int actual ) { } public static void assertNotNull ( Object object ) { } public static void assertNotNull ( String message , Object object ) { } public static void assertNull ( Object object ) { } public static void assertNull ( String message , Object object ) { } public static void assertSame ( String message , Object expected , Object actual ) { } public static void assertSame ( Object expected , Object actual ) { } public static void assertNotSame ( String message , Object expected , Object actual ) { } public static void assertNotSame ( Object expected , Object actual ) { } private static void failSame ( String message , Object expected , Object actual ) { } private static void failNotSame ( String message , Object expected , Object actual ) { String formatted = "" ; if ( message != null ) formatted = message + "<seq2seq4repair_space>" ; <START_BUG> Assert . fail ( ( formatted + "expected<seq2seq4repair_space>same" ) ) ; <END_BUG> } private static void failNotEquals ( String message , Object expected , Object actual ) { } }

Fix:
Assert . fail ( ( ( ( ( ( formatted + "expected<seq2seq4repair_space>same:<" ) + expected ) + "><seq2seq4repair_space>was<seq2seq4repair_space>not:<" ) + actual ) + ">" ) ) ;
Buggy code:
public class FilterExpr extends Expr { public Expr e ; public Predicate p ; boolean first_time ; public boolean out_of_range ; public FilterExpr ( Expr l , Predicate pr ) { } public final boolean evalBoolean ( VTDNav vn ) { } public final double evalNumber ( VTDNav vn ) { } public final int evalNodeSet ( VTDNav vn ) throws NavException , XPathEvalException { } public final String evalString ( VTDNav vn ) { String s = "" ; int a = 2147483647 ; int k = - 1 ; vn . push2 ( ) ; int size = vn . contextStack2 . size ; try { if ( needReordering ) { while ( ( k = evalNodeSet ( vn ) ) != ( - 1 ) ) { if ( k < a ) a = k ; } if ( a == 2147483647 ) a = - 1 ; } else { a = evalNodeSet ( vn ) ; } if ( a != ( - 1 ) ) { int t = vn . getTokenType ( a ) ; switch ( t ) { case VTDNav . TOKEN_STARTING_TAG : case VTDNav . TOKEN_DOCUMENT : <START_BUG> s = vn . getXPathStringVal ( ) ; <END_BUG> break ; case VTDNav . TOKEN_ATTR_NAME : s = vn . toString ( ( a + 1 ) ) ; break ; case VTDNav . TOKEN_PI_NAME : s = vn . toString ( ( a + 1 ) ) ; break ; default : s = vn . toString ( a ) ; break ; } } } catch ( Exception e ) { } vn . contextStack2 . size = size ; reset ( vn ) ; vn . pop2 ( ) ; return s ; } public final void reset ( VTDNav vn ) { } public final void reset2 ( VTDNav vn ) { } public final String toString ( ) { } public final boolean isNumerical ( ) { } public final boolean isNodeSet ( ) { } public final boolean isString ( ) { } public final boolean isBoolean ( ) { } public final boolean requireContextSize ( ) { } public final void setContextSize ( int size ) { } public final void setPosition ( int pos ) { } public final int adjust ( int n ) { } public final boolean isFinal ( ) { } public final void markCacheable2 ( ) { } public final void markCacheable ( ) { } public final void clearCache ( ) { } }

Fix:
s = vn . getXPathStringVal2 ( a , ( ( short ) ( 0 ) ) ) ;
Buggy code:
class BasicResourceReferenceMapper extends AbstractResourceReferenceMapper { private final IPageParametersEncoder pageParametersEncoder ; private final IProvider < ? extends IResourceCachingStrategy > cachingStrategy ; public BasicResourceReferenceMapper ( IPageParametersEncoder pageParametersEncoder , IProvider < ? extends IResourceCachingStrategy > cachingStrategy ) { } public IRequestHandler mapRequest ( Request request ) { } private IResourceCachingStrategy getCachingStrategy ( ) { } protected Class < ? > resolveClass ( String name ) { } protected String getClassName ( Class < ? > scope ) { } public Url mapHandler ( IRequestHandler requestHandler ) { if ( requestHandler instanceof ResourceReferenceRequestHandler ) { ResourceReferenceRequestHandler referenceRequestHandler = ( ( ResourceReferenceRequestHandler ) ( requestHandler ) ) ; ResourceReference reference = referenceRequestHandler . getResourceReference ( ) ; Url url ; if ( reference instanceof MetaInfStaticResourceReference ) { url = ( ( MetaInfStaticResourceReference ) ( reference ) ) . mapHandler ( referenceRequestHandler ) ; if ( url != null ) { return url ; } } url = new Url ( ) ; List < String > segments = url . getSegments ( ) ; segments . add ( getContext ( ) . getNamespace ( ) ) ; segments . add ( getContext ( ) . getResourceIdentifier ( ) ) ; segments . add ( getClassName ( reference . getScope ( ) ) ) ; PageParameters parameters = referenceRequestHandler . getPageParameters ( ) ; if ( parameters == null ) { parameters = new PageParameters ( ) ; } else { parameters = new PageParameters ( parameters ) ; parameters . clearIndexed ( ) ; } encodeResourceReferenceAttributes ( url , reference ) ; StringTokenizer tokens = new StringTokenizer ( reference . getName ( ) , "//" ) ; while ( tokens . hasMoreTokens ( ) ) { String token = tokens . nextToken ( ) ; if ( ( tokens . hasMoreTokens ( ) ) == false ) { ResourceUrl resourceUrl = new ResourceUrl ( token , parameters ) ; getCachingStrategy ( ) . decorateUrl ( resourceUrl , reference ) ; token = resourceUrl . getFileName ( ) ; if ( Strings . isEmpty ( token ) ) throw new NullPointerException ( "caching<seq2seq4repair_space>strategy<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>return<seq2seq4repair_space>an<seq2seq4repair_space>empty<seq2seq4repair_space>filename" ) ; if ( ( parameters . getIndexedCount ( ) ) > 0 ) throw new IllegalStateException ( "caching<seq2seq4repair_space>strategy<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>add<seq2seq4repair_space>indexed<seq2seq4repair_space>parameters" ) ; } segments . add ( token ) ; } <START_BUG> if ( parameters != null ) { <END_BUG> url = encodePageParameters ( url , parameters , pageParametersEncoder ) ; } return url ; } return null ; } public int getCompatibilityScore ( Request request ) { } }

Fix:
if ( ( parameters . isEmpty ( ) ) == false ) {
Buggy code:
public class ChatBotPanel extends JPanel { private ChatBotController baseController ; private JButton sampleButton ; private JTextField sampleField ; private JButton CapButton ; private JTextField CapField ; private JTextArea chatArea ; private JScrollPane chatPane ; private SpringLayout baseLayout ; private JLabel lblTextHere ; private JLabel lblWelcomeToChatbot ; public ChatBotPanel ( ChatBotController baseController ) { } private void setupScrollPane ( ) { } private void setupPanel ( ) { this . setBackground ( Blue ) ; <START_BUG> this . setsize ( 400 , 400 ) ; <END_BUG> this . setLayout ( baseLayout ) ; this . add ( sampleButton ) ; this . add ( sampleField ) ; this . add ( chatPane ) ; } private void setupLayout ( ) { } private void setupListeners ( ) { } public void displayTextToUser ( String input ) { } }

Fix:
this . setSize ( 400 , 400 ) ;
Buggy code:
public class PersistentWordCount { private static final String WORD_SPOUT = "WORD_SPOUT" ; private static final String COUNT_BOLT = "COUNT_BOLT" ; private static final String REDIS_BOLT = "REDIS_BOLT" ; private static final String TEST_REDIS_HOST = "127.0.0.1" ; private static final int TEST_REDIS_PORT = 6379 ; public static class StoreCountRedisBolt extends AbstractRedisBolt { private static final Logger LOG = LoggerFactory . getLogger ( PersistentWordCount . StoreCountRedisBolt . class ) ; public StoreCountRedisBolt ( JedisPoolConfig config ) { } public StoreCountRedisBolt ( JedisClusterConfig config ) { } @ Override public void execute ( Tuple input ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } } public static void main ( String [ ] args ) throws Exception { Config config = new Config ( ) ; String host = PersistentWordCount . TEST_REDIS_HOST ; int port = PersistentWordCount . TEST_REDIS_PORT ; <START_BUG> if ( ( args . length ) > 2 ) { <END_BUG> host = args [ 0 ] ; port = Integer . parseInt ( args [ 1 ] ) ; } JedisPoolConfig poolConfig = new JedisPoolConfig . Builder ( ) . setHost ( host ) . setPort ( port ) . build ( ) ; WordSpout spout = new WordSpout ( ) ; WordCounter bolt = new WordCounter ( ) ; PersistentWordCount . StoreCountRedisBolt redisBolt = new PersistentWordCount . StoreCountRedisBolt ( poolConfig ) ; TopologyBuilder builder = new TopologyBuilder ( ) ; builder . setSpout ( PersistentWordCount . WORD_SPOUT , spout , 1 ) ; builder . setBolt ( PersistentWordCount . COUNT_BOLT , bolt , 1 ) . shuffleGrouping ( PersistentWordCount . WORD_SPOUT ) ; builder . setBolt ( PersistentWordCount . REDIS_BOLT , redisBolt , 1 ) . fieldsGrouping ( PersistentWordCount . COUNT_BOLT , new Fields ( "word" ) ) ; if ( ( args . length ) == 2 ) { LocalCluster cluster = new LocalCluster ( ) ; cluster . submitTopology ( "test" , config , builder . createTopology ( ) ) ; Thread . sleep ( 30000 ) ; cluster . killTopology ( "test" ) ; cluster . shutdown ( ) ; System . exit ( 0 ) ; } else if ( ( args . length ) == 3 ) { StormSubmitter . submitTopology ( args [ 2 ] , config , builder . createTopology ( ) ) ; } else { System . out . println ( "Usage:<seq2seq4repair_space>PersistentWordCount<seq2seq4repair_space><redis<seq2seq4repair_space>host><seq2seq4repair_space><redis<seq2seq4repair_space>port><seq2seq4repair_space>(topology<seq2seq4repair_space>name)" ) ; } } }

Fix:
if ( ( args . length ) >= 2 ) {
Buggy code:
public class FilePageStoreTest extends WicketTestCase { @ Override protected void setUp ( ) throws Exception { } public void testPageSerialization ( ) throws Exception { PageB b = new PageB ( "test" ) ; PageA a = new PageA ( b ) ; b . setA ( a ) ; tester . setupRequestAndResponse ( ) ; Session . get ( ) ; a . getPageMap ( ) . put ( a ) ; a . getPageMap ( ) . put ( b ) ; <START_BUG> PageA a2 = ( ( PageA ) ( a . getPageMap ( ) . get ( a . getNumericId ( ) , a . getCurrentVersionNumber ( ) ) ) ) ; <END_BUG> Assert . assertEquals ( a , a2 ) ; Assert . assertSame ( a2 , a2 . getB ( ) . getA ( ) ) ; } public void testCircular ( ) throws Exception { } }

Fix:
PageA a2 = ( ( PageA ) ( a . getPageMap ( ) . get ( a . getNumericId ( ) , 0 ) ) ) ;
Buggy code:
final class ExtensionActivityRegistry extends AbstractActivityRegistry { private List activityDefinitions ; private List activityPatternBindingDefinitions ; private IExtensionRegistry extensionRegistry ; ExtensionActivityRegistry ( IExtensionRegistry extensionRegistry ) { } private void load ( ) throws IOException { if ( ( activityDefinitions ) == null ) activityDefinitions = new ArrayList ( ) ; else activityDefinitions . clear ( ) ; if ( ( activityPatternBindingDefinitions ) == null ) activityPatternBindingDefinitions = new ArrayList ( ) ; else activityPatternBindingDefinitions . clear ( ) ; IConfigurationElement [ ] configurationElements = extensionRegistry . getConfigurationElementsFor ( PACKAGE_FULL ) ; for ( int i = 0 ; i < ( configurationElements . length ) ; i ++ ) { IConfigurationElement configurationElement = configurationElements [ i ] ; String name = configurationElement . getName ( ) ; if ( TAG_ACTIVITY . equals ( name ) ) readActivityDefinition ( configurationElement ) ; else <START_BUG> if ( TAG_PATTERN_BINDING . equals ( name ) ) <END_BUG> readActivityPatternBindingDefinition ( configurationElement ) ; } boolean activityRegistryChanged = false ; if ( ! ( activityDefinitions . equals ( super . activityDefinitions ) ) ) { super . activityDefinitions = Collections . unmodifiableList ( activityDefinitions ) ; activityRegistryChanged = true ; } if ( ! ( activityPatternBindingDefinitions . equals ( super . activityPatternBindingDefinitions ) ) ) { super . activityPatternBindingDefinitions = Collections . unmodifiableList ( activityPatternBindingDefinitions ) ; activityRegistryChanged = true ; } if ( activityRegistryChanged ) fireActivityRegistryChanged ( ) ; } private String getPluginId ( IConfigurationElement configurationElement ) { } private void readActivityDefinition ( IConfigurationElement configurationElement ) { } private void readActivityPatternBindingDefinition ( IConfigurationElement configurationElement ) { } }

Fix:
if ( TAG_ACTIVITY_PATTERN_BINDING . equals ( name ) )
Buggy code:
public class AdjacencyMatrixTest { private AdjacencyMatrix adjacencyMatrix ; @ Test public void testAddEdgeSimpleUndirected ( ) { } @ Test public void testRemoveEdgeSimpleUndirected ( ) { } @ Test public void testAddEdgeSimpleDirected ( ) { } @ Test public void testRemoveEdgeSimpleDirected ( ) { } @ Test public void testAddEdgeWeightedDirected ( ) { } @ Test public void testRemoveEdgeWeightedDirected ( ) { } @ Test public void testAddEdgeWeightedUndirected ( ) { } @ Test public void testRemoveEdgeWeightedUndirected ( ) { } @ Test public void testHasEdge ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testRemoveEdgeThatDoesNotExists ( ) throws Exception { } @ Test ( expected = UnsupportedOperationException . class ) public void testAddEdgeWrongType ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testAddEdgeWrongVertex ( ) throws Exception { } @ Test ( expected = UnsupportedOperationException . class ) public void testAddEdgeWrongType2 ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testAddEdgeWrongVertex2 ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testAddEdgeWrongWeight ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testAddEdgeWrongWeight2 ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testWrongNumberOfVertices ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testGetNeighboursWrongVertex ( ) throws Exception { } @ Test public void testGetNeighbours ( ) { final int numberOfVertices = 7 ; Set < Integer > expected = new HashSet < Integer > ( ) ; expected . add ( 3 ) ; expected . add ( 6 ) ; adjacencyMatrix = new AdjacencyMatrix ( numberOfVertices , WEIGHTED_DIRECTED ) ; adjacencyMatrix . addEdge ( 1 , 2 , 10 ) ; adjacencyMatrix . addEdge ( 1 , 4 , 100 ) ; adjacencyMatrix . addEdge ( 2 , 3 , 150 ) ; adjacencyMatrix . addEdge ( 2 , 6 , 175 ) ; adjacencyMatrix . addEdge ( 3 , 6 , 300 ) ; adjacencyMatrix . addEdge ( 3 , 4 , 15 ) ; adjacencyMatrix . addEdge ( 4 , 5 , 326 ) ; adjacencyMatrix . addEdge ( 4 , 4 , 20 ) ; adjacencyMatrix . addEdge ( 5 , 6 , 80 ) ; Set < Integer > actual = adjacencyMatrix . getNeighbours ( 2 ) ; <START_BUG> assertThat ( expected , is ( actual ) ) ; <END_BUG> } private boolean isEqual ( Integer [ ] [ ] expected , Integer [ ] [ ] actual ) { } }

Fix:
assertThat ( actual , is ( expected ) ) ;
Buggy code:
public abstract class Loop extends AbstractRepeater { public static class LoopItem extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private final int iteration ; public LoopItem ( final int iteration ) { } public final int getIteration ( ) { } } public Loop ( final String id , final int iterations ) { } public Loop ( final String id , final IModel model ) { } public final int getIterations ( ) { } protected void onBeforeRender ( ) { } protected Loop . LoopItem newItem ( int iteration ) { } protected Iterator renderIterator ( ) { <START_BUG> final int iterations = getIterations ( ) ; <END_BUG> return new ReadOnlyIterator ( ) { private int index = 0 ; public boolean hasNext ( ) { return ( index ) < iterations ; } public Object next ( ) { return get ( Integer . toString ( ( ( index ) ++ ) ) ) ; } } ; } protected abstract void populateItem ( Loop . LoopItem item ) { } protected final void renderChild ( Component child ) { } protected void renderItem ( final Loop . LoopItem item ) { } }

Fix:
final int iterations = size ( ) ;
Buggy code:
public class DefinitionsUpdateResponseVerbHandler implements IVerbHandler { private static final Logger logger = LoggerFactory . getLogger ( DefinitionsUpdateResponseVerbHandler . class ) ; public void doVerb ( final Message message ) { try { Collection < Column > cols = MigrationManager . makeColumns ( message ) ; for ( Column col : cols ) { final UUID version = UUIDGen . makeType1UUID ( col . name ( ) ) ; if ( ( version . timestamp ( ) ) > ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) ) { <START_BUG> final Migration m = Migration . deserialize ( new ByteArrayInputStream ( col . value ( ) ) ) ; <END_BUG> assert m . getVersion ( ) . equals ( version ) ; StageManager . getStage ( MIGRATION_STAGE ) . submit ( new WrappedRunnable ( ) { @ Override protected void runMayThrow ( ) throws Exception { if ( ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) == ( version . timestamp ( ) ) ) DefinitionsUpdateResponseVerbHandler . logger . debug ( ( "Not<seq2seq4repair_space>appling<seq2seq4repair_space>(equal)<seq2seq4repair_space>" + ( version . toString ( ) ) ) ) ; else if ( ( DatabaseDescriptor . getDefsVersion ( ) . timestamp ( ) ) > ( version . timestamp ( ) ) ) DefinitionsUpdateResponseVerbHandler . logger . debug ( ( "Not<seq2seq4repair_space>applying<seq2seq4repair_space>(before)" + ( version . toString ( ) ) ) ) ; else { DefinitionsUpdateResponseVerbHandler . logger . debug ( "Applying<seq2seq4repair_space>{}<seq2seq4repair_space>from<seq2seq4repair_space>{}" , m . getClass ( ) . getSimpleName ( ) , message . getFrom ( ) ) ; m . apply ( ) ; m . announce ( ) ; } } } ) ; } } } catch ( IOException ex ) { throw new IOError ( ex ) ; } } }

Fix:
final Migration m = Migration . deserialize ( col . value ( ) ) ;
Buggy code:
public class TestHyphenatedWordsFilter extends BaseTokenStreamTestCase { public void testHyphenatedWords ( ) throws Exception { } public void testHyphenAtEnd ( ) throws Exception { } public void testOffsets ( ) throws Exception { } public void testRandomString ( ) throws Exception { Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , new HyphenatedWordsFilter ( tokenizer ) ) ; } } ; <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , a , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class WorkbenchPreferenceNode extends WorkbenchPreferenceExtensionNode { public WorkbenchPreferenceNode ( String nodeId , IConfigurationElement element ) { } public void createPage ( ) { IWorkbenchPreferencePage page ; try { page = ( ( IWorkbenchPreferencePage ) ( WorkbenchPlugin . createExtension ( getConfigurationElement ( ) , ATT_CLASS ) ) ) ; } catch ( CoreException e ) { IStatus errStatus = StatusUtil . newStatus ( e . getStatus ( ) , PreferenceNode_errorMessage ) ; <START_BUG> StatusManager . getManager ( ) . handle ( errStatus , SHOW ) ; <END_BUG> page = new ErrorPreferencePage ( ) ; } page . init ( PlatformUI . getWorkbench ( ) ) ; if ( ( getLabelImage ( ) ) != null ) { page . setImageDescriptor ( getImageDescriptor ( ) ) ; } page . setTitle ( getLabelText ( ) ) ; setPage ( page ) ; } public String getCategory ( ) { } }

Fix:
StatusManager . getManager ( ) . handle ( errStatus , ( ( StatusManager . SHOW ) | ( StatusManager . LOG ) ) ) ;
Buggy code:
public class BHROS_OIWFS_Feature extends GMOS_OIWFS_Feature { private ISSPort _port ; private Double _patrolFieldXOffset ; private Double _patrolFieldYOffset ; private double _getPatrolFieldXOffset ( InstBHROS inst ) { } private double _getPatrolFieldYOffset ( InstBHROS inst ) { } protected void _updateFigureList ( double guidePosX , double guidePosY , double offsetPosX , double offsetPosY , double translateX , double translateY , double basePosX , double basePosY , boolean oiwfsDefined ) { final InstBHROS inst = _iw . getContext ( ) . instrument ( ) . orNull ( SP_TYPE ) ; if ( inst != null ) { _port = inst . getISSPort ( ) ; _patrolFieldXOffset = _getPatrolFieldXOffset ( inst ) ; _patrolFieldYOffset = _getPatrolFieldYOffset ( inst ) ; _figureList . clear ( ) ; final boolean flip = ( _port ) == ( ISSPort . SIDE_LOOKING ) ; addOffsetConstrainedPatrolField ( ( offsetPosX + translateX ) , ( offsetPosY + translateY ) ) ; if ( oiwfsDefined ) <START_BUG> _addProbeArm ( guidePosX , guidePosY , offsetPosX , offsetPosY , translateX , translateY , flip ) ; <END_BUG> } } protected boolean _needsUpdate ( SPInstObsComp inst , TpeImageInfo tii ) { } No newline ; at end ; of file ; }

Fix:
_addProbeArm ( guidePosX , guidePosY , offsetPosX , offsetPosY , translateX , translateY , basePosX , basePosY , flip ) ;
Buggy code:
public class EditorPane extends PartPane { private EditorWorkbook workbook ; private PinEditorAction pinEditorAction ; public EditorPane ( IEditorReference ref , WorkbenchPage page , EditorWorkbook workbook ) { } protected WorkbenchPart createErrorPart ( WorkbenchPart oldPart ) { } protected void createTitleBar ( ) { } public void doHide ( ) { } public IEditorReference getEditorReference ( ) { } int getStyle ( ) { } public EditorWorkbook getWorkbook ( ) { } public boolean isDragAllowed ( Point p ) { <START_BUG> if ( workbook . overImage ( this , p . x ) ) <END_BUG> return false ; int wbCount = workbook . getEditorArea ( ) . getEditorWorkbookCount ( ) ; int editorCount = workbook . getItemCount ( ) ; if ( isZoomed ( ) ) return editorCount > 1 ; else return ( editorCount > 1 ) || ( wbCount > 1 ) ; } protected void requestActivation ( ) { } public void setWorkbook ( EditorWorkbook editorWorkbook ) { } void shellActivated ( ) { } void shellDeactivated ( ) { } public void showFocus ( boolean inFocus ) { } protected void addMoveItems ( Menu moveMenu ) { } protected void setPinEditorAction ( PinEditorAction action ) { } protected void addPinEditorItem ( Menu parent ) { } protected Sashes findSashes ( ) { } public void updateTitles ( ) { } public void showPaneMenu ( ) { } public void showViewMenu ( ) { } }

Fix:
if ( workbook . isDragAllowed ( this , p ) )