nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ModClusterRemoveCustomMetric implements OperationStepHandler { static final ModClusterRemoveCustomMetric INSTANCE = new ModClusterRemoveCustomMetric ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { PathAddress parent = PathAddress . pathAddress ( SUBSYSTEM_PATH , CONFIGURATION_PATH , DYNAMIC_LOAD_PROVIDER ) ; String clazz = CLASS . resolveModelAttribute ( context , operation ) . asString ( ) ; String name = getMetricName ( context , clazz ) ; if ( name == null ) { context . setRollbackOnly ( ) ; return ; } ModelNode targetOperation = Util . createRemoveOperation ( parent . append ( PathElement . pathElement ( CUSTOM_LOAD_METRIC . getKey ( ) , name ) ) ) ; context . addStep ( targetOperation , new ReloadRequiredRemoveStepHandler ( ) , IMMEDIATE ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } private String getMetricName ( OperationContext context , String clazz ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class Config { private static final Logger LOG = LoggerFactory . getLogger ( Config . class ) ; private boolean auto_metric = false ; private boolean enable_compactions = true ; protected final HashMap < String , String > properties = new HashMap < String , String > ( ) ; protected static final HashMap < String , String > default_map = new HashMap < String , String > ( ) ; private String config_location ; public Config ( final boolean auto_load_config ) throws IOException { } public Config ( final String file ) throws IOException { } public Config ( final Config parent ) { } public boolean auto_metric ( ) { } public boolean enable_compactions ( ) { } public void overrideConfig ( final String property , final String value ) { } public final String getString ( final String property ) { } public final int getInt ( final String property ) { } public final short getShort ( final String property ) { } public final long getLong ( final String property ) { } public final float getFloat ( final String property ) { } public final double getDouble ( final String property ) { } public final boolean getBoolean ( final String property ) { } public final boolean hasProperty ( final String property ) { <START_BUG> final String val = this . properties . get ( property ) . toUpperCase ( ) ; <END_BUG> if ( val == null ) return false ; if ( val . isEmpty ( ) ) return false ; return true ; } public final String dumpConfiguration ( ) { } protected void setDefaults ( ) { } protected void loadConfig ( ) throws IOException { } protected void loadConfig ( final String file ) throws FileNotFoundException , IOException { } private void loadHashMap ( final Properties props ) { } }

Fix:
final String val = this . properties . get ( property ) ;
Buggy code:
public class DeployTask implements TaskType { @ Override public TaskResult execute ( final TaskContext taskContext ) throws TaskException { final BuildLogger buildLogger = taskContext . getBuildLogger ( ) ; final ConfigurationMap configuration = taskContext . getConfigurationMap ( ) ; final AWSOpsWorks opsWorks = new AWSOpsWorksClient ( new com . kabbage . bamboo . aws . ConfigurationMapCredentialsProvider ( configuration ) ) ; final OpsWorksService service = new OpsWorksService ( opsWorks ) ; final String stackName = configuration . get ( STACK_NAME ) ; final String appName = configuration . get ( APP_NAME ) ; String deploymentId ; try { deploymentId = service . CreateDeployment ( stackName , appName ) ; buildLogger . addBuildLogEntry ( ( "Successfully<seq2seq4repair_space>created<seq2seq4repair_space>deployment<seq2seq4repair_space>with<seq2seq4repair_space>ID<seq2seq4repair_space>" + deploymentId ) ) ; } catch ( Exception ex ) { buildLogger . addErrorLogEntry ( "Error<seq2seq4repair_space>creating<seq2seq4repair_space>OpsWorks<seq2seq4repair_space>deployment" , ex ) ; return TaskResultBuilder . newBuilder ( taskContext ) . failedWithError ( ) . build ( ) ; } try { buildLogger . addBuildLogEntry ( "Polling<seq2seq4repair_space>deployment<seq2seq4repair_space>status..." ) ; while ( true ) { <START_BUG> if ( service . IsDeploymentComplete ( deploymentId ) ) { <END_BUG> break ; } buildLogger . addBuildLogEntry ( "Deployment<seq2seq4repair_space>still<seq2seq4repair_space>in<seq2seq4repair_space>progress,<seq2seq4repair_space>will<seq2seq4repair_space>check<seq2seq4repair_space>again<seq2seq4repair_space>in<seq2seq4repair_space>10<seq2seq4repair_space>seconds" ) ; Thread . sleep ( ( 10 * 1000 ) ) ; } if ( ! ( service . IsDeploymentSuccessful ( deploymentId ) ) ) { buildLogger . addErrorLogEntry ( "The<seq2seq4repair_space>OpsWorks<seq2seq4repair_space>deployment<seq2seq4repair_space>failed" ) ; return TaskResultBuilder . newBuilder ( taskContext ) . failedWithError ( ) . build ( ) ; } } catch ( Exception ex ) { buildLogger . addErrorLogEntry ( "Error<seq2seq4repair_space>polling<seq2seq4repair_space>OpsWorks<seq2seq4repair_space>deployment" , ex ) ; return TaskResultBuilder . newBuilder ( taskContext ) . failedWithError ( ) . build ( ) ; } buildLogger . addBuildLogEntry ( "The<seq2seq4repair_space>OpsWorks<seq2seq4repair_space>deployment<seq2seq4repair_space>completed<seq2seq4repair_space>successfully" ) ; return TaskResultBuilder . newBuilder ( taskContext ) . success ( ) . build ( ) ; } }

Fix:
if ( ! ( service . IsDeploymentComplete ( deploymentId ) ) ) {
Buggy code:
public class FileDialog extends Dialog { String [ ] filterNames = new String [ 0 ] ; String [ ] filterExtensions = new String [ 0 ] ; String filterPath = "" ; String fileName = "" ; String [ ] fileNames = new String [ 0 ] ; String fullPath = "" ; int handle ; static final char SEPARATOR = System . getProperty ( "file.separator" ) . charAt ( 0 ) ; static final char EXTENSION_SEPARATOR = ';' ; public FileDialog ( Shell parent ) { } public FileDialog ( Shell parent , int style ) { } String computeResultChooserDialog ( ) { } String computeResultClassicDialog ( ) { } public String getFileName ( ) { } public String [ ] getFileNames ( ) { } public String [ ] getFilterExtensions ( ) { } public String [ ] getFilterNames ( ) { } public String getFilterPath ( ) { } public String open ( ) { <START_BUG> boolean useChooserDialog = ( OS . gtk_check_version ( 2 , 4 , 10 ) ) == 0 ; <END_BUG> if ( useChooserDialog ) { return openChooserDialog ( ) ; } else { return openClassicDialog ( ) ; } } String openChooserDialog ( ) { } String openClassicDialog ( ) { } void presetChooserDialog ( ) { } void presetClassicDialog ( ) { } public void setFileName ( String string ) { } public void setFilterExtensions ( String [ ] extensions ) { } public void setFilterNames ( String [ ] names ) { } public void setFilterPath ( String string ) { } }

Fix:
boolean useChooserDialog = ( OS . GTK_VERSION ) >= ( OS . VERSION ( 2 , 4 , 10 ) ) ;
Buggy code:
public class Help implements Command { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final Set commands = new HashSet ( ) ; private static final String HELP_DOCS = ( "file://////" + ( JMeterUtils . getJMeterHome ( ) ) ) + "//printable_docs//usermanual//" ; private static final String HELP_PAGE = ( Help . HELP_DOCS ) + "component_reference.html" ; public static final String HELP_FUNCTIONS = ( Help . HELP_DOCS ) + "functions.html" ; private static JDialog helpWindow ; private static HtmlPane helpDoc ; private static JScrollPane scroller ; private static String currentPage ; public void doAction ( ActionEvent e ) { if ( ( Help . helpWindow ) == null ) { Help . helpWindow = new JDialog ( new Frame ( ) , JMeterUtils . getResString ( "help" ) , false ) ; Help . helpWindow . getContentPane ( ) . setLayout ( new GridLayout ( 1 , 1 ) ) ; ComponentUtil . centerComponentInWindow ( Help . helpWindow , 60 ) ; } Help . helpWindow . getContentPane ( ) . removeAll ( ) ; Help . helpWindow . getContentPane ( ) . add ( Help . scroller ) ; <START_BUG> Help . helpWindow . show ( ) ; <END_BUG> if ( ( e . getSource ( ) ) instanceof String [ ] ) { String [ ] source = ( ( String [ ] ) ( e . getSource ( ) ) ) ; resetPage ( source [ 0 ] ) ; Help . helpDoc . scrollToReference ( source [ 1 ] ) ; } else { resetPage ( Help . HELP_PAGE ) ; Help . helpDoc . scrollToReference ( GuiPackage . getInstance ( ) . getTreeListener ( ) . getCurrentNode ( ) . getDocAnchor ( ) ) ; } } private void resetPage ( String source ) { } public Set getActionNames ( ) { } }

Fix:
Help . helpWindow . setVisible ( true ) ;
Buggy code:
public abstract class DocValuesFormat { public abstract PerDocConsumer docsConsumer ( PerDocWriteState state ) throws IOException { } public abstract PerDocValues docsProducer ( SegmentReadState state ) throws IOException { } <START_BUG> public abstract void files ( Directory dir , SegmentInfo info , int formatId , Set < String > files ) throws IOException ; <END_BUG> }

Fix:
public abstract void files ( Directory dir , SegmentInfo info , Set < String > files ) throws IOException ;
Buggy code:
public class BinaryMemtable implements IFlushable < DecoratedKey > { private static Logger logger_ = Logger . getLogger ( BinaryMemtable . class ) ; private int threshold_ = ( ( DatabaseDescriptor . getBMTThreshold ( ) ) * 1024 ) * 1024 ; private AtomicInteger currentSize_ = new AtomicInteger ( 0 ) ; private String table_ ; private String cfName_ ; private boolean isFrozen_ = false ; private Map < DecoratedKey , byte [ ] > columnFamilies_ = new org . cliffc . high_scale_lib . NonBlockingHashMap < DecoratedKey , byte [ ] > ( ) ; Lock lock_ = new ReentrantLock ( ) ; Condition condition_ ; private final IPartitioner partitioner_ = StorageService . getPartitioner ( ) ; BinaryMemtable ( String table , String cfName ) throws IOException { } public int getMemtableThreshold ( ) { } void resolveSize ( int oldSize , int newSize ) { } boolean isThresholdViolated ( ) { } String getColumnFamily ( ) { } void put ( String key , byte [ ] buffer ) throws IOException { } public boolean isClean ( ) { } private void resolve ( String key , byte [ ] buffer ) { } public List < DecoratedKey > getSortedKeys ( ) { assert ! ( columnFamilies_ . isEmpty ( ) ) ; BinaryMemtable . logger_ . info ( ( "Sorting<seq2seq4repair_space>" + ( this ) ) ) ; List < DecoratedKey > keys = new ArrayList < DecoratedKey > ( columnFamilies_ . keySet ( ) ) ; <START_BUG> Collections . sort ( keys , partitioner_ . getDecoratedKeyComparator ( ) ) ; <END_BUG> return keys ; } public SSTableReader writeSortedContents ( List < DecoratedKey > sortedKeys ) throws IOException { } }

Fix:
Collections . sort ( keys ) ;
Buggy code:
public class WebServiceWebServiceProviderCoExistRule extends AbstractAnnotationProcessor { @ Override public void process ( ) { } private void checkWebServiceProvider ( AnnotationMirror mirror ) { if ( mirror . getAnnotationType ( ) . toString ( ) . equals ( WebServiceProvider . class . getName ( ) ) ) { <START_BUG> printError ( mirror . getPosition ( ) , WEBSERVICE_WEBSERVICEPROVIDER_COMBINATION ) ; <END_BUG> } } }

Fix:
printFixableError ( mirror . getPosition ( ) , WEBSERVICE_WEBSERVICEPROVIDER_COMBINATION ) ;
Buggy code:
public class SteeringNode extends SerialNode implements Node { public Publisher brakePub ; public Publisher steeringPub ; public Publisher statePub ; public SteeringNode ( SensorChannel sensor ) { } @ Override public boolean matchDataSample ( byte [ ] sample ) { } @ Override public int matchDataMinSize ( ) { } @ Override public int baudRate ( ) { } @ Override public int peel ( byte [ ] buffer , int start , int bytes_available ) { RBPair rbp = RBSerial . peel ( buffer , start , bytes_available ) ; <START_BUG> int bytes_read = rbp . get_num_bytes_read ( ) ; <END_BUG> RBSerialMessage message = rbp . getMessage ( ) ; byte b = message . getHeaderByte ( ) ; if ( b == ( RBSerialMessage . BRAKE ) ) { } else if ( b == ( RBSerialMessage . STEERING ) ) { } else if ( b == ( RBSerialMessage . DEVICE_ID ) ) { } return bytes_read ; } }

Fix:
int bytes_read = rbp . getNumberOfBytesRead ( ) ;
Buggy code:
public class Sash extends Control { Cursor sizeCursor ; boolean dragging ; int lastX ; int lastY ; int startX ; int startY ; private static final int INCREMENT = 1 ; private static final int PAGE_INCREMENT = 9 ; public Sash ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } boolean becomeFirstResponder ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } boolean sendKeyEvent ( NSEvent nsEvent , int type ) { } void mouseDown ( int theEvent ) { } void mouseDragged ( int theEvent ) { } void mouseEntered ( int theEvent ) { } void mouseUp ( int theEvent ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } <START_BUG> int traversalCode ( int key , int theEvent ) { <END_BUG> return 0 ; } }

Fix:
int traversalCode ( int key , NSEvent theEvent ) {
Buggy code:
class Session { protected static final int INIT = 1 ; protected static final int ATTEXC = 2 ; protected static final int SECACC = 3 ; protected static final int CHKSEC = 4 ; protected static final int CLOSED = 5 ; protected static final int DRDA_SESSION = 1 ; protected static final int CMD_SESSION = 2 ; private static final String TRACENAME_PREFIX = "Server" ; private static final String TRACENAME_SUFFIX = ".trace" ; protected Socket clientSocket ; protected int connNum ; protected InputStream sessionInput ; protected OutputStream sessionOutput ; protected String traceFileName ; protected boolean traceOn ; protected int state ; protected int sessionType ; protected String drdaID ; protected DssTrace dssTrace ; protected AppRequester appRequester ; protected Database database ; protected int qryinsid ; protected LocalizedResource langUtil ; private Hashtable dbtable ; private NetworkServerControlImpl nsctrl ; Session ( NetworkServerControlImpl nsctrl , int connNum , Socket clientSocket , String traceDirectory , boolean traceOn ) throws Exception { } protected void close ( ) throws SQLException { } protected void initTrace ( String traceDirectory , boolean throwException ) throws Exception { } protected void setTraceOn ( String traceDirectory , boolean throwException ) throws Exception { } protected boolean isTraceOn ( ) { } protected int getConnNum ( ) { } protected void setTraceOff ( ) { } protected void addDatabase ( Database d ) { <START_BUG> dbtable . put ( d . dbName , d ) ; <END_BUG> } protected Database getDatabase ( String dbName ) { } protected int getRequiredSecurityCodepoint ( ) { } protected boolean requiresSecurityCodepoint ( ) { } protected void setState ( int s ) { } private void initialize ( String traceDirectory ) throws Exception { } protected String buildRuntimeInfo ( String indent , LocalizedResource localLangUtil ) { } }

Fix:
dbtable . put ( d . getDatabaseName ( ) , d ) ;
Buggy code:
public class Videos extends Fragment { private LoadResource loadResource ; private RecyclerView mRecyclerView ; private LayoutManager mLayoutManager ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View rootView = inflater . inflate ( fragment_videos , container , false ) ; String [ ] sub = new String [ ] { "Visual<seq2seq4repair_space>Art" , "Science" } ; <START_BUG> mRecyclerView = ( ( RecyclerView ) ( rootView . findViewById ( recycler_res ) ) ) ; <END_BUG> mRecyclerView . setHasFixedSize ( true ) ; mLayoutManager = new android . support . v7 . widget . LinearLayoutManager ( getActivity ( ) ) ; mRecyclerView . setLayoutManager ( mLayoutManager ) ; loadResource = new LoadResource ( getActivity ( ) , mRecyclerView , sub , "LowerElem" , 1 ) ; loadResource . execute ( ) ; return rootView ; } }

Fix:
mRecyclerView = ( ( RecyclerView ) ( rootView . findViewById ( recycler_videos ) ) ) ;
Buggy code:
public class BootstrapMetadataVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( BootstrapMetadataVerbHandler . class ) ; public void doVerb ( Message message ) { BootstrapMetadataVerbHandler . logger_ . debug ( ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>BootstrapMetadataMessage<seq2seq4repair_space>from<seq2seq4repair_space>" + ( message . getFrom ( ) ) ) ) ; <START_BUG> byte [ ] body = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> DataInputBuffer bufIn = new DataInputBuffer ( ) ; bufIn . reset ( body , body . length ) ; try { BootstrapMetadataMessage bsMetadataMessage = BootstrapMetadataMessage . serializer ( ) . deserialize ( bufIn ) ; BootstrapMetadata [ ] bsMetadata = bsMetadataMessage . bsMetadata_ ; for ( BootstrapMetadata bsmd : bsMetadata ) { BootstrapMetadataVerbHandler . logger_ . debug ( bsmd . toString ( ) ) ; } for ( BootstrapMetadata bsmd : bsMetadata ) { long startTime = System . currentTimeMillis ( ) ; doTransfer ( bsmd . target_ , bsmd . ranges_ ) ; BootstrapMetadataVerbHandler . logger_ . debug ( ( ( ( ( "Time<seq2seq4repair_space>taken<seq2seq4repair_space>to<seq2seq4repair_space>boostrap<seq2seq4repair_space>" + ( bsmd . target_ ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( System . currentTimeMillis ( ) ) - startTime ) ) + "<seq2seq4repair_space>msecs." ) ) ; } } catch ( IOException ex ) { BootstrapMetadataVerbHandler . logger_ . info ( LogUtil . throwableToString ( ex ) ) ; } } private void doTransfer ( EndPoint target , List < Range > ranges ) throws IOException { } private void doHandoff ( EndPoint target , List < String > fileList ) throws IOException { } }

Fix:
byte [ ] body = message . getMessageBody ( ) ;
Buggy code:
public class Available extends Task { private String property ; private String classname ; private String file ; private String resource ; public void setProperty ( String property ) { } public void setClass ( String classname ) { } public void setClassname ( String classname ) { } public void setFile ( String filename ) { <START_BUG> this . file = file ; <END_BUG> } public void setResource ( String resource ) { } public void init ( ) throws BuildException { } private boolean checkFile ( String file ) { } private boolean checkResource ( String resource ) { } private boolean checkClass ( String classname ) { } }

Fix:
this . file = filename ;
Buggy code:
public class AttackClickListener implements OnClickListener { @ Override public void onClick ( View v ) { <START_BUG> activity . PCMakesAttackMove ( ) ; <END_BUG> } }

Fix:
GameActivity . getInstance ( ) . PCMakesAttackMove ( ) ;
Buggy code:
public class Blackjack { public static void main ( String [ ] args ) { } public static int cardPointValue ( Card card ) { <START_BUG> if ( ( card . getRANK_VALUE ( ) ) > 7 ) { <END_BUG> return 10 ; } else if ( ( card . getRANK_VALUE ( ) ) == 12 ) { return 11 ; } return ( card . getRANK_VALUE ( ) ) + 2 ; } public static int addToScore ( Card newCard , int score ) { } public static boolean willDealerHit ( int dealerScore ) { } public static void hit ( CardStack deck , ArrayList hand ) { } public static void printHand ( ArrayList cards , String whoseHand ) { } public static boolean isBust ( int score ) { } public static void whoWon ( int playerScore , int dealerScore ) { } public static boolean anyNat21 ( int playerScore , int dealerScore ) { } }

Fix:
if ( ( ( card . getRANK_VALUE ( ) ) > 7 ) && ( ( card . getRANK_VALUE ( ) ) != 12 ) ) {
Buggy code:
public class MessageDrivenAnnotationProcessor implements DeploymentUnitProcessor { static final DotName MESSAGE_DRIVEN_ANNOTATION_NAME = DotName . createSimple ( MessageDriven . class . getName ( ) ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final CompositeIndex compositeIndex = deploymentUnit . getAttachment ( COMPOSITE_ANNOTATION_INDEX ) ; if ( compositeIndex == null ) { return ; } final List < AnnotationInstance > instances = compositeIndex . getAnnotations ( MessageDrivenAnnotationProcessor . MESSAGE_DRIVEN_ANNOTATION_NAME ) ; if ( ( instances == null ) || ( instances . isEmpty ( ) ) ) { return ; } EjbDeploymentMarker . mark ( deploymentUnit ) ; EjbJarDescription ejbJarDescription = deploymentUnit . getAttachment ( EJB_JAR_DESCRIPTION ) ; if ( ejbJarDescription == null ) { <START_BUG> ejbJarDescription = new EjbJarDescription ( moduleDescription ) ; <END_BUG> deploymentUnit . putAttachment ( EJB_JAR_DESCRIPTION , ejbJarDescription ) ; } for ( final AnnotationInstance instance : instances ) { final AnnotationTarget target = instance . target ( ) ; if ( ! ( target instanceof ClassInfo ) ) { throw new DeploymentUnitProcessingException ( ( "The<seq2seq4repair_space>@MessageDriven<seq2seq4repair_space>annotation<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>class<seq2seq4repair_space>level:<seq2seq4repair_space>" + target ) ) ; } final ClassInfo beanClassInfo = ( ( ClassInfo ) ( target ) ) ; final String beanClassName = beanClassInfo . name ( ) . toString ( ) ; final String ejbName = beanClassInfo . name ( ) . local ( ) ; final AnnotationValue nameValue = instance . value ( "name" ) ; final String beanName = ( ( nameValue == null ) || ( nameValue . asString ( ) . isEmpty ( ) ) ) ? ejbName : nameValue . asString ( ) ; final String messageListenerInterfaceName = instance . value ( "messageListenerInterface" ) . asClass ( ) . name ( ) . toString ( ) ; MessageDrivenComponentDescription messageDrivenComponentDescription = new MessageDrivenComponentDescription ( beanName , beanClassName , ejbJarDescription , deploymentUnit . getServiceName ( ) ) ; messageDrivenComponentDescription . setMessageListenerInterfaceName ( messageListenerInterfaceName ) ; if ( ( moduleDescription . getComponentByName ( messageDrivenComponentDescription . getComponentName ( ) ) ) == null ) { moduleDescription . addComponent ( messageDrivenComponentDescription ) ; } } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
ejbJarDescription = new EjbJarDescription ( moduleDescription , deploymentUnit . getName ( ) . endsWith ( ".war" ) ) ;
Buggy code:
public class Move extends Copy { public Move ( ) { } protected void validateAttributes ( ) throws BuildException { } protected void doFileOperations ( ) { } private void moveFile ( File fromFile , File toFile , boolean filtering , boolean overwrite ) { } private void copyFile ( File fromFile , File toFile , boolean filtering , boolean overwrite ) { } protected boolean okToDelete ( File d ) { } protected void deleteDir ( File d ) { } protected void deleteDir ( File d , boolean deleteFiles ) { } protected boolean renameFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite ) throws IOException , BuildException { if ( ( ( ( destFile . isDirectory ( ) ) || filtering ) || ( ( getFilterSets ( ) . size ( ) ) > 0 ) ) || ( ( getFilterChains ( ) . size ( ) ) > 0 ) ) { return false ; } if ( ( destFile . isFile ( ) ) && ( ! ( destFile . canWrite ( ) ) ) ) { if ( ! ( getForce ( ) ) ) { throw new IOException ( ( ( "can't<seq2seq4repair_space>replace<seq2seq4repair_space>read-only<seq2seq4repair_space>destination<seq2seq4repair_space>" + "file<seq2seq4repair_space>" ) + destFile ) ) ; } else if ( ! ( getFileUtils ( ) . tryHardToDelete ( destFile ) ) ) { throw new IOException ( ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>read-only<seq2seq4repair_space>" + "destination<seq2seq4repair_space>file<seq2seq4repair_space>" ) + destFile ) ) ; } } File parent = destFile . getParentFile ( ) ; if ( ( parent != null ) && ( ! ( parent . exists ( ) ) ) ) { parent . mkdirs ( ) ; } else if ( destFile . isFile ( ) ) { sourceFile = getFileUtils ( ) . normalize ( sourceFile . getAbsolutePath ( ) ) . getCanonicalFile ( ) ; destFile = getFileUtils ( ) . normalize ( destFile . getAbsolutePath ( ) ) ; <START_BUG> if ( destFile . equals ( sourceFile ) ) { <END_BUG> log ( ( ( ( ( "Rename<seq2seq4repair_space>of<seq2seq4repair_space>" + sourceFile ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + destFile ) + "<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>no-op." ) , MSG_VERBOSE ) ; return true ; } if ( ! ( ( sourceFile . equals ( destFile . getCanonicalFile ( ) ) ) || ( destFile . delete ( ) ) ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>existing<seq2seq4repair_space>file<seq2seq4repair_space>" + destFile ) ) ; } } return sourceFile . renameTo ( destFile ) ; } }

Fix:
if ( destFile . getAbsolutePath ( ) . equals ( sourceFile . getAbsolutePath ( ) ) ) {
Buggy code:
public class AutolinkTest extends TestCase { private MockWebApplication application ; public AutolinkTest ( String name ) { } public void testRenderHomePage ( ) throws Exception { } private boolean validateDocument ( String document ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; title . addExpectedChild ( new TextContent ( "Mock<seq2seq4repair_space>Page" ) ) ; Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag anchor1 = new Tag ( "a" ) ; anchor1 . addExpectedAttribute ( "href" , ".*MockWebApplication.*" ) ; anchor1 . addExpectedChild ( new TextContent ( "Home" ) ) ; body . addExpectedChild ( anchor1 ) ; Tag link1 = new Tag ( "wicket:link" ) ; body . addExpectedChild ( link1 ) ; link1 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag anchor2 = new Tag ( "a" ) ; anchor2 . addExpectedAttribute ( "href" , ".*MockWebApplication.*" ) ; anchor2 . addExpectedChild ( new TextContent ( "Home" ) ) ; link1 . addExpectedChild ( anchor2 ) ; Tag link2 = new Tag ( "wicket:link" ) ; body . addExpectedChild ( link2 ) ; link2 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag anchor3 = new Tag ( "a" ) ; anchor3 . addExpectedAttribute ( "href" , "Page1.html" ) ; anchor3 . addExpectedChild ( new TextContent ( "Home" ) ) ; link2 . addExpectedChild ( anchor3 ) ; Tag link3 = new Tag ( "wicket:link" ) ; body . addExpectedChild ( link3 ) ; link3 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag anchor4 = new Tag ( "a" ) ; anchor4 . addExpectedAttribute ( "href" , ".*MockWebApplication.*" ) ; anchor4 . addExpectedChild ( new TextContent ( "Home" ) ) ; link3 . addExpectedChild ( anchor4 ) ; Tag link4 = new Tag ( "wicket:link" ) ; body . addExpectedChild ( link4 ) ; link4 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag anchor5 = new Tag ( "a" ) ; anchor5 . addExpectedAttribute ( "href" , "Page1.html" ) ; anchor5 . addExpectedChild ( new TextContent ( "Home" ) ) ; link4 . addExpectedChild ( anchor5 ) ; link4 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag link5 = new Tag ( "wicket:link" ) ; link4 . addExpectedChild ( link5 ) ; link5 . addExpectedChild ( new TextContent ( ".*" ) ) ; Tag anchor6 = new Tag ( "a" ) ; <START_BUG> anchor6 . addExpectedAttribute ( "href" , ".*MockWebApplication.*name=test&id=123" ) ; <END_BUG> anchor6 . addExpectedChild ( new TextContent ( "Home" ) ) ; link5 . addExpectedChild ( anchor6 ) ; link5 . addExpectedChild ( new TextContent ( ".*" ) ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } }

Fix:
anchor6 . addExpectedAttribute ( "href" , ".*MockWebApplication.*name=test&amp;id=123" ) ;
Buggy code:
public class OpOr extends Operator { public OpOr ( int pos , SpelNodeImpl ... operands ) { } @ Override public BooleanTypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { boolean leftValue ; boolean rightValue ; try { TypedValue typedValue = getLeftOperand ( ) . getValueInternal ( state ) ; this . assertTypedValueNotNull ( typedValue ) ; leftValue = ( ( Boolean ) ( state . convertValue ( typedValue , BOOLEAN_TYPE_DESCRIPTOR ) ) ) ; } catch ( SpelEvaluationException see ) { see . setPosition ( getLeftOperand ( ) . getStartPosition ( ) ) ; throw see ; } if ( leftValue == true ) { <START_BUG> return BooleanTypedValue . True ; <END_BUG> } try { TypedValue typedValue = getRightOperand ( ) . getValueInternal ( state ) ; this . assertTypedValueNotNull ( typedValue ) ; rightValue = ( ( Boolean ) ( state . convertValue ( typedValue , BOOLEAN_TYPE_DESCRIPTOR ) ) ) ; } catch ( SpelEvaluationException see ) { see . setPosition ( getRightOperand ( ) . getStartPosition ( ) ) ; throw see ; } return BooleanTypedValue . forValue ( ( leftValue || rightValue ) ) ; } private void assertTypedValueNotNull ( TypedValue typedValue ) { } }

Fix:
return BooleanTypedValue . TRUE ;
Buggy code:
public class CopyResourceElementsOperation extends MultiOperation implements SuffixConstants { protected ArrayList fRenamedCompilationUnits = null ; protected Map fDeltasPerProject = new HashMap ( 1 ) ; protected DOMFactory fFactory ; protected ArrayList fCreatedElements ; public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement [ ] destContainers , boolean force ) { } public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement destContainer , boolean force ) { } private IResource [ ] collectResourcesOfInterest ( IPackageFragment source ) throws JavaModelException { } private void createNeededPackageFragments ( IContainer sourceFolder , IPackageFragmentRoot root , String newFragName , boolean moveFolder ) throws JavaModelException { } private JavaElementDelta getDeltaFor ( IJavaProject javaProject ) { } protected String getMainTaskName ( ) { } protected void prepareDeltas ( IJavaElement sourceElement , IJavaElement destinationElement , boolean isMove ) { } private void processCompilationUnitResource ( ICompilationUnit source , IPackageFragment dest ) throws JavaModelException { } protected void processDeltas ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void processElements ( ) throws JavaModelException { } private void processPackageFragmentResource ( IPackageFragment source , IPackageFragmentRoot root , String newName ) throws JavaModelException { } private String updatedContent ( ICompilationUnit cu , IPackageFragment dest , String newName ) throws JavaModelException { } private void updatePackageStatement ( IDOMCompilationUnit domCU , String pkgName ) throws JavaModelException { } private void updateTypeName ( ICompilationUnit cu , IDOMCompilationUnit domCU , String oldName , String newName ) throws JavaModelException { } protected IJavaModelStatus verify ( ) { } protected void verify ( IJavaElement element ) throws JavaModelException { if ( ( element == null ) || ( ! ( element . exists ( ) ) ) ) error ( IJavaModelStatusConstants . ELEMENT_DOES_NOT_EXIST , element ) ; if ( ( element . isReadOnly ( ) ) && ( ( isRename ( ) ) || ( isMove ( ) ) ) ) error ( IJavaModelStatusConstants . READ_ONLY , element ) ; IResource resource = element . getResource ( ) ; if ( resource instanceof IFolder ) { if ( resource . isLinked ( ) ) { <START_BUG> error ( JavaModelStatus . INVALID_RESOURCE , element ) ; <END_BUG> } } int elementType = element . getElementType ( ) ; if ( elementType == ( IJavaElement . COMPILATION_UNIT ) ) { if ( ( isMove ( ) ) && ( ( ( ICompilationUnit ) ( element ) ) . isWorkingCopy ( ) ) ) error ( IJavaModelStatusConstants . INVALID_ELEMENT_TYPES , element ) ; } else if ( elementType != ( IJavaElement . PACKAGE_FRAGMENT ) ) { error ( IJavaModelStatusConstants . INVALID_ELEMENT_TYPES , element ) ; } JavaElement dest = ( ( JavaElement ) ( getDestinationParent ( element ) ) ) ; verifyDestination ( element , dest ) ; if ( ( this . renamings ) != null ) { verifyRenaming ( element ) ; } } }

Fix:
error ( IJavaModelStatusConstants . INVALID_RESOURCE , element ) ;
Buggy code:
@ XmlRootElement public class CVEInfo { public String cve_name ; public String product_name ; public String product_version ; public String bugzilla ; public String bugzilla_status ; public String errata ; public String build_nvr ; public String fixed_in_version ; public String note ; public String getCve_name ( ) { } public void setCve_name ( String cve_name ) { } public String getProduct_name ( ) { } public void setProduct_name ( String product_name ) { } public String getProduct_version ( ) { } public void setProduct_version ( String product_version ) { } public String getBugzilla ( ) { <START_BUG> return ( bugzilla ) == null ? "" : ( ( ( "<a<seq2seq4repair_space>href=\"https:////bugzilla.redhat.com//show_bug.cgi?id=" + ( bugzilla ) ) + "\"<seq2seq4repair_space>target=\"_blank\">" ) + ( bugzilla ) ) + "<//a>" ; <END_BUG> } public void setBugzilla ( String bugzilla ) { } public String getBugzilla_status ( ) { } public void setBugzilla_status ( String bugzilla_status ) { } public String getErrata ( ) { } public void setErrata ( String errata ) { } public String getBuild_nvr ( ) { } public void setBuild_nvr ( String build_nvr ) { } public String getFixed_in_version ( ) { } public void setFixed_in_version ( String fixed_in_version ) { } public String getNote ( ) { } public void setNote ( String note ) { } }

Fix:
return bugzilla ;
Buggy code:
public class SurfaceFormDictionary extends Configured implements Tool { private static class HadoopSurfaceFormDictionaryMap extends Mapper < LongWritable , Text , Text , IntWritable > { Logger log = Logger . getLogger ( "de.tudarmstadt.lt.wiki" ) ; @ Override public void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { try { String [ ] valueParts = value . toString ( ) . split ( "\t" ) ; String [ ] links = valueParts [ 1 ] . split ( "<seq2seq4repair_space>" ) ; for ( String link : links ) { String [ ] linkParts = link . split ( "@@" ) ; <START_BUG> String surfaceFormLemma = linkParts [ 0 ] ; <END_BUG> String [ ] rightParts = linkParts [ 1 ] . split ( "@" ) ; String target = rightParts [ 0 ] ; context . write ( new Text ( ( ( surfaceFormLemma + "@@" ) + target ) ) , new IntWritable ( 1 ) ) ; } } catch ( Exception e ) { log . error ( ( "Can't<seq2seq4repair_space>process<seq2seq4repair_space>line:<seq2seq4repair_space>" + ( value . toString ( ) ) ) , e ) ; } } } public boolean runJob ( String inDir , String outDir ) throws Exception { } public int run ( String [ ] args ) throws Exception { } public static void main ( final String [ ] args ) throws Exception { } No newline ; at end ; of file ; }

Fix:
String surfaceFormLemma = linkParts [ 0 ] . replace ( "\t" , "" ) ;
Buggy code:
public final class Camera implements IUpdate { private static final Camera instance = new Camera ( ) ; private static final int TILE_SIZE_PIXELS = 64 ; private static final int BASE_VIEWPORT_WIDTH = 50 ; private static final int BASE_VIEWPORT_HEIGHT = 50 ; public static final int NUM_TILES_PER_SCREEN_WIDTH = 18 ; private final OrthographicCamera rawCamera ; private Camera ( ) { } public static Camera getInstance ( ) { } @ Override public boolean update ( ) { } <START_BUG> public com . badlogic . gdx . graphics . Camera getRawCamera ( ) { <END_BUG> return rawCamera ; } public void resizeViewport ( float width , float height ) { } public float getViewportWidth ( ) { } public float getViewportHeight ( ) { } public float getTileMapScale ( ) { } }

Fix:
public OrthographicCamera getRawCamera ( ) {
Buggy code:
public class EvalTag extends HtmlEscapingAwareTag { private ExpressionParser expressionParser ; private String expression ; private String var ; private int scope = PageContext . PAGE_SCOPE ; private boolean javaScriptEscape = false ; public void setExpression ( String expression ) { } public void setVar ( String var ) { } public void setScope ( String scope ) { } public void setJavaScriptEscape ( String javaScriptEscape ) throws JspException { } @ Override public int doStartTagInternal ( ) throws JspException { } @ Override public int doEndTag ( ) throws JspException { } private EvaluationContext createEvaluationContext ( ) { StandardEvaluationContext context = new StandardEvaluationContext ( ) ; context . addPropertyAccessor ( new EvalTag . JspPropertyAccessor ( this . pageContext ) ) ; ConversionService conversionService = getConversionService ( ) ; if ( conversionService != null ) { <START_BUG> context . setTypeConverter ( new StandardTypeConverter ( ) ) ; <END_BUG> } return context ; } private ConversionService getConversionService ( ) { } private static class JspPropertyAccessor implements PropertyAccessor { private PageContext pageContext ; public JspPropertyAccessor ( PageContext pageContext ) { } public Class < ? > [ ] getSpecificTargetClasses ( ) { } public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } } }

Fix:
context . setTypeConverter ( new org . springframework . expression . spel . support . StandardTypeConverter ( conversionService ) ) ;
Buggy code:
class RemoveFolderFromIndex extends IndexRequest { IPath folderPath ; char [ ] [ ] inclusionPatterns ; char [ ] [ ] exclusionPatterns ; IProject project ; public RemoveFolderFromIndex ( IPath folderPath , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns , IProject project , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) ) return true ; Index index = manager . getIndex ( this . containerPath , true , false ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = index . monitor ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; String [ ] paths = index . queryDocumentNames ( this . folderPath . toString ( ) ) ; if ( ( ( this . exclusionPatterns ) == null ) && ( ( this . inclusionPatterns ) == null ) ) { for ( int i = 0 , max = ( paths == null ) ? 0 : paths . length ; i < max ; i ++ ) manager . remove ( paths [ i ] , this . containerPath ) ; } else { for ( int i = 0 , max = ( paths == null ) ? 0 : paths . length ; i < max ; i ++ ) { String documentPath = paths [ i ] ; if ( ! ( Util . isExcluded ( new Path ( documentPath ) , this . inclusionPatterns , this . exclusionPatterns , false ) ) ) manager . remove ( documentPath , this . containerPath ) ; } } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { <START_BUG> JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; <END_BUG> e . printStackTrace ( ) ; } return false ; } finally { monitor . exitRead ( ) ; } return true ; } public String toString ( ) { } }

Fix:
Util . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) , System . err ) ;
Buggy code:
public final class BasicAuthentication { private static final Logger logger = LoggerFactory . getLogger ( BasicAuthentication . class ) ; private BasicAuthentication ( ) { } public static String [ ] parseAuthorization ( final HttpServletRequest request ) { } public static void request ( final HttpServletResponse response , final String realm , final String message ) throws IOException { response . setStatus ( SC_UNAUTHORIZED ) ; <START_BUG> response . setHeader ( "WWW-Authenticate" , String . format ( "Basic<seq2seq4repair_space>realm=\"%s" , realm ) ) ; <END_BUG> response . getWriter ( ) . write ( message ) ; } }

Fix:
response . setHeader ( "WWW-Authenticate" , String . format ( "Basic<seq2seq4repair_space>realm=\"%s\"" , realm ) ) ;
Buggy code:
public class FakeReactorWorld implements IFakeReactorWorld { public static class Factory { private final int xSize ; private final int zSize ; private final int height ; public Factory ( int xSize , int ySize , int height ) { } public FakeReactorWorld create ( String reactorLayout ) { } } private ThreeNestedMap < Integer , Integer , Integer , FakeReactorWorld . Value > worldValues = new ThreeNestedMap < Integer , Integer , Integer , FakeReactorWorld . Value > ( ) ; private final CoordTriplet maxDims ; private final List < TileEntity > parts = Lists . newArrayList ( ) ; private int numRods = 0 ; public FakeReactorWorld ( int x , int y , int z ) { } public static FakeReactorWorld makeReactor ( String reactorLayout , int xSize , int zSize , int height ) { } public void makeControlRod ( int x , int z ) { } public int getNumRods ( ) { } @ Override public String display ( ) { } private void setEntity ( int x , int y , int z , TileEntity part ) { } public void makeCoolantColumn ( int x , int z , String coolant ) { if ( ( x < ( maxDims . x ) ) && ( z < ( maxDims . z ) ) ) { int maxY = maxDims . y ; <START_BUG> for ( int i = 1 ; i < ( maxY - 1 ) ; i ++ ) { <END_BUG> worldValues . put ( x , i , z , new FakeReactorWorld . Value ( coolant ) ) ; } } else { throw new IllegalArgumentException ( ( ( ( ( x + "," ) + z ) + "<seq2seq4repair_space>invalid<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( maxDims ) ) ) ; } } @ Override public TileEntity getTileEntity ( int x , int y , int z ) { } @ Override public boolean isAirBlock ( int x , int y , int z ) { } @ Override public String getBlockName ( int x , int y , int z ) { } @ Override public CoordTriplet getMaxCoord ( ) { } @ Override public CoordTriplet getMinCoord ( ) { } @ Override public List < TileEntity > getParts ( ) { } private static class Value { private TileEntity entity = null ; private String blockOrFluid = "" ; private Value ( TileEntity entity ) { } private Value ( String blockOrFluid ) { } public TileEntity getEntity ( ) { } public String getBlockOrFluid ( ) { } } }

Fix:
for ( int i = 1 ; i < maxY ; i ++ ) {
Buggy code:
public class POP3MailCheckingAction extends AbstractMailCheckingAction { private int accountUid ; public POP3MailCheckingAction ( AccountItem accountItem ) { } public void check ( ) { } public boolean isCheckAll ( ) { POP3Server controller = POP3ServerCollection . getInstance ( ) . uidGet ( accountUid ) ; <START_BUG> return ! ( controller . getAccountItem ( ) . getPopItem ( ) . getBoolean ( "exclude_from_checkall" , false ) ) ; <END_BUG> } }

Fix:
return ! ( controller . getAccountItem ( ) . getPopItem ( ) . getBooleanWithDefault ( "exclude_from_checkall" , false ) ) ;
Buggy code:
public class MatchTest { @ Test public void testConstructor ( ) { } @ Test public void testConstructor2 ( ) { } @ Test public void testEquals1 ( ) { } @ Test public void testEquals2 ( ) { } @ Test public void testEquals4 ( ) { } @ Test public void testEquals5 ( ) { } @ Test public void testEquals6 ( ) { } @ Test public void testEquals7 ( ) { } @ Test public void testEquals8 ( ) { } @ Test public void testEquals9 ( ) { } @ Test public void testEquals10 ( ) { } @ Test public void testEquals11 ( ) { } @ Test public void testEquals12 ( ) { } @ Test public void testgetHomeTeam ( ) { } @ Test public void testgetAwayTeam ( ) { } @ Test public void testgetHometeam ( ) { } @ Test public void testgetAwayteam ( ) { } @ Test public void testgetAwayGoals1 ( ) { } @ Test public void testgetAwayGoals2 ( ) { } @ Test public void testgetHomeGoals1 ( ) { } @ Test public void testgetHomeGoals2 ( ) { } @ Test public void testgetWinner ( ) { } @ Test public void testgetLoser ( ) { } @ Test public void testgetDraw ( ) { } @ Test public void testPlayround ( ) { } @ Test public void testContains ( ) { } @ Test public void testContains2 ( ) { } @ Test public void testContains3 ( ) { } @ Test public void testDetermineGoals1 ( ) { } @ Test public void testDetermineGoals2 ( ) { } @ Test public void testDetermineGoals3 ( ) { } @ Test public void testDetermineGoals4 ( ) { } @ Test public void testDetermineGoals5 ( ) { } @ Test public void testDetermineGoals6 ( ) { } @ Test public void testDetermineGoals7 ( ) { } @ Test public void testDetermineGoals8 ( ) { } @ Test public void testDetermineGoals9 ( ) { } @ Test public void testDetermineGoals10 ( ) { } @ Test public void testDetermineGoals11 ( ) { } @ Test public void testDetermineGoals12 ( ) { Team team1 = new Team ( "ajax" , "ajax" , "Frank<seq2seq4repair_space>de<seq2seq4repair_space>Boer" ) ; Team team2 = new Team ( "ado" , "ado" , "Ronald<seq2seq4repair_space>de<seq2seq4repair_space>Boer" ) ; Match match = new Match ( team1 , team2 ) ; <START_BUG> assertEquals ( match . determinegoals ( 3001 ) , ( - 1 ) ) ; <END_BUG> } @ Test public void testDetermineGoals13 ( ) { } }

Fix:
assertEquals ( match . determinegoals ( 3001 ) , 11 ) ;
Buggy code:
public class WebCrawlerTest { private static final long APP_ID = 282070 ; @ Test public void gettingDLCsListTest ( ) { GameWebCrawler gameWebCrawler = new GameWebCrawler ( ) ; List < String > listOfDLCs = gameWebCrawler . getDLCsFromHtmlString ( WebCrawlerTest . APP_ID ) ; <START_BUG> assertEquals ( 2 , listOfDLCs . size ( ) ) ; <END_BUG> } @ Test public void getAppPriceTest ( ) { } @ Test public void getAppTagsTest ( ) { } @ Test public void getHelpfulUserReviewsTest ( ) { } }

Fix:
assertFalse ( listOfDLCs . isEmpty ( ) ) ;
Buggy code:
public class MainActivity extends ActionBarActivity implements LocationListener { private TextView height ; private TextView heightUnit ; private LocationManager locMan ; private String provider ; private AdView mAdView ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onLocationChanged ( Location location ) { } @ Override public void onStatusChanged ( String provider , int status , Bundle extras ) { } @ Override public void onProviderEnabled ( String provider ) { } @ Override public void onProviderDisabled ( String provider ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override protected void onRestoreInstanceState ( Bundle savedInstanceState ) { super . onRestoreInstanceState ( savedInstanceState ) ; <START_BUG> height . setText ( savedInstanceState . getString ( "STATE_SPEED" ) ) ; <END_BUG> heightUnit . setText ( savedInstanceState . getString ( "STATE_UNIT" ) ) ; } private void startAds ( ) { } private void pauseAds ( ) { } private void setActionBarColor ( ) { } private boolean locationServiceEnabled ( ) { } private void locationServiceDisabledAlert ( ) { } private void setTypeFace ( ) { } private void setUnit ( ) { } private void startLocationUpdates ( ) { } private void stopLocationUpdates ( ) { } private class RetrieveHeight extends AsyncTask < Location , Void , Integer > { @ Override protected Integer doInBackground ( Location ... params ) { } @ Override protected void onPostExecute ( Integer integer ) { } } }

Fix:
height . setText ( savedInstanceState . getString ( "STATE_HEIGHT" ) ) ;