nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WorkingSetRegistry { private static final String DEFAULT_PAGE_ID = "org.eclipse.ui.resourceWorkingSetPage" ; private HashMap workingSetDescriptors = new HashMap ( ) ; public void addWorkingSetDescriptor ( WorkingSetDescriptor descriptor ) { } public IWorkingSetPage getDefaultWorkingSetPage ( ) { } public WorkingSetDescriptor getWorkingSetDescriptor ( String pageId ) { } public WorkingSetDescriptor [ ] getWorkingSetDescriptors ( ) { } public IWorkingSetPage getWorkingSetPage ( String pageId ) { } public void load ( ) { WorkingSetRegistryReader reader = new WorkingSetRegistryReader ( ) ; <START_BUG> reader . readWorkingSets ( Platform . getPluginRegistry ( ) , this ) ; <END_BUG> } public void removeWorkingSetDescriptor ( String id ) { } }

Fix:
reader . readWorkingSets ( Platform . getExtensionRegistry ( ) , this ) ;
Buggy code:
public class EventSourceTransportHandler extends AbstractHttpSendingTransportHandler { @ Override public TransportType getTransportType ( ) { } @ Override protected MediaType getContentType ( ) { } @ Override public StreamingSockJsSession createSession ( String sessionId , WebSocketHandler handler ) { <START_BUG> Assert . state ( ( ( getSockJsConfig ( ) ) != null ) , "This<seq2seq4repair_space>transport<seq2seq4repair_space>requires<seq2seq4repair_space>SockJsConfiguration" ) ; <END_BUG> return new StreamingSockJsSession ( sessionId , getSockJsConfig ( ) , handler ) { @ Override protected void writePrelude ( ) throws IOException { getResponse ( ) . getBody ( ) . write ( '\r' ) ; getResponse ( ) . getBody ( ) . write ( '\n' ) ; getResponse ( ) . flush ( ) ; } } ; } @ Override protected FrameFormat getFrameFormat ( ServerHttpRequest request ) { } }

Fix:
Assert . notNull ( getSockJsConfig ( ) , "This<seq2seq4repair_space>transport<seq2seq4repair_space>requires<seq2seq4repair_space>SockJsConfiguration" ) ;
Buggy code:
public class PlayerScreen extends BasicGameState { private static int gameState ; private PlayerClass player ; private TiledMap background ; private Image plus ; private Image [ ] playersAttacks ; private int [ ] knownAttacks ; Color greyLight ; Color greyDark ; public PlayerScreen ( int gameState ) { } public void init ( GameContainer gc , StateBasedGame sbg ) throws SlickException { <START_BUG> this . player = player . getInstance ( ) ; <END_BUG> this . background = new TiledMap ( "NewEra-Beta//res//map//PlayerMenu.tmx" ) ; this . plus = new Image ( "NewEra-Beta//res//buttons//plus.png" ) ; this . playersAttacks = this . player . getAttackImages ( ) ; this . knownAttacks = this . player . getAttacksKnown ( ) ; this . greyLight = new Color ( 0 , 0 , 0 , 0.3F ) ; this . greyDark = new Color ( 0 , 0 , 0 , 0.7F ) ; } public void render ( GameContainer gc , StateBasedGame sbg , Graphics g ) throws SlickException { } public void update ( GameContainer gc , StateBasedGame sbg , int delta ) throws SlickException { } public int getID ( ) { } }

Fix:
this . player = this . player . getInstance ( ) ;
Buggy code:
class CComboTab extends Tab { CCombo combo1 ; Group comboGroup ; Button flatButton ; Button readOnlyButton ; static String [ ] ListData = new String [ ] { ControlExample . getResourceString ( "ListData1_0" ) , ControlExample . getResourceString ( "ListData1_1" ) , ControlExample . getResourceString ( "ListData1_2" ) , ControlExample . getResourceString ( "ListData1_3" ) , ControlExample . getResourceString ( "ListData1_4" ) , ControlExample . getResourceString ( "ListData1_5" ) , ControlExample . getResourceString ( "ListData1_6" ) , ControlExample . getResourceString ( "ListData1_7" ) , ControlExample . getResourceString ( "ListData1_8" ) } ; CComboTab ( ControlExample instance ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; comboGroup = new Group ( exampleGroup , SWT . NONE ) ; comboGroup . setLayout ( new GridLayout ( ) ) ; <START_BUG> comboGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> comboGroup . setText ( ControlExample . getResourceString ( "Custom_Combo" ) ) ; } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
comboGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
public class TestPorterStemFilter extends BaseTokenStreamTestCase { Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testPorterStemFilter ( ) throws Exception { } public void testWithKeywordAttribute ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , a , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class CopyAction extends AbstractColumbaAction { FrameMediator frameController ; public CopyAction ( FrameMediator frameController ) { } public void actionPerformed ( ActionEvent arg0 ) { ClipboardManager . getInstance ( ) . setOperation ( COPY_ACTION ) ; <START_BUG> ClipboardManager . getInstance ( ) . setMessageSelection ( ( ( FolderCommandReference ) ( ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( frameController ) ) . getTableSelection ( ) ) ) ) ; <END_BUG> } }

Fix:
ClipboardManager . getInstance ( ) . setSelection ( ( ( FolderCommandReference ) ( ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( frameController ) ) . getTableSelection ( ) ) ) ) ;
Buggy code:
public class Chess { public static void main ( String [ ] args ) { Board board = new Board ( ) ; Pieces blackSet = new Pieces ( board , 0 ) ; Pieces whiteSet = new Pieces ( board , 1 ) ; TextDisplay display = new TextDisplay ( ) ; HumanPlayer player1 = new HumanPlayer ( "Player1" , whiteSet , board ) ; <START_BUG> RandomPlayer player2 = new RandomPlayer ( "Player2" , blackSet , board ) ; <END_BUG> player1 . setOpponent ( player2 ) ; player2 . setOpponent ( player1 ) ; int whiteColl = 15 ; int blackColl = 15 ; display . showPiecesOnBoard ( player1 . getBoard ( ) . getData ( ) ) ; while ( ( ( player1 . getPieces ( ) . getPiece ( whiteColl ) . getChar ( ) ) == 'k' ) && ( ( player2 . getPieces ( ) . getPiece ( blackColl ) . getChar ( ) ) == 'K' ) ) { System . out . println ( ( ( player1 . toString ( ) ) + "<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>your<seq2seq4repair_space>turn!" ) ) ; player1 . getMove ( ) ; if ( player1 . isPieceTaken ( ) ) player1 . defeatPiece ( player2 ) ; else player1 . justMove ( ) ; blackColl = ( player2 . getPieces ( ) . getNumPieces ( ) ) - 1 ; if ( ! ( ( player2 . getPieces ( ) . getPiece ( blackColl ) . getChar ( ) ) == 'K' ) ) { System . out . println ( "Player1<seq2seq4repair_space>won!" ) ; break ; } display . showPiecesOnBoard ( player2 . getBoard ( ) . getData ( ) ) ; System . out . println ( ( ( player2 . toString ( ) ) + "<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>your<seq2seq4repair_space>turn!" ) ) ; player2 . getMove ( ) ; if ( player2 . isPieceTaken ( ) ) player2 . defeatPiece ( player1 ) ; else player2 . justMove ( ) ; whiteColl = ( player1 . getPieces ( ) . getNumPieces ( ) ) - 1 ; if ( ( player1 . getPieces ( ) . getPiece ( whiteColl ) . getChar ( ) ) != 'k' ) { System . out . println ( "Player2<seq2seq4repair_space>won!" ) ; break ; } display . showPiecesOnBoard ( player1 . getBoard ( ) . getData ( ) ) ; System . out . print ( ( ( "\nPlayer<seq2seq4repair_space>1<seq2seq4repair_space>has<seq2seq4repair_space>" + ( player1 . getPieces ( ) . getNumPieces ( ) ) ) + "<seq2seq4repair_space>pieces." ) ) ; System . out . println ( ( ( "Player<seq2seq4repair_space>2<seq2seq4repair_space>has<seq2seq4repair_space>" + ( player2 . getPieces ( ) . getNumPieces ( ) ) ) + "<seq2seq4repair_space>pieces.\n" ) ) ; } } No newline ; at end ; of file ; }

Fix:
AgressivePlayer player2 = new AgressivePlayer ( "Player2" , blackSet , board ) ;
Buggy code:
public interface ModelUpdateOperationHandler extends ModelQueryOperationHandler { <START_BUG> Cancellable execute ( NewOperationContext context , ModelNode operation , ResultHandler resultHandler ) ; <END_BUG> }

Fix:
Cancellable execute ( OperationContext context , ModelNode operation , ResultHandler resultHandler ) ;
Buggy code:
public class PackageDeclaration extends ASTNode { public static final ChildPropertyDescriptor JAVADOC_PROPERTY = new ChildPropertyDescriptor ( PackageDeclaration . class , "javadoc" , Javadoc . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY = new ChildListPropertyDescriptor ( PackageDeclaration . class , "annotations" , Annotation . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( PackageDeclaration . class , "name" , Name . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } Javadoc optionalDocComment = null ; private ASTNode . NodeList annotations = null ; private Name packageName = null ; PackageDeclaration ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { PackageDeclaration result = new PackageDeclaration ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> if ( ( this . ast . apiLevel ) >= ( AST . JLS3 ) ) { result . setJavadoc ( ( ( Javadoc ) ( ASTNode . copySubtree ( target , getJavadoc ( ) ) ) ) ) ; result . annotations ( ) . addAll ( ASTNode . copySubtrees ( target , annotations ( ) ) ) ; } result . setName ( ( ( Name ) ( getName ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List annotations ( ) { } public Javadoc getJavadoc ( ) { } public void setJavadoc ( Javadoc docComment ) { } public Name getName ( ) { } public void setName ( Name name ) { } public IPackageBinding resolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class AgentController extends ChannelInboundHandlerAdapter { private static final Logger LOGGER = LoggerFactory . getLogger ( AgentController . class ) ; private AgentConnectionGroup group ; private AgentConnection conn ; public AgentController ( AgentConnectionGroup group ) { } @ Override public void channelActive ( ChannelHandlerContext ctx ) throws Exception { AgentController . LOGGER . debug ( "agent<seq2seq4repair_space>connected.<seq2seq4repair_space>remote<seq2seq4repair_space>address:<seq2seq4repair_space>{}" , ctx . channel ( ) . remoteAddress ( ) ) ; setAgentConnection ( new AgentConnection ( ) ) ; conn . setChannel ( ctx . channel ( ) ) ; if ( ! ( group . addAgentConnection ( conn ) ) ) { ctx . close ( ) ; return ; } TunnelInitRequest req = new TunnelInitRequest ( ) ; req . setVersion ( IntranetTunnelV1 ) ; req . setEhost ( group . getEhost ( ) ) ; req . setEport ( group . getEport ( ) ) ; req . setSign ( group . getSign ( ) ) ; <START_BUG> ctx . writeAndFlush ( req ) . sync ( ) ; <END_BUG> } @ Override public void channelRead ( ChannelHandlerContext ctx , Object msg ) throws Exception { } @ Override public void channelInactive ( ChannelHandlerContext ctx ) throws Exception { } @ Override public void exceptionCaught ( ChannelHandlerContext ctx , Throwable cause ) throws Exception { } public void setAgentConnection ( AgentConnection conn ) { } }

Fix:
ctx . writeAndFlush ( req ) ;
Buggy code:
public class AssertionGui extends AbstractAssertionGui { private static final long serialVersionUID = 240L ; private static final String COL_RESOURCE_NAME = "assertion_patterns_to_test" ; private JRadioButton responseStringButton ; private JRadioButton urlButton ; private JRadioButton responseMessageButton ; private JRadioButton responseCodeButton ; private JRadioButton responseHeadersButton ; private JCheckBox assumeSuccess ; private JRadioButton containsBox ; private JRadioButton matchesBox ; private JRadioButton equalsBox ; private JRadioButton substringBox ; private JCheckBox notBox ; private JTable stringTable ; private JButton addPattern ; private JButton deletePattern ; private PowerTableModel tableModel ; public AssertionGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement el ) { } @ Override public void clearGui ( ) { } @ Override public void configure ( TestElement el ) { } private void init ( ) { setLayout ( new BorderLayout ( ) ) ; Box box = Box . createVerticalBox ( ) ; setBorder ( makeBorder ( ) ) ; box . add ( makeTitlePanel ( ) ) ; <START_BUG> box . add ( createScopePanel ( ) ) ; <END_BUG> box . add ( createFieldPanel ( ) ) ; box . add ( createTypePanel ( ) ) ; add ( box , BorderLayout . NORTH ) ; add ( createStringPanel ( ) , BorderLayout . CENTER ) ; } private JPanel createFieldPanel ( ) { } private JPanel createTypePanel ( ) { } private JPanel createStringPanel ( ) { } private JPanel createButtonPanel ( ) { } private class ClearPatternsListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { } } private class AddPatternListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { } } }

Fix:
box . add ( createScopePanel ( true ) ) ;
Buggy code:
public class Alarm { public static final int MINUTES_IN_HOUR = 50 ; public static List < TileEntityAlarm > getAllAlarms ( List < EntityPlayer > playerEntities ) { } public static TileEntityAlarm findNearbyAlarm ( EntityPlayer player ) { } @ SuppressWarnings ( "unchecked" ) public static void sleepWorld ( WorldServer world ) { List < TileEntityAlarm > alarms = Alarm . getAllAlarms ( world . playerEntities ) ; int mntTotal = 0 ; for ( TileEntityAlarm alarm : alarms ) { mntTotal += MinecraftTime . extrapolateTime ( alarm . getHour ( ) , alarm . getMinute ( ) ) ; } if ( ( alarms . size ( ) ) != 0 ) mntTotal //= alarms . size ( ) ; else mntTotal = 0 ; long curTime = world . getWorldTime ( ) ; <START_BUG> if ( mntTotal == 0 ) { <END_BUG> long i = curTime + 24000L ; i -= i % 24000 ; i += Config . defaultWakeUpTime ; i += world . rand . nextInt ( oversleepWithoutAlarm ) ; world . setWorldTime ( i ) ; } else { long i = curTime ; if ( mntTotal <= ( curTime % 24000 ) ) i += 24000L ; i -= i % 24000 ; i += mntTotal ; i += world . rand . nextInt ( ( ( Config . oversleepWithAlarm ) // ( alarms . size ( ) ) ) ) ; world . setWorldTime ( i ) ; } MinecraftTime time = MinecraftTime . getFromWorldTime ( world . getWorldTime ( ) ) ; for ( EntityPlayer player : ( ( List < EntityPlayer > ) ( world . playerEntities ) ) ) { if ( player . isPlayerSleeping ( ) ) player . wakeUpPlayer ( false , false , true ) ; player . addChatMessage ( new net . minecraft . util . ChatComponentText ( ( "Good<seq2seq4repair_space>morning!<seq2seq4repair_space>It<seq2seq4repair_space>is<seq2seq4repair_space>" + ( time . toString ( ) ) ) ) ) ; } if ( ( Config . chanceToStopRain ) >= ( world . rand . nextDouble ( ) ) ) world . provider . resetRainAndThunder ( ) ; } public static boolean canNotSleep ( ) { } }

Fix:
if ( ( alarms . size ( ) ) == 0 ) {
Buggy code:
public class GetMaxHealth extends IArgument { @ ArgumentDescription ( description = "Returns<seq2seq4repair_space>the<seq2seq4repair_space>maximum<seq2seq4repair_space>health<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>entity" , parameterdescription = { "entity" } , returntype = ParameterType . Number , rparams = { ParameterType . Entity } ) public GetMaxHealth ( ) { } @ Override public Object getArgument ( Object [ ] obj , SpellInformationObject so ) { if ( ! ( ( obj [ 0 ] ) instanceof Entity [ ] ) ) { return 0 ; } LivingEntity e = ( ( LivingEntity ) ( ( ( Entity [ ] ) ( obj [ 0 ] ) ) [ 0 ] ) ) ; if ( e instanceof Player ) { <START_BUG> Player p = ( ( Player ) ( obj [ 0 ] ) ) ; <END_BUG> PlayerData pd = PlayerData . getPlayerData ( p . getUniqueId ( ) ) ; if ( DamageConverter . isEnabledInWorld ( p . getWorld ( ) ) ) return pd . getHpsystem ( ) . getMaxHP ( ) ; } return e . getMaxHealth ( ) ; } No newline ; at end ; of file ; }

Fix:
Player p = ( ( Player ) ( e ) ) ;
Buggy code:
public abstract class AbstractEstimator implements Estimator { protected AbstractEstimator ( ) { } public final void setMaxCostEval ( int maxCostEval ) { } public final int getCostEvaluations ( ) { } public final int getJacobianEvaluations ( ) { } protected void updateJacobian ( ) { } protected final void incrementJacobianEvaluationsCounter ( ) { } protected void updateResidualsAndCost ( ) throws EstimationException { } public double getRMS ( EstimationProblem problem ) { } public double getChiSquare ( EstimationProblem problem ) { } public double [ ] [ ] getCovariances ( EstimationProblem problem ) throws EstimationException { updateJacobian ( ) ; final int rows = problem . getMeasurements ( ) . length ; final int cols = problem . getUnboundParameters ( ) . length ; final int max = cols * rows ; double [ ] [ ] jTj = new double [ cols ] [ cols ] ; for ( int i = 0 ; i < cols ; ++ i ) { for ( int j = i ; j < cols ; ++ j ) { double sum = 0 ; for ( int k = 0 ; k < max ; k += cols ) { sum += ( jacobian [ ( k + i ) ] ) * ( jacobian [ ( k + j ) ] ) ; } jTj [ i ] [ j ] = sum ; jTj [ j ] [ i ] = sum ; } } try { return ( ( org . apache . commons . math . linear . RealMatrixImpl ) ( new org . apache . commons . math . linear . RealMatrixImpl ( jTj , false ) . inverse ( ) ) ) . getDataRef ( ) ; } catch ( InvalidMatrixException ime ) { <START_BUG> throw new EstimationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>compute<seq2seq4repair_space>covariances:<seq2seq4repair_space>singular<seq2seq4repair_space>problem" , new Object [ 0 ] ) ; <END_BUG> } } public double [ ] guessParametersErrors ( EstimationProblem problem ) throws EstimationException { } protected void initializeEstimate ( EstimationProblem problem ) { } public abstract void estimate ( EstimationProblem problem ) throws EstimationException { } protected WeightedMeasurement [ ] measurements ; protected EstimatedParameter [ ] parameters ; protected double [ ] jacobian ; protected int cols ; protected int rows ; protected double [ ] residuals ; protected double cost ; private int maxCostEval ; private int costEvaluations ; private int jacobianEvaluations ; }

Fix:
throw new EstimationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>compute<seq2seq4repair_space>covariances:<seq2seq4repair_space>singular<seq2seq4repair_space>problem" , null ) ;
Buggy code:
public class TransactionalSpoutBatchExecutor implements IRichBolt { TransactionalOutputCollectorImpl _collector ; ITransactionalSpout _spout ; public TransactionalSpoutBatchExecutor ( ITransactionalSpout spout ) { } @ Override public void prepare ( Map conf , TopologyContext context , OutputCollector collector ) { } @ Override public void execute ( Tuple input ) { _collector . setAnchor ( input ) ; _spout . emitBatch ( ( ( TransactionAttempt ) ( input . getValue ( 0 ) ) ) , _collector ) ; <START_BUG> _collector . ack ( ) ; <END_BUG> } @ Override public void cleanup ( ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } }

Fix:
_collector . ack ( input ) ;
Buggy code:
public class TriggerNextBuildWrapper extends BuildWrapper { private static final Logger LOGGER = Logger . getLogger ( TriggerNextBuildWrapper . class . getName ( ) ) ; private final String triggerIfResult ; private final NodeParameterDefinition nodeParameterDefinition ; public TriggerNextBuildWrapper ( NodeParameterDefinition nodeParameterDefinition ) { } public BuildStepMonitor getRequiredMonitorService ( ) { } @ Override public Environment setUp ( AbstractBuild build , Launcher launcher , BuildListener listener ) throws IOException , InterruptedException { } private void triggerAllBuildsConcurrent ( AbstractBuild build , BuildListener listener ) { final List < String > newBuildNodes = new ArrayList < String > ( ) ; final ParametersAction origParamsAction = build . getAction ( ParametersAction . class ) ; final List < ParameterValue > origParams = origParamsAction . getParameters ( ) ; final List < ParameterValue > newPrams = new ArrayList < ParameterValue > ( ) ; for ( ParameterValue parameterValue : origParams ) { if ( parameterValue instanceof LabelParameterValue ) { if ( parameterValue instanceof NodeParameterValue ) { NodeParameterValue origNodePram = ( ( NodeParameterValue ) ( parameterValue ) ) ; List < String > nextNodes = origNodePram . getNextLabels ( ) ; if ( nextNodes != null ) { listener . getLogger ( ) . print ( ( "next<seq2seq4repair_space>nodes:<seq2seq4repair_space>" + nextNodes ) ) ; newBuildNodes . addAll ( nextNodes ) ; } } } else { newPrams . add ( parameterValue ) ; } } for ( String nodeName : newBuildNodes ) { final List < String > singleNodeList = new ArrayList < String > ( ) ; singleNodeList . add ( nodeName ) ; final NodeParameterValue nodeParameterValue = new NodeParameterValue ( nodeName , singleNodeList ) ; <START_BUG> List < ParameterValue > copies = new ArrayList < ParameterValue > ( ) ; <END_BUG> Collections . copy ( copies , newPrams ) ; copies . add ( nodeParameterValue ) ; listener . getLogger ( ) . print ( ( "schedule<seq2seq4repair_space>build<seq2seq4repair_space>on<seq2seq4repair_space>node<seq2seq4repair_space>" + nodeName ) ) ; build . getProject ( ) . scheduleBuild ( 0 , new NextLabelCause ( nodeName ) , new ParametersAction ( copies ) ) ; } } private class TriggerNextBuildEnvironment extends Environment { @ Override public boolean tearDown ( AbstractBuild build , BuildListener listener ) throws IOException , InterruptedException { } private void triggerBuilds ( AbstractBuild build , BuildListener listener ) { } private boolean shouldScheduleNextJob ( Result buildResult , String runIfResult ) { } } }

Fix:
List < ParameterValue > copies = new ArrayList < ParameterValue > ( newPrams . size ( ) ) ;
Buggy code:
@ NotThreadSafe final class SparseHll implements HllInstance { private static final int SPARSE_INSTANCE_SIZE = ClassLayout . parseClass ( SparseHll . class ) . instanceSize ( ) ; private static final int VALUE_BITS = 6 ; private static final int VALUE_MASK = ( 1 << ( SparseHll . VALUE_BITS ) ) - 1 ; private static final int EXTENDED_PREFIX_BITS = ( Integer . SIZE ) - ( SparseHll . VALUE_BITS ) ; private final byte indexBitLength ; private short numberOfEntries ; private int [ ] entries ; public SparseHll ( int indexBitLength ) { } public SparseHll ( Slice serialized ) { } public static boolean canDeserialize ( Slice serialized ) { } public void insertHash ( long hash ) { } private int encode ( long hash ) { } private static int encode ( int bucketIndex , int value ) { } private static int decodeBucketIndex ( int entry ) { } private static int decodeBucketValue ( int entry ) { } private static int decodeBucketIndex ( int indexBitLength , int entry ) { } public void mergeWith ( SparseHll other ) { } public DenseHll toDense ( ) { } @ Override public long cardinality ( ) { <START_BUG> int totalBuckets = Utils . numberOfBuckets ( Short . SIZE ) ; <END_BUG> int zeroBuckets = totalBuckets - ( numberOfEntries ) ; return Math . round ( Utils . linearCounting ( zeroBuckets , totalBuckets ) ) ; } @ Override public int estimatedInMemorySize ( ) { } @ Override public int getIndexBitLength ( ) { } private int searchBucket ( int bucketIndex ) { } private int [ ] mergeEntries ( SparseHll other ) { } public Slice serialize ( ) { } @ Override public int estimatedSerializedSize ( ) { } private static void validatePrefixLength ( int indexBitLength ) { } @ VisibleForTesting public void verify ( ) { } }

Fix:
int totalBuckets = Utils . numberOfBuckets ( SparseHll . EXTENDED_PREFIX_BITS ) ;
Buggy code:
public class App1Test2 { private static final Log log = LogFactory . getLog ( App1Test2 . class ) ; public static void main ( String [ ] args ) throws Exception { <START_BUG> List < String > gets = Arrays . asList ( new String [ ] { "//app1//wicket//bookmarkable//org.apache.wicket.threadtest.apps.app1.Home" } ) ; <END_BUG> SimpleGetCommand getCmd = new SimpleGetCommand ( gets , 5 ) ; Tester tester = new Tester ( getCmd , 100 , false ) ; tester . run ( ) ; } }

Fix:
List < String > gets = Arrays . asList ( "//app1//wicket//bookmarkable//org.apache.wicket.threadtest.apps.app1.Home" ) ;
Buggy code:
public class DomainFinalResultHandler implements OperationStepHandler { private final DomainOperationContext domainOperationContext ; public DomainFinalResultHandler ( DomainOperationContext domainOperationContext ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private boolean collectDomainFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectContextFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectHostFailures ( final OperationContext context , final boolean isDomain ) { } private ModelNode getSingleHostResult ( ) { } private void populateServerGroupResults ( final OperationContext context , final ModelNode result ) { final Set < String > groupNames = new TreeSet < String > ( ) ; final Map < String , Set < DomainFinalResultHandler . HostServer > > groupToServerMap = new HashMap < String , Set < DomainFinalResultHandler . HostServer > > ( ) ; for ( Map . Entry < ServerIdentity , ModelNode > entry : domainOperationContext . getServerResults ( ) . entrySet ( ) ) { final String serverGroup = entry . getKey ( ) . getServerGroupName ( ) ; groupNames . add ( serverGroup ) ; final String hostName = entry . getKey ( ) . getHostName ( ) ; <START_BUG> final String serverName = entry . getKey ( ) . getHostName ( ) ; <END_BUG> if ( ! ( groupToServerMap . containsKey ( serverGroup ) ) ) { groupToServerMap . put ( serverGroup , new TreeSet < DomainFinalResultHandler . HostServer > ( ) ) ; } groupToServerMap . get ( serverGroup ) . add ( new DomainFinalResultHandler . HostServer ( hostName , serverName , entry . getValue ( ) ) ) ; } boolean serverGroupSuccess = false ; for ( String groupName : groupNames ) { final ModelNode groupNode = new ModelNode ( ) ; if ( domainOperationContext . isServerGroupRollback ( groupName ) ) { } else { serverGroupSuccess = true ; } for ( DomainFinalResultHandler . HostServer hostServer : groupToServerMap . get ( groupName ) ) { final ModelNode serverNode = new ModelNode ( ) ; serverNode . get ( HOST ) . set ( hostServer . hostName ) ; serverNode . get ( RESPONSE ) . set ( hostServer . result ) ; groupNode . get ( hostServer . serverName ) . set ( serverNode ) ; } result . get ( SERVER_GROUPS ) . add ( groupName , groupNode ) ; } if ( ! serverGroupSuccess ) { context . getFailureDescription ( ) . set ( "Operation<seq2seq4repair_space>failed<seq2seq4repair_space>or<seq2seq4repair_space>was<seq2seq4repair_space>rolled<seq2seq4repair_space>back<seq2seq4repair_space>on<seq2seq4repair_space>all<seq2seq4repair_space>servers." ) ; } } private boolean isDomainOperation ( final ModelNode operation ) { } private class HostServer implements Comparable < DomainFinalResultHandler . HostServer > { private final String hostName ; private final String serverName ; private final ModelNode result ; private HostServer ( String hostName , String serverName , ModelNode result ) { } public int compareTo ( DomainFinalResultHandler . HostServer hostServer ) { } } }

Fix:
final String serverName = entry . getKey ( ) . getServerName ( ) ;
Buggy code:
public class Payment extends Activity { public final String ME_URL = "https:////api.venmo.com//v1//me?access_token=" ; EditText editText ; Button button ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void addListenerOnButton ( ) { final Context context = this ; button = ( ( Button ) ( findViewById ( button1 ) ) ) ; button . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View arg0 ) { Intent intent = new Intent ( context , Payment_Step2 . class ) ; <START_BUG> intent . putExtra ( "amount" , editText . getText ( ) . toString ( ) . substring ( 1 ) ) ; <END_BUG> startActivity ( intent ) ; } } ) ; } public void addListenerOnButton2 ( ) { } public void addNum ( View v ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private class InfoRequestTask extends AsyncTask < String , Void , String > { @ Override protected String doInBackground ( String ... uri ) { } @ Override protected void onPostExecute ( String result ) { } } }

Fix:
intent . putExtra ( "amount" , editText . getText ( ) . toString ( ) ) ;
Buggy code:
public class RunningMedian { private MyHeap < Integer > min ; private MyHeap < Integer > max ; public RunningMedian ( ) { } public int getMedian ( ) { if ( ( ( min . size ( ) ) == 0 ) && ( ( max . size ( ) ) == 0 ) ) { throw new NoSuchElementException ( ) ; } else <START_BUG> if ( ( ( min . size ( ) ) + ( ( max . size ( ) ) % 2 ) ) == 0 ) { <END_BUG> return ( ( min . peek ( ) ) + ( max . peek ( ) ) ) // 2 ; } else { if ( ( min . size ( ) ) > ( max . size ( ) ) ) { return min . peek ( ) ; } return max . peek ( ) ; } } public void add ( int x ) { } }

Fix:
if ( ( ( ( min . size ( ) ) + ( max . size ( ) ) ) % 2 ) == 0 ) {
Buggy code:
public class TwoPhaseCommitEventProcessor implements ISharedObjectContainerTransaction , IEventProcessor { public static final Trace trace = Trace . create ( "twophasecommiteventprocessor" ) ; AbstractSharedObject sharedObject = null ; byte transactionState = ISharedObjectContainerTransaction . ACTIVE ; Object lock = new Object ( ) ; List participants = new Vector ( ) ; Map failed = new HashMap ( ) ; int timeout = ITransactionConfiguration . DEFAULT_TIMEOUT ; int minFailedToAbort = 0 ; long identifier = 0 ; ITransactionParticipantsFilter participantsFilter = null ; public TwoPhaseCommitEventProcessor ( AbstractSharedObject bse , ITransactionConfiguration config ) { } protected void trace ( String msg ) { } protected void traceStack ( String msg , Throwable t ) { } protected int getTimeout ( ) { } protected int getMinFailedToAbort ( ) { } protected boolean isPrimary ( ) { } protected AbstractSharedObject getSharedObject ( ) { } protected ID getHomeID ( ) { <START_BUG> return getSharedObject ( ) . getHomeID ( ) ; <END_BUG> } protected void addParticipants ( ID [ ] ids ) { } protected void removeParticipant ( ID id ) { } protected void addFailed ( ID remote , Throwable failure ) { } protected ISharedObjectContext getContext ( ) { } public boolean acceptEvent ( Event event ) { } public Event processEvent ( Event event ) { } protected void handleActivated ( ISharedObjectActivatedEvent event ) { } protected void replicateTo ( ID [ ] remotes ) { } protected void handlePrimaryActivated ( ISharedObjectActivatedEvent event ) { } private long getNextIdentifier ( ) { } protected void handleReplicaActivated ( ISharedObjectActivatedEvent event ) { } protected void handleJoined ( ISharedObjectContainerConnectedEvent event ) { } protected void handleCreateResponse ( ISharedObjectCreateResponseEvent event ) { } protected void handleDeparted ( ISharedObjectContainerDisconnectedEvent event ) { } protected void handleVotingCompletedCreateResponse ( ID fromID , Throwable e , long identifier ) { } protected void handlePostCommitFailure ( ID fromID , Throwable e , long identifier ) { } protected void sendCommit ( ) throws SharedObjectAddAbortException { } public byte getTransactionState ( ) { } protected void setTransactionState ( byte state ) { } public void waitToCommit ( ) throws SharedObjectAddAbortException { } protected void doTMAbort ( Throwable except ) throws SharedObjectAddAbortException { } protected void doTMCommit ( ) throws SharedObjectAddAbortException { } protected void localCommitted ( ) { } protected boolean isVotingCompleted ( ) throws SharedObjectAddAbortException { } }

Fix:
return getSharedObject ( ) . getPrimaryContainerID ( ) ;
Buggy code:
public class TimeSurface implements Surface { private final int gxlo_ ; private final int gxhi_ ; private final int gylo_ ; private final int gyhi_ ; private final double dtlo_ ; private final double dthi_ ; private final double dylo_ ; private final double dyhi_ ; private final boolean ylog_ ; private final boolean yflip_ ; private final Tick [ ] tticks_ ; private final Tick [ ] yticks_ ; private final String tlabel_ ; private final String ylabel_ ; private final Captioner captioner_ ; private final boolean grid_ ; private final TimeFormat tformat_ ; private final Axis tAxis_ ; private final Axis yAxis_ ; private static final boolean INVERT_Y = true ; public TimeSurface ( int gxlo , int gxhi , int gylo , int gyhi , double dtlo , double dthi , double dylo , double dyhi , boolean ylog , boolean yflip , Tick [ ] tticks , Tick [ ] yticks , String tlabel , String ylabel , Captioner captioner , boolean grid , TimeFormat tformat ) { } public Rectangle getPlotBounds ( ) { } public Insets getPlotInsets ( boolean withScroll ) { } public int getDataDimCount ( ) { } public boolean dataToGraphics ( double [ ] dpos , boolean visibleOnly , Point2D . Double gp ) { double gx = tAxis_ . dataToGraphics ( dpos [ 0 ] ) ; double gy = yAxis_ . dataToGraphics ( dpos [ 1 ] ) ; <START_BUG> if ( ( ! visibleOnly ) || ( ( ( ( gx >= ( gxlo_ ) ) && ( gx <= ( gxhi_ ) ) ) && ( gy >= ( gylo_ ) ) ) && ( gy <= ( gyhi_ ) ) ) ) { <END_BUG> gp . x = gx ; gp . y = gy ; return true ; } else { return false ; } } public boolean dataToGraphicsOffset ( double [ ] dpos0 , Point2D . Double gpos0 , double [ ] dpos1 , boolean visibleOnly , Point2D . Double gpos1 ) { } public double [ ] graphicsToData ( Point2D gp , Iterable < double [ ] > dposIt ) { } public String formatPosition ( double [ ] dpos ) { } public void paintBackground ( Graphics g ) { } public void paintForeground ( Graphics g ) { } public Captioner getCaptioner ( ) { } TimeAspect zoom ( Point2D pos , double tZoom , double yZoom ) { } TimeAspect pan ( Point2D pos0 , Point2D pos1 , boolean tFlag , boolean yFlag ) { } TimeAspect center ( double [ ] dpos , boolean tFlag , boolean yFlag ) { } TimeAspect reframe ( Rectangle frame ) { } private AxisAnnotation createAxisAnnotation ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object o ) { } public static TimeSurface createSurface ( Rectangle plotBounds , TimeAspect aspect , boolean ylog , boolean yflip , String tlabel , String ylabel , Captioner captioner , boolean grid , TimeFormat tformat , double tcrowd , double ycrowd , boolean minor ) { } }

Fix:
if ( ( ! visibleOnly ) || ( ( ( ( gx >= ( gxlo_ ) ) && ( gx < ( gxhi_ ) ) ) && ( gy >= ( gylo_ ) ) ) && ( gy < ( gyhi_ ) ) ) ) {
Buggy code:
public class OptionsTag extends TagSupport { protected static MessageResources messages = MessageResources . getMessageResources ( ( ( Constants . Package ) + ".LocalStrings" ) ) ; protected String collection = null ; public String getCollection ( ) { } public void setCollection ( String collection ) { } protected String labelName = null ; public String getLabelName ( ) { } public void setLabelName ( String labelName ) { } protected String labelProperty = null ; public String getLabelProperty ( ) { } public void setLabelProperty ( String labelProperty ) { } protected String name = null ; public String getName ( ) { } public void setName ( String name ) { } protected String property = null ; public String getProperty ( ) { } public void setProperty ( String property ) { } public int doStartTag ( ) throws JspException { } public int doEndTag ( ) throws JspException { } public void release ( ) { } protected void addOption ( StringBuffer sb , String value , String label , boolean matched ) { sb . append ( "<option<seq2seq4repair_space>value=\"" ) ; sb . append ( value ) ; sb . append ( "\"" ) ; if ( matched ) sb . append ( "<seq2seq4repair_space>selected" ) ; sb . append ( ">" ) ; <START_BUG> sb . append ( label ) ; <END_BUG> sb . append ( "<//option>\r\n" ) ; } protected Iterator getIterator ( String name , String property ) throws JspException { } }

Fix:
sb . append ( ResponseUtils . filter ( label ) ) ;
Buggy code:
public class XtendComponent extends AbstractExpressionsUsingWorkflowComponent { private String _invokeExpression ; String _extensionFile = null ; private String _expression = null ; private String _outputSlot = WorkflowContext . DEFAULT_SLOT ; private String _fileEncoding = null ; public XtendComponent ( ) { } public void setFileEncoding ( String fileEncoding ) { } @ Override public String getLogMessage ( ) { } public void setInvoke ( String invoke ) { } public void setOutputSlot ( String outputSlot ) { } @ Override public void invokeInternal2 ( final WorkflowContext ctx , final ProgressMonitor monitor , final Issues issues ) { } private boolean extensionFileExists ( ) { InputStream is = null ; try { <START_BUG> is = ResourceLoaderFactory . createResourceLoader ( ) . getResourceAsStream ( ( ( _extensionFile . replace ( NS_DELIM , "//" ) ) + ( XtendFile . FILE_EXTENSION ) ) ) ; <END_BUG> } catch ( Exception exc ) { } if ( is != null ) { try { is . close ( ) ; } catch ( Exception e ) { } } return is != null ; } @ Override public void checkConfigurationInternal ( Issues issues ) { } }

Fix:
is = ResourceLoaderFactory . createResourceLoader ( ) . getResourceAsStream ( ( ( ( _extensionFile . replace ( NS_DELIM , "//" ) ) + "." ) + ( XtendFile . FILE_EXTENSION ) ) ) ;
Buggy code:
public class PreferenceTransferElement extends WorkbenchAdapter implements IPluginContribution { private String id ; private ImageDescriptor imageDescriptor ; private IConfigurationElement configurationElement ; private IPreferenceFilter filter ; public PreferenceTransferElement ( IConfigurationElement configurationElement ) { } public IConfigurationElement getConfigurationElement ( ) { } public IPreferenceFilter getFilter ( ) throws CoreException { } public String getDescription ( ) { } public String getID ( ) { } public ImageDescriptor getImageDescriptor ( ) { } public String getName ( ) { } public String getLocalId ( ) { } public String getPluginId ( ) { <START_BUG> return ( configurationElement ) != null ? configurationElement . getDeclaringExtension ( ) . getNamespace ( ) : null ; <END_BUG> } class PreferenceFilter implements IPreferenceFilter { protected String [ ] scopes ; protected Map [ ] maps ; public String [ ] getScopes ( ) { } public Map getMapping ( String scope ) { } } }

Fix:
return ( configurationElement ) != null ? configurationElement . getNamespace ( ) : null ;
Buggy code:
public class FunctionInvoke extends Expr { static final boolean IS_DEBUG = false ; FunctionBasic func ; final ArrayList < Expr > para ; public FunctionInvoke ( FunctionBasic f , ArrayList < Expr > p ) { } void check ( ) { } @ Override boolean isChangeable ( ) { } @ Override public Expr optimize ( ) { } @ Override public String toString ( ) { } @ Override public Constant getValue ( ) { <START_BUG> Constant result = null ; <END_BUG> final Constant [ ] args = new Constant [ para . size ( ) ] ; for ( int i = 0 ; i < ( args . length ) ; i ++ ) { args [ i ] = para . get ( i ) . getValue ( ) ; } VarTable . pushTop ( ) ; int i = 0 ; for ( Constant c : args ) { if ( FunctionInvoke . IS_DEBUG ) { System . out . println ( ( ( ( ( ( ( ( "\narg[" + i ) + "]{" ) + ( para . get ( i ) ) ) + "}<seq2seq4repair_space>=<seq2seq4repair_space>" ) + c ) + "<->" ) + ( c . hashCode ( ) ) ) ) ; } VarTable . pushVar ( c ) ; i ++ ; } if ( FunctionInvoke . IS_DEBUG ) { System . out . println ( ( ( "\nInvoke<seq2seq4repair_space>" + ( func . toString ( ) ) ) + "{" ) ) ; } RunStack . invokeFunction ( lexline , filename , func ) ; try { func . run ( ) ; if ( FunctionInvoke . IS_DEBUG ) { System . out . println ( ( "\n}End<seq2seq4repair_space>Invoke#2<seq2seq4repair_space>" + ( func . toString ( ) ) ) ) ; } } catch ( ReturnResult e ) { if ( FunctionInvoke . IS_DEBUG ) { System . out . println ( ( "\n}End<seq2seq4repair_space>Invoke#1<seq2seq4repair_space>" + ( func . toString ( ) ) ) ) ; } result = e . value ; } RunStack . endInvokeFunction ( ) ; VarTable . popTop ( ) ; return result ; } No newline ; at end ; of file ; }

Fix:
Constant result = type . getInitialValue ( ) ;
Buggy code:
public class ParameterizedMethodBinding extends MethodBinding { protected MethodBinding originalMethod ; public ParameterizedMethodBinding ( final ParameterizedTypeBinding parameterizedDeclaringClass , MethodBinding originalMethod ) { } public ParameterizedMethodBinding ( final ReferenceBinding declaringClass , MethodBinding originalMethod , char [ ] [ ] alternateParamaterNames , final LookupEnvironment environment ) { } public ParameterizedMethodBinding ( ) { } public static ParameterizedMethodBinding instantiateGetClass ( TypeBinding receiverType , MethodBinding originalMethod , Scope scope ) { ParameterizedMethodBinding method = new ParameterizedMethodBinding ( ) ; method . modifiers = originalMethod . modifiers ; method . selector = originalMethod . selector ; method . declaringClass = originalMethod . declaringClass ; method . typeVariables = Binding . NO_TYPE_VARIABLES ; method . originalMethod = originalMethod ; method . parameters = originalMethod . parameters ; method . thrownExceptions = originalMethod . thrownExceptions ; ReferenceBinding genericClassType = scope . getJavaLangClass ( ) ; LookupEnvironment environment = scope . environment ( ) ; <START_BUG> TypeBinding rawType = environment . convertToRawType ( receiverType ) ; <END_BUG> method . returnType = environment . createParameterizedType ( genericClassType , new TypeBinding [ ] { environment . createWildcard ( genericClassType , 0 , rawType , null , Wildcard . EXTENDS ) } , null ) ; return method ; } public boolean hasSubstitutedParameters ( ) { } public boolean hasSubstitutedReturnType ( ) { } public MethodBinding original ( ) { } }

Fix:
TypeBinding rawType = environment . convertToRawType ( receiverType . erasure ( ) ) ;
Buggy code:
public class QuadPrefixTree extends SpatialPrefixTree { public static class Factory extends SpatialPrefixTreeFactory { @ Override protected int getLevelForDistance ( double degrees ) { QuadPrefixTree grid = new QuadPrefixTree ( ctx , QuadPrefixTree . MAX_LEVELS_POSSIBLE ) ; <START_BUG> return ( grid . getLevelForDistance ( degrees ) ) + 1 ; <END_BUG> } @ Override protected SpatialPrefixTree newSPT ( ) { } } public static final int MAX_LEVELS_POSSIBLE = 50 ; public static final int DEFAULT_MAX_LEVELS = 12 ; private final double xmin ; private final double xmax ; private final double ymin ; private final double ymax ; private final double xmid ; private final double ymid ; private final double gridW ; public final double gridH ; final double [ ] levelW ; final double [ ] levelH ; final int [ ] levelS ; final int [ ] levelN ; public QuadPrefixTree ( SpatialContext ctx , Rectangle bounds , int maxLevels ) { } public QuadPrefixTree ( SpatialContext ctx ) { } public QuadPrefixTree ( SpatialContext ctx , int maxLevels ) { } public void printInfo ( PrintStream out ) { } @ Override public int getLevelForDistance ( double dist ) { for ( int i = 0 ; i < ( ( maxLevels ) - 1 ) ; i ++ ) { if ( ( dist > ( levelW [ i ] ) ) && ( dist > ( levelH [ i ] ) ) ) { return i + 1 ; } } return maxLevels ; } @ Override public Node getNode ( Point p , int level ) { } @ Override public Node getNode ( String token ) { } @ Override public Node getNode ( byte [ ] bytes , int offset , int len ) { } @ Override public List < Node > getNodes ( Shape shape , int detailLevel , boolean inclParents ) { } private void build ( double x , double y , int level , List < Node > matches , StringBuilder str , Shape shape , int maxLevel ) { } private void checkBattenberg ( char c , double cx , double cy , int level , List < Node > matches , StringBuilder str , Shape shape , int maxLevel ) { } class QuadCell extends Node { public QuadCell ( String token ) { } public QuadCell ( String token , SpatialRelation shapeRel ) { } QuadCell ( byte [ ] bytes , int off , int len ) { } @ Override public void reset ( byte [ ] bytes , int off , int len ) { } @ Override public Collection < Node > getSubCells ( ) { } @ Override public int getSubCellsSize ( ) { } @ Override public Node getSubCell ( Point p ) { } private Shape shape ; @ Override public Shape getShape ( ) { } private Rectangle makeShape ( ) { } } }

Fix:
return grid . getLevelForDistance ( degrees ) ;
Buggy code:
public class MeanShiftCanopyJob { private static final Logger log = LoggerFactory . getLogger ( MeanShiftCanopyJob . class ) ; private MeanShiftCanopyJob ( ) { } public static void main ( String [ ] args ) throws IOException { } public static void runJob ( String input , String output , String measureClassName , double t1 , double t2 , double convergenceDelta , int maxIterations ) throws IOException { JobConf conf = new JobConf ( MeanShiftCanopyDriver . class ) ; Path outPath = new Path ( output ) ; <START_BUG> FileSystem fs = FileSystem . get ( conf ) ; <END_BUG> if ( fs . exists ( outPath ) ) { fs . delete ( outPath , true ) ; } fs . mkdirs ( outPath ) ; boolean converged = false ; boolean inputIsSequenceFile = false ; int iteration = 0 ; String clustersIn = input ; while ( ( ! converged ) && ( iteration < maxIterations ) ) { MeanShiftCanopyJob . log . info ( "Iteration<seq2seq4repair_space>{}" , iteration ) ; String clustersOut = ( output + "//canopies-" ) + iteration ; MeanShiftCanopyDriver . runJob ( clustersIn , clustersOut , measureClassName , t1 , t2 , convergenceDelta , inputIsSequenceFile ) ; converged = MeanShiftCanopyJob . isConverged ( ( clustersOut + "//part-00000" ) , conf , FileSystem . get ( conf ) ) ; clustersIn = ( output + "//canopies-" ) + iteration ; iteration ++ ; inputIsSequenceFile = true ; } } private static boolean isConverged ( String filePath , JobConf conf , FileSystem fs ) throws IOException { } }

Fix:
FileSystem fs = FileSystem . get ( outPath . toUri ( ) , conf ) ;
Buggy code:
public class MappingJacksonJsonView extends AbstractView { public static final String DEFAULT_CONTENT_TYPE = "application//json" ; private ObjectMapper objectMapper = new ObjectMapper ( ) ; private JsonEncoding encoding = JsonEncoding . UTF8 ; private boolean prefixJson = false ; private Boolean prettyPrint ; private Set < String > modelKeys ; private boolean extractValueFromSingleKeyModel = false ; private boolean disableCaching = true ; private boolean updateContentLength = false ; public MappingJacksonJsonView ( ) { } public void setObjectMapper ( ObjectMapper objectMapper ) { } private void configurePrettyPrint ( ) { } public void setEncoding ( JsonEncoding encoding ) { } public void setPrefixJson ( boolean prefixJson ) { } public void setPrettyPrint ( boolean prettyPrint ) { } public void setModelKey ( String modelKey ) { } public void setModelKeys ( Set < String > modelKeys ) { } public Set < String > getModelKeys ( ) { } @ Deprecated public void setRenderedAttributes ( Set < String > renderedAttributes ) { } @ Deprecated public Set < String > getRenderedAttributes ( ) { } public void setExtractValueFromSingleKeyModel ( boolean extractValueFromSingleKeyModel ) { } public void setDisableCaching ( boolean disableCaching ) { } public void setUpdateContentLength ( boolean updateContentLength ) { } @ Override protected void prepareResponse ( HttpServletRequest request , HttpServletResponse response ) { <START_BUG> response . setContentType ( getContentType ( ) ) ; <END_BUG> response . setCharacterEncoding ( this . encoding . getJavaName ( ) ) ; if ( this . disableCaching ) { response . addHeader ( "Pragma" , "no-cache" ) ; response . addHeader ( "Cache-Control" , "no-cache,<seq2seq4repair_space>no-store,<seq2seq4repair_space>max-age=0" ) ; response . addDateHeader ( "Expires" , 1L ) ; } } @ Override protected void renderMergedOutputModel ( Map < String , Object > model , HttpServletRequest request , HttpServletResponse response ) throws Exception { } protected Object filterModel ( Map < String , Object > model ) { } }

Fix:
setResponseContentType ( request , response ) ;