nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ElementNSImpl extends ElementImpl { static final long serialVersionUID = - 9142310625494392642L ; static final String xmlURI = "http:////www.w3.org//XML//1998//namespace" ; protected String namespaceURI ; protected String localName ; transient XSTypeDefinition type ; protected ElementNSImpl ( ) { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName ) throws DOMException { } private void setName ( String namespaceURI , String qname ) { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) throws DOMException { } protected ElementNSImpl ( CoreDocumentImpl ownerDocument , String value ) { } void rename ( String namespaceURI , String qualifiedName ) { } protected void setValues ( CoreDocumentImpl ownerDocument , String namespaceURI , String qualifiedName , String localName ) { } public String getNamespaceURI ( ) { } public String getPrefix ( ) { } public void setPrefix ( String prefix ) throws DOMException { if ( needsSyncData ( ) ) { synchronizeData ( ) ; } if ( ownerDocument ( ) . errorChecking ) { if ( isReadOnly ( ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NO_MODIFICATION_ALLOWED_ERR" , null ) ; throw new DOMException ( DOMException . NO_MODIFICATION_ALLOWED_ERR , msg ) ; } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { <START_BUG> if ( ! ( ownerDocument ( ) . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) { <END_BUG> String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "INVALID_CHARACTER_ERR" , null ) ; throw new DOMException ( DOMException . INVALID_CHARACTER_ERR , msg ) ; } if ( ( ( namespaceURI ) == null ) || ( ( prefix . indexOf ( ':' ) ) >= 0 ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } else if ( prefix . equals ( "xml" ) ) { if ( ! ( namespaceURI . equals ( ElementNSImpl . xmlURI ) ) ) { String msg = DOMMessageFormatter . formatMessage ( DOM_DOMAIN , "NAMESPACE_ERR" , null ) ; throw new DOMException ( DOMException . NAMESPACE_ERR , msg ) ; } } } } if ( ( prefix != null ) && ( ( prefix . length ( ) ) != 0 ) ) { name = ( prefix + ":" ) + ( localName ) ; } else { name = localName ; } } public String getLocalName ( ) { } public String getBaseURI ( ) { } public String getTypeName ( ) { } public String getTypeNamespace ( ) { } public boolean isDerivedFrom ( String typeNamespaceArg , String typeNameArg , int derivationMethod ) { } public void setType ( XSTypeDefinition type ) { } }

Fix:
if ( ! ( CoreDocumentImpl . isXMLName ( prefix , ownerDocument ( ) . isXML11Version ( ) ) ) ) {
Buggy code:
public class Save { public int saveAccount ( DAL . Account account ) { } public int SaveProduct ( DAL . Product product ) { } public int SaveWinkelWagen ( DAL . Account account , DAL . Product product , int totaal ) { try { Find f = new Find ( ) ; <START_BUG> long result = f . findWinkelwagenByAccountId ( account . getId ( ) , product . getId ( ) ) . getId ( ) ; <END_BUG> if ( result == 0 ) { WinkelWagen w = new WinkelWagen ( ) ; EntityManagerFactory emf = Persistence . createEntityManagerFactory ( "EindwerkJavaPU" ) ; EntityManager em = emf . createEntityManager ( ) ; EntityTransaction trans = em . getTransaction ( ) ; w . setAccountId ( account . getId ( ) ) ; w . setProductId ( product . getId ( ) ) ; w . setTotaal ( totaal ) ; trans . begin ( ) ; em . persist ( w ) ; trans . commit ( ) ; em . close ( ) ; emf . close ( ) ; } else return 2 ; return 0 ; } catch ( Exception ex ) { return 1 ; } } }

Fix:
long result = f . findWinkelwagenByMultyId ( account . getId ( ) , product . getId ( ) ) . getId ( ) ;
Buggy code:
public abstract class TridentLivingEntity extends TridentEntity implements LivingEntity { private volatile AiModule ai ; private volatile Path path ; private final AtomicInteger restTicks = new AtomicInteger ( 0 ) ; protected final List < EntityAttribute > attributes = new CopyOnWriteArrayList < > ( ) ; protected final AtomicInteger invincibilityTicks = new AtomicInteger ( 0 ) ; protected final AtomicInteger restTicks = new AtomicInteger ( 0 ) ; protected final AtomicDouble health = new AtomicDouble ( 0.0 ) ; protected volatile boolean dead ; protected volatile boolean canPickup = true ; protected volatile double maxHealth ; public TridentLivingEntity ( UUID id , Position spawnLocation ) { } @ Override protected void encodeMetadata ( ProtocolMetadata protocolMeta ) { } @ Override protected void doTick ( ) { } @ Override public double health ( ) { } @ Override public void setHealth ( double health ) { } @ Override public double maxHealth ( ) { } @ Override public void setMaxHealth ( double maxHealth ) { } @ Override public Position headLocation ( ) { } @ Override public long remainingAir ( ) { } @ Override public void setRemainingAir ( long ticks ) { } @ Override public boolean canCollectItems ( ) { } @ Override public boolean isDead ( ) { } @ Override public void remove ( ) { } @ Override public void setAiModule ( AiModule module ) { } @ Override public AiModule aiModule ( ) { } @ Override public < T extends Projectile > T launchProjectile ( EntityProperties properties ) { } public void performAiUpdate ( ) { } @ Override public Path path ( ) { } public void setPath ( Path path ) { } @ Override public void hide ( Entity entity ) { } @ Override public void show ( Entity entity ) { PacketPlayOutSpawnMob packet = new PacketPlayOutSpawnMob ( ) ; ProtocolMetadata protocolMeta = new ProtocolMetadata ( ) ; ( ( TridentEntity ) ( entity ) ) . encodeMetadata ( protocolMeta ) ; <START_BUG> packet . set ( "entityId" , entity . entityId ( ) ) . set ( "entity" , entity ) . set ( "metadata" , ( ( TridentEntity ) ( entity ) ) . protocolMeta ) ; <END_BUG> if ( ( this ) instanceof Player ) { ( ( net . tridentsdk . server . player . TridentPlayer ) ( this ) ) . connection ( ) . sendPacket ( packet ) ; } } @ Override public void load ( CompoundTag tag ) { } }

Fix:
packet . set ( "entityId" , entity . entityId ( ) ) . set ( "entity" , entity ) . set ( "metadata" , protocolMeta ) ;
Buggy code:
ApplyDomeTask . log . error ( "No<seq2seq4repair_space>data<seq2seq4repair_space>found<seq2seq4repair_space>from<seq2seq4repair_space>input<seq2seq4repair_space>file,<seq2seq4repair_space>no<seq2seq4repair_space>DOME<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>applied<seq2seq4repair_space>for<seq2seq4repair_space>data<seq2seq4repair_space>set<seq2seq4repair_space>{}" , source . toString ( ) ) ; d . put ( "errors" , "Loaded<seq2seq4repair_space>raw<seq2seq4repair_space>data<seq2seq4repair_space>is<seq2seq4repair_space>invalid,<seq2seq4repair_space>please<seq2seq4repair_space>check<seq2seq4repair_space>input<seq2seq4repair_space>files" ) ; return d ; } } if ( mode . equals ( "strategy" ) ) { ApplyDomeTask . log . debug ( "Domes:<seq2seq4repair_space>{}" , stgDomes . toString ( ) ) ; ApplyDomeTask . log . debug ( "Entering<seq2seq4repair_space>Strategy<seq2seq4repair_space>mode!" ) ; if ( ! noExpMode ) { updateWthReferences ( updateExpReferences ( true ) ) ; flattenedData = MapUtil . flatPack ( source ) ; } String stgDomeName = "" ; if ( autoApply ) { for ( String domeName : stgDomes . keySet ( ) ) { stgDomeName = domeName ; } ApplyDomeTask . log . info ( "Auto<seq2seq4repair_space>apply<seq2seq4repair_space>seasonal<seq2seq4repair_space>strategy:<seq2seq4repair_space>{}" , stgDomeName ) ; } Engine generatorEngine ; ArrayList < HashMap < String , Object > > strategyResults = new ArrayList < HashMap < String , Object > > ( ) ; for ( HashMap < String , Object > entry : flattenedData ) { if ( autoApply ) { entry . put ( "seasonal_strategy" , stgDomeName ) ; } String domeName = getLinkIds ( "strategy" , entry ) ; if ( domeName . equals ( "" ) ) { domeName = MapUtil . getValueOr ( entry , "seasonal_strategy" , "" ) ; } else { entry . put ( "seasonal_strategy" , domeName ) ; ApplyDomeTask . log . debug ( "Apply<seq2seq4repair_space>seasonal<seq2seq4repair_space>strategy<seq2seq4repair_space>domes<seq2seq4repair_space>from<seq2seq4repair_space>link<seq2seq4repair_space>csv:<seq2seq4repair_space>{}" , domeName ) ; } entry . remove ( "seasonal_strategy" ) ; reviseDomeIds ( entry , domeName , "strategy" ) ; String [ ] tmp = domeName . split ( "[|]" ) ; String strategyName ; if ( ( tmp . length ) > 1 ) { ApplyDomeTask . log . warn ( "Multiple<seq2seq4repair_space>seasonal<seq2seq4repair_space>strategy<seq2seq4repair_space>dome<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>yet,<seq2seq4repair_space>only<seq2seq4repair_space>the<seq2seq4repair_space>first<seq2seq4repair_space>dome<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>applied" ) ; for ( int i = 1 ; i < ( tmp . length ) ; i ++ ) { setFailedDomeId ( entry , "seasonal_dome_failed" , tmp [ i ] ) ; } } <START_BUG> strategyName = tmp [ 0 ] ; <END_BUG>

Fix:
strategyName = tmp [ 0 ] . toUpperCase ( ) ;
Buggy code:
public class Debug { public static final boolean isDebug = true ; public static void log ( Object tag , String message ) { if ( ! ( Debug . isDebug ) ) return ; <START_BUG> Log . w ( tag . getClass ( ) . getSimpleName ( ) , message ) ; <END_BUG> } public static void log ( String message ) { } public static void toast ( String message , int duration ) { } public static void toast ( String message ) { } private static long start ; public static void stopwatchStart ( ) { } public static double stopwatchEnd ( ) { } public static void toastStopwatch ( String task ) { } No newline ; at end ; of file ; }

Fix:
Log . w ( tag . toString ( ) , message ) ;
Buggy code:
public final class Main { public static String getVersionString ( ) { } public static void usage ( ) { <START_BUG> CommandLineArgument . printUsage ( System . out ) ; <END_BUG> } private Main ( ) { } public static final String HOST_CONTROLLER_PROCESS_NAME = "Host<seq2seq4repair_space>Controller" ; public static final String HOST_CONTROLLER_MODULE = "org.jboss.as.host-controller" ; public static void main ( String [ ] args ) throws IOException { } public static ProcessController start ( String [ ] args ) throws IOException { } private static String parseValue ( final String arg , final String key ) { } private static void addJavaOption ( String option , List < String > javaOptions ) { } private static class PCSocketConfig { private String bindAddress ; private int bindPort = 0 ; private int argIncrement = 0 ; private boolean parseFailed ; private PCSocketConfig ( ) { } private String getBindAddress ( ) { } private int getBindPort ( ) { } private int getArgIncrement ( ) { } private boolean isParseFailed ( ) { } private boolean processPCSocketConfigArgument ( final String arg , final String [ ] args , final int index ) { } } }

Fix:
CommandLineArgumentUsageImpl . printUsage ( System . out ) ;
Buggy code:
public class RequestWrapperAttributeInitializer extends AnnotationAttributeInitializer { @ Override public List < MemberValuePair > getMemberValuePairs ( IJavaElement javaElement , AST ast , Class < ? extends Annotation > annotationClass ) { } public List < ICompletionProposal > getCompletionProposalsForMemberValuePair ( IJavaElement javaElement , MemberValuePair memberValuePair ) { } protected String getPackageName ( IType type ) { } protected String getClassName ( IType type , IMethod method ) { try { String methodName = method . getElementName ( ) ; <START_BUG> return ( ( ( getPackageName ( type ) ) + ( methodName . substring ( 0 , 1 ) . toUpperCase ( Locale . getDefault ( ) ) ) ) + ( methodName . substring ( 1 ) ) ) + ( AnnotationUtils . accountForOverloadedMethods ( type , method ) ) ; <END_BUG> } catch ( JavaModelException jme ) { JAXWSCorePlugin . log ( jme . getStatus ( ) ) ; } return "" ; } protected String getLocalName ( IType type , IMethod method ) { } protected String getTargetNamespace ( IType type ) { } }

Fix:
return ( ( ( getPackageName ( type ) ) + ( methodName . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( methodName . substring ( 1 ) ) ) + ( AnnotationUtils . accountForOverloadedMethods ( type , method ) ) ;
Buggy code:
public final class BooleanConverter extends AbstractConverter { public BooleanConverter ( ) { } public Object convert ( Object value , Class c ) { if ( value == null ) { return null ; } <START_BUG> if ( Boolean . class . isAssignableFrom ( c ) ) { <END_BUG> if ( value instanceof Boolean ) { return value ; } try { String stringValue = value . toString ( ) ; if ( ( ( ( ( stringValue . equalsIgnoreCase ( "yes" ) ) || ( stringValue . equalsIgnoreCase ( "y" ) ) ) || ( stringValue . equalsIgnoreCase ( "true" ) ) ) || ( stringValue . equalsIgnoreCase ( "on" ) ) ) || ( stringValue . equalsIgnoreCase ( "1" ) ) ) { return Boolean . TRUE ; } else if ( ( ( ( ( stringValue . equalsIgnoreCase ( "no" ) ) || ( stringValue . equalsIgnoreCase ( "n" ) ) ) || ( stringValue . equalsIgnoreCase ( "false" ) ) ) || ( stringValue . equalsIgnoreCase ( "off" ) ) ) || ( stringValue . equalsIgnoreCase ( "0" ) ) ) { return Boolean . FALSE ; } else { throw new ConversionException ( stringValue ) ; } } catch ( ClassCastException e ) { throw new ConversionException ( e ) ; } } else if ( String . class . isAssignableFrom ( c ) ) { return toString ( value ) ; } throw new ConversionException ( ( ( ( this ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>handle<seq2seq4repair_space>conversions<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>" ) + c ) ) ; } }

Fix:
if ( ( c == ( CONVERT_TO_DEFAULT_TYPE ) ) || ( Boolean . class . isAssignableFrom ( c ) ) ) {
Buggy code:
public class CreateCompilationUnitOperation extends JavaModelOperation { protected String fName ; protected String fSource = null ; public CreateCompilationUnitOperation ( IPackageFragment parentElement , String name , String source , boolean force ) { } protected void executeOperation ( ) throws JavaModelException { try { beginTask ( Util . bind ( "operation.createUnitProgress" ) , 2 ) ; JavaElementDelta delta = newJavaElementDelta ( ) ; ICompilationUnit unit = getCompilationUnit ( ) ; IPackageFragment pkg = ( ( IPackageFragment ) ( getParentElement ( ) ) ) ; IContainer folder = ( ( IContainer ) ( pkg . getUnderlyingResource ( ) ) ) ; worked ( 1 ) ; IFile compilationUnitFile = folder . getFile ( new Path ( fName ) ) ; if ( compilationUnitFile . exists ( ) ) { if ( fForce ) { IBuffer buffer = unit . getBuffer ( ) ; if ( buffer == null ) return ; buffer . setContents ( fSource ) ; unit . save ( new NullProgressMonitor ( ) , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . changed ( fResultElements [ i ] , IJavaElementDelta . F_CONTENT ) ; } addDelta ( delta ) ; } } else { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION ) ) ; } } else { try { <START_BUG> String encoding = JavaCore . getOption ( JavaCore . CORE_ENCODING ) ; <END_BUG> InputStream stream = new ByteArrayInputStream ( ( encoding == null ? fSource . getBytes ( ) : fSource . getBytes ( encoding ) ) ) ; createFile ( folder , unit . getElementName ( ) , stream , false ) ; fResultElements = new IJavaElement [ ] { unit } ; if ( unit . getParent ( ) . exists ( ) ) { for ( int i = 0 ; i < ( fResultElements . length ) ; i ++ ) { delta . added ( fResultElements [ i ] ) ; } addDelta ( delta ) ; } } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } } worked ( 1 ) ; } finally { done ( ) ; } } protected ICompilationUnit getCompilationUnit ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
String encoding = unit . getJavaProject ( ) . getOption ( JavaCore . CORE_ENCODING , true ) ;
Buggy code:
public class DeadlineTaskList { private final int TASKLIST_SIZE = 1000 ; private ArrayList < DeadlineTask > taskArray = new ArrayList < DeadlineTask > ( TASKLIST_SIZE ) ; private enum SORT_TYPE { NAME , DEADLINE , WORKLOAD , ID ; } private int numOfDisplayItems = 5 ; private ObservableList < DeadlineTask > observableDeadline = FXCollections . observableArrayList ( ) ; public DeadlineTaskList ( ) { } public DeadlineTask get ( int index ) { } public void add ( DeadlineTask task ) { } public void delete ( int index ) { <START_BUG> taskArray . remove ( index ) ; <END_BUG> } public void delete ( String name ) { } public int size ( ) { } public boolean isEmpty ( ) { } public DeadlineTaskList . SORT_TYPE getSortType ( String keyword ) { } public void sortBy ( DeadlineTaskList . SORT_TYPE type ) { } public ObservableList < DeadlineTask > getObservable ( ) { } private Comparator < DeadlineTask > taskNameComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskDeadlineComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskWorkloadComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; private Comparator < DeadlineTask > taskIdComparator = new Comparator < DeadlineTask > ( ) { public int compare ( DeadlineTask t1 , DeadlineTask t2 ) { } } ; }

Fix:
taskArray . remove ( ( index - 1 ) ) ;
Buggy code:
public class BoundsMenuListener implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { if ( e . getActionCommand ( ) . equals ( "Set<seq2seq4repair_space>Bounds" ) ) { Component frame = null ; String bounds = ( ( String ) ( JOptionPane . showInputDialog ( frame , "Specify<seq2seq4repair_space>Bounds<seq2seq4repair_space>Seperated<seq2seq4repair_space>By<seq2seq4repair_space>Spaces:" , "Set<seq2seq4repair_space>Bounds" , JOptionPane . PLAIN_MESSAGE , null , null , "" ) ) ) ; <START_BUG> if ( ( ( ( bounds != null ) && ( ( bounds . length ( ) ) == 7 ) ) || ( ( bounds . length ( ) ) == 9 ) ) || ( ( bounds . length ( ) ) == 11 ) ) { <END_BUG> int [ ] selectBounds = new int [ ] { 0 , 0 , 0 , 0 } ; int j = 0 ; String [ ] userBounds = bounds . split ( "<seq2seq4repair_space>" ) ; for ( int i = 0 ; i < ( userBounds . length ) ; i ++ ) { selectBounds [ i ] = Integer . parseInt ( String . valueOf ( userBounds [ i ] ) ) ; } BoardJPanel . setBounds ( selectBounds ) ; feedback . setText ( "Bounds<seq2seq4repair_space>updated" ) ; } else { feedback . setText ( "Invalid<seq2seq4repair_space>bounds<seq2seq4repair_space>supplied" ) ; } } else { int lines = BoardJPanel . getLines ( ) ; int [ ] noBounds = new int [ ] { 0 , 0 , lines , lines } ; BoardJPanel . setBounds ( noBounds ) ; feedback . setText ( "Bounds<seq2seq4repair_space>removed" ) ; } } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( ( bounds != null ) && ( ( bounds . length ( ) ) == 7 ) ) || ( ( bounds . length ( ) ) == 8 ) ) || ( ( bounds . length ( ) ) == 9 ) ) || ( ( bounds . length ( ) ) == 11 ) ) {
Buggy code:
public class StringResourceModelTest extends TestCase { private MockWebApplication application ; private WebPage page ; private StringResourceModelTest . WeatherStation ws ; private Model wsModel ; public StringResourceModelTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; application . getResourceSettings ( ) . addStringResourceLoader ( new BundleStringResourceLoader ( "wicket.model.StringResourceModelTest" ) ) ; <START_BUG> page = new MockPage ( null ) ; <END_BUG> ws = new StringResourceModelTest . WeatherStation ( ) ; wsModel = new Model ( ws ) ; } public void testGetSimpleResource ( ) { } public void testNullResourceKey ( ) { } public void testGetSimpleResourceWithKeySubstitution ( ) { } public void testGetPropertySubstitutedResource ( ) { } public void testSubstitutionParametersResource ( ) { } public void testUninitialisedLocalizer ( ) { } public void testSetObject ( ) { } public void testDetachAttachNormalModel ( ) throws Exception { } public void testDetachAttachDetachableModel ( ) throws Exception { } public class WeatherStation implements Serializable { private static final long serialVersionUID = 1L ; private String currentStatus = "sunny" ; private double currentTemperature = 25.7 ; public String getCurrentStatus ( ) { } public void setCurrentStatus ( String currentStatus ) { } public double getCurrentTemperature ( ) { } public void setCurrentTemperature ( double currentTemperature ) { } public String getUnits ( ) { } } }

Fix:
page = new MockPage ( ) ;
Buggy code:
public class ThreeEighthesIntegratorTest extends TestCase { public ThreeEighthesIntegratorTest ( String name ) { } public void testDimensionCheck ( ) { } public void testDecreasingSteps ( ) throws DerivativeException , IntegratorException { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousError = Double . NaN ; for ( int i = 4 ; i < 10 ; ++ i ) { <START_BUG> TestProblemAbstract pb = ( ( TestProblemAbstract ) ( problems [ k ] . clone ( ) ) ) ; <END_BUG> double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( Math . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new ThreeEighthesIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . addStepHandler ( handler ) ; EventHandler [ ] functions = pb . getEventsHandlers ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { integ . addEventHandler ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ; } double stopTime = integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; if ( ( functions . length ) == 0 ) { assertEquals ( pb . getFinalTime ( ) , stopTime , 1.0E-10 ) ; } double error = handler . getMaximalValueError ( ) ; if ( i > 4 ) { assertTrue ( ( error < ( Math . abs ( previousError ) ) ) ) ; } previousError = error ; assertEquals ( 0 , handler . getMaximalTimeError ( ) , 1.0E-12 ) ; } } } public void testSmallStep ( ) throws DerivativeException , IntegratorException { } public void testBigStep ( ) throws DerivativeException , IntegratorException { } public void testBackward ( ) throws DerivativeException , IntegratorException { } public void testKepler ( ) throws DerivativeException , IntegratorException { } private static class KeplerHandler implements StepHandler { public KeplerHandler ( TestProblem3 pb ) { } public boolean requiresDenseOutput ( ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) throws DerivativeException { } private TestProblem3 pb ; private double maxError = 0 ; } public void testStepSize ( ) throws DerivativeException , IntegratorException { } public static Test suite ( ) { } }

Fix:
TestProblemAbstract pb = problems [ k ] . copy ( ) ;
Buggy code:
@ Path ( "positions" ) @ Produces ( MediaType . APPLICATION_JSON ) public class PositionResource { @ javax . ws . rs . core . Context HttpServletRequest req ; private static double x = 174.7281713 ; @ Path ( "ws" ) @ GET public Response wsTest ( @ QueryParam ( "deviceId" ) long deviceId , @ DefaultValue ( "false" ) @ QueryParam ( "insert" ) boolean insert ) throws Exception { Position position = new Position ( ) ; position . setDeviceId ( deviceId ) ; position . setTime ( new Date ( ) ) ; position . setServerTime ( JsonConverter . parseDate ( "2015-05-22T12:00:01.000Z" ) ) ; position . setLatitude ( ( - 36.8785803 ) ) ; PositionResource . x = ( PositionResource . x ) - 1.1 ; position . setLongitude ( PositionResource . x ) ; <START_BUG> position . setSpeed ( 1311.234123 ) ; <END_BUG> Context . getConnectionManager ( ) . updatePosition ( position ) ; if ( insert ) { new PositionRepository ( ) . addPosition ( position ) ; } return Response . ok ( ) . build ( ) ; } @ GET public Response get ( @ QueryParam ( "deviceId" ) long deviceId , @ QueryParam ( "from" ) String from , @ QueryParam ( "to" ) String to , @ QueryParam ( "stopTime" ) Integer stopTime ) throws Exception { } @ Path ( "devices" ) @ GET public Response devices ( ) throws Exception { } }

Fix:
position . setSpeed ( 0 ) ;
Buggy code:
public class ExceptionErrorPage extends WebPage { private static final long serialVersionUID = 1L ; private transient Throwable throwable ; public ExceptionErrorPage ( final Throwable throwable , final Page page ) { } @ Override protected void configureResponse ( ) { super . configureResponse ( ) ; <START_BUG> getWebRequestCycle ( ) . getWebResponse ( ) . getHttpServletResponse ( ) . setStatus ( SC_INTERNAL_SERVER_ERROR ) ; <END_BUG> } public Throwable getThrowable ( ) { } @ Override public boolean isErrorPage ( ) { } @ Override public boolean isVersioned ( ) { } }

Fix:
getRequestCycle ( ) . getWebResponse ( ) . getHttpServletResponse ( ) . setStatus ( SC_INTERNAL_SERVER_ERROR ) ;
Buggy code:
public class CharSetUtil { private static Log log = LogFactory . getLog ( CharSetUtil . class ) ; private static CharSetMap charSetMap ; public CharSetUtil ( ) { } private static final synchronized void initialize ( final WebApplication application ) { if ( ( CharSetUtil . charSetMap ) == null ) { <START_BUG> final ServletContext context = application . getWicketServlet ( ) . getServletContext ( ) ; <END_BUG> final InputStream inputStream = context . getResourceAsStream ( ( "//WEB-INF//" + ( CharSetMap . CHARSET_RESOURCE ) ) ) ; if ( inputStream == null ) { CharSetUtil . charSetMap = new CharSetMap ( ) ; if ( CharSetUtil . log . isDebugEnabled ( ) ) { CharSetUtil . log . debug ( ( ( "File<seq2seq4repair_space>'" + ( CharSetMap . CHARSET_RESOURCE ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } } else { try { CharSetUtil . charSetMap = new CharSetMap ( inputStream ) ; } catch ( IOException ex ) { throw new WicketRuntimeException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>reading<seq2seq4repair_space>CharSetMap" , ex ) ; } } } } public static final String getEncoding ( final RequestCycle cycle ) { } }

Fix:
final ServletContext context = application . getServletContext ( ) ;
Buggy code:
public class FeatureMapTest extends AbstractTestCase { private ExpressionFacade ec ; private Object def ( String varname , String exp ) { } @ Override protected void setUp ( ) throws Exception { super . setUp ( ) ; String xsd = ( getSrcDir ( ) ) + "//FeatureMap.xsd" ; String xml = ( getSrcDir ( ) ) + "//FeatureMap.xml" ; XSDMetaModel mm = new XSDMetaModel ( ) ; mm . setId ( "mm" ) ; mm . addSchemaFile ( xsd ) ; ExecutionContextImpl ctx = new ExecutionContextImpl ( ) ; ctx . registerMetaModel ( mm ) ; ec = new ExpressionFacade ( ctx ) ; <START_BUG> EObject oxml = XMLReaderImpl . read ( xml , "mm" , false ) ; <END_BUG> ec = ec . cloneWithVariable ( new org . eclipse . xtend . expression . Variable ( "xml" , oxml ) ) ; } public void testAdd1 ( ) { } public void testAdd2 ( ) { } public void testAddAllAndList ( ) { } public void testAddAllToMixed ( ) { } public void testAddAttributeToAnyAttribute ( ) { } public void testAddElementToAny ( ) { } public void testClassFeature ( ) { } public void testClassType ( ) { } @ SuppressWarnings ( "unchecked" ) public void testElementFeature ( ) { } @ SuppressWarnings ( "unchecked" ) public void testElementType ( ) { } public void testMapEntryName ( ) { } public void testMapName ( ) { } public void testMapType ( ) { } public void testSet ( ) { } }

Fix:
EObject oxml = XMLReaderImpl . read ( xml , mm , false ) ;
Buggy code:
public class PropertyOrFieldReference extends SpelNodeImpl { private final String name ; private volatile PropertyAccessor cachedReadAccessor ; private volatile PropertyAccessor cachedWriteAccessor ; private final boolean nullSafe ; public PropertyOrFieldReference ( boolean nullSafe , String propertyOrFieldName , int pos ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } @ Override public void setValue ( ExpressionState state , Object newValue ) throws SpelEvaluationException { } @ Override public boolean isWritable ( ExpressionState state ) throws SpelEvaluationException { } @ Override public String toStringAST ( ) { } private TypedValue readProperty ( ExpressionState state , String name ) throws EvaluationException { TypedValue contextObject = state . getActiveContextObject ( ) ; Object targetObject = contextObject . getValue ( ) ; if ( ( targetObject == null ) && ( nullSafe ) ) { <START_BUG> return TypedValue . NULL_TYPED_VALUE ; <END_BUG> } PropertyAccessor accessorToUse = this . cachedReadAccessor ; if ( accessorToUse != null ) { try { return accessorToUse . read ( state . getEvaluationContext ( ) , contextObject . getValue ( ) , name ) ; } catch ( AccessException ae ) { this . cachedReadAccessor = null ; } } Class < ? > contextObjectClass = getObjectClass ( contextObject . getValue ( ) ) ; List < PropertyAccessor > accessorsToTry = getPropertyAccessorsToTry ( contextObjectClass , state ) ; EvaluationContext eContext = state . getEvaluationContext ( ) ; if ( accessorsToTry != null ) { try { for ( PropertyAccessor accessor : accessorsToTry ) { if ( accessor . canRead ( eContext , contextObject . getValue ( ) , name ) ) { if ( accessor instanceof ReflectivePropertyAccessor ) { accessor = ( ( ReflectivePropertyAccessor ) ( accessor ) ) . createOptimalAccessor ( eContext , contextObject . getValue ( ) , name ) ; } this . cachedReadAccessor = accessor ; return accessor . read ( eContext , contextObject . getValue ( ) , name ) ; } } } catch ( AccessException ae ) { throw new SpelEvaluationException ( ae , SpelMessage . EXCEPTION_DURING_PROPERTY_READ , name , ae . getMessage ( ) ) ; } } if ( ( contextObject . getValue ( ) ) == null ) { throw new SpelEvaluationException ( SpelMessage . PROPERTY_OR_FIELD_NOT_READABLE_ON_NULL , name ) ; } else { throw new SpelEvaluationException ( getStartPosition ( ) , SpelMessage . PROPERTY_OR_FIELD_NOT_READABLE , name , FormatHelper . formatClassNameForMessage ( contextObjectClass ) ) ; } } private void writeProperty ( ExpressionState state , String name , Object newValue ) throws SpelEvaluationException { } public boolean isWritableProperty ( String name , ExpressionState state ) throws SpelEvaluationException { } private List < PropertyAccessor > getPropertyAccessorsToTry ( Class < ? > targetType , ExpressionState state ) { } String getName ( ) { } }

Fix:
return TypedValue . NULL ;
Buggy code:
public interface TaskDetailsService { void addTasks ( TaskDetailsView taskDetails ) { } void checkTasks ( TaskDetailsView taskDetails ) { } boolean renderScreen ( ) { } <START_BUG> String logout ( ) ; <END_BUG> public String showResult ( TaskDetailsView taskDetailsView ) { } String addRisks ( TaskDetailsView taskDetailsView , RiskDetailsView riskDetailsView ) { } String deleteRisks ( TaskDetailsView taskDetailsView , RiskDetailsView riskDetailsView ) { } }

Fix:
Boolean logout ( ) ;
Buggy code:
public interface ItemRegistry extends Registry < Item , String > { public Item getItem ( String name ) throws ItemNotFoundException { } public Item getItemByPattern ( String name ) throws ItemNotFoundException , ItemNotUniqueException { } public Collection < Item > getItems ( ) { } public Collection < Item > getItemsOfType ( String type ) { } public Collection < Item > getItems ( String pattern ) { } public boolean isValidItemName ( String itemName ) { } public Collection < Item > getItemsByTag ( String ... tags ) { } public Collection < Item > getItemsByTagAndType ( String type , String ... tags ) { } public < T extends GenericItem > Collection < T > getItemsByTag ( Class < T > typeFilter , String ... tags ) { } <START_BUG> public void remove ( String itemName , boolean recursive ) ; <END_BUG> }

Fix:
public Item remove ( String itemName , boolean recursive ) ;
Buggy code:
public class MimeTreeRenderer { private static final String rendererPath = "org.columba.mail.composer.mimepartrenderers." ; private static final String [ ] renderers = new String [ ] { "MultipartRenderer" , "MultipartSignedRenderer" } ; private static MimeTreeRenderer myInstance ; private Hashtable rendererTable ; private MimePartRenderer defaultRenderer ; protected MimeTreeRenderer ( ) { } public static MimeTreeRenderer getInstance ( ) { } public String render ( MimePartTree tree ) { } public String renderMimePart ( MimePart part ) { } private MimePartRenderer getRenderer ( MimeHeader input ) { } private void loadAllRenderer ( ) { ClassLoader loader = ClassLoader . getSystemClassLoader ( ) ; Class actClass = null ; try { for ( int i = 0 ; i < ( Array . getLength ( MimeTreeRenderer . renderers ) ) ; i ++ ) { actClass = loader . loadClass ( ( ( MimeTreeRenderer . rendererPath ) + ( MimeTreeRenderer . renderers [ i ] ) ) ) ; <START_BUG> if ( actClass . getSuperclass ( ) . getName ( ) . equals ( "org.columba.modules.mail.composer.MimePartRenderer" ) ) { <END_BUG> MimePartRenderer renderer = ( ( MimePartRenderer ) ( actClass . newInstance ( ) ) ) ; rendererTable . put ( renderer . getRegisterString ( ) , renderer ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } } }

Fix:
if ( actClass . getSuperclass ( ) . getName ( ) . equals ( "org.columba.mail.composer.MimePartRenderer" ) ) {
Buggy code:
public class SimpleName extends Name { private static final String MISSING_IDENTIFIER = "MISSING" ; private String identifier = SimpleName . MISSING_IDENTIFIER ; SimpleName ( AST ast ) { } ASTNode clone ( AST target ) { } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getIdentifier ( ) { } public void setIdentifier ( String identifier ) { if ( identifier == null ) { throw new IllegalArgumentException ( ) ; } Scanner scanner = getAST ( ) . scanner ; char [ ] source = identifier . toCharArray ( ) ; <START_BUG> scanner . setSourceBuffer ( source ) ; <END_BUG> scanner . resetTo ( 0 , source . length ) ; try { int tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case Scanner . TokenNameIdentifier : break ; default : throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } modifying ( ) ; this . identifier = identifier ; } int memSize ( ) { } int treeSize ( ) { } }

Fix:
scanner . setSource ( source ) ;
Buggy code:
public class NewCall implements Call { @ Override public void invoke ( Stack stack ) { try { StackEffect stackEffect = ( ( StackEffect ) ( stack . pop ( ) . object ) ) ; Constructor constructor = getConstructorFromStackEffect ( stackEffect ) ; Class [ ] parameterTypes = constructor . getParameterTypes ( ) ; Object [ ] args = new Object [ parameterTypes . length ] ; for ( int i = ( parameterTypes . length ) - 1 ; i >= 0 ; i -- ) { <START_BUG> args [ i ] = stack . pop ( ) ; <END_BUG> } Object instance = constructor . newInstance ( args ) ; stack . push ( new JavaType ( instance . getClass ( ) ) , instance ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>construct<seq2seq4repair_space>and<seq2seq4repair_space>instance." , e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>construct<seq2seq4repair_space>and<seq2seq4repair_space>instance." , e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>construct<seq2seq4repair_space>and<seq2seq4repair_space>instance." , e ) ; } } private Constructor getConstructorFromStackEffect ( StackEffect stackEffect ) { } @ Override public StackEffect getStackEffect ( TypeStack typeStack ) { } }

Fix:
args [ i ] = stack . pop ( ) . object ;
Buggy code:
public class LocationFilter { public static final String URL_BASE_MAP_GPS_ST_INTERSECTS = "https:////www.googleapis.com//fusiontables//v1//query?sql=SELECT%20business_id,name%20FROM%201WtuOzZqOYiiMQ24qapSyzz3AHaYl6hfoh3J7oLKn%20WHERE%20ST_INTERSECTS(Location,CIRCLE(LATLNG(" ; public static final String MAP_GPS_KEY = "&key=AIzaSyCGl5NEl5viaCeaUR5lIK2hgJCYDaXtbo4" ; public static void main ( String [ ] args ) { } public static ArrayList < Business > obtenerSitiosCercanos ( double latitud , double longitud , int radioM ) { try { ArrayList < Business > id_collection = new ArrayList < Business > ( ) ; String url = ( ( ( ( ( ( ( LocationFilter . URL_BASE_MAP_GPS_ST_INTERSECTS ) + latitud ) + "," ) + longitud ) + ")," ) + radioM ) + "))" ) + ( LocationFilter . MAP_GPS_KEY ) ; JSONObject json = LocationFilter . receiveJSON ( url ) ; String rta = null ; Business agregar ; JSONArray ids = json . getJSONArray ( "rows" ) ; for ( int i = 0 ; i < ( ids . length ( ) ) ; i ++ ) { JSONArray rtaArray = ids . getJSONArray ( i ) ; rta = rtaArray . getString ( 0 ) ; rta = rta . replace ( "[" , "" ) ; rta = rta . replace ( "]" , "" ) ; rta = rta . replace ( "\"" , "" ) ; agregar = new Business ( ) ; agregar . setBusiness_id ( rta ) ; agregar . setName ( rtaArray . getString ( 1 ) ) ; id_collection . add ( agregar ) ; } return id_collection ; } catch ( JSONException e ) { System . out . println ( ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>JSON<seq2seq4repair_space>response<seq2seq4repair_space>" + ( e . getClass ( ) ) ) + ( e . getMessage ( ) ) ) ) ; e . printStackTrace ( ) ; <START_BUG> return null ; <END_BUG> } } public static JSONObject receiveJSON ( String url ) { } }

Fix:
return new ArrayList < Business > ( ) ;
Buggy code:
public class WebBindAndValidateLifecycle { private final WebBinder binder ; private final AlertContext alertContext ; private WebBindAndValidateLifecycle . ValidationDecider validationDecider = WebBindAndValidateLifecycle . ValidationDecider . ALWAYS_VALIDATE ; private Validator validator ; public WebBindAndValidateLifecycle ( Object model , AlertContext alertContext ) { } public void setFormatterRegistry ( FormatterRegistry registry ) { } public void execute ( Map < String , ? extends Object > userMap ) { } interface ValidationDecider { boolean shouldValidateAfter ( BindingResults results ) { } static final WebBindAndValidateLifecycle . ValidationDecider ALWAYS_VALIDATE = new WebBindAndValidateLifecycle . ValidationDecider ( ) { public boolean shouldValidateAfter ( BindingResults results ) { } } ; } private void configure ( WebBinder binder , Object model ) { Model m = AnnotationUtils . findAnnotation ( model . getClass ( ) , Model . class ) ; if ( m != null ) { if ( StringUtils . hasText ( m . value ( ) ) ) { } binder . setStrict ( m . strictBinding ( ) ) ; } if ( binder . isStrict ( ) ) { BeanInfo beanInfo ; try { beanInfo = Introspector . getBeanInfo ( model . getClass ( ) ) ; } catch ( IntrospectionException e ) { throw new IllegalStateException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>introspect<seq2seq4repair_space>model<seq2seq4repair_space>" + model ) , e ) ; } for ( PropertyDescriptor prop : beanInfo . getPropertyDescriptors ( ) ) { Method getter = prop . getReadMethod ( ) ; Bound b = AnnotationUtils . getAnnotation ( getter , Bound . class ) ; if ( b != null ) { <START_BUG> binder . add ( new BindingConfiguration ( prop . getName ( ) , null ) ) ; <END_BUG> } } } } }

Fix:
binder . configureBinding ( new BindingConfiguration ( prop . getName ( ) , null ) ) ;
Buggy code:
final class FileRegistry extends AbstractMutableRegistry { private static final String TAG_ROOT = Persistence . PACKAGE_FULL ; private File file ; FileRegistry ( File file ) { } public void load ( ) throws IOException { Reader reader = new BufferedReader ( new FileReader ( file ) ) ; try { IMemento memento = XMLMemento . createReadRoot ( reader ) ; activeKeyConfigurations = Collections . unmodifiableList ( Persistence . readActiveKeyConfigurations ( memento , TAG_ACTIVE_KEY_CONFIGURATION , null ) ) ; categories = Collections . unmodifiableList ( Persistence . readCategories ( memento , TAG_CATEGORY , null ) ) ; commands = Collections . unmodifiableList ( Persistence . readCommands ( memento , TAG_COMMAND , null ) ) ; contextBindings = Collections . unmodifiableList ( Persistence . readContextBindings ( memento , TAG_CONTEXT_BINDING , null ) ) ; imageBindings = Collections . unmodifiableList ( Persistence . readImageBindings ( memento , TAG_IMAGE_BINDING , null ) ) ; <START_BUG> keyBindings = Collections . unmodifiableList ( Persistence . readKeyBindings ( memento , TAG_KEY_BINDING , null ) ) ; <END_BUG> keyConfigurations = Collections . unmodifiableList ( Persistence . readKeyConfigurations ( memento , TAG_KEY_CONFIGURATION , null ) ) ; } catch ( WorkbenchException eWorkbench ) { throw new IOException ( ) ; } finally { reader . close ( ) ; } } public void save ( ) throws IOException { } }

Fix:
keyBindings = Collections . unmodifiableList ( Persistence . readKeyBindings ( memento , TAG_KEY_BINDING , null , 1 ) ) ;
Buggy code:
public abstract class Query implements Cloneable { private float boost = 1.0F ; public void setBoost ( float b ) { } public float getBoost ( ) { } public abstract String toString ( String field ) { } @ Override public String toString ( ) { } public Weight createWeight ( IndexSearcher searcher ) throws IOException { <START_BUG> throw new UnsupportedOperationException ( ) ; <END_BUG> } public Query rewrite ( IndexReader reader ) throws IOException { } public void extractTerms ( Set < Term > terms ) { } @ Override public Object clone ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
throw new UnsupportedOperationException ( ( ( "Query<seq2seq4repair_space>" + ( this ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>implement<seq2seq4repair_space>createWeight" ) ) ;
Buggy code:
@ ExportedBean @ SuppressWarnings ( { "PMD.ExcessiveClassLength" } ) public class FindBugsAudit implements ModelObject , Serializable { private AbstractBuild < ? , ? > build ; private final AbstractProject < ? , ? > project ; private boolean auditFingerprintsLoaded = false ; private Collection < AuditFingerprint > auditWarnings ; private int previousNumberOfUnconfirmedWarnings = 0 ; private int previousNumberOfConfirmedWarnings = 0 ; private int newNumberOfUnconfirmedWarnings = 0 ; private int newNumberOfConfirmedWarnings = 0 ; private int fixedNumberOfUnconfirmedWarnings = 0 ; private int fixedNumberOfConfirmedWarnings = 0 ; public FindBugsAudit ( AbstractBuild < ? , ? > build ) { } public void loadClassData ( ) { } private void copyCurrentBuildResultAnnotations ( ) { } public FindBugsAudit getReferenceAudit ( ) { } public BuildResult getCurrentBuildResult ( ) { } @ Override public String getDisplayName ( ) { } public AbstractBuild < ? , ? > getBuild ( ) { } @ Exported public int getBuildNumber ( ) { } public int getPreviousBuildNumber ( ) { } public int getLastSuccessfulBuildNumber ( ) { } public boolean isLatestSuccessfulBuild ( ) { <START_BUG> return ( getBuildNumber ( ) ) == ( getLastSuccessfulBuildNumber ( ) ) ; <END_BUG> } @ JavaScriptMethod public void boundSystemLogger ( String message ) { } @ JavaScriptMethod public void boundUpdateWarnings ( String message ) { } private void serialiseAuditFingerprints ( ) { } private boolean loadAuditFingerprints ( ) { } private void calculateWarningNumbers ( ) { } private XmlFile getSerializationAuditFile ( ) { } private XStream getXStream ( ) { } protected void configure ( final XStream xstream ) { } protected String getSerializationFileName ( ) { } public List < AuditFingerprint > getAllWarnings ( ) { } public List < AuditFingerprint > getUnconfirmedWarnings ( ) { } public List < AuditFingerprint > getConfirmedWarnings ( ) { } public List < AuditFingerprint > getTrackedWarnings ( ) { } public List < AuditFingerprint > getFalsePositiveWarnings ( ) { } public int getPreviousNumberOfUnconfirmedWarnings ( ) { } public String getPreviousUnconfirmedTooltip ( ) { } public int getPreviousNumberOfConfirmedWarnings ( ) { } public String getPreviousConfirmedTooltip ( ) { } public int getNewNumberOfUnconfirmedWarnings ( ) { } public String getNewUnconfirmedTooltip ( ) { } public int getNewNumberOfConfirmedWarnings ( ) { } public String getNewConfirmedTooltip ( ) { } public int getFixedNumberOfUnconfirmedWarnings ( ) { } public String getFixedUnconfirmedTooltip ( ) { } public int getFixedNumberOfConfirmedWarnings ( ) { } public String getFixedConfirmedTooltip ( ) { } public String getUpdateSelectionButtonTooltip ( ) { } }

Fix:
return ( this . build . number ) == ( this . build . getProject ( ) . getLastSuccessfulBuild ( ) . number ) ;
Buggy code:
public abstract class Pack extends AbstractTask { private File m_src ; private File m_zipFile ; public void setSrc ( final File src ) { } public void setZipfile ( final File zipFile ) { } public void execute ( ) throws TaskException { validate ( ) ; final String message = "Building:<seq2seq4repair_space>" + ( m_zipFile . getAbsolutePath ( ) ) ; <START_BUG> getContext ( ) . info ( message ) ; <END_BUG> pack ( ) ; } private void pack ( ) throws TaskException { } protected abstract OutputStream getPackingStream ( OutputStream output ) throws IOException , TaskException { } protected final void copy ( final File file , final OutputStream output ) throws IOException { } private void validate ( ) throws TaskException { } protected final File getSrc ( ) { } protected final File getZipFile ( ) { } }

Fix:
getContext ( ) . verbose ( message ) ;
Buggy code:
public class PerfJ { public static final String PERFJ_SYSTEM_PROPERTIES_FILE = "info-minzhou-perfj.properties" ; public static final String KEY_PERFJ_LIB_PATH = "info.minzhou.perfj.lib.path" ; public static final String KEY_PERFJ_LIB_NAME = "info.minzhou.perfj.lib.name" ; public static final String KEY_PERFJ_TEMPDIR = "info.minzhou.perfj.tempdir" ; public static final String KEY_PERFJ_USE_SYSTEMLIB = "info.minzhou.perfj.use.systemlib" ; private static void loadSystemProperties ( ) { } private static File findNativeLibrary ( ) { boolean useSystemLib = Boolean . parseBoolean ( System . getProperty ( PerfJ . KEY_PERFJ_USE_SYSTEMLIB , "false" ) ) ; if ( useSystemLib ) { return null ; } String perfjNativeLibraryPath = System . getProperty ( PerfJ . KEY_PERFJ_LIB_PATH ) ; String perfjNativeLibraryName = System . getProperty ( PerfJ . KEY_PERFJ_LIB_NAME ) ; if ( perfjNativeLibraryName == null ) { perfjNativeLibraryName = System . mapLibraryName ( "perfj" ) ; } if ( perfjNativeLibraryPath != null ) { File nativeLib = new File ( perfjNativeLibraryPath , perfjNativeLibraryName ) ; if ( nativeLib . exists ( ) ) { return nativeLib ; } } <START_BUG> perfjNativeLibraryPath = "//info//minzhou//perfj" ; <END_BUG> boolean hasNativeLib = PerfJ . hasResource ( ( ( perfjNativeLibraryPath + "//" ) + perfjNativeLibraryName ) ) ; if ( ! hasNativeLib ) { throw new RuntimeException ( "no<seq2seq4repair_space>native<seq2seq4repair_space>library<seq2seq4repair_space>is<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>perfj" ) ; } File tempFolder = new File ( System . getProperty ( PerfJ . KEY_PERFJ_TEMPDIR , System . getProperty ( "java.io.tmpdir" ) ) ) ; if ( ! ( tempFolder . exists ( ) ) ) { boolean created = tempFolder . mkdirs ( ) ; if ( ! created ) { } } return PerfJ . extractLibraryFile ( perfjNativeLibraryPath , perfjNativeLibraryName , tempFolder . getAbsolutePath ( ) ) ; } private static boolean hasResource ( String path ) { } private static File extractLibraryFile ( String libraryFolder , String libraryFileName , String targetFolder ) { } private static boolean contentsEquals ( InputStream in1 , InputStream in2 ) throws IOException { } private static void loadAgent ( String pid , String options ) throws Exception { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
perfjNativeLibraryPath = "//info//minzhou//perfj//native" ;