nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DebugRepaintManager extends RepaintManager { private static final Logger LOG = Logger . getLogger ( "org.columba.core.gui.base" ) ; private int tabCount = 0 ; private boolean checkIsShowing = true ; public DebugRepaintManager ( ) { } public DebugRepaintManager ( boolean checkIsShowing ) { } public synchronized void addInvalidComponent ( JComponent jComponent ) { } private void checkThread ( JComponent c ) { if ( ( ! ( SwingUtilities . isEventDispatchThread ( ) ) ) && ( checkIsShowing ( c ) ) ) { System . err . println ( "----------Wrong<seq2seq4repair_space>Thread<seq2seq4repair_space>START" ) ; <START_BUG> DebugRepaintManager . LOG . info ( getStracktraceAsString ( new Exception ( ) ) ) ; <END_BUG> dumpComponentTree ( c ) ; System . err . println ( "----------Wrong<seq2seq4repair_space>Thread<seq2seq4repair_space>END" ) ; } } private String getStracktraceAsString ( Exception e ) { } private boolean checkIsShowing ( JComponent c ) { } public synchronized void addDirtyRegion ( JComponent jComponent , int i , int i1 , int i2 , int i3 ) { } private void dumpComponentTree ( Component c ) { } private void resetTabCount ( ) { } private void incrementTabCount ( ) { } private void printTabIndent ( ) { } }

Fix:
System . err . println ( getStracktraceAsString ( new Exception ( ) ) ) ;
Buggy code:
public class DefaultDetailsArea extends AbstractStatusAreaProvider { private WorkbenchStatusDialogManager workbenchStatusDialog ; public DefaultDetailsArea ( WorkbenchStatusDialogManager wsd ) { } protected static final int MASK = ( ( ( IStatus . CANCEL ) | ( IStatus . ERROR ) ) | ( IStatus . INFO ) ) | ( IStatus . WARNING ) ; private static final Object NESTING_INDENT = "<seq2seq4repair_space>" ; private List list ; private Clipboard clipboard ; public Control createSupportArea ( Composite parent , StatusAdapter statusAdapter ) { } protected Composite createArea ( Composite parent ) { parent = new Composite ( parent , SWT . NONE ) ; parent . setLayout ( new GridLayout ( ) ) ; parent . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ; list = new List ( parent , ( ( ( ( SWT . H_SCROLL ) | ( SWT . V_SCROLL ) ) | ( SWT . MULTI ) ) | ( SWT . BORDER ) ) ) ; GridData gd = new GridData ( GridData . FILL_BOTH ) ; gd . grabExcessHorizontalSpace = true ; gd . grabExcessVerticalSpace = true ; gd . widthHint = 250 ; <START_BUG> gd . minimumHeight = 100 ; <END_BUG> list . setLayoutData ( gd ) ; list . addDisposeListener ( new DisposeListener ( ) { public void widgetDisposed ( DisposeEvent e ) { if ( ( clipboard ) != null ) { clipboard . dispose ( ) ; } } } ) ; list . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { list . selectAll ( ) ; super . widgetSelected ( e ) ; } } ) ; createDNDSource ( ) ; createCopyAction ( parent ) ; Dialog . applyDialogFont ( parent ) ; return parent ; } protected void setStatusAdapter ( StatusAdapter adapter ) { } private void createDNDSource ( ) { } private void createCopyAction ( final Composite parent ) { } private String prepareCopyString ( ) { } private void populateList ( List list , IStatus status , int nesting ) { } public List getList ( ) { } }

Fix:
gd . heightHint = 100 ;
Buggy code:
@ Service @ Singleton public class ViewCoordinatePreferencesPluginView implements PreferencesPluginViewI { ViewCoordinatePreferencesPluginViewController drlvc_ ; private final Logger LOG = LoggerFactory . getLogger ( this . getClass ( ) ) ; private final StringProperty slaveValidationFailureMessageProperty = new SimpleStringProperty ( ) ; private ViewCoordinatePreferencesPluginView ( ) { } @ Override public Region getContent ( ) { } @ Override public String getName ( ) { <START_BUG> return "Set<seq2seq4repair_space>View<seq2seq4repair_space>Coordinate" ; <END_BUG> } @ Override public ReadOnlyStringProperty validationFailureMessageProperty ( ) { } @ Override public void save ( ) throws IOException { } @ Override public int getTabOrder ( ) { } }

Fix:
return "View<seq2seq4repair_space>Coordinate" ;
Buggy code:
public class SystemMenuCloseAllEditors extends Action implements ISelfUpdatingAction { private EditorPane editorPane ; public SystemMenuCloseAllEditors ( EditorPane editorPane ) { } public void setPane ( EditorPane pane ) { } public void dispose ( ) { } public void run ( ) { } public void update ( ) { if ( ( editorPane ) == null ) { setEnabled ( false ) ; return ; } <START_BUG> setEnabled ( ( ( editorPane . getPage ( ) . getEditors ( ) . length ) >= 1 ) ) ; <END_BUG> } public boolean shouldBeVisible ( ) { } }

Fix:
setEnabled ( ( ( editorPane . getPage ( ) . getEditorReferences ( ) . length ) >= 1 ) ) ;
Buggy code:
public abstract class Context { private HashMap < String , Entity > nameRelations ; private XmlEntityReader entityReader ; private XmlPrefabReader prefabReader ; private ArrayList < Entity > entities ; private XmlSceneReader sceneReader ; public Context ( ) { } public final void updateAll ( ) { } public final void createAll ( ) { } public final void renderAll ( Shader shader ) { } public void postUpdate ( ) { } public void clean ( ) { <START_BUG> for ( int i = entities . size ( ) ; i >= 0 ; i -- ) { <END_BUG> if ( entities . get ( i ) . isDestroyed ( ) ) entities . remove ( i ) ; } } public final Entity addEntity ( Entity entity ) { } public final Entity newEntity ( String name ) { } public Entity newCamera ( String name , boolean current ) { } public final void populate ( String xmlFilePath ) { } public Prefab newPrefab ( String filePath ) { } public final void readEntity ( String xmlFilePath , String name ) { } public void define ( String filePath ) { } public final Entity findEntity ( String name ) { } public ArrayList < Entity > getEntities ( ) { } public void onUpdate ( ) { } public abstract void onCreate ( ) { } public abstract void onStop ( ) { } }

Fix:
for ( int i = ( entities . size ( ) ) - 1 ; i >= 0 ; i -- ) {
Buggy code:
public class GameWorldView { private final OrthogonalTiledMapRenderer mapRenderer ; private final GameWorld gameWorld ; private final SpriteBatch batch ; private final WorldPhysicsView worldPhysicsView ; private final EntityPlayerKeldeView entityPlayerKeldeView ; private final EntityBatView entityBatView ; private final EntityEyeView entityEyeView ; private final EntityGhostView entityGhostView ; private final BarrelView barrelView ; private final TreasureView treasureView ; private final TreasureView treasureView2 ; private final DoorView doorView ; private final BombView bombView ; private final List < ItemEntityView > itemEntityViews = new ArrayList < > ( ) ; public GameWorldView ( GameWorld gameWorld ) { } public void render ( float delta ) { mapRenderer . setView ( gameWorld . getCamera ( ) . getOrthographicCamera ( ) ) ; mapRenderer . render ( ) ; batch . begin ( ) ; treasureView . draw ( batch ) ; treasureView2 . draw ( batch ) ; barrelView . draw ( batch ) ; doorView . draw ( batch ) ; entityPlayerKeldeView . draw ( batch ) ; entityBatView . draw ( batch ) ; entityEyeView . draw ( batch ) ; bombView . draw ( batch ) ; <START_BUG> for ( ItemEntityView itemView : itemEntityViews ) { <END_BUG> itemView . draw ( batch ) ; } entityGhostView . draw ( batch ) ; batch . end ( ) ; worldPhysicsView . render ( delta ) ; } public void addEntityViews ( ItemEntity itemEntity ) { } public void updateProjectionMatrix ( ) { } public void dispose ( ) { } public OrthogonalTiledMapRenderer getMapRenderer ( ) { } public WorldPhysicsView getWorldPhysicsView ( ) { } public EntityPlayerKeldeView getEntityPlayerKeldeView ( ) { } public BarrelView getBarrelView ( ) { } public TreasureView getTreasureView ( ) { } public TreasureView getTreasureView2 ( ) { } public DoorView getDoorView ( ) { } public EntityBatView getEntityBatView ( ) { } public EntityEyeView getEntityEyeView ( ) { } public BombView getBombView ( ) { } public List < ItemEntityView > getItemEntityViews ( ) { } public EntityGhostView getEntityGhostView ( ) { } public void removeItemView ( ItemEntityView itemEntityView ) { } }

Fix:
for ( final ItemEntityView itemView : itemEntityViews ) {
Buggy code:
public abstract class AbstractSolrMorphlineZkTestBase extends AbstractFullDistribZkTestBase { private static final File solrHomeDirectory = new File ( TEMP_DIR , AbstractSolrMorphlineZkTestBase . class . getName ( ) ) ; protected static final String RESOURCES_DIR = ( ExternalPaths . SOURCE_HOME ) + "//contrib//map-reduce//src//test-files" ; private static final File SOLR_INSTANCE_DIR = new File ( ( ( AbstractSolrMorphlineZkTestBase . RESOURCES_DIR ) + "//solr" ) ) ; private static final File SOLR_CONF_DIR = new File ( ( ( AbstractSolrMorphlineZkTestBase . RESOURCES_DIR ) + "//solr//collection1" ) ) ; protected Collector collector ; protected Command morphline ; @ Override public String getSolrHome ( ) { } public AbstractSolrMorphlineZkTestBase ( ) { } @ BeforeClass public static void setupClass ( ) throws Exception { } @ Override @ Before public void setUp ( ) throws Exception { } @ Override @ After public void tearDown ( ) throws Exception { } @ Test @ Override public void testDistribSearch ( ) throws Exception { } @ Override protected void commit ( ) throws Exception { } protected Command parse ( String file ) throws IOException { } protected Command parse ( String file , String collection ) throws IOException { } private Command createMorphline ( Config config ) { } private MorphlineContext createMorphlineContext ( ) { } protected void startSession ( ) { } protected ListMultimap < String , Object > next ( Iterator < SolrDocument > iter ) { } private Record toRecord ( SolrDocument doc ) { } @ Override public JettySolrRunner createJetty ( File solrHome , String dataDir , String shardList , String solrConfigOverride , String schemaOverride ) throws Exception { <START_BUG> JettySolrRunner jetty = new JettySolrRunner ( solrHome . getAbsolutePath ( ) , context , 0 , solrConfigOverride , schemaOverride ) ; <END_BUG> jetty . setShards ( shardList ) ; if ( ( System . getProperty ( "collection" ) ) == null ) { System . setProperty ( "collection" , "collection1" ) ; } jetty . start ( ) ; System . clearProperty ( "collection" ) ; return jetty ; } private static void putConfig ( SolrZkClient zkClient , File solrhome , String name ) throws Exception { } private static void putConfig ( SolrZkClient zkClient , File solrhome , String srcName , String destName ) throws Exception { } private void uploadConfFiles ( ) throws Exception { } }

Fix:
JettySolrRunner jetty = new JettySolrRunner ( solrHome . getAbsolutePath ( ) , context , 0 , solrConfigOverride , schemaOverride , true , null , sslConfig ) ;
Buggy code:
public class DefaultProcessorTest extends TestCase { private CommandProcessor processor ; int executedID ; int finishedID ; public DefaultProcessorTest ( String arg0 ) { } public void testAddOp_PriorityOrdering ( ) { } public void testAddOp_PriorityOrderingWithSynchronized ( ) { } public void testReserveForRealtime ( ) throws Exception { } public void testRunOne ( ) throws Exception { } public void testRunMultiple ( ) throws Exception { } public void testRunMax ( ) throws Exception { } public void testRunRealtime ( ) throws Exception { processor = new CommandProcessor ( true ) ; processor . addOp ( new TestCommand ( this , 1 ) ) ; processor . addOp ( new TestCommand ( this , 2 ) ) ; processor . addOp ( new TestCommand ( this , 3 ) ) ; processor . addOp ( new TestCommand ( this , 4 , Command . REALTIME_PRIORITY ) ) ; processor . addOp ( new TestCommand ( this , 5 ) ) ; processor . addOp ( new TestCommand ( this , 1 ) ) ; processor . addOp ( new TestCommand ( this , 2 ) ) ; processor . addOp ( new TestCommand ( this , 3 ) ) ; processor . addOp ( new TestCommand ( this , 4 ) ) ; processor . addOp ( new TestCommand ( this , 5 , Command . REALTIME_PRIORITY ) ) ; processor . addOp ( new TestCommand ( this , 1 ) ) ; processor . addOp ( new TestCommand ( this , 2 ) ) ; processor . addOp ( new TestCommand ( this , 3 ) ) ; processor . addOp ( new TestCommand ( this , 4 ) ) ; processor . addOp ( new TestCommand ( this , 5 ) ) ; <START_BUG> Thread . sleep ( 2000 ) ; <END_BUG> assertEquals ( 0 , processor . operationQueue . size ( ) ) ; assertEquals ( MAX_WORKERS , processor . worker . size ( ) ) ; } }

Fix:
Thread . sleep ( 3000 ) ;
Buggy code:
public final class HtmlProblemFinder extends AbstractMarkupFilter { private static final Log log = LogFactory . getLog ( HtmlProblemFinder . class ) ; public static final int ERR_INGORE = 3 ; public static final int ERR_LOG_WARN = 2 ; public static final int ERR_LOG_ERROR = 1 ; public static final int ERR_THROW_EXCEPTION = 0 ; private final int problemEscalation ; public HtmlProblemFinder ( final int problemEscalation ) { } public MarkupElement nextTag ( ) throws ParseException { <START_BUG> final ComponentTag tag = ( ( ComponentTag ) ( getParent ( ) . nextTag ( ) ) ) ; <END_BUG> if ( tag == null ) { return tag ; } if ( ( "img" . equals ( tag . getName ( ) ) ) && ( ( tag . isOpen ( ) ) || ( tag . isOpenClose ( ) ) ) ) { String src = tag . getAttributes ( ) . getString ( "src" ) ; if ( ( src != null ) && ( ( src . trim ( ) . length ( ) ) == 0 ) ) { escalateWarning ( "Attribute<seq2seq4repair_space>'src'<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty.<seq2seq4repair_space>Location:<seq2seq4repair_space>" , tag ) ; } } Iterator iter = tag . getAttributes ( ) . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String key = ( ( String ) ( iter . next ( ) ) ) ; if ( key != null ) { key = key . toLowerCase ( ) ; if ( key . startsWith ( "wicket." ) ) { escalateWarning ( "You<seq2seq4repair_space>probably<seq2seq4repair_space>want<seq2seq4repair_space>'wicket:xxx'<seq2seq4repair_space>rather<seq2seq4repair_space>than<seq2seq4repair_space>'wicket.xxx'.<seq2seq4repair_space>Location:<seq2seq4repair_space>" , tag ) ; } } } return tag ; } private void escalateWarning ( final String msg , final ComponentTag tag ) throws ParseException { } }

Fix:
final ComponentTag tag = nextComponentTag ( ) ;
Buggy code:
public class EntityFira extends Entity { EntityPlayer player ; public EntityFira ( World world ) { } public EntityFira ( World world , EntityPlayer sender , double x , double y , double z , int level ) { } @ Override public void onUpdate ( ) { if ( ( player ) == null ) { return ; } int rotation = 0 ; if ( ! ( worldObj . isRemote ) ) { <START_BUG> PacketDispatcher . sendToAllAround ( new SpawnFireParticles ( this ) , player , 64.0 ) ; <END_BUG> } this . rotationYaw = ( rotation + 1 ) % 360 ; if ( ( ticksExisted ) > 15 ) { setDead ( ) ; } if ( ( ticksExisted ) < 10 ) { player . getEntityAttribute ( movementSpeed ) . setBaseValue ( 0.0 ) ; } else { player . getEntityAttribute ( movementSpeed ) . setBaseValue ( 0.10000000149011612 ) ; } AxisAlignedBB aabb = player . getEntityBoundingBox ( ) . expand ( 2 , 2 , 2 ) ; List list = this . worldObj . getEntitiesWithinAABBExcludingEntity ( player , aabb ) ; if ( ! ( list . isEmpty ( ) ) ) { for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { Entity e = ( ( Entity ) ( list . get ( i ) ) ) ; e . attackEntityFrom ( magic , 3.0F ) ; e . setFire ( 5 ) ; } } aabb . contract ( 2 , 2 , 2 ) ; super . onUpdate ( ) ; } @ Override protected void entityInit ( ) { } @ Override protected void readEntityFromNBT ( NBTTagCompound tagCompund ) { } @ Override protected void writeEntityToNBT ( NBTTagCompound tagCompound ) { } @ Override public AxisAlignedBB getEntityBoundingBox ( ) { } }

Fix:
PacketDispatcher . sendToAllAround ( new SpawnFireParticles ( this , 2 ) , player , 64.0 ) ;
Buggy code:
public class FriendBank { private DBConnection connection ; public FriendBank ( ) { } public void AddFriends ( int user1 , int user2 ) { } public void RemoveFriends ( int user1 , int user2 ) { <START_BUG> connection . ExecuteUpdate ( ( ( ( "DELETE<seq2seq4repair_space>FROM<seq2seq4repair_space>friends<seq2seq4repair_space>WHERE<seq2seq4repair_space>user1=" + user1 ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>user2=" ) + user2 ) ) ; <END_BUG> } }

Fix:
connection . ExecuteUpdate ( ( ( ( ( ( ( ( ( "DELETE<seq2seq4repair_space>FROM<seq2seq4repair_space>friends<seq2seq4repair_space>WHERE<seq2seq4repair_space>(user1=" + user1 ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>user2=" ) + user2 ) + ")<seq2seq4repair_space>OR<seq2seq4repair_space>(user1=" ) + user2 ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>user2=" ) + user1 ) + ")" ) ) ;
Buggy code:
public class SubViewerTwoFormat implements SubtitleFormat { public TextView writeTo ; SubtitlePlayer playerInstance = null ; public SubViewerTwoFormat ( SubtitlePlayer tmpPlayer ) { } public ArrayList < TextBlock > readFile ( InputStream data , String srcCharset ) { } public void readLines ( BufferedReader in , ArrayList < TextBlock > blocks ) { String [ ] replace = new String [ ] { "[br]" } ; String [ ] replaceWith = new String [ ] { "<br>" } ; try { String buffer ; String str ; long startTime ; long endTime ; int pos = - 1 ; String text ; do { buffer = in . readLine ( ) ; } while ( ( ( buffer . length ( ) ) == 0 ) || ( ! ( ( ( buffer . charAt ( 0 ) ) >= '0' ) && ( ( buffer . charAt ( 0 ) ) <= '9' ) ) ) ) ; while ( true ) { <START_BUG> if ( ( blocks . size ( ) ) > 0 ) <END_BUG> buffer = in . readLine ( ) ; if ( buffer == null ) break ; str = buffer . trim ( ) ; pos = str . indexOf ( ',' ) ; if ( pos == ( - 1 ) ) continue ; startTime = parseTimeStamp ( str . substring ( 0 , pos ) ) ; endTime = parseTimeStamp ( str . substring ( ( pos + 1 ) ) ) ; text = in . readLine ( ) ; for ( int i = 0 ; i < ( replace . length ) ; i ++ ) text = text . replace ( replace [ i ] , replaceWith [ i ] ) ; blocks . add ( new com . subscreen . TimeBlock ( text , startTime , endTime , playerInstance ) ) ; } } catch ( IOException e ) { return ; } } public long parseTimeStamp ( String input ) { } }

Fix:
if ( ( blocks . size ( ) ) > 1 )
Buggy code:
public class ParameterConfiguration { private Map < Parameter , Object > parameter_instances ; private byte [ ] checksum ; public ParameterConfiguration ( Set < Parameter > parameters ) { } public byte [ ] getChecksum ( ) { } public void updateChecksum ( ) { } public Object getParameterValue ( Parameter p ) { } public void setParameterValue ( Parameter p , Object v ) { } public void setParameterValue ( String parameter_name , Object v ) { } public void unsetParameter ( Parameter p ) { } public void unsetParameter ( String parameter_name ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; ParameterConfiguration other = ( ( ParameterConfiguration ) ( obj ) ) ; if ( ( parameter_instances ) == null ) { if ( ( other . parameter_instances ) != null ) return false ; } else if ( ! ( parameter_instances . keySet ( ) . equals ( other . parameter_instances . keySet ( ) ) ) ) return false ; else { for ( Parameter p : parameter_instances . keySet ( ) ) { if ( ( ( parameter_instances . get ( p ) ) == null ) && ( ( other . getParameterValue ( p ) ) == null ) ) continue ; if ( ( ( parameter_instances . get ( p ) ) == null ) && ( other . getParameterValue ( p ) . equals ( FlagDomain . FLAGS . OFF ) ) ) continue ; if ( ( ( parameter_instances . get ( p ) ) == null ) && ( other . getParameterValue ( p ) . equals ( OptionalDomain . OPTIONS . NOT_SPECIFIED ) ) ) continue ; if ( ( ( other . getParameterValue ( p ) ) == null ) && ( parameter_instances . get ( p ) . equals ( FlagDomain . FLAGS . OFF ) ) ) continue ; if ( ( ( other . getParameterValue ( p ) ) == null ) && ( parameter_instances . get ( p ) . equals ( OptionalDomain . OPTIONS . NOT_SPECIFIED ) ) ) continue ; if ( ( parameter_instances . get ( p ) ) == null ) return false ; if ( ( ( parameter_instances . get ( p ) ) instanceof Double ) || ( ( parameter_instances . get ( p ) ) instanceof Float ) ) { double this_val = ( ( Double ) ( parameter_instances . get ( p ) ) ) ; <START_BUG> double other_val = ( ( Double ) ( other . getParameterValue ( p ) ) ) ; <END_BUG> if ( ! ( ( ( other_val - 1.0E-8 ) < this_val ) && ( this_val < ( other_val + 1.0E-8 ) ) ) ) return false ; } else if ( ! ( parameter_instances . get ( p ) . equals ( other . getParameterValue ( p ) ) ) ) return false ; } } return true ; } public Map < Parameter , Object > getParameter_instances ( ) { } public String toString ( ) { } public ParameterConfiguration ( ParameterConfiguration other ) { } }

Fix:
double other_val = ( ( Number ) ( other . getParameterValue ( p ) ) ) . doubleValue ( ) ;
Buggy code:
public class NativeManagementWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { private final LocalHostControllerInfoImpl hostControllerInfo ; public NativeManagementWriteAttributeHandler ( final LocalHostControllerInfoImpl hostControllerInfo ) { } @ Override protected boolean applyUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode resolvedValue , final ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } private void installNativeManagementService ( final OperationContext context , final ModelNode subModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final ModelNode portNode = NATIVE_PORT . resolveModelAttribute ( context , subModel ) ; int port = ( portNode . isDefined ( ) ) ? portNode . asInt ( ) : 0 ; <START_BUG> ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR , port ) ; <END_BUG> NativeManagementAddHandler . populateHostControllerInfo ( hostControllerInfo , context , subModel ) ; NativeManagementAddHandler . installNativeManagementServices ( context . getServiceTarget ( ) , hostControllerInfo , verificationHandler , null ) ; } }

Fix:
ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR ) ;
Buggy code:
public class TestSpansAdvanced extends LuceneTestCase { protected Directory mDirectory ; protected IndexReader reader ; protected IndexSearcher searcher ; private static final String FIELD_ID = "ID" ; protected static final String FIELD_TEXT = "TEXT" ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; mDirectory = newDirectory ( ) ; final RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , mDirectory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) , MockTokenizer . SIMPLE , true , MockTokenFilter . ENGLISH_STOPSET ) ) . setMergePolicy ( newLogMergePolicy ( ) ) . setSimilarity ( new DefaultSimilarity ( ) ) ) ; addDocument ( writer , "1" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "2" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "3" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; addDocument ( writer , "4" , "I<seq2seq4repair_space>think<seq2seq4repair_space>it<seq2seq4repair_space>should<seq2seq4repair_space>work." ) ; reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> searcher = newSearcher ( reader ) ; searcher . setSimilarity ( new DefaultSimilarity ( ) ) ; } @ Override public void tearDown ( ) throws Exception { } protected void addDocument ( final RandomIndexWriter writer , final String id , final String text ) throws IOException { } public void testBooleanQueryWithSpanQueries ( ) throws IOException { } protected void doTestBooleanQueryWithSpanQueries ( IndexSearcher s , final float expectedScore ) throws IOException { } protected static void assertHits ( IndexSearcher s , Query query , final String description , final String [ ] expectedIds , final float [ ] expectedScores ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
@ Component public class DailyReminderAdherenceTrendService { public static final String ADHERENCE_IN_RED_ALERT = "Adherence<seq2seq4repair_space>in<seq2seq4repair_space>Red" ; public static final String FALLING_ADHERENCE = "Falling<seq2seq4repair_space>Adherence" ; private AllDosageAdherenceLogs allDosageAdherenceLogs ; private PillReminderService pillReminderService ; private PatientAlertService patientAlertService ; @ Autowired public DailyReminderAdherenceTrendService ( AllDosageAdherenceLogs allDosageAdherenceLogs , PillReminderService pillReminderService , PatientAlertService alertService ) { } public boolean isAdherenceFalling ( String patientId ) { } public double getAdherencePercentage ( String patientId ) { } protected double getAdherencePercentageForCurrentWeek ( String patientId ) { } protected double getAdherencePercentageForLastWeek ( String patientId ) { } protected double getAdherencePercentage ( String patientId , DateTime asOfDate ) { PillRegimenResponse pillRegimen = pillReminderService . getPillRegimen ( patientId ) ; String regimenId = pillRegimen . getPillRegimenId ( ) ; int scheduledDosagesTotalCountForLastFourWeeksAsOfNow = DosageUtil . getScheduledDosagesTotalCountForLastFourWeeks ( asOfDate . minusWeeks ( 4 ) , asOfDate , pillRegimen ) ; int dosagesTakenForLastFourWeeksAsOfNow = allDosageAdherenceLogs . findScheduledDosagesSuccessCount ( regimenId , asOfDate . minusWeeks ( 4 ) . toLocalDate ( ) , asOfDate . toLocalDate ( ) ) ; <START_BUG> return ( ( double ) ( dosagesTakenForLastFourWeeksAsOfNow ) ) // scheduledDosagesTotalCountForLastFourWeeksAsOfNow ; <END_BUG> } public void raiseAdherenceFallingAlert ( String patientId ) { } public void raiseAdherenceInRedAlert ( String patientId , Double adherencePercentage ) { } }

Fix:
return ( ( ( double ) ( dosagesTakenForLastFourWeeksAsOfNow ) ) // scheduledDosagesTotalCountForLastFourWeeksAsOfNow ) * 100.0 ;
Buggy code:
public class TestopiaSite { private final TestopiaAPI api ; protected final Report report ; public TestopiaSite ( TestopiaAPI api ) { } public TestopiaAPI getApi ( ) { } public Report getReport ( ) { } public TestCaseWrapper [ ] getTestCases ( TestRun testCaseRun , TestCase [ ] testCases ) { } public void updateTestCase ( TestCaseWrapper tc ) { <START_BUG> if ( ( tc . getStatusId ( ) ) != ( IDLE . getValue ( ) ) ) { <END_BUG> this . api . update ( tc , tc . getRunId ( ) , tc . getBuildId ( ) , tc . getEnvId ( ) ) ; Status executionStatus = Status . get ( tc . getStatusId ( ) ) ; switch ( executionStatus ) { case PASSED : report . setPassed ( ( ( report . getPassed ( ) ) + 1 ) ) ; break ; case FAILED : report . setFailed ( ( ( report . getFailed ( ) ) + 1 ) ) ; break ; case BLOCKED : report . setBlocked ( ( ( report . getBlocked ( ) ) + 1 ) ) ; break ; default : break ; } report . addTestCase ( tc ) ; } } }

Fix:
if ( ( tc . getStatusId ( ) ) != null ) {
Buggy code:
public class FileResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream { private static final long serialVersionUID = 1L ; private final File file ; private transient InputStream inputStream ; public FileResourceStream ( final File file ) { } public FileResourceStream ( final java . io . File file ) { } public void close ( ) throws IOException { } @ Override public String getContentType ( ) { } public File getFile ( ) { } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } @ Override public Time lastModifiedTime ( ) { } @ Override public String toString ( ) { } @ Override public Bytes length ( ) { if ( ( file ) != null ) { return Bytes . bytes ( file . length ( ) ) ; } <START_BUG> return Bytes . bytes ( 0 ) ; <END_BUG> } public String locationAsString ( ) { } }

Fix:
return null ;
Buggy code:
public class TcpWriter extends BusConsumer implements IAisHandler { private static final Logger LOG = Logger . getLogger ( TcpWriter . class ) ; private int port ; private String host ; public TcpWriter ( MessageBus messageBus ) { } @ Override public void run ( ) { handlerInit ( ) ; while ( true ) { Socket socket = new Socket ( ) ; try { InetSocketAddress address = new InetSocketAddress ( host , port ) ; TcpWriter . LOG . info ( ( ( ( ( "Connecting<seq2seq4repair_space>to<seq2seq4repair_space>" + ( host ) ) + ":" ) + ( port ) ) + "<seq2seq4repair_space>..." ) ) ; socket . connect ( address ) ; socket . setKeepAlive ( true ) ; OutputStream outputStream ; if ( isGzipCompress ( ) ) { outputStream = new java . util . zip . GZIPOutputStream ( socket . getOutputStream ( ) , gzipBufferSize ) ; } else { outputStream = socket . getOutputStream ( ) ; } PrintWriter out = new PrintWriter ( outputStream ) ; TcpWriter . LOG . info ( "Connected." ) ; addToBus ( ) ; while ( ! ( out . checkError ( ) ) ) { AisMessage aisMessage = queue . take ( ) ; if ( isFilterAllowed ( aisMessage ) ) { <START_BUG> out . print ( ( ( aisMessage . getVdm ( ) . getOrgLinesJoined ( ) ) + "\r\n" ) ) ; <END_BUG> } } } catch ( IOException e ) { TcpWriter . LOG . error ( ( "TCP<seq2seq4repair_space>writer<seq2seq4repair_space>connection<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } catch ( InterruptedException e ) { TcpWriter . LOG . error ( ( "TCP<seq2seq4repair_space>writer<seq2seq4repair_space>connection<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } finally { try { socket . close ( ) ; } catch ( IOException e ) { } } removeFromBus ( ) ; AisBus . sleep ( 20000 ) ; } } public void setHost ( String host ) { } public void setPort ( int port ) { } public int getPort ( ) { } public String getHost ( ) { } }

Fix:
out . print ( aisMessage . reassemble ( ) ) ;
Buggy code:
public class KMeansClusterMapper extends Mapper < WritableComparable < ? > , VectorWritable , IntWritable , WeightedVectorWritable > { private final List < Cluster > clusters = new ArrayList < Cluster > ( ) ; private KMeansClusterer clusterer ; @ Override protected void map ( WritableComparable < ? > key , VectorWritable point , Context context ) throws IOException , InterruptedException { } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { super . setup ( context ) ; Configuration conf = context . getConfiguration ( ) ; try { ClassLoader ccl = Thread . currentThread ( ) . getContextClassLoader ( ) ; DistanceMeasure measure = ccl . loadClass ( conf . get ( DISTANCE_MEASURE_KEY ) ) . asSubclass ( DistanceMeasure . class ) . newInstance ( ) ; measure . configure ( conf ) ; String clusterPath = conf . get ( CLUSTER_PATH_KEY ) ; if ( ( clusterPath != null ) && ( ( clusterPath . length ( ) ) > 0 ) ) { KMeansUtil . configureWithClusterInfo ( new Path ( clusterPath ) , clusters ) ; if ( clusters . isEmpty ( ) ) { <START_BUG> throw new IllegalStateException ( "Cluster<seq2seq4repair_space>is<seq2seq4repair_space>empty!" ) ; <END_BUG> } } this . clusterer = new KMeansClusterer ( measure ) ; } catch ( ClassNotFoundException e ) { throw new IllegalStateException ( e ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( e ) ; } catch ( InstantiationException e ) { throw new IllegalStateException ( e ) ; } } }

Fix:
throw new IllegalStateException ( "No<seq2seq4repair_space>clusters<seq2seq4repair_space>found.<seq2seq4repair_space>Check<seq2seq4repair_space>your<seq2seq4repair_space>-c<seq2seq4repair_space>path." ) ;
Buggy code:
public class SettingsLoader { private String path ; private String login ; private String password ; private String computeMethod ; private String gpu ; private String cores ; private String cacheDir ; private String autoSignIn ; private String ui ; public SettingsLoader ( ) { } public SettingsLoader ( String path_ ) { } public SettingsLoader ( String login_ , String password_ , ComputeType computeMethod_ , GPUDevice gpu_ , int cores_ , String cacheDir_ , boolean autoSignIn_ , String ui_ ) { } public static String getDefaultFilePath ( ) { } public String getFilePath ( ) { } public void saveFile ( ) { } public void loadFile ( ) { } public void merge ( Configuration config ) { if ( config == null ) { System . out . println ( "SettingsLoader::merge<seq2seq4repair_space>config<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } loadFile ( ) ; if ( ( config . login ( ) . isEmpty ( ) ) && ( ( login ) != null ) ) { config . setLogin ( login ) ; } if ( ( config . password ( ) . isEmpty ( ) ) && ( ( password ) != null ) ) { config . setPassword ( password ) ; } try { if ( ( ( ( config . getComputeMethod ( ) ) == null ) && ( ( computeMethod ) != null ) ) || ( ( ( computeMethod ) != null ) && ( ( config . getComputeMethod ( ) ) != ( ComputeType . valueOf ( computeMethod ) ) ) ) ) { config . setComputeMethod ( ComputeType . valueOf ( computeMethod ) ) ; } } catch ( IllegalArgumentException e ) { System . err . println ( ( ( "SettingsLoader::merge<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>handle<seq2seq4repair_space>compute<seq2seq4repair_space>method<seq2seq4repair_space>(raw<seq2seq4repair_space>value:<seq2seq4repair_space>'" + ( computeMethod ) ) + "')" ) ) ; computeMethod = null ; } if ( ( ( config . getGPUDevice ( ) ) == null ) && ( ( gpu ) != null ) ) { GPUDevice device = GPU . getGPUDevice ( gpu ) ; if ( device != null ) { config . setUseGPU ( device ) ; } } if ( ( ( config . getNbCores ( ) ) == ( - 1 ) ) && ( ( cores ) != null ) ) { config . setUseNbCores ( Integer . valueOf ( cores ) ) ; } <START_BUG> if ( ( ( config . getUserSpecifiedACacheDir ( ) ) == false ) && ( ( cacheDir ) != null ) ) { <END_BUG> config . setCacheDir ( new File ( cacheDir ) ) ; } if ( ( ( config . getUIType ( ) ) == null ) && ( ( ui ) != null ) ) { config . setUIType ( ui ) ; } config . setAutoSignIn ( Boolean . valueOf ( autoSignIn ) ) ; } @ Override public String toString ( ) { } }

Fix:
if ( ( ( ( config . getUserSpecifiedACacheDir ( ) ) == false ) && ( ( cacheDir ) != null ) ) && ( new File ( cacheDir ) . exists ( ) ) ) {
Buggy code:
public class Http extends ProjectComponent implements Condition { private static final int ERROR_BEGINS = 400 ; private static final String DEFAULT_REQUEST_METHOD = "GET" ; private String spec = null ; private String requestMethod = Http . DEFAULT_REQUEST_METHOD ; public void setUrl ( String url ) { } private int errorsBeginAt = Http . ERROR_BEGINS ; public void setErrorsBeginAt ( int errorsBeginAt ) { } public void setRequestMethod ( String method ) { <START_BUG> this . requestMethod = ( method == null ) ? Http . DEFAULT_REQUEST_METHOD : method . toUpperCase ( Locale . US ) ; <END_BUG> } public boolean eval ( ) throws BuildException { } }

Fix:
this . requestMethod = ( method == null ) ? Http . DEFAULT_REQUEST_METHOD : method . toUpperCase ( Locale . ENGLISH ) ;
Buggy code:
public class SelfNamespace extends BBMPlatformUser { public static final String NAME = "self" ; public static final String FUNC_SET_PERSONAL_MSG = "setPersonalMessage" ; public static final String FUNC_SET_STATUS = "setStatus" ; public static final String FUNC_SET_DISPLAY_PIC = "setDisplayPicture" ; private static SelfNamespace instance ; private SelfNamespace ( ) { } public static SelfNamespace getInstance ( ) { } public Object getField ( String name ) throws Exception { } private class SetPersonalMessage extends ScriptableFunctionBase { protected Object execute ( Object thiz , Object [ ] args ) throws Exception { } protected FunctionSignature [ ] getFunctionSignatures ( ) { FunctionSignature sig1 = new FunctionSignature ( 2 ) ; <START_BUG> sig1 . addParam ( String . class , true ) ; <END_BUG> sig1 . addParam ( ScriptableFunction . class , true ) ; return new FunctionSignature [ ] { sig1 } ; } } private class SetStatus extends ScriptableFunctionBase { protected Object execute ( Object thiz , Object [ ] args ) throws Exception { } protected FunctionSignature [ ] getFunctionSignatures ( ) { FunctionSignature sig1 = new FunctionSignature ( 3 ) ; sig1 . addParam ( String . class , true ) ; sig1 . addNullableParam ( String . class , true ) ; sig1 . addParam ( ScriptableFunction . class , true ) ; return new FunctionSignature [ ] { sig1 } ; } } private class SetDisplayPic extends ScriptableFunctionBase { protected Object execute ( Object thiz , Object [ ] args ) throws Exception { } protected FunctionSignature [ ] getFunctionSignatures ( ) { FunctionSignature sig1 = new FunctionSignature ( 2 ) ; sig1 . addParam ( String . class , true ) ; sig1 . addParam ( ScriptableFunction . class , true ) ; return new FunctionSignature [ ] { sig1 } ; } } }

Fix:
sig1 . addNullableParam ( String . class , true ) ;
Buggy code:
public class Assignment extends Expression { public Expression lhs ; public Expression expression ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } void checkAssignment ( BlockScope scope , TypeBinding lhsType , TypeBinding rhsType ) { FieldBinding leftField = getLastField ( this . lhs ) ; <START_BUG> if ( ( ( ( leftField != null ) && ( rhsType != ( TypeBinding . NULL ) ) ) && ( lhsType . isWildcard ( ) ) ) && ( ( ( ( WildcardBinding ) ( lhsType ) ) . boundKind ) != ( Wildcard . SUPER ) ) ) { <END_BUG> scope . problemReporter ( ) . wildcardAssignment ( lhsType , rhsType , this . expression ) ; } else if ( ( ( ( leftField != null ) && ( ! ( leftField . isStatic ( ) ) ) ) && ( ( leftField . declaringClass ) != null ) ) && ( leftField . declaringClass . isRawType ( ) ) ) { scope . problemReporter ( ) . unsafeRawFieldAssignment ( leftField , rhsType , this . lhs ) ; } else if ( rhsType . needsUncheckedConversion ( lhsType ) ) { scope . problemReporter ( ) . unsafeTypeConversion ( this . expression , rhsType , lhsType ) ; } } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public static Binding getDirectBinding ( Expression someExpression ) { } FieldBinding getLastField ( Expression someExpression ) { } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public StringBuffer printExpressionNoParenthesis ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public TypeBinding resolveTypeExpecting ( BlockScope scope , TypeBinding expectedType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public LocalVariableBinding localVariableBinding ( ) { } }

Fix:
if ( ( ( ( leftField != null ) && ( rhsType != ( TypeBinding . NULL ) ) ) && ( ( lhsType . kind ( ) ) == ( Binding . WILDCARD_TYPE ) ) ) && ( ( ( ( WildcardBinding ) ( lhsType ) ) . boundKind ) != ( Wildcard . SUPER ) ) ) {
Buggy code:
public class TickTest { private static DateTime time1 ; private static DateTime time2 ; private Tick tick ; @ BeforeClass public static void setUpBeforClass ( ) throws Exception { } @ Before public void setUp ( ) throws Exception { } @ Test public void testConstruct3TDD ( ) throws Exception { } @ Test public void testConstruct3TDL ( ) throws Exception { } @ Test public void testConstruct2 ( ) throws Exception { } @ Test public void testEquals_SpecialCases ( ) throws Exception { } @ Test public void testEquals ( ) throws Exception { } @ Test public void testToString ( ) throws Exception { <START_BUG> assertEquals ( "Tick[val=1828.14,<seq2seq4repair_space>opt=1000.0<seq2seq4repair_space>at<seq2seq4repair_space>2013-10-06T15:44:51.123+04:00]" , tick . toString ( ) ) ; <END_BUG> } @ Test public void testGetOptionalValueAsLong ( ) throws Exception { } }

Fix:
assertEquals ( ( ( "Tick[val=1828.14,<seq2seq4repair_space>opt=1000.0<seq2seq4repair_space>at<seq2seq4repair_space>" + ( tick . getTime ( ) ) ) + "]" ) , tick . toString ( ) ) ;
Buggy code:
class SessionProviderFactory { static SessionProvider create ( MailSessionConfig config , final Map < String , OutboundSocketBinding > socketBindings ) throws StartException { } static SessionProvider create ( MailSessionMetaData mailSessionMetaData ) { } private static String getHostKey ( final String protocol ) { } private static String getPortKey ( final String protocol ) { } private static String getPropKey ( final String protocol , final String name ) { } private static class ManagedSession implements SessionProvider { private final Map < String , OutboundSocketBinding > socketBindings ; private final MailSessionConfig sessionConfig ; private final Properties properties = new Properties ( ) ; private ManagedSession ( MailSessionConfig sessionConfig , Map < String , OutboundSocketBinding > socketBindings ) throws StartException { } private void configure ( ) throws StartException { } private void configureCustomServers ( final Properties props , final CustomServerConfig ... serverConfigs ) throws StartException { } private void setServerProps ( final Properties props , final ServerConfig server , final String protocol ) throws StartException { } private InetSocketAddress getServerSocketAddress ( ServerConfig server ) throws StartException { final String ref = server . getOutgoingSocketBinding ( ) ; final OutboundSocketBinding binding = socketBindings . get ( ref ) ; if ( binding == null ) { <START_BUG> throw MESSAGES . outboundSocketBindingNotAvailable ( ref ) ; <END_BUG> } return new InetSocketAddress ( binding . getUnresolvedDestinationAddress ( ) , binding . getDestinationPort ( ) ) ; } @ Override public Session getSession ( ) { } } protected static class ManagedPasswordAuthenticator extends Authenticator { private MailSessionConfig config ; public ManagedPasswordAuthenticator ( MailSessionConfig sessionConfig ) { } @ Override protected PasswordAuthentication getPasswordAuthentication ( ) { } } private static class DirectSessionProvider implements SessionProvider { private final MailSessionMetaData metaData ; private final Properties properties = new Properties ( ) ; private PasswordAuthentication authenticator = null ; private DirectSessionProvider ( MailSessionMetaData metaData ) { } private void configure ( ) { } @ Override public Session getSession ( ) { } } }

Fix:
throw ROOT_LOGGER . outboundSocketBindingNotAvailable ( ref ) ;
Buggy code:
public class AnonymizerConsumer implements Consumer < List < Object > > { private DataAnonymizer dataAnonymizer ; private Table table ; public AnonymizerConsumer ( DataAnonymizer dataAnonymizer , Table table ) { } @ Override public void accept ( List < Object > objects ) { <START_BUG> if ( dataAnonymizer . shouldAnonymize ( ) ) { <END_BUG> List < Column > columns = table . getColumns ( ) ; int index = 0 ; for ( Column column : columns ) { Optional < Anonymizer > optional = dataAnonymizer . getAnonymizer ( table . getName ( ) , column . getName ( ) ) ; if ( optional . isPresent ( ) ) { Anonymizer anonymizer = optional . get ( ) ; Object original = objects . get ( index ) ; if ( original != null ) objects . set ( index , anonymizer . anonymize ( original ) ) ; } } } } }

Fix:
if ( ( ( dataAnonymizer ) != null ) && ( dataAnonymizer . shouldAnonymize ( ) ) ) {
Buggy code:
public class GStraight3 extends GLineType3 { public GStraight3 ( ) { } public GStraight3 ( GSegment3 s ) { } public GStraight3 ( GPoint3 point1 , GPoint3 point2 ) throws TypeBuildException { } public GStraight3 ( GPoint3 point , GVector3 vector ) throws TypeBuildException { } public GStraight3 ( GStraight3 s ) { } @ Override public boolean equals ( GType obj ) { } @ Override public double distance ( GType obj ) { } @ Override public boolean cross ( GType obj ) { } @ Override public GType [ ] crossResults ( GType obj ) { } protected double distance ( GPoint3 p ) { GVector3 v1 ; GVector3 v2 ; v1 = new GVector3 ( p , p1 ) ; v2 = new GVector3 ( p , p2 ) ; <START_BUG> return ( v1 . product ( v2 ) . length ( ) ) // ( 2 * ( p1 . distance ( p2 ) ) ) ; <END_BUG> } protected boolean cross ( GPoint3 p ) { } protected GType [ ] crossResults ( GPoint3 p ) { } protected double distance ( GStraight3 s ) { } protected boolean cross ( GStraight3 s ) { } protected GType [ ] crossResults ( GStraight3 s ) { } private double solve ( double a1 , double b1 , double a2 , double b2 , double x1 , double y1 , double x2 , double y2 ) { } @ Override public GVector3 getVector ( ) { } }

Fix:
return ( v1 . product ( v2 ) . length ( ) ) // ( p1 . distance ( p2 ) ) ;
Buggy code:
public class PersistenceUnitParseProcessor implements DeploymentUnitProcessor { private static final String WEB_PERSISTENCE_XML = "WEB-INF//classes//META-INF//persistence.xml" ; private static final String META_INF_PERSISTENCE_XML = "META-INF//persistence.xml" ; private static final String JAR_FILE_EXTENSION = ".jar" ; private static final String LIB_FOLDER = "lib" ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( DeploymentUnit context ) { } private void handleJarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void handleWarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void handleEarDeployment ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void parse ( final VirtualFile persistence_xml , final List < PersistenceUnitMetadataHolder > listPUHolders , final DeploymentUnit deploymentUnit ) throws DeploymentUnitProcessingException { } private void postParseSteps ( final VirtualFile persistence_xml , final PersistenceUnitMetadataHolder puHolder , final DeploymentUnit deploymentUnit ) { } private static URL getRelativeURL ( VirtualFile persistence_xml , String jar , boolean convertVFS ) { } private URL getPersistenceUnitURL ( VirtualFile persistence_xml , boolean convertVFS ) { try { VirtualFile metaData = persistence_xml ; <START_BUG> return convertVFS ? metaData . getPhysicalFile ( ) . getParentFile ( ) . getParentFile ( ) . toURI ( ) . toURL ( ) : metaData . getParent ( ) . getParent ( ) . toURL ( ) ; <END_BUG> } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } private PersistenceUnitMetadataHolder normalize ( List < PersistenceUnitMetadataHolder > listPUHolders ) { } static boolean isEarDeployment ( final DeploymentUnit context ) { } static boolean isWarDeployment ( final DeploymentUnit context ) { } private static String getScopedDeploymentUnitPath ( DeploymentUnit deploymentUnit ) { } public static String createBeanName ( DeploymentUnit deploymentUnit , String persistenceUnitName ) { } private void markDU ( PersistenceUnitMetadataHolder holder , DeploymentUnit deploymentUnit ) { } private void incrementPersistenceUnitCount ( DeploymentUnit topDeploymentUnit , int persistenceUnitCount ) { } private void addApplicationDependenciesOnProvider ( DeploymentUnit topDeploymentUnit , PersistenceUnitMetadataHolder holder ) { } private PersistenceUnitsInApplication getPersistenceUnitsInApplication ( DeploymentUnit topDeploymentUnit ) { } }

Fix:
return convertVFS ? metaData . getParent ( ) . getParent ( ) . getPhysicalFile ( ) . toURI ( ) . toURL ( ) : metaData . getParent ( ) . getParent ( ) . toURL ( ) ;
Buggy code:
public interface MultivariateJacobianFunction { <START_BUG> Pair < RealVector , RealMatrix > value ( double [ ] point ) ; <END_BUG> }

Fix:
Pair < RealVector , RealMatrix > value ( RealVector point ) ;